/* ============================================================
   ExpatCalc — Main Stylesheet
   Supports: EN (LTR), TL (LTR), HI (LTR), AR (RTL via rtl.css)
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --color-primary:    #0F2044;
  --color-accent:     #E8A020;
  --color-bg:         #F8F7F4;
  --color-surface:    #FFFFFF;
  --color-text:       #1A1A1A;
  --color-muted:      #6B7280;
  --color-success:    #059669;
  --color-border:     #E5E7EB;
  --color-error:      #DC2626;
  --color-warning:    #F59E0B;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);

  --max-width: 1200px;
  --header-h:  68px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* Language-specific font stacks */
:lang(en), :lang(tl) {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}
:lang(ar) {
  --font-display: 'Noto Naskh Arabic', 'Arial Unicode MS', serif;
  --font-body:    'Noto Naskh Arabic', 'Arial Unicode MS', sans-serif;
}
:lang(hi) {
  --font-display: 'Noto Sans Devanagari', serif;
  --font-body:    'Noto Sans Devanagari', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-primary);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Site Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--header-h);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; opacity: .9; }

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Desktop nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: .5rem;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--color-primary);
  padding: 1rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  flex-direction: column;
  gap: .25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,.85);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  transition: background .15s;
}
.mobile-nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* ---------- Language Switcher Bar ---------- */
.lang-switcher {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: .45rem 0;
}
.lang-switcher .container {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.lang-label {
  font-size: .75rem;
  color: var(--color-muted);
  margin-inline-end: .5rem;
  white-space: nowrap;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  background: transparent;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
  text-decoration: none;
}
.lang-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}
.lang-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: .75rem 0;
  font-size: .8rem;
  color: var(--color-muted);
}
.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--color-border); font-size: .7rem; }
.breadcrumb [aria-current] { color: var(--color-text); font-weight: 500; }

/* ---------- Ad Slots ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0ee;
  border: 1px dashed #ccc;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: .75rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.ad-leaderboard {
  width: 100%;
  min-height: 90px;
  margin: .75rem 0;
}
.ad-rectangle {
  width: 300px;
  min-height: 250px;
  margin-inline: auto;
}
.ad-inarticle {
  width: 100%;
  min-height: 200px;
  margin: 1.5rem 0;
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a3a6e 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(232,160,32,.2);
  border: 1px solid rgba(232,160,32,.4);
  color: var(--color-accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1rem;
  max-width: 700px;
}
.hero-sub {
  color: rgba(255,255,255,.8);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 600px;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: all .18s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}
.btn-primary:hover { background: #d48f14; border-color: #d48f14; }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn-ghost:hover { background: var(--color-bg); border-color: var(--color-primary); }
.btn-sm { font-size: .82rem; padding: .45rem 1rem; }
.btn-lg { font-size: 1.05rem; padding: .85rem 2rem; }
.btn-full { width: 100%; }

/* ---------- Calculator Layout ---------- */
.calc-page {
  flex: 1;
  padding: 2rem 0 4rem;
}

.calc-header {
  margin-bottom: 2rem;
}
.calc-header .tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(15,32,68,.07);
  color: var(--color-primary);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}
.calc-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: .5rem;
}
.calc-header .subtitle {
  color: var(--color-muted);
  font-size: 1rem;
}

/* Two-column calculator layout */
.calculator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Input panel */
.input-panel {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.input-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--color-border);
}

/* Form groups */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group:last-child { margin-bottom: 0; }
label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: .4rem;
}
.label-hint {
  font-weight: 400;
  color: var(--color-muted);
  margin-inline-start: .35rem;
}
input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15,32,68,.1);
  background: var(--color-surface);
}
input[type="number"].error,
select.error {
  border-color: var(--color-error);
}
.field-error {
  font-size: .78rem;
  color: var(--color-error);
  margin-top: .3rem;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Input with currency prefix */
.input-wrap {
  position: relative;
}
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-muted);
  pointer-events: none;
  font-family: var(--font-mono);
}
.input-prefix { left: .9rem; }
.input-suffix { right: .9rem; }
.input-wrap input { padding-left: 3rem; }
.input-wrap.has-suffix input { padding-right: 3rem; }

/* Slider */
.range-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}
input[type="range"] {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  cursor: pointer;
  border: none;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  cursor: pointer;
}
.range-value {
  font-size: .9rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-primary);
  min-width: 3.5rem;
  text-align: right;
}

/* Form actions row */
.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

/* ---------- Results Panel ---------- */
.result-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Primary result card */
.result-primary {
  background: var(--color-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.result-primary::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.result-primary-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: .5rem;
}
.result-primary-amount {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: .35rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.result-primary-note {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}

/* Result breakdown card */
.result-breakdown {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.breakdown-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-muted);
  margin-bottom: 1rem;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
}
.breakdown-row:last-child { border-bottom: none; padding-bottom: 0; }
.breakdown-row.total {
  border-top: 2px solid var(--color-primary);
  border-bottom: none;
  padding-top: .75rem;
  margin-top: .25rem;
  font-weight: 700;
}
.breakdown-label { font-size: .9rem; color: var(--color-text); }
.breakdown-value {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-primary);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
  white-space: nowrap;
}
.breakdown-value.deduction { color: var(--color-error); }
.breakdown-value.success   { color: var(--color-success); }

/* Result number — always LTR */
.result-number {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-mono);
}

/* Result actions */
.result-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Empty state */
.result-empty {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  border: 2px dashed var(--color-border);
}
.result-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: .4;
}
.result-empty p {
  color: var(--color-muted);
  font-size: .95rem;
}

/* ---------- Notice / Alert Boxes ---------- */
.notice {
  display: flex;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: .85rem;
  line-height: 1.5;
}
.notice-icon { flex-shrink: 0; font-size: 1rem; }
.notice-info {
  background: rgba(15,32,68,.06);
  border: 1px solid rgba(15,32,68,.12);
  color: var(--color-primary);
}
.notice-warning {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.25);
  color: #92400e;
}
.notice-disclaimer {
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #713f12;
}

/* ---------- SEO Content Area ---------- */
.content-section {
  max-width: 860px;
  margin: 3rem 0 0;
}
.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.content-section h2:first-child { border-top: none; padding-top: 0; }
.content-section h3 { margin-top: 1.25rem; margin-bottom: .5rem; }
.content-section p, .content-section li { color: #374151; font-size: .97rem; }
.content-section ul, .content-section ol {
  padding-inline-start: 1.5rem;
  margin-bottom: 1rem;
}
.content-section ul { list-style: disc; }
.content-section ol { list-style: decimal; }
.content-section li { margin-bottom: .4rem; }

/* FAQ accordion */
.faq-list { margin-top: 1rem; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--color-surface);
  border: none;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background .15s;
}
.faq-question:hover { background: var(--color-bg); }
.faq-question[aria-expanded="true"] {
  background: rgba(15,32,68,.04);
  color: var(--color-primary);
}
.faq-icon {
  flex-shrink: 0;
  font-size: .75rem;
  transition: transform .2s;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: .9rem;
  color: #374151;
  line-height: 1.65;
  background: var(--color-surface);
}
.faq-item.open .faq-answer { display: block; }

/* ---------- Calculator Grid (Homepage) ---------- */
.calc-grid-section {
  padding: 4rem 0;
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.section-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .6rem;
}
.section-header h2 { margin-bottom: .75rem; }
.section-header p { color: var(--color-muted); }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.calc-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.calc-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-primary);
  text-decoration: none;
}
.calc-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(15,32,68,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.calc-card-country {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.calc-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
}
.calc-card p {
  font-size: .83rem;
  color: var(--color-muted);
  line-height: 1.45;
  margin: 0;
}
.calc-card-arrow {
  margin-top: auto;
  font-size: .8rem;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ---------- Country Selector ---------- */
.country-section {
  background: var(--color-surface);
  padding: 3.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.country-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.country-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem .75rem;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all .18s;
  cursor: pointer;
  font-family: inherit;
}
.country-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.country-flag { font-size: 2rem; line-height: 1; }
.country-name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}
.country-currency {
  font-size: .68rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
}

/* ---------- Features / Why Section ---------- */
.why-section {
  padding: 4rem 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}
.why-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.why-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}
.why-card h3 {
  font-size: 1.1rem;
  margin-bottom: .6rem;
}
.why-card p {
  color: var(--color-muted);
  font-size: .9rem;
  line-height: 1.6;
}

/* ---------- Languages Section ---------- */
.lang-section {
  padding: 3.5rem 0;
  background: var(--color-primary);
  color: #fff;
}
.lang-section .section-header { text-align: center; max-width: 580px; }
.lang-section h2 { color: #fff; }
.lang-section p { color: rgba(255,255,255,.7); }
.lang-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.lang-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}
.lang-card:hover { background: rgba(255,255,255,.13); text-decoration: none; }
.lang-card-script {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--color-accent);
}
.lang-card-name {
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: .25rem;
}
.lang-card-note {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.75);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .site-logo { margin-bottom: 1rem; }
.footer-brand p {
  font-size: .85rem;
  line-height: 1.7;
  max-width: 280px;
  color: rgba(255,255,255,.6);
  margin-bottom: 0;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: .9rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a {
  color: rgba(255,255,255,.7);
  font-size: .87rem;
  transition: color .15s;
  text-decoration: none;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
}
.footer-copy {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
}
.footer-disclaimer {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  max-width: 600px;
  text-align: right;
}

/* ---------- Info Bar (last updated etc.) ---------- */
.info-bar {
  background: rgba(15,32,68,.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}
.info-bar strong { color: var(--color-text); }

/* ---------- Table Styles ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin-bottom: 1.5rem;
}
.data-table th {
  background: var(--color-primary);
  color: #fff;
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .03em;
}
.data-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(15,32,68,.02); }
.data-table .mono { font-family: var(--font-mono); }

/* ---------- Progress / Step indicator ---------- */
.step-indicator {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  font-size: .82rem;
  color: var(--color-muted);
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}
.step-dot.active { background: var(--color-accent); }
.step-dot.done   { background: var(--color-success); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .country-grid { grid-template-columns: repeat(3, 1fr); }
  .lang-cards   { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  /* Nav → hamburger */
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* Single column calculator */
  .calculator-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Hero */
  .hero { padding: 2.5rem 0 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* Grids */
  .why-grid { grid-template-columns: 1fr; gap: 1rem; }
  .country-grid { grid-template-columns: repeat(3, 1fr); }
  .lang-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-disclaimer { text-align: left; }

  /* Ad slots */
  .ad-leaderboard { min-height: 60px; }
  .ad-rectangle { width: 100%; }
}

@media (max-width: 480px) {
  .container { padding-inline: 1rem; }
  .country-grid { grid-template-columns: repeat(2, 1fr); }
  .lang-cards { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .lang-switcher, .breadcrumb,
  .ad-slot, .form-actions, .result-actions,
  .site-footer, .faq-list { display: none !important; }
  body { background: #fff; }
  .calculator-layout { grid-template-columns: 1fr; }
  .result-primary { background: #fff; color: #000; border: 2px solid #000; }
  .result-primary-amount { color: #000; }
}
