/* ============================================================
   PAYCHECKBUDDY — MAIN SITE CSS
   Global layout, header, footer, nav, typography
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg, video, canvas { max-width: 100%; height: auto; }

:root {
  --color-primary:    #2563eb;
  --color-primary-dk: #1d4ed8;
  --color-green:      #16a34a;
  --color-gray-50:    #f9fafb;
  --color-gray-100:   #f3f4f6;
  --color-gray-200:   #e5e7eb;
  --color-gray-400:   #9ca3af;
  --color-gray-600:   #4b5563;
  --color-gray-700:   #374151;
  --color-gray-900:   #111827;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width:  1080px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
}

html { scroll-behavior: smooth; max-width: 100vw; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  background: var(--color-gray-50);
  color: var(--color-gray-900);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

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

.site-logo {
  text-decoration: none;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-gray-900);
  letter-spacing: -0.3px;
}

/* Primary Nav */
.main-navigation { display: flex; align-items: center; }

#primary-menu {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

#primary-menu li a {
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
  transition: background 0.15s, color 0.15s;
}

#primary-menu li a:hover,
#primary-menu li.current-menu-item a {
  background: var(--color-gray-100);
  color: var(--color-primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-gray-700);
  position: relative;
  transition: transform 0.2s;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }

@media (max-width: 640px) {
  .menu-toggle { display: flex; align-items: center; }

  #primary-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-gray-200);
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  #primary-menu.menu-open { display: flex; }
  #primary-menu li a { padding: 10px 14px; font-size: 1rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-gray-900);
  color: #fff;
  margin-top: 60px;
  padding: 48px 0 24px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 720px) {
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .footer-columns { grid-template-columns: 1fr; }
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-tagline {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-gray-400);
  margin-bottom: 12px;
}

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

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

.footer-copy,
.footer-affiliate-disclosure {
  font-size: 0.775rem;
  color: var(--color-gray-400);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* ============================================================
   EDITORIAL CONTENT & DEMO 2A DASHBOARD SYSTEM
   ============================================================ */
.dashboard-container,
.editorial-content,
.editorial-content-wrap {
  max-width: 1040px !important;
  width: 100% !important;
  margin: 32px auto 0 !important;
  padding: 0 16px 60px !important;
  box-sizing: border-box !important;
}

/* FAQ Accordion */
.faq-section { margin-top: 40px; }
.faq-item { border-bottom: 1px solid var(--color-gray-200); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after { content: '+'; font-size: 1.4rem; color: var(--color-primary); font-weight: 400; }
.faq-question.open::after { content: '−'; }
.faq-answer { padding: 0 0 16px; color: var(--color-gray-700); display: none; line-height: 1.7; }
.faq-answer.open { display: block; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-center { text-align: center; }
.text-green  { color: var(--color-green); }
.font-bold   { font-weight: 700; }

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--color-primary); color: #fff;
  padding: 8px 16px; z-index: 9999;
  text-decoration: none; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb-nav-wrapper {
  background: #fff;
  border-bottom: 1px solid var(--color-gray-200);
  padding: 10px 0;
  font-size: 0.85rem;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--color-gray-600);
}
.breadcrumb-list a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.breadcrumb-list a:hover {
  text-decoration: underline;
  color: var(--color-primary-dk);
}
.breadcrumb-separator {
  color: var(--color-gray-400);
  font-size: 0.8rem;
}

/* ============================================================
   UNIFIED CONTENT & EDITORIAL DESIGN SYSTEM
   ============================================================ */
.seo-content-wrap,
.guide-wrapper {
  font-family: var(--font-sans);
  color: #334155;
  line-height: 1.75;
  max-width: 960px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

.seo-content-wrap h2,
.guide-wrapper h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 48px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
  letter-spacing: -0.02em;
}

.seo-content-wrap h3,
.guide-wrapper h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 32px;
  margin-bottom: 14px;
}

.seo-content-wrap p,
.guide-wrapper p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.75;
}

.seo-content-wrap ul,
.seo-content-wrap ol,
.guide-wrapper ul,
.guide-wrapper ol {
  margin: 0 0 20px 24px;
  color: #334155;
  line-height: 1.75;
}

.seo-content-wrap li,
.guide-wrapper li {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

/* E-E-A-T Editorial Badge */
.eeat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #15803d;
  margin-bottom: 24px;
}

/* Table of Contents Box */
.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 28px 0 36px;
}
.toc-box h4 {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-list a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.toc-list a:hover {
  text-decoration: underline;
}

/* High-Impact Highlight / Quick Facts Box */
.quick-facts-box,
.highlight-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 5px solid #16a34a;
  padding: 24px 28px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}
.quick-facts-box h4,
.highlight-box strong {
  color: #14532d;
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}
.quick-facts-box p,
.highlight-box p {
  color: #166534;
  margin-bottom: 0;
  font-size: 1.02rem;
}

/* County Tax Container */
.county-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 22px 26px;
  margin: 28px 0;
}
.county-box h4 {
  margin: 0 0 12px 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Modern Data Table Wrap */
.modern-table-wrap,
.table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.modern-table-wrap table,
.table-card table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  margin: 0;
}
.modern-table-wrap th,
.table-card th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 18px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}
.modern-table-wrap td,
.table-card td {
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  white-space: nowrap;
}
.modern-table-wrap tr:last-child td,
.table-card tr:last-child td {
  border-bottom: none;
}
.modern-table-wrap tr:hover td,
.table-card tr:hover td {
  background: #f8fafc;
}

/* Interactive Accordion FAQ Cards */
.faq-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.faq-card details summary {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  position: relative;
  list-style: none;
}
.faq-card details summary::-webkit-details-marker {
  display: none;
}
.faq-card details summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #64748b;
  font-weight: 400;
}
.faq-card details[open] summary::after {
  content: "−";
}
.faq-card .faq-content {
  padding: 0 22px 20px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.7;
}

/* High-Converting Related States Card Grid */
.state-links-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0 40px;
}
.related-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  min-height: 58px;
}
.related-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}
.related-card .state-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-card .rate-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.rate-badge--zero {
  background: #dcfce7;
  color: #15803d;
}
.rate-badge--flat {
  background: #e0f2fe;
  color: #0369a1;
}
.rate-badge--prog {
  background: #f1f5f9;
  color: #475569;
}

/* CLS-Free Ad Container Slot */
.ad-slot-container {
  min-height: 280px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 36px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* ============================================================
   CRITICAL CALCULATOR SKELETON (ELIMINATES DESKTOP & MOBILE CLS)
   ============================================================ */
.calc-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  box-sizing: border-box;
}
.calc-header {
  text-align: center;
  margin-bottom: 28px;
}
.calc-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-gray-900, #0f172a);
  line-height: 1.2;
  margin-bottom: 8px;
}
.calc-subtitle {
  font-size: 1rem;
  color: var(--color-gray-600, #475569);
  max-width: 600px;
  margin: 0 auto;
}
.calc-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 820px) {
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.calc-form-panel {
  background: #ffffff;
  border: 1px solid var(--color-gray-300, #cbd5e1);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}
.calc-results-panel {
  background: #ffffff;
  border: 1px solid var(--color-gray-300, #cbd5e1);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}
.clean-elevation-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

