/* ===================================================
   Salary Calculator UK - Main Stylesheet
   salarycalculatoruk.online
   =================================================== */

/* === CSS Variables === */
:root {
  --primary: #1a3c5e;
  --primary-light: #2563a8;
  --primary-dark: #0f2440;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-dark: #111827;
  --text-medium: #374151;
  --text-light: #6b7280;
  --text-xlight: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #2563a8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-height: 70px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text-medium);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 3px; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

/* === Accessibility === */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.section-header p { font-size: 1.05rem; color: var(--text-light); max-width: 540px; margin: 0 auto; }

/* === Header === */
.site-header {
  background: var(--primary);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.logo-icon { font-size: 1.6rem; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.logo-text strong { font-weight: 800; color: var(--accent); }

/* Nav */
.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; gap: 4px; list-style: none; }
.nav-link {
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}
.nav-link.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

/* === Breadcrumb === */
.breadcrumb-bar {
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  list-style: none;
}
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--text-xlight); }
.breadcrumb a { color: var(--primary-light); }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  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.04'%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");
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); font-weight: 500; }

/* === Calculator Section === */
.calculator-section { padding: 60px 0; background: var(--bg-light); }

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Calculator Card */
.calculator-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.calc-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 28px 32px;
}
.calc-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calc-header p { font-size: 0.9rem; opacity: 0.85; }
.calc-form { padding: 28px 32px; }

/* Form Elements */
.form-group { margin-bottom: 1.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.form-label i { color: var(--primary-light); width: 14px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37,99,168,0.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-prefix, .input-suffix {
  position: absolute;
  font-weight: 700;
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }
.input-wrapper .form-control { padding-left: 30px; }
.input-wrapper .form-control:has(+ .input-suffix) { padding-right: 40px; }
.input-wrapper input[id="pension"] { padding-right: 40px; padding-left: 14px; }
.form-help { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; display: block; }

/* Checkboxes */
.checkbox-group { display: flex; flex-direction: column; gap: 10px; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-medium);
  font-weight: 500;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--primary-light);
  flex-shrink: 0;
}

/* Calculate Button */
.btn-calculate {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(245,158,11,0.35);
  letter-spacing: 0.01em;
  margin-top: 0.5rem;
}
.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.45);
}
.btn-calculate:active { transform: translateY(0); }

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--primary);
  transition: all var(--transition);
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* === Results Card === */
.results-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 500px;
}

/* Placeholder */
.results-placeholder {
  padding: 50px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.placeholder-icon { font-size: 4rem; margin-bottom: 1rem; }
.results-placeholder h3 {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.results-placeholder p { color: var(--text-light); margin-bottom: 1.5rem; }
.placeholder-features {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.placeholder-features li {
  font-size: 0.9rem;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 8px;
}
.placeholder-features i { color: var(--success); }

/* Results Content */
.results-header {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  padding: 24px 28px;
  text-align: center;
}
.results-header h3 { font-size: 1rem; font-weight: 600; opacity: 0.9; margin-bottom: 8px; }
.take-home-amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.take-home-freq { font-size: 0.9rem; opacity: 0.8; }

.pay-periods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.pay-period {
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.pay-period:last-child { border-right: none; }
.pay-period-label { font-size: 0.75rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.pay-period-amount { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); }

.results-breakdown { padding: 20px 24px; }
.breakdown-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 12px;
}
.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-gray);
  font-size: 0.95rem;
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-label { color: var(--text-medium); }
.breakdown-label span { font-size: 0.8rem; color: var(--text-light); display: block; }
.breakdown-amount { font-weight: 700; color: var(--text-dark); }
.breakdown-amount.deduction { color: var(--danger); }
.breakdown-amount.gross { color: var(--primary); }

/* Tax chart bar */
.tax-bar-section { padding: 0 24px 20px; }
.tax-bar-label { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); margin-bottom: 10px; }
.tax-bar { display: flex; height: 28px; border-radius: var(--radius-sm); overflow: hidden; }
.tax-bar-segment { display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #fff; transition: width 0.5s ease; overflow: hidden; white-space: nowrap; padding: 0 4px; }
.bar-takehome { background: var(--success); }
.bar-tax { background: var(--danger); }
.bar-ni { background: var(--warning); }
.bar-pension { background: var(--primary-light); }
.bar-loan { background: #7c3aed; }

.tax-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-medium); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* === Quick Links === */
.quick-links-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.quick-links-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quick-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quick-link-btn {
  padding: 8px 18px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition);
}
.quick-link-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
}

/* === Ad Placeholders === */
.ad-container { padding: 16px 0; }
.ad-placeholder {
  background: var(--bg-gray);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xlight);
  font-size: 0.85rem;
  font-weight: 500;
}
.sidebar-ad { min-height: 250px; margin-bottom: 1.5rem; }
.ad-leaderboard .ad-placeholder { min-height: 90px; }

/* === Tax Info Section === */
.tax-info-section { padding: 70px 0; background: var(--bg-white); }

.tax-tables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.tax-table-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tax-table-card h3 {
  background: var(--primary);
  color: #fff;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-responsive { overflow-x: auto; }
.tax-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tax-table th {
  background: var(--bg-gray);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
}
.tax-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bg-gray);
  color: var(--text-medium);
  vertical-align: middle;
}
.tax-table tr:last-child td { border-bottom: none; }
.tax-table tr:hover td { background: var(--bg-light); }

.rate-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
}
.rate-0 { background: #d1fae5; color: #065f46; }
.rate-19 { background: #dbeafe; color: #1e40af; }
.rate-20 { background: #dbeafe; color: #1e40af; }
.rate-21 { background: #e0e7ff; color: #3730a3; }
.rate-8 { background: #fef3c7; color: #92400e; }
.rate-2 { background: #fefce8; color: #713f12; }
.rate-40, .rate-42 { background: #fee2e2; color: #991b1b; }
.rate-45 { background: #fce7f3; color: #831843; }
.rate-48 { background: #f3e8ff; color: #6b21a8; }

.tax-source-note { font-size: 0.85rem; color: var(--text-light); text-align: center; margin-top: 1rem; }

/* === How It Works === */
.how-it-works { padding: 70px 0; background: var(--bg-gray); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 30px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.step-icon {
  font-size: 2.5rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
}
.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.step-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* === Content Section === */
.content-section { padding: 70px 0; background: var(--bg-white); }
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.content-main h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.content-main h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.8rem 0 0.8rem;
  letter-spacing: -0.01em;
}
.content-main h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 1.4rem 0 0.6rem;
}
.content-main p { margin-bottom: 1rem; color: var(--text-medium); line-height: 1.8; }
.content-main ul, .content-main ol {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-main ol { list-style: decimal; }
.content-main li { padding: 4px 0; color: var(--text-medium); }
.content-main a { color: var(--primary-light); font-weight: 500; }

.cta-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 1.5rem 0;
}
.cta-box p { margin: 0; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 1rem;
  background: var(--bg-light);
}
.faq-item h4 { color: var(--primary); margin: 0 0 8px 0; font-size: 1rem; }
.faq-item p { margin: 0; font-size: 0.95rem; }

/* Sidebar */
.content-sidebar { position: sticky; top: calc(var(--header-height) + 20px); }
.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-gray);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-links a {
  font-size: 0.9rem;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.sidebar-links a:hover { background: var(--bg-light); color: var(--primary); text-decoration: none; padding-left: 12px; }
.sidebar-links i { color: var(--primary-light); font-size: 0.75rem; }
.tax-facts-list { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; }
.tax-facts-list li { padding: 7px 10px; background: var(--bg-light); border-radius: var(--radius-sm); color: var(--text-medium); border-left: 3px solid var(--primary-light); }

/* === Testimonials === */
.testimonials-section { padding: 70px 0; background: var(--primary); }
.testimonials-section .section-header h2 { color: #fff; }
.testimonials-section .section-header p { color: rgba(255,255,255,0.7); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.testimonial-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(8px);
  transition: transform var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); }
.stars { color: var(--accent); font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-card p { color: rgba(255,255,255,0.88); font-size: 0.9rem; line-height: 1.7; margin-bottom: 14px; font-style: italic; }
.reviewer strong { color: #fff; display: block; font-size: 0.9rem; }
.reviewer span { color: rgba(255,255,255,0.6); font-size: 0.82rem; }

/* === Articles Section === */
.articles-section { padding: 70px 0; background: var(--bg-light); }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.article-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-icon { font-size: 2rem; flex-shrink: 0; }
.article-content { flex: 1; }
.article-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.article-content h3 a { color: var(--primary); text-decoration: none; }
.article-content h3 a:hover { color: var(--primary-light); }
.article-content p { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; margin-bottom: 12px; }
.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.read-more:hover { gap: 10px; text-decoration: none; }

/* === Footer === */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 4rem;
  margin-bottom: 3rem;
}
.footer-brand .logo a { color: #fff; }
.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-top: 1rem;
  line-height: 1.7;
}
.footer-disclaimer {
  font-size: 0.82rem !important;
  background: rgba(255,255,255,0.08);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-top: 1rem !important;
  border-left: 3px solid var(--accent);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-nav-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-nav-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-nav-col a {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }

/* === Back to Top === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px; height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 100;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--primary-light); transform: translateY(-3px); }

/* ===================================================
   BLOG / ARTICLE PAGE STYLES
   =================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 50px 0;
}
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.page-hero p { font-size: 1.05rem; opacity: 0.85; max-width: 600px; }
.page-hero .breadcrumb { margin-bottom: 1.2rem; }
.page-hero .breadcrumb a, .page-hero .breadcrumb li { color: rgba(255,255,255,0.75); }

.blog-page { padding: 60px 0; background: var(--bg-light); }
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card-img {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.blog-card-body { padding: 20px; }
.blog-card-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.blog-card-body h2 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; line-height: 1.4; }
.blog-card-body h2 a { color: var(--primary); text-decoration: none; }
.blog-card-body h2 a:hover { color: var(--primary-light); }
.blog-card-body p { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; margin-bottom: 12px; }
.blog-card-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-xlight); }

/* Article Page */
.article-page { padding: 60px 0; background: var(--bg-light); }
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.article-body {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.article-body h2 { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin: 2rem 0 0.8rem; letter-spacing: -0.02em; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin: 1.5rem 0 0.6rem; }
.article-body h4 { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); margin: 1.2rem 0 0.4rem; }
.article-body p { margin-bottom: 1rem; line-height: 1.8; color: var(--text-medium); }
.article-body ul, .article-body ol { margin-left: 1.5rem; margin-bottom: 1rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { padding: 4px 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.article-body th { background: var(--primary); color: #fff; padding: 10px 14px; text-align: left; font-weight: 700; }
.article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--bg-light); }
.article-body a { color: var(--primary-light); font-weight: 500; }
.article-meta { display: flex; gap: 20px; font-size: 0.85rem; color: var(--text-light); margin-bottom: 1.5rem; flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 6px; }

/* Info Box */
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 1.5rem 0;
}
.info-box p { margin: 0; font-size: 0.9rem; }
.warning-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 1.5rem 0;
}

/* Internal link section */
.related-articles { margin-top: 2rem; padding-top: 2rem; border-top: 2px solid var(--bg-gray); }
.related-articles h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.related-links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.related-link-item {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}
.related-link-item:hover { background: var(--primary); color: #fff; text-decoration: none; }
.related-link-item span { font-size: 0.88rem; font-weight: 600; color: var(--primary); display: block; margin-bottom: 2px; }
.related-link-item:hover span { color: #fff; }
.related-link-item small { font-size: 0.78rem; color: var(--text-light); }
.related-link-item:hover small { color: rgba(255,255,255,0.75); }

/* Contact / Static pages */
.static-page { padding: 60px 0; background: var(--bg-light); }
.static-page-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 50px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.static-page-content h2 { color: var(--primary); font-weight: 700; margin: 1.5rem 0 0.7rem; font-size: 1.3rem; }
.static-page-content h2:first-child { margin-top: 0; }
.static-page-content p { margin-bottom: 1rem; line-height: 1.8; }
.static-page-content ul { margin-left: 1.5rem; list-style: disc; margin-bottom: 1rem; }
.static-page-content li { padding: 4px 0; }

/* Contact Form */
.contact-form .form-group { margin-bottom: 1.2rem; }
.contact-form .form-label { color: var(--text-dark); font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; display: block; }
.contact-form .form-control { border: 2px solid var(--border); }
.contact-form textarea.form-control { min-height: 140px; resize: vertical; }
.contact-form .btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.contact-form .btn-submit:hover { background: var(--primary-light); transform: translateY(-2px); }
.form-success {
  display: none;
  background: #d1fae5;
  border: 1px solid #34d399;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #065f46;
  font-weight: 600;
  margin-top: 1rem;
}

/* 404 page */
.error-404 {
  min-height: calc(100vh - var(--header-height));
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-light);
}
.error-404-content h1 { font-size: 8rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 0.5rem; opacity: 0.15; }
.error-404-content h2 { font-size: 2rem; color: var(--primary); font-weight: 800; margin-bottom: 1rem; }
.error-404-content p { color: var(--text-light); max-width: 440px; margin: 0 auto 2rem; }

/* ===================================================
   RESPONSIVE DESIGN
   =================================================== */

@media (max-width: 1100px) {
  .calculator-grid { grid-template-columns: 1fr; }
  .tax-tables-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr 280px; }
  .footer-grid { gap: 2.5rem; }
}

@media (max-width: 960px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
  .blog-layout, .article-layout { grid-template-columns: 1fr; }
  .tax-tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }
  .nav-toggle { display: flex; }
  .nav-list {
    position: fixed; top: var(--header-height); left: 0; right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 4px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-list.nav-open { transform: translateX(0); }
  .nav-link { padding: 12px 16px; border-radius: var(--radius-sm); }
  .hero { padding: 40px 0 35px; }
  .hero-stats { gap: 1.5rem; }
  .calculator-section { padding: 40px 0; }
  .calc-form { padding: 20px; }
  .calc-header { padding: 20px; }
  .steps-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonials-section .section-header { padding: 0 1rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pay-periods { grid-template-columns: repeat(2, 1fr); }
  .related-links-grid { grid-template-columns: 1fr; }
  .static-page-content { padding: 25px; }
  .article-body { padding: 24px; }
  .quick-links-section { padding: 20px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .back-to-top { bottom: 20px; right: 20px; }
  .tax-tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero h1 { font-size: 1.8rem; }
  .take-home-amount { font-size: 2.2rem; }
  .quick-links-grid { gap: 8px; }
  .quick-link-btn { font-size: 0.82rem; padding: 6px 14px; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

/* === Print Styles === */
@media print {
  .site-header, .site-footer, .ad-placeholder, .back-to-top, .quick-links-section { display: none !important; }
  .results-content { display: block !important; }
  body { color: #000; }
}
