@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --navy-950: #090d16;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --navy-600: #475569;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --off-white: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #10b981;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
  direction: rtl;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--off-white);
  color: var(--text-primary);
  line-height: 1.7;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open {
  overflow: hidden;
}

/* Prevent auto-zoom on mobile inputs */
input, select, textarea, button {
  font-family: inherit;
  font-size: 16px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (max-width: 640px) {
  .container {
    padding-inline: 1rem;
  }
}

/* ==========================================================================
   Header & Navigation (Fully Responsive)
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--emerald-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.72rem;
  color: var(--emerald-600);
  font-weight: 600;
}

/* Desktop Navigation */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.4rem;
}

.nav-link {
  color: var(--navy-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--emerald-600);
  background-color: var(--emerald-50);
}

.nav-link.active {
  color: var(--emerald-700);
  background-color: var(--emerald-100);
  font-weight: 700;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-500) 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 42px;
  height: 42px;
  color: var(--navy-900);
  font-size: 1.4rem;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background: var(--emerald-50);
  border-color: var(--emerald-400);
  color: var(--emerald-700);
}

/* Header Breakpoints */
@media (max-width: 992px) {
  .site-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 64px;
  }
  .logo-title {
    font-size: 0.98rem;
  }
  .logo-tagline {
    font-size: 0.68rem;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
  .header-cta {
    display: none; /* Keep clean space on tiny screens */
  }
}

/* ==========================================================================
   Mobile Navigation Drawer (Touch Friendly)
   ========================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.open .mobile-nav-content {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--navy-800);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-links .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.mobile-nav-links .nav-link:active,
.mobile-nav-links .nav-link.active {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  border-color: var(--emerald-200);
  font-weight: 800;
}

.mobile-nav-cta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.mobile-nav-cta .header-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
  font-size: 1rem;
}

/* ==========================================================================
   Hero Section (Responsive)
   ========================================================================== */
.hero-section {
  padding: 2.75rem 0 2rem;
  background: radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(15, 23, 42, 0.06) 0%, transparent 45%);
  border-bottom: 1px solid var(--border);
}

.hero-header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--emerald-100);
  color: var(--emerald-700);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.hero-title {
  font-size: clamp(1.6rem, 5vw, 2.75rem);
  font-weight: 900;
  color: var(--navy-900);
  line-height: 1.35;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  color: var(--emerald-600);
  position: relative;
  display: inline-block;
}

.hero-desc {
  font-size: clamp(0.95rem, 2.5vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
}

.trust-badge-item svg {
  color: var(--emerald-600);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .hero-section {
    padding: 1.75rem 0 1.5rem;
  }
  .trust-badges {
    gap: 0.6rem;
  }
  .trust-badge-item {
    font-size: 0.78rem;
    padding: 0.25rem 0.6rem;
  }
}

/* ==========================================================================
   Calculator Section & Card (Responsive)
   ========================================================================== */
.calculator-section {
  padding: 2rem 0 3.5rem;
}

.calculator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%;
}

/* Presets Bar with Touch Momentum Scroll */
.calculator-presets {
  padding: 1rem 1.5rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.calculator-presets::-webkit-scrollbar {
  display: none;
}

.presets-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.preset-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--navy-700);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.preset-chip:hover,
.preset-chip:active {
  background: var(--emerald-50);
  border-color: var(--emerald-400);
  color: var(--emerald-700);
}

/* Calculator Grid */
.calculator-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.25rem;
  padding: 2rem;
}

@media (max-width: 992px) {
  .calculator-body {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .calculator-section {
    padding: 1.25rem 0 2.5rem;
  }
  .calculator-card {
    border-radius: var(--radius-lg);
  }
  .calculator-presets {
    padding: 0.75rem 1rem;
  }
  .calculator-body {
    padding: 1rem;
    gap: 1.75rem;
  }
}

/* Calculator Inputs Column */
.calc-inputs-col {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.section-subhead {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--emerald-500);
}

.currency-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.currency-select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-900);
  background-color: var(--surface);
  cursor: pointer;
  outline: none;
}

.currency-select:focus {
  border-color: var(--emerald-500);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.form-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-800);
}

.label-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-with-symbol {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-symbol {
  position: absolute;
  left: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-950);
  background-color: var(--surface);
  transition: all 0.2s ease;
  outline: none;
  min-height: 48px;
}

.form-input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.range-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.range-slider {
  flex: 1;
  height: 8px;
  border-radius: 9999px;
  background: var(--surface-alt);
  outline: none;
  accent-color: var(--emerald-600);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald-600);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 2px solid #ffffff;
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald-600);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 2px solid #ffffff;
}

.range-limits {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Radio pill selector */
.freq-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--surface-alt);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.freq-option {
  position: relative;
}

.freq-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.freq-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.freq-option input:checked + label {
  background: var(--surface);
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}

/* Action Buttons */
.calc-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-primary {
  flex: 2;
  background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-500) 100%);
  color: #ffffff;
  border: none;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  flex: 1;
  background: var(--surface-alt);
  color: var(--navy-700);
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover,
.btn-secondary:active {
  background: var(--border);
  color: var(--navy-900);
}

@media (max-width: 480px) {
  .calc-actions {
    flex-direction: column;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    flex: auto;
  }
}

/* ==========================================================================
   Calculator Results Column (Responsive)
   ========================================================================== */
.calc-results-col {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.results-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.result-card {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.result-card.primary {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.35);
}

.result-card.primary .card-title {
  color: var(--emerald-100);
}

.result-card.primary .card-value {
  color: #ffffff;
  font-size: clamp(1.65rem, 5vw, 2.3rem);
}

.result-card.primary .card-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.results-cards-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 540px) {
  .results-cards-subgrid {
    grid-template-columns: 1fr;
  }
}

.result-card.sub {
  background: var(--surface-alt);
}

.result-card.interest {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.result-card.interest .card-value {
  color: var(--emerald-700);
}

.result-card.deposits .card-value {
  color: var(--navy-900);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: var(--emerald-100);
  color: var(--emerald-700);
  white-space: nowrap;
}

.card-value {
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  font-weight: 900;
  line-height: 1.3;
  word-break: break-word;
}

.card-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.result-card.primary .card-subtext {
  color: rgba(255, 255, 255, 0.85);
}

/* Chart Container */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chart-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--navy-900);
}

.chart-legend {
  display: flex;
  gap: 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.deposits {
  background-color: var(--navy-800);
}

.legend-dot.interest {
  background-color: var(--emerald-500);
}

.chart-wrapper {
  position: relative;
  height: 280px;
  width: 100%;
}

@media (max-width: 640px) {
  .chart-wrapper {
    height: 230px;
  }
  .chart-card {
    padding: 1rem;
  }
}

/* Breakdown Table Accordion */
.breakdown-toggle-btn {
  width: 100%;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--navy-800);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  min-height: 44px;
}

.breakdown-toggle-btn:hover,
.breakdown-toggle-btn:active {
  background: var(--surface-alt);
  border-color: var(--emerald-500);
  color: var(--emerald-700);
}

.breakdown-table-wrap {
  display: none;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
}

.breakdown-table-wrap.open {
  display: block;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
  min-width: 480px;
}

.breakdown-table th {
  background: var(--navy-900);
  color: #ffffff;
  padding: 0.75rem 0.85rem;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.breakdown-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--navy-800);
  white-space: nowrap;
}

.breakdown-table tr:nth-child(even) {
  background: var(--surface-alt);
}

.breakdown-table tr:hover {
  background: var(--emerald-50);
}

/* ==========================================================================
   AdSense Slot Styling (Responsive)
   ========================================================================== */
.adsense-wrapper {
  margin: 1.5rem 0;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  overflow: hidden;
}

.adsense-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-alt);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.adsense-placeholder-box {
  width: 100%;
  max-width: 728px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  background: #f8fafc;
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
}

/* ==========================================================================
   Educational Content Section (Anti-Thin Content)
   ========================================================================== */
.article-section {
  padding: 3rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.article-container {
  max-width: 900px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2.25rem;
  text-align: center;
}

.article-pill {
  display: inline-block;
  background: var(--emerald-100);
  color: var(--emerald-700);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  font-weight: 900;
  color: var(--navy-900);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.article-content h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 1.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--emerald-500);
  display: inline-block;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-top: 0.65rem;
}

.article-content p {
  text-align: justify;
}

.article-content strong {
  color: var(--navy-900);
}

@media (max-width: 640px) {
  .article-section {
    padding: 2rem 0;
  }
  .article-content {
    font-size: 0.98rem;
    line-height: 1.8;
  }
  .article-content p {
    text-align: right; /* More natural on mobile than justified */
  }
}

/* Formula Box (Responsive) */
.formula-box {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 1rem 0;
  border-right: 5px solid var(--emerald-500);
  width: 100%;
}

.formula-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--emerald-400);
  margin-bottom: 0.75rem;
}

.formula-display {
  font-size: clamp(1.15rem, 4.5vw, 1.6rem);
  font-weight: 900;
  text-align: center;
  direction: ltr;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
}

.formula-breakdown {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
}

@media (max-width: 600px) {
  .formula-box {
    padding: 1.15rem;
  }
  .formula-breakdown {
    grid-template-columns: 1fr;
  }
}

.formula-breakdown li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.formula-var {
  font-weight: 900;
  color: var(--emerald-400);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  min-width: 20px;
}

/* Comparison Table (Responsive with Scroll) */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 580px;
}

.comparison-table th {
  background: var(--navy-900);
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) {
  background: var(--surface-alt);
}

.comparison-table td.highlight-cell {
  font-weight: 800;
  color: var(--emerald-700);
  background: var(--emerald-50);
}

/* Strategy Cards */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
  margin: 1.25rem 0;
}

.strategy-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.strategy-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--emerald-100);
  color: var(--emerald-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.strategy-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-900);
}

.strategy-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Callout Box */
.callout-box {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  border-right: 4px solid var(--accent-gold);
  background: var(--accent-gold-light);
  color: #78350f;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.callout-box.info {
  border-right-color: var(--emerald-600);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

/* ==========================================================================
   FAQ Accordion (Responsive)
   ========================================================================== */
.faq-section {
  padding: 3rem 0;
  background: var(--off-white);
}

.faq-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2.25rem;
}

.faq-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--navy-900);
  margin-bottom: 0.65rem;
}

.faq-list {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  border-color: var(--emerald-400);
}

.faq-question {
  width: 100%;
  padding: 1.1rem 1.35rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-900);
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.2s ease;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.faq-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-700);
  transition: transform 0.3s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  background: var(--emerald-600);
  color: #ffffff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  padding: 0 1.35rem;
  background: var(--surface);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.35rem 1.25rem 1.35rem;
  border-top: 1px solid var(--surface-alt);
}

@media (max-width: 640px) {
  .faq-question {
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
  }
  .faq-answer {
    padding: 0 1rem;
    font-size: 0.9rem;
  }
  .faq-item.active .faq-answer {
    padding: 0 1rem 1rem 1rem;
  }
}

/* ==========================================================================
   Static Pages (About, Contact, Privacy, Terms, Disclaimer)
   ========================================================================== */
.page-header {
  padding: 2.75rem 0 1.75rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--off-white) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.page-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--navy-900);
  margin-bottom: 0.65rem;
}

.page-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

.static-content-wrap {
  padding: 2.5rem 0 3.5rem;
}

.static-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  line-height: 1.85;
  color: var(--text-secondary);
  width: 100%;
}

@media (max-width: 640px) {
  .page-header {
    padding: 2rem 0 1.25rem;
  }
  .static-content-wrap {
    padding: 1.5rem 0 2.5rem;
  }
  .static-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    gap: 1.25rem;
    font-size: 0.95rem;
  }
}

.static-card h2 {
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--emerald-500);
  display: inline-block;
}

.static-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-top: 0.5rem;
}

.static-card ul {
  padding-right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  max-width: 1050px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.contact-info-card {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.contact-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text-box h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
}

.contact-text-box p {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .contact-info-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }
  .contact-form-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy-950);
  background-color: var(--surface);
  transition: all 0.2s ease;
  outline: none;
  min-height: 120px;
  resize: vertical;
}

.form-textarea:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.alert-box {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  display: none;
}

.alert-success {
  background: var(--emerald-100);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-400);
}

/* ==========================================================================
   Footer (Responsive)
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--navy-950);
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
  width: 100%;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid #1e293b;
}

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 580px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-brand .logo-title {
  color: #ffffff;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #94a3b8;
}

.footer-col h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 28px;
  height: 2px;
  background: var(--emerald-500);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
}

.footer-links a:hover {
  color: var(--emerald-400);
  transform: translateX(-3px);
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: #64748b;
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 640px) {
  .site-footer {
    padding: 2.25rem 0 1.25rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .site-header, .site-footer, .adsense-wrapper, .calc-actions, .calculator-presets, .mobile-menu-btn, .mobile-nav {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .calculator-card {
    border: none;
    box-shadow: none;
  }
  .breakdown-table-wrap {
    display: block !important;
    max-height: none;
  }
}
