/* National Payroll Guide - Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x removed to enable sticky header */
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a2332; background: #fff; width: 100%; max-width: 100vw; }
a { text-decoration: none; }
img { max-width: 100%; display: block; }

:root {
  --navy: #0a2540;
  --navy-light: #0f3460;
  --red: #b22234;
  --red-light: #cc3344;
  --gold: #d4a843;
  --gold-light: #e8c060;
  --white: #ffffff;
  --gray: #f4f6f9;
  --border: #e0e8f0;
  --text: #1a2332;
  --muted: #5a6a7a;
}

/* HEADER */
.site-header { background: var(--navy); border-top: 4px solid var(--red); position: sticky; top: 0; z-index: 9999; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.15rem; font-weight: 800; color: var(--white); line-height: 1.15; letter-spacing: -0.01em; }
.logo-name span { color: var(--red-light); }
.logo-tagline { font-size: 0.7rem; color: rgba(255,255,255,0.55); font-weight: 400; letter-spacing: 0.02em; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: 0.3s; }
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a { color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 500; padding: 0.4rem 0.85rem; border-radius: 5px; transition: background 0.2s, color 0.2s; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.1); color: var(--white); }
.main-nav a.nav-cta { background: var(--red); color: var(--white); font-weight: 700; }
.main-nav a.nav-cta:hover { background: var(--red-light); }

/* HERO */
.hero { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-image: url('../img/us-capitol.jpg'); background-size: cover; background-position: center 30%; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,37,64,0.88) 0%, rgba(10,37,64,0.72) 50%, rgba(178,34,52,0.45) 100%); }
.hero-content { position: relative; max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem 4rem; width: 100%; }
.hero-eyebrow { display: inline-block; background: rgba(212,168,67,0.2); border: 1px solid var(--gold); color: var(--gold); padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 900; color: var(--white); line-height: 1.12; margin-bottom: 1.1rem; max-width: 700px; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.82); max-width: 580px; line-height: 1.75; margin-bottom: 2rem; }
.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-primary { display: inline-block; background: var(--red); color: var(--white); padding: 0.85rem 2rem; border-radius: 6px; font-weight: 700; font-size: 0.95rem; transition: background 0.2s; }
.btn-primary:hover { background: var(--red-light); }
.btn-secondary { display: inline-block; background: rgba(255,255,255,0.12); color: var(--white); border: 1.5px solid rgba(255,255,255,0.35); padding: 0.85rem 2rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem; transition: background 0.2s; }
.btn-secondary:hover { background: rgba(255,255,255,0.22); }
.btn-gold { display: inline-block; background: var(--gold); color: var(--navy); padding: 0.85rem 2rem; border-radius: 6px; font-weight: 700; font-size: 0.95rem; transition: background 0.2s; }
.btn-gold:hover { background: var(--gold-light); }
.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stat { text-align: left; }
.stat-num { font-size: 1.9rem; font-weight: 900; color: var(--gold); display: block; line-height: 1; }
.stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

/* TRUST BAR */
.trust-bar { background: var(--red); padding: 0.7rem 1.5rem; }
.trust-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.92); text-transform: uppercase; letter-spacing: 0.05em; }
.tb-divider { margin: 0 1rem; color: rgba(255,255,255,0.4); }

/* SNAPSHOT TABLE */
.snapshot-section { background: #eef2f9; padding: 3rem 1.5rem; border-bottom: 2px solid #d0daea; }
.snapshot-inner { max-width: 1000px; margin: 0 auto; }
.snapshot-inner h2 { font-size: 1.35rem; font-weight: 800; color: var(--navy); margin-bottom: 1rem; }
.snapshot-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.snapshot-table thead tr { background: var(--navy); color: var(--white); }
.snapshot-table th { padding: 0.6rem 0.85rem; text-align: left; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.snapshot-table td { padding: 0.55rem 0.85rem; border-bottom: 1px solid #d8e4f0; }
.snapshot-table tbody tr:nth-child(even) { background: #f9fafb; }
.snapshot-table tbody tr:nth-child(odd) { background: #fff; }

/* STATES SECTION */
.states-section { padding: 4rem 1.5rem; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 0.5rem; }
.section-header p { color: var(--muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }
.legend { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.75rem; font-size: 0.82rem; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend-dot.standard { background: var(--navy); }
.legend-dot.notax { background: #1a4a2a; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.state-card { background: var(--navy); color: var(--white); border-radius: 10px; padding: 1.25rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.4rem; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.state-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(10,37,64,0.25); }
.state-card.no-tax { background: linear-gradient(135deg, #1a4a2a, #1a3a1a); border-color: rgba(26,138,74,0.3); }
.state-code { font-size: 1.5rem; font-weight: 900; color: var(--gold); letter-spacing: 0.05em; }
.state-name { font-size: 0.95rem; font-weight: 600; color: var(--white); }
.state-note { font-size: 0.75rem; color: rgba(255,255,255,0.55); line-height: 1.4; }
.state-card.no-tax .state-note { color: rgba(100,220,140,0.8); }
.state-link { font-size: 0.78rem; font-weight: 600; color: var(--gold); margin-top: auto; padding-top: 0.5rem; }
.state-card.no-tax .state-link { color: #6ade8c; }
.no-tax-badge { position: absolute; top: 0.6rem; right: 0.6rem; background: rgba(26,138,74,0.3); border: 1px solid rgba(26,138,74,0.5); color: #6ade8c; font-size: 0.6rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* WHY SECTION */
.why-section { padding: 4.5rem 1.5rem; background: var(--gray); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.why-card { background: var(--white); border-radius: 10px; padding: 1.75rem; border: 1px solid var(--border); }
.why-icon { width: 40px; height: 4px; background: var(--red); border-radius: 2px; margin-bottom: 1rem; }
.why-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.why-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

/* BANNER IMAGE SECTION */
.banner-section { position: relative; height: 220px; overflow: hidden; }
.banner-img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.banner-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(10,37,64,0.8) 0%, rgba(10,37,64,0.3) 100%); display: flex; align-items: center; }
.banner-text { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.banner-text h2 { font-size: 1.85rem; font-weight: 800; color: var(--white); }
.banner-text p { color: rgba(255,255,255,0.8); font-size: 1rem; margin-top: 0.4rem; }

/* PDS SECTION */
.pds-section { background: var(--navy); color: var(--white); padding: 4.5rem 1.5rem; }
.pds-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.pds-label { color: var(--gold); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.65rem; }
.pds-inner h2 { font-size: 1.8rem; font-weight: 800; line-height: 1.25; margin-bottom: 1rem; }
.pds-inner p { color: rgba(255,255,255,0.75); line-height: 1.75; margin-bottom: 1.25rem; font-size: 0.95rem; }
.pds-stats { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; }
.pds-stat-num { font-size: 1.75rem; font-weight: 800; color: var(--gold); }
.pds-stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.04em; }
.pds-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.13); border-radius: 12px; padding: 2rem; }
.pds-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; }
.pds-list { list-style: none; }
.pds-list li { padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 0.9rem; color: rgba(255,255,255,0.82); display: flex; align-items: center; gap: 0.6rem; }
.pds-list li:last-child { border-bottom: none; }
.pds-list li::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }

/* FOOTER */
footer { background: #060f1a; color: rgba(255,255,255,0.5); padding: 2rem 1.5rem; text-align: center; font-size: 0.82rem; line-height: 1.8; }
footer a { color: rgba(255,255,255,0.6); }
footer a:hover { color: var(--gold); }
footer strong { color: rgba(255,255,255,0.8); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 1rem 1.5rem; gap: 0.25rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 99; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.65rem 1rem; border-radius: 6px; }
}
@media (max-width: 768px) {
  .hero { min-height: 420px; }
  .hero h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  .pds-inner { grid-template-columns: 1fr; gap: 2rem; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .banner-section { height: 160px; }
  .banner-text h2 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .hero-stats { gap: 1.5rem; }
  .trust-bar-inner { font-size: 0.7rem; }
  .tb-divider { margin: 0 0.5rem; }
  .logo-tagline { display: none; }
}

/* AFFILIATE PLACEHOLDER */
.affiliate-section { background: #f4f6f9; padding: 3rem 1.5rem; text-align: center; border-top: 3px solid #0a2540; }
.affiliate-inner { max-width: 680px; margin: 0 auto; }
.affiliate-inner h2 { font-size: 1.6rem; font-weight: 800; color: #0a2540; margin-bottom: 0.75rem; }
.affiliate-inner p { color: #5a6a7a; font-size: 1rem; line-height: 1.7; }
.btn-secondary-plain { display: inline-block; background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.35); padding: 0.85rem 2rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem; }


/* Empty card thumbnails collapse to thin accent strip */
.article-card-thumb:empty,
.blog-card-thumb:empty {
  aspect-ratio: auto !important;
  height: 5px !important;
  background: var(--teal, #0d7377) !important;
  font-size: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

/* --- Nav Search --- */
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search-btn { background: none; border: none; cursor: pointer; padding: .4rem; display: flex; align-items: center; color: var(--text); transition: color .2s; border-radius: 6px; }
.nav-search-btn:hover { color: var(--gold); }
.nav-search-wrap { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 0; overflow: hidden; transition: width .25s ease; background: var(--blue); border-radius: 20px; }
.nav-search-wrap.open { width: 220px; overflow: visible; }
.nav-search-input { width: 100%; padding: .38rem .8rem; border-radius: 20px; border: 1.5px solid rgba(255,255,255,.35); background: var(--blue); color: #fff; font-size: .84rem; outline: none; transition: border-color .2s; }
.nav-search-input::placeholder { color: rgba(255,255,255,.45); }
.nav-search-input:focus { border-color: var(--gold); }
.nav-search-results { position: absolute; top: calc(100% + .5rem); right: 0; width: 270px; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); overflow: hidden; display: none; z-index: 300; }
.nav-search-results.show { display: block; }
.nav-search-result { display: flex; flex-direction: column; padding: .65rem 1rem; border-bottom: 1px solid #f1f5f9; text-decoration: none; color: var(--text); transition: background .12s; }
.nav-search-result:last-child { border-bottom: none; }
.nav-search-result:hover, .nav-search-result.focused { background: #f1f5f9; }
.nav-search-result strong { font-size: .88rem; color: var(--blue); }
.nav-search-result span { font-size: .76rem; color: var(--gray-600); margin-top: .1rem; }
.nav-search-empty { padding: .75rem 1rem; font-size: .83rem; color: var(--gray-600); }
