/* ==========================================================================
   حاسبة العمر — Arabic Age Calculator Website Stylesheet
   Theme: Saudi Arabia Age Calculator
   Design Tokens & Modern RTL Layout
   ========================================================================== */

:root {
  --primary: #0D7377;
  --primary-hover: #095457;
  --primary-light: #E6F4F4;
  --secondary: #F4A62A;
  --secondary-light: #FEF6E9;
  --bg-page: #F8F9FA;
  --text-main: #1A1A2E;
  --text-muted: #4B5563;
  --text-light: #6B7280;
  --cta-green: #14A44D;
  --cta-green-hover: #10853E;
  --card-bg: #FFFFFF;
  --border-subtle: #E5E7EB;
  --border-focus: #0D7377;
  --highlight-box-bg: #F0F9FF;
  --highlight-box-border: #BAE6FD;
  --footer-bg: #1A1A2E;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(13, 115, 119, 0.1);
  --transition: all 0.25s ease-in-out;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography Helpers */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary);
}

h2 {
  font-size: 1.6rem;
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 2px;
}

p {
  margin-bottom: 1rem;
  color: var(--text-main);
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background-color: #0D7377;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(10, 40, 42, 0.12);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
  direction: rtl;
}

/* Site Logo on Far Right in Arabic RTL — Pure Transparent, No White Box */
.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  line-height: 1;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-logo:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.site-logo:focus-visible {
  outline: 2px solid #F4A62A;
  outline-offset: 4px;
}

.site-logo-img {
  width: 220px;
  height: auto;
  max-width: 230px;
  max-height: 64px;
  aspect-ratio: 1024 / 341;
  object-fit: contain;
  display: block;
}

/* Nav Menu to the Left of Logo */
.nav-menu {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 8px 14px;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
  border-radius: 6px;
  line-height: 1.5;
}

.nav-link:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link:focus-visible {
  color: #FFFFFF;
  outline: 2px solid #F4A62A;
  outline-offset: 2px;
}

/* Active navigation item: restrained, elegant bottom bar with brand accent */
.nav-link.active {
  color: #FFFFFF;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 14px;
  left: 14px;
  height: 2.5px;
  background-color: #F4A62A;
  border-radius: 2px;
}

/* Hamburger button (Mobile) */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hamburger-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.hamburger-btn:focus-visible {
  outline: 2px solid #F4A62A;
  outline-offset: 2px;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Dropdown Menu */
.mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #0A5E62;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
  padding: 0.85rem 1.25rem;
  animation: fadeIn 0.2s ease-out;
}

.mobile-nav-dropdown.show {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.mobile-nav-link:focus-visible {
  outline: 2px solid #F4A62A;
  outline-offset: 2px;
}

.mobile-nav-link.active {
  background-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-weight: 700;
  border-right: 3.5px solid #F4A62A;
}

/* Hero Section */
.hero-section {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.hero-title {
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 820px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

/* Hero Deep Teal Variant (Used for /hijri) */
.hero-section.hero-teal {
  background: linear-gradient(135deg, #0D7377 0%, #084C4E 100%);
  color: #FFFFFF;
  padding: 3rem 0 2.5rem;
  margin-bottom: 0;
}

.hero-section.hero-teal .hero-title {
  color: #FFFFFF;
}

.hero-section.hero-teal .hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
}

/* Compact Full-Width Image Hero Banner (Homepage) */
.hero-image-banner {
  width: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(13, 115, 119, 0.76) 0%, rgba(8, 76, 78, 0.86) 100%),
    url('jens-aber-8OOuQCvxy-s-unsplash.webp') center 40% / cover no-repeat;
  color: #FFFFFF;
  padding: 2.75rem 1rem 2.5rem;
  position: relative;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.hero-image-banner .hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.hero-image-banner .hero-title {
  color: #FFFFFF;
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  line-height: 1.35;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.hero-image-banner .hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.75;
  margin: 0 auto;
  max-width: 760px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Compact Full-Width Image Hero Banner (Hijri Age Calculator Page) */
.hero-image-banner.hero-hijri {
  background: linear-gradient(180deg, rgba(13, 115, 119, 0.72) 0%, rgba(8, 76, 78, 0.84) 100%),
    url('neom-2gVgVf5CNAE-unsplash.webp') center center / cover no-repeat;
}

/* Compact Full-Width Image Hero Banner (Gregorian Age Calculator Page) */
.hero-image-banner.hero-gregorian {
  background: linear-gradient(180deg, rgba(13, 115, 119, 0.70) 0%, rgba(8, 76, 78, 0.82) 100%),
    url('neom-9hWJs7iblh8-unsplash.webp') center 40% / cover no-repeat;
}

/* Compact Full-Width Image Hero Banner (Age Difference Calculator Page) */
.hero-image-banner.hero-age-diff {
  background: linear-gradient(180deg, rgba(13, 115, 119, 0.70) 0%, rgba(8, 76, 78, 0.82) 100%),
    url('neom--AFeVPw7lDU-unsplash.webp') center 45% / cover no-repeat;
}

/* Compact Full-Width Image Hero Banner (Child Age Calculator Page) */
.hero-image-banner.hero-child-age {
  background: linear-gradient(180deg, rgba(13, 115, 119, 0.70) 0%, rgba(8, 76, 78, 0.82) 100%),
    url('neom-207NEuFvjlg-unsplash.webp') center 40% / cover no-repeat;
}

/* Calculator Section directly below Hero */
.calculator-section {
  padding: 2.25rem 0 1.5rem;
  background-color: var(--bg-page);
}

/* Calculator Tool Widget Card */
.calculator-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  transition: var(--transition);
}

.calculator-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #D1D5DB;
}

/* Calendar Toggle Tabs */
.calendar-toggle-group {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-page);
  padding: 4px;
  border-radius: 30px;
  max-width: 280px;
  width: 100%;
  margin: 0 auto 1.75rem;
  border: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

.toggle-btn {
  flex: 1 1 50%;
  width: 50%;
  border: none;
  background: transparent;
  padding: 8px 14px;
  height: 42px;
  min-height: 42px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-sizing: border-box;
}

.toggle-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(13, 115, 119, 0.3);
}

.toggle-btn:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Date Input Dropdowns Grid — Single Row on Desktop (33% each) */
.input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
  direction: rtl;
  width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: right;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  text-align: right;
  white-space: nowrap;
}

.form-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230D7377'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 18px;
}

.form-select:hover {
  border-color: #9CA3AF;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

/* Action Buttons */
.action-buttons-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-cta {
  background-color: var(--cta-green);
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 14px 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(20, 164, 77, 0.3);
  text-decoration: none;
}

.btn-cta:hover {
  background-color: var(--cta-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 164, 77, 0.4);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-reset {
  background-color: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-subtle);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  background-color: #F3F4F6;
  color: var(--text-main);
  border-color: #D1D5DB;
}

/* Error message */
.calc-error {
  display: none;
  background-color: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

/* ==========================================================================
   Results Output Section
   ========================================================================== */
.results-container {
  display: none;
  margin-top: 2rem;
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Birthday Celebration Banner */
.birthday-banner {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 2px solid var(--secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 15px rgba(244, 166, 42, 0.25);
  animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.015);
  }
}

/* Main Age Comparison Cards */
.age-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.age-result-card,
.age-card {
  background-color: #FFFFFF;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.age-result-card.hijri-card,
.age-card.age-card-hijri {
  border-color: var(--secondary);
}

.age-card-badge {
  display: inline-block;
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.age-result-card.hijri-card .age-card-badge,
.age-card.age-card-hijri .age-card-badge {
  background-color: var(--secondary);
}

.age-numbers-row,
.age-card-numbers {
  display: flex;
  justify-content: space-around;
  align-items: baseline;
  margin-top: 0.75rem;
  width: 100%;
}

.age-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.unit-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.age-result-card.hijri-card .unit-value,
.age-card.age-card-hijri .unit-value {
  color: #D97706;
}

.unit-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.unit-separator {
  display: none !important;
}

/* Live Countdown Box */
.countdown-box,
.countdown-card {
  background: linear-gradient(135deg, #0D7377 0%, #084C4E 100%);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
}

.countdown-box .subcard-title,
.countdown-card .subcard-title,
.countdown-title {
  color: var(--secondary);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.timer-segment {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  min-width: 80px;
}

.timer-value {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  display: block;
  line-height: 1.1;
}

.timer-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.timer-divider {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
  margin-top: -10px;
}

/* Details Section 2 Card */
.details-section-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.subcard-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid #ECEFF1;
}

.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.detail-value {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
}

/* ==========================================================================
   Action Bar: Copy & Share Buttons
   ========================================================================== */
.result-actions-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1.75rem;
  flex-wrap: wrap;
}

.share-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.btn-action-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: #0D7377;
  border: 1.5px solid #0D7377;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-outline:hover,
.btn-action-outline:focus-visible {
  background-color: #0D7377;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 115, 119, 0.25);
}

.btn-action-outline .action-icon {
  stroke: currentColor;
  transition: stroke 0.2s ease;
}

/* Share Dropdown Menu (Desktop) */
.share-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.share-dropdown-menu.show {
  display: block;
}

.share-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  text-align: right;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.share-dropdown-item:hover {
  background-color: #F0FDF4;
  color: #0D7377;
}

.share-dropdown-item svg {
  flex-shrink: 0;
  stroke: currentColor;
}

/* Fun Facts Section 3 */
.fun-facts-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.fact-item {
  background-color: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fact-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fact-item:nth-child(1) {
  border-top-color: var(--primary);
}

.fact-item:nth-child(1) .fact-number {
  color: var(--primary);
}

.fact-item:nth-child(2) {
  border-top-color: var(--secondary);
}

.fact-item:nth-child(2) .fact-number {
  color: #D97706;
}

.fact-item:nth-child(3) {
  border-top-color: var(--cta-green);
}

.fact-item:nth-child(3) .fact-number {
  color: var(--cta-green);
}

.fact-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.fact-number {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.fact-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.4;
  margin-top: auto;
}

/* ==========================================================================
   NEW SECTION A: Your Age in Numbers (عمرك بالأرقام)
   ========================================================================== */
.age-in-numbers-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-card {
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0D7377;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* ==========================================================================
   NEW SECTION B: Birth Date Info (معلومات عن تاريخ ميلادك)
   ========================================================================== */
.birth-date-info-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.birth-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.birth-info-card {
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.birth-info-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.birth-info-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.birth-info-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0D7377;
  text-align: left;
}

/* ==========================================================================
   Content Sections (Sections 3 to 12)
   ========================================================================== */
.content-section {
  padding: 2.25rem 0;
  border-bottom: 1px solid #EDF2F7;
}

.content-section:last-of-type {
  border-bottom: none;
}

/* Step 4 — How to Use Cards */
.steps-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.step-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.step-number-badge {
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Step 5 — Highlight Blue Box */
.highlight-blue-box {
  background-color: var(--highlight-box-bg);
  border: 1.5px solid var(--highlight-box-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 1.25rem;
}

.highlight-blue-box p:last-child {
  margin-bottom: 0;
}

/* Step 6 — Feature Checkmarks */
.features-list {
  list-style: none;
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.check-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--cta-green);
  margin-top: 4px;
}

.feature-text {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Step 7 — Saudi Use Cases Grid */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.use-case-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-right: 4px solid var(--primary);
}

.use-case-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.use-case-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.use-case-icon {
  font-size: 1.6rem;
}

.use-case-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
}

.use-case-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Step 8 — Birth Year Table */
.table-wrapper {
  margin-top: 1.5rem;
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.birth-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  text-align: right;
}

.birth-table th {
  background-color: var(--primary);
  color: #FFFFFF;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 1.05rem;
}

.birth-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1rem;
}

.birth-table tr:nth-child(even) td {
  background-color: var(--bg-page);
}

.birth-table tr:hover td {
  background-color: var(--primary-light);
}

.table-note {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  padding: 0 4px;
}

/* Step 9 — Comparison */
.manual-comparison-box {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.25rem;
}

.reasons-list {
  list-style: none;
  margin: 1rem 0;
}

.reason-item {
  padding: 10px 14px;
  margin-bottom: 8px;
  background-color: var(--bg-page);
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--secondary);
  font-size: 0.98rem;
}

/* Step 10 — FAQ Accordion */
.faq-accordion {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-item.open .faq-question {
  color: var(--primary);
  background-color: var(--primary-light);
}

.faq-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  fill: currentColor;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  background-color: #FFFFFF;
}

.faq-answer-inner {
  padding: 16px 20px;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.9;
  border-top: 1px solid #F3F4F6;
}

/* Step 11 — Other Tools Cards (Interactive Navigation) */
.other-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.other-tool-card,
.tool-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  background-color: var(--card-bg, #FFFFFF);
  border: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: var(--radius-md, 12px);
  padding: 1.5rem 1.25rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.other-tool-card:hover,
.tool-card-placeholder:hover {
  background-color: #FFFFFF;
  border-color: var(--primary-teal, #0D7377);
  box-shadow: 0 6px 16px rgba(13, 115, 119, 0.12);
  transform: translateY(-2px);
}

.other-tool-card:focus-visible,
.tool-card-placeholder:focus-visible {
  outline: 2px solid var(--primary-teal, #0D7377);
  outline-offset: 2px;
}

.other-tool-title,
.tool-placeholder-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #1F2937);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.other-tool-card:hover .other-tool-title,
.other-tool-card:hover .tool-placeholder-title,
.tool-card-placeholder:hover .tool-placeholder-title {
  color: var(--primary-teal, #0D7377);
}

.coming-soon-badge {
  display: none;
}

/* Step 12 — Closing CTA */
.closing-cta-card {
  background: linear-gradient(135deg, #0D7377 0%, #064E50 100%);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
}

.closing-cta-card p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  line-height: 1.9;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: #121524;
  color: #CBD5E1;
  padding: 4rem 0 0;
  margin-top: auto;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 3.5rem;
  padding-bottom: 3rem;
}

.footer-col-title {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 3px;
  background-color: #F4A62A;
  border-radius: 2px;
}

/* Brand Column (Right in RTL) */
.footer-col-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.footer-brand-title {
  color: #FFFFFF;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.footer-brand-sub {
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-about-text {
  color: #94A3B8;
  line-height: 1.85;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #E2E8F0;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

/* Nav & Legal Lists (Middle & Left in RTL) */
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-list li a,
.footer-list li span {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 2px 0;
}

.footer-list li a:hover,
.footer-list li span:hover {
  color: #FFFFFF;
  transform: translateX(-4px);
}

.footer-list li a:focus-visible {
  color: #FFFFFF;
  outline: 2px solid #F4A62A;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Footer Social Media Section */
.footer-social-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social-title {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
  text-decoration: none;
  transition: all 0.25s ease;
}

.social-icon-btn:hover {
  background-color: #0D7377;
  border-color: #0D7377;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 115, 119, 0.35);
}

.social-icon-btn:focus-visible {
  outline: 2px solid #F4A62A;
  outline-offset: 3px;
  color: #FFFFFF;
  background-color: #0D7377;
}

.social-icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Bottom Bar / Copyright */
.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 0;
  text-align: center;
}

.footer-bottom-bar p {
  margin: 0;
  color: #94A3B8;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ==========================================================================
   Age Difference Calculator Widget Styles (/age-difference)
   ========================================================================== */
.diff-tool-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

/* Two person cards side by side in a 2-column layout (above 768px) */
.diff-cards-grid {
  display: flex;
  justify-content: space-between;
  gap: 4%;
  align-items: stretch;
  margin-bottom: 24px;
}

.diff-person-card {
  flex: 0 0 48%;
  width: 48%;
  min-height: auto;
  height: auto;
  background: #F8F9FA;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #E5E7EB;
  box-sizing: border-box;
}

.diff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E5E7EB;
  flex-wrap: wrap;
  gap: 10px;
}

.diff-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0D7377;
}

.calendar-toggle-mini {
  display: inline-flex;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.mini-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 14px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-toggle-btn.active {
  background-color: #0D7377;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(13, 115, 119, 0.25);
}

.diff-inputs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.diff-inputs-row .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.diff-inputs-row .form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4B5563;
  margin-bottom: 6px;
  text-align: right;
}

.diff-inputs-row .form-select {
  width: 100%;
  padding: 10px 10px;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 600;
  color: #1F2937;
  background-color: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.diff-inputs-row .form-select:focus {
  border-color: #0D7377;
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

/* Buttons Row: Centered below both cards */
.diff-buttons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.diff-buttons-row .btn-cta {
  background: linear-gradient(135deg, #14A44D 0%, #0F823D 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 30px;
  padding: 14px 36px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(20, 164, 77, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.diff-buttons-row .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 164, 77, 0.45);
}

.diff-buttons-row .btn-reset {
  background-color: transparent;
  color: #4B5563;
  border: 1.5px solid #D1D5DB;
  border-radius: 30px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.diff-buttons-row .btn-reset:hover {
  background-color: #F3F4F6;
  color: #111827;
  border-color: #9CA3AF;
}

/* Results Section */
.diff-results-wrapper {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed #E5E7EB;
  animation: fadeInDiff 0.35s ease-out;
}

@keyframes fadeInDiff {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Result Card 1 — Who is older (Light Gold #FFF8E7) */
.diff-card-older {
  background-color: #FFF8E7 !important;
  border: 1.5px solid #FDE68A !important;
  border-radius: 12px;
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
}

.diff-older-label {
  font-size: 1.25rem;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 8px;
}

.diff-older-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0D7377;
  line-height: 1.3;
}

/* Result Card 2 — Age difference */
.diff-card-difference {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 22px 20px;
  margin-bottom: 16px;
}

.diff-card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F3F4F6;
}

.diff-card-title-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0D7377;
}

.diff-summary-line {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1F2937;
  background-color: #F3F4F6;
  padding: 4px 14px;
  border-radius: 20px;
}

.diff-unit-boxes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.diff-unit-box {
  background-color: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
}

.diff-unit-box:hover {
  border-color: #0D7377;
  transform: translateY(-2px);
}

.diff-unit-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0D7377;
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.diff-unit-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4B5563;
  margin-top: 6px;
}

/* Result Card 3 — Total Numbers */
.diff-card-totals {
  background: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.diff-totals-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.diff-total-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
}

.diff-total-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #374151;
}

.diff-total-count {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0D7377;
  font-feature-settings: "tnum";
}

/* ==========================================================================
   School Enrollment Eligibility Feature (/school-enrollment-age)
   ========================================================================== */
.school-eligibility-box {
  padding: 22px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  animation: fadeInDiff 0.35s ease-out;
}

.school-eligibility-box.eligible {
  background-color: #E8F5E9 !important;
  border: 2px solid #81C784 !important;
  color: #1B5E20 !important;
}

.school-eligibility-box.not-eligible {
  background-color: #FFF3E0 !important;
  border: 2px solid #FFB74D !important;
  color: #C64000 !important;
}

.school-stages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.school-stage-card {
  background: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.school-stage-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.school-stage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E5E7EB;
}

.school-stage-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.school-stage-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0D7377;
}

.school-stage-card p {
  color: #374151;
  line-height: 1.8;
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .age-cards-grid {
    grid-template-columns: 1fr;
  }

  .other-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .fact-item {
    padding: 1.25rem 0.6rem;
  }

  .fact-number {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .action-buttons-group {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  .action-buttons-group .btn-cta,
  .action-buttons-group .btn-reset {
    width: 100% !important;
  }
  html {
    font-size: 16px;
  }

  .hero-image-banner {
    min-height: 200px;
    padding: 2rem 1rem 1.75rem;
    background-position: center 40%;
  }

  .hero-image-banner.hero-hijri {
    background-position: center center;
  }

  .hero-image-banner.hero-gregorian {
    background-position: center 35%;
  }

  .hero-image-banner.hero-age-diff {
    background-position: center 45%;
  }

  .hero-image-banner.hero-child-age {
    background-position: center 40%;
  }

  .hero-image-banner .hero-title {
    font-size: 1.55rem;
    margin-bottom: 0.5rem;
  }

  .hero-image-banner .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .calculator-section {
    padding: 1.5rem 0 1rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .calculator-card {
    padding: 1.5rem 1rem;
  }

  .steps-cards-grid {
    grid-template-columns: 1fr;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .facts-grid {
    grid-template-columns: 1fr;
  }

  .stat-cards-grid {
    grid-template-columns: 1fr;
  }

  .birth-info-grid {
    grid-template-columns: 1fr;
  }

  .countdown-timer {
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .timer-segment {
    min-width: 54px;
    padding: 6px 8px;
  }

  .timer-value {
    font-size: 1.35rem;
  }

  .timer-divider {
    font-size: 1.35rem;
    margin-top: -6px;
  }

  .btn-cta {
    width: 100%;
    padding: 14px 20px;
  }

  .btn-reset {
    width: 100%;
  }

  .site-header {
    height: 64px;
  }

  .site-logo {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
  }

  .site-logo-img {
    width: 175px;
    height: auto;
    max-width: 185px;
    max-height: 52px;
    aspect-ratio: 1024 / 341;
  }

  .nav-menu {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  .site-footer {
    padding: 3rem 0 0;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-bottom: 2.25rem;
  }

  .footer-social-section {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 1.15rem;
    padding: 1.5rem 0;
  }

  .footer-social-title {
    text-align: center;
    font-size: 1rem;
  }

  .footer-social-links {
    justify-content: center;
    gap: 1rem;
  }

  /* Age Difference Tool Mobile Adjustments (<768px) */
  .diff-tool-card {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .diff-cards-grid {
    flex-direction: column;
    gap: 16px;
  }

  .diff-person-card {
    flex: 1 1 auto;
    width: 100%;
  }

  .diff-buttons-row {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .diff-buttons-row .btn-cta,
  .diff-buttons-row .btn-reset {
    width: 100%;
  }

  .diff-unit-boxes-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .diff-unit-val {
    font-size: 1.75rem;
  }

  .diff-totals-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .diff-older-value {
    font-size: 1.45rem;
  }

  .school-eligibility-box {
    padding: 16px 16px;
    font-size: 1.05rem;
  }

  .school-stages-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .other-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Static Pages (/about, /privacy-policy, /terms, /contact)
   ========================================================================== */

.static-page-main {
  padding: 48px 16px 80px;
  background-color: var(--bg-page);
  min-height: calc(100vh - 64px - 300px);
}

.static-card-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 48px 44px;
}

.static-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.static-date-sub {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.static-intro-lead {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-main);
  margin-top: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #F3F4F6;
}

.static-section {
  margin-top: 32px;
}

.static-section:first-of-type {
  margin-top: 24px;
}

.static-section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 8px;
}

.static-section h2::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 2px;
}

.static-section p {
  font-size: 1.05rem;
  line-height: 1.95;
  color: #374151;
  margin-bottom: 14px;
}

.static-section p:last-child {
  margin-bottom: 0;
}

.static-section a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}

.static-section a:hover {
  color: var(--primary-hover);
}

/* Contact Page Specific */
.contact-lead-desc {
  font-size: 1.15rem;
  line-height: 1.95;
  color: var(--text-main);
  margin-bottom: 28px;
}

.contact-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.contact-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.contact-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-label-optional {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  color: var(--text-main);
  background-color: #F9FAFB;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  direction: rtl;
}

.contact-input:focus,
.contact-textarea:focus {
  background-color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

.contact-textarea {
  min-height: 140px;
  resize: vertical;
}

.btn-contact-submit {
  background-color: var(--cta-green);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(20, 164, 77, 0.3);
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  width: 100%;
}

.btn-contact-submit:hover {
  background-color: var(--cta-green-hover);
  box-shadow: 0 6px 18px rgba(20, 164, 77, 0.4);
}

.btn-contact-submit:active {
  transform: translateY(1px);
}

.contact-response-note {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 10px;
}

.contact-response-note h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #166534;
  margin-bottom: 6px;
  margin-top: 0;
  padding-bottom: 0;
}

.contact-response-note h2::after {
  display: none;
}

.contact-response-note p {
  color: #14532D;
  font-size: 0.98rem;
  margin-bottom: 0;
}

.form-alert-success {
  display: none;
  background-color: #ECFDF5;
  border: 1.5px solid #10B981;
  color: #065F46;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 20px;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .static-page-main {
    padding: 28px 12px 60px;
  }

  .static-card-wrapper {
    padding: 28px 20px;
    border-radius: var(--radius-md);
  }

  .static-h1 {
    font-size: 1.75rem;
  }

  .static-section h2 {
    font-size: 1.25rem;
  }

  .contact-form-wrapper {
    max-width: 100%;
  }
}

/* ==========================================================================
   About Page (Version 2)
   ========================================================================== */

.about-hero {
  background-color: var(--primary-teal, #0D7377);
  color: #FFFFFF;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

.about-hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.about-hero-title {
  color: #FFFFFF;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.about-hero-desc {
  font-size: 1.12rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1rem;
}

.about-hero-desc:last-child {
  margin-bottom: 0;
}

.about-features-section {
  background-color: var(--bg-page, #F9FAFB);
  padding: 4.5rem 1.5rem;
}

.about-container {
  max-width: 1140px;
  margin: 0 auto;
}

.about-section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.about-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-teal, #0D7377);
  line-height: 1.35;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: var(--radius-md, 12px);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13, 115, 119, 0.12);
  border-color: rgba(13, 115, 119, 0.3);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 0.85rem;
  line-height: 1;
  display: inline-block;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-teal, #0D7377);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.feature-desc {
  font-size: 0.96rem;
  color: var(--text-muted, #4B5563);
  line-height: 1.7;
}

.about-mission-section {
  background-color: #F8F9FA;
  padding: 4.5rem 1.5rem;
}

.about-mission-card {
  max-width: 820px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 2.75rem 2.25rem;
  text-align: center;
}

.about-mission-text {
  font-size: 1.15rem;
  line-height: 2.05;
  color: var(--text-main, #1F2937);
  font-weight: 500;
}

.about-calendar-section {
  background-color: #F0F9FF;
  padding: 4.5rem 1.5rem;
}

.about-info-card {
  max-width: 820px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #BAE6FD;
  box-shadow: 0 4px 16px rgba(186, 230, 253, 0.25);
  padding: 2.5rem 2.25rem;
  text-align: center;
}

.about-info-text {
  font-size: 1.12rem;
  line-height: 2;
  color: var(--text-main, #1F2937);
}

.about-privacy-section {
  background-color: #FFFFFF;
  padding: 4.5rem 1.5rem 5.5rem;
}

.about-privacy-card {
  max-width: 820px;
  margin: 0 auto;
  background: #F9FAFB;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  padding: 2.5rem 2.25rem;
  text-align: center;
}

@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .about-hero {
    padding: 3rem 1.25rem 2.5rem;
  }

  .about-hero-title {
    font-size: 1.95rem;
  }

  .about-hero-desc {
    font-size: 1.02rem;
  }

  .about-features-section,
  .about-mission-section,
  .about-calendar-section,
  .about-privacy-section {
    padding: 3.25rem 1.25rem;
  }

  .about-section-title {
    font-size: 1.65rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
  }

  .about-mission-card,
  .about-info-card,
  .about-privacy-card {
    padding: 2rem 1.25rem;
  }

  .about-mission-text,
  .about-info-text {
    font-size: 1.05rem;
  }
}

/* Mobile only: stack tool inputs vertically */
@media (max-width: 600px) {
  .input-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}