/* =========================================
   AFFORDABLEGLPS.COM — MAIN STYLESHEET
   ========================================= */

/* --- CSS Variables --- */
:root {
  --primary:       #1e3a5f;
  --primary-light: #2d5282;
  --primary-xlight:#e8edf4;

  --accent:        #10b981;
  --accent-light:  #d1fae5;
  --accent-dark:   #059669;

  --amber:         #f59e0b;
  --amber-light:   #fef3c7;

  --blue:          #0ea5e9;
  --blue-light:    #e0f2fe;

  --purple:        #7c3aed;
  --purple-light:  #ede9fe;

  --teal:          #0d9488;
  --teal-light:    #ccfbf1;

  --orange:        #ea580c;
  --orange-light:  #ffedd5;

  --bg:            #f8fafc;
  --bg-alt:        #f1f5f9;
  --card:          #ffffff;
  --border:        #e2e8f0;
  --border-light:  #f1f5f9;

  --text:          #0f172a;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);

  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full:9999px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 78px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

/* =========================================
   HEADER
   ========================================= */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.5px;
}

.logo-dot { color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s;
  white-space: nowrap;
}

.header-nav a:hover { color: #fff; }

/* =========================================
   HERO
   ========================================= */
.hero {
  background: linear-gradient(140deg, #142d4c 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
}

/* Audit Badge */
.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.35);
  color: #6ee7b7;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.audit-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* H1 */
.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 16px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -.3px;
}

.accent-text { color: var(--accent); }

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* Quick Stats */
.quick-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  flex-wrap: wrap;
  row-gap: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.2);
}

.stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 5px;
  white-space: nowrap;
}

/* Jump Buttons */
.section-jumps {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.jump-btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  transition: background .2s, border-color .2s;
}

.jump-btn:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.45);
}

.jump-btn--pill {
  background: rgba(124,58,237,.25);
  border-color: rgba(124,58,237,.45);
}

.jump-btn--shot {
  background: rgba(13,148,136,.25);
  border-color: rgba(13,148,136,.45);
}

/* =========================================
   TRUST BAR
   ========================================= */
.trust-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  list-style: none;
  row-gap: 10px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--text-muted);
}

.trust-icon { font-size: 1rem; }

/* =========================================
   COMPARISON SECTIONS
   ========================================= */
.comparison-section { padding: 72px 0; }
.section-alt        { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 44px;
}

.section-label {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 4px 13px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -.2px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: .98rem;
}

/* --- Scroll hint (mobile) --- */
.table-scroll-hint {
  display: none;
  text-align: center;
  font-size: .75rem;
  color: var(--text-light);
  margin-bottom: 8px;
  letter-spacing: .03em;
}

/* --- Table Wrapper --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: .9rem;
}

/* Head */
.comparison-table thead { background: var(--primary); }

.comparison-table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  background: var(--primary);
}

.comparison-table th.col-highlight {
  background: rgba(16,185,129,.18);
  color: #a7f3d0;
}

/* Body rows */
.comparison-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background .12s;
}

.comparison-table tbody tr:last-child { border-bottom: none; }

.comparison-table tbody tr:hover { background: #f8fafc; }

.comparison-table td {
  padding: 18px;
  vertical-align: middle;
}

/* Winner row */
.row-winner {
  background: linear-gradient(90deg, rgba(16,185,129,.06) 0%, transparent 60%) !important;
}

.row-winner td:first-child {
  border-left: 3px solid var(--accent);
}

/* Highlight column */
td.col-highlight, th.col-highlight {
  background: rgba(16,185,129,.05);
}

/* Clinic Cell */
.clinic-cell {
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clinic-cell strong {
  font-size: .95rem;
  color: var(--primary);
  display: block;
}

/* =========================================
   BADGES
   ========================================= */
.badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.badge-winner  { background: var(--accent);  color: #fff; }
.badge-popular { background: var(--purple);   color: #fff; }
.badge-flat    { background: var(--teal);     color: #fff; }
.badge-sm      { font-size: .58rem; padding: 2px 7px; }

/* =========================================
   PRICE CELLS
   ========================================= */
.price-cell {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  white-space: nowrap;
}

.price-note {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
}

.price-flat { color: var(--accent) !important; }
.price-low  { color: var(--accent) !important; }

.fee-cell      { color: var(--text-muted); font-size: .9rem; white-space: nowrap; }
.fee-zero      { color: var(--accent) !important; font-weight: 600; }

.year-cost {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

/* =========================================
   TAGS
   ========================================= */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-green  { background: var(--accent-light);  color: var(--accent-dark); }
.tag-purple { background: var(--purple-light);  color: var(--purple); }
.tag-blue   { background: var(--blue-light);    color: #0369a1; }
.tag-teal   { background: var(--teal-light);    color: var(--teal); }
.tag-orange { background: var(--orange-light);  color: var(--orange); }

/* =========================================
   TIMING BADGES
   ========================================= */
.timing {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
}

.timing-strict { background: var(--amber-light); color: #92400e; }
.timing-flex   { background: var(--accent-light); color: #065f46; }

/* =========================================
   CTA BUTTON
   ========================================= */
.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .84rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, transform .15s, box-shadow .15s;
}

.cta-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* =========================================
   TABLE NOTES & CALLOUTS
   ========================================= */
.table-note {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.callout {
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  font-size: .9rem;
  line-height: 1.65;
}

.callout-amber { background: var(--amber-light); border-left: 4px solid var(--amber); }
.callout-blue  { background: var(--blue-light);  border-left: 4px solid var(--blue); }

/* =========================================
   METHODOLOGY
   ========================================= */
.methodology-section {
  background: var(--primary);
  color: #fff;
  padding: 72px 0;
}

.methodology-section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 44px;
  letter-spacing: -.2px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.method-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  transition: background .2s;
}

.method-card:hover { background: rgba(255,255,255,.11); }

.method-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.method-card h3 {
  font-size: .98rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.method-card p {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}

/* =========================================
   FAQ
   ========================================= */
.faq-section {
  padding: 72px 0;
  background: var(--bg-alt);
}

.faq-section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 44px;
  letter-spacing: -.2px;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background .12s;
  font-family: var(--font);
  line-height: 1.5;
}

.faq-q:hover { background: var(--bg); }

.faq-icon {
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 300;
  transition: transform .22s;
  line-height: 1;
}

.faq-item.is-open .faq-icon { transform: rotate(45deg); }

.faq-a {
  padding: 0 24px 22px;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.faq-a[hidden] { display: none; }

.faq-a p + p { margin-top: 12px; }

/* =========================================
   DISCLAIMER
   ========================================= */
.disclaimer-section {
  padding: 40px 0;
  background: var(--bg);
}

.disclaimer-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.disclaimer-box h3 {
  font-size: .88rem;
  color: var(--text);
  margin-bottom: 12px;
}

.disclaimer-box p + p { margin-top: 8px; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.65);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 700;
  font-size: .98rem;
}

.footer-logo .logo-mark {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
}

.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .84rem;
  transition: color .15s;
}

.footer-nav a:hover { color: #fff; }

.footer-copy {
  font-size: .77rem;
  color: rgba(255,255,255,.35);
}

/* =========================================
   BACK TO TOP
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s, background .15s;
  z-index: 100;
  line-height: 1;
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.back-to-top[hidden] { display: none; }

/* =========================================
   RESPONSIVE — TABLET
   ========================================= */
@media (max-width: 900px) {
  .stat { padding: 0 18px; }
  .stat-num { font-size: 1.8rem; }
}

/* =========================================
   RESPONSIVE — MOBILE
   ========================================= */
@media (max-width: 720px) {
  .header-nav { display: none; }

  .hero { padding: 44px 0 36px; }
  .comparison-section { padding: 48px 0; }
  .methodology-section { padding: 48px 0; }
  .faq-section { padding: 48px 0; }

  .quick-stats { gap: 0; row-gap: 20px; }
  .stat-divider { display: none; }
  .stat { padding: 0 16px; }

  .trust-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .trust-item { text-align: left; }

  .table-scroll-hint { display: block; }

  .comparison-table th,
  .comparison-table td {
    padding: 13px 14px;
    font-size: .85rem;
  }

  .section-jumps { gap: 8px; }
  .jump-btn { padding: 9px 16px; font-size: .84rem; }

  .method-grid { grid-template-columns: 1fr 1fr; }

  .faq-q { padding: 16px 18px; font-size: .9rem; }
  .faq-a  { padding: 0 18px 18px; }
}

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

  .hero h1 { font-size: 1.65rem; }

  .clinic-cell { min-width: 110px; }

  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}
