/* ============================================================
   SweldoPH - Philippine Salary Calculator
   Design: Clean, professional, Filipino-inspired warmth
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #0066CC;
  --primary-dark: #004D99;
  --primary-light: #E8F2FF;
  --accent: #FF6B35;
  --accent-light: #FFF3ED;

  --bg: #F8F9FC;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-hero: #0B1A33;

  --text: #1A1F36;
  --text-secondary: #4A5568;
  --text-muted: #8492A6;
  --text-on-dark: #E8EDF5;

  --border: #E2E8F0;
  --border-light: #EDF2F7;

  --success: #22C55E;
  --warning: #F59E0B;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 10px -5px rgba(0,0,0,0.03);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}
.nav-brand:hover { color: var(--text); }
.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.1rem;
}
.brand-accent { color: var(--primary); }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  padding: 8px;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.nav-dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--bg-hero);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,102,204,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,107,53,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-on-dark);
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.7;
}

/* Quick Calc Card */
.quick-calc-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.quick-calc-card h2,
.quick-calc-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}
.quick-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-input-group label {
  font-size: 0.85rem;
  color: var(--text-on-dark);
  font-weight: 500;
}
.quick-input-group input {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1.05rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.quick-input-group input::placeholder { color: rgba(255,255,255,0.4); }
.quick-input-group input:focus { border-color: var(--primary); }
.quick-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.quick-result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-on-dark);
}
.quick-result-row.total {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
}
.quick-result .btn { margin-top: 16px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}
.btn-outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}
.section-info { background: var(--bg-white); }

.page-hero {
  background: var(--bg-hero);
  color: white;
  padding: 40px 0;
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.page-hero p {
  color: var(--text-on-dark);
  font-size: 1rem;
  max-width: 600px;
}
.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: rgba(255,255,255,0.9); }

/* ============================================================
   CALCULATOR GRID (Home page)
   ============================================================ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.calc-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s;
  position: relative;
  color: var(--text);
}
.calc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}
.calc-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}
.calc-card h2,
.calc-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.calc-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.calc-card-arrow {
  position: absolute;
  top: 28px;
  right: 28px;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: all 0.2s;
}
.calc-card:hover .calc-card-arrow {
  color: var(--primary);
  transform: translateX(4px);
}

/* ============================================================
   CALCULATOR LAYOUT (Calculator pages)
   ============================================================ */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.calc-main { min-width: 0; }

/* Calculator Card */
.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

/* Form Inputs */
.calc-form { margin-bottom: 0; }
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
  background: white;
}
select.form-input { cursor: pointer; }

/* Results */
.calc-results {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.calc-results h2,
.calc-results h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.result-section {
  margin-bottom: 20px;
}
.result-section h4,
.result-section .result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-light);
}
.result-row:last-child { border-bottom: none; }
.result-row span:first-child { color: var(--text-secondary); }
.result-row span:last-child { font-weight: 600; font-family: var(--font-mono); font-size: 0.9rem; }
.result-row.highlight {
  background: var(--primary-light);
  padding: 12px;
  border-radius: var(--radius-sm);
  border-bottom: none;
  margin-bottom: 4px;
}
.result-row.highlight span:last-child { color: var(--primary-dark); }
.result-row.subtotal {
  font-weight: 600;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}
.result-row.subtotal span:first-child { color: var(--text); }
.result-row.total {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white !important;
  padding: 16px;
  border-radius: var(--radius-sm);
  border-bottom: none;
  margin-top: 8px;
}
.result-row.total span { color: white !important; font-weight: 700 !important; }
.result-row.total span:last-child { font-size: 1.1rem; }
.result-row.dim span { color: var(--text-muted); font-size: 0.85rem; }

/* Content Card */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.content-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.content-card p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.75;
}
.content-card p:last-child { margin-bottom: 0; }
.formula-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}
.formula-box code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary-dark);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.info-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.info-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 88px;
}
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.sidebar-links {
  list-style: none;
}
.sidebar-links li { margin-bottom: 2px; }
.sidebar-links a {
  display: block;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.sidebar-links a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.data-table td:first-child {
  font-family: var(--font);
}
.data-table tbody tr:hover { background: var(--primary-light); }

/* Sector breakdown table */
.sector-table { font-size: 0.82rem; }
.sector-table th { padding: 8px 10px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.sector-table td { padding: 8px 10px; }
.sector-table .sector-primary td { background: var(--primary-light); font-weight: 600; color: var(--text-primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-hero);
  color: var(--text-on-dark);
  padding: 60px 0 30px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  margin-top: 12px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 300px;
}
.footer-brand .nav-brand { color: white; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links h4,
.footer-links .footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.15s;
}
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.footer-disclaimer {
  margin-top: 8px;
  font-size: 0.75rem !important;
}

/* ============================================================
   TOGGLE BUTTONS (Employment type, pay period, work schedule)
   ============================================================ */
.toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.toggle-btn {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}
.toggle-btn:hover {
  border-color: var(--primary);
  background: rgba(0, 102, 204, 0.05);
}
.toggle-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.toggle-btn small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 2px;
}
/* Compact toggle variant for smaller items */
.toggle-group.compact .toggle-btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  flex: 0 1 auto;
}

/* ============================================================
   SWITCH TOGGLE (Night Diff / OT checkbox)
   ============================================================ */
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.switch-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.switch-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
.switch-toggle input:checked + .switch-slider {
  background: var(--primary);
}
.switch-toggle input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   CONDITIONAL FIELDS (revealed on toggle)
   ============================================================ */
.conditional-fields {
  display: none;
  padding: 12px 0 12px 16px;
  margin-top: 4px;
  border-left: 3px solid var(--primary-light);
}
.conditional-fields.active {
  display: block;
}
.conditional-fields .form-group {
  margin-bottom: 12px;
}
.conditional-fields .form-group:last-child {
  margin-bottom: 0;
}
.inline-fields {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.inline-fields .form-group {
  flex: 1;
}

/* ============================================================
   TIMEFRAME TABS (Semi-Monthly / Monthly / Annual)
   ============================================================ */
.timeframe-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  gap: 0;
}
.timeframe-tab {
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font);
  color: var(--text-muted);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.timeframe-tab:hover {
  color: var(--primary);
}
.timeframe-tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   RESULT SUB-ROWS (indented breakdown rows)
   ============================================================ */
.result-row.sub {
  padding-left: 24px;
  font-size: 0.85rem;
}
.result-row.sub span:first-child {
  color: var(--text-muted);
}

/* Badge (e.g. Tax-exempt) */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}
.badge-info {
  background: var(--primary-light);
  color: var(--primary);
}

/* Note box */
.note-box {
  background: var(--accent-light);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 12px 0;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section details {
  border-bottom: 1px solid var(--border-light);
}
.faq-section details:last-child {
  border-bottom: none;
}
.faq-section details summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-section details summary::-webkit-details-marker {
  display: none;
}
.faq-section details summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-section details[open] summary::after {
  content: '\2212';
}
.faq-section details p {
  margin: 0 0 14px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================
   RELATED CALCULATORS
   ============================================================ */
.related-tools h3 {
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.related-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.related-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.related-link strong {
  font-size: 0.9rem;
  color: var(--primary);
}
.related-link span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active { display: flex; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-top: 4px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

  .calc-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }

  .calculator-card { padding: 24px; }
  .page-hero { padding: 28px 0; }
  .page-hero h1 { font-size: 1.5rem; }

  .result-row { font-size: 0.85rem; }
  .result-row span:last-child { font-size: 0.83rem; }

  .toggle-group { gap: 6px; }
  .toggle-btn { padding: 8px 10px; font-size: 0.8rem; }
  .toggle-btn small { font-size: 0.7rem; }
  .toggle-group.compact .toggle-btn { padding: 6px 10px; }
  .inline-fields { flex-direction: column; }
  .timeframe-tab { padding: 8px 14px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: 1.75rem; }
  .quick-calc-card { padding: 24px; }
}

/* ============================================================
   CTA Card — links guide to calculator
   ============================================================ */
.cta-card {
  background: linear-gradient(135deg, var(--primary), #0052a3);
  color: white;
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-top: 24px;
  box-shadow: var(--shadow-md);
}
.cta-card h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.2rem;
}
.cta-card p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.cta-card .btn {
  background: white;
  color: var(--primary);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  display: inline-block;
  transition: all 0.2s;
}
.cta-card .btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* Legal reference line */
.legal-ref {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 12px;
}

/* Guide link on calculator pages */
.guide-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}
.guide-link:hover {
  text-decoration: underline;
}
