/* ============================================
   CleoCashAdvance.com — Master Stylesheet
   Professional design system · December 2026
   ============================================ */

/* --- TOKENS & VARIABLES --- */
:root {
  --primary:       #4F46E5;
  --primary-dark:  #3730A3;
  --primary-light: #818CF8;
  --primary-bg:    #EEF2FF;
  --accent:        #10B981;
  --accent-bg:     #ECFDF5;
  --warn:          #F59E0B;
  --warn-bg:       #FFFBEB;
  --danger:        #EF4444;
  --danger-bg:     #FEF2F2;
  --sky:           #0EA5E9;
  --sky-bg:        #EFF6FF;
  --dark:          #0F172A;
  --dark-mid:      #1E293B;
  --mid:           #475569;
  --light:         #94A3B8;
  --border:        #E2E8F0;
  --border-mid:    #CBD5E1;
  --bg:            #F8FAFC;
  --white:         #FFFFFF;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.12);
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     20px;
  --max-w:         1180px;
  --nav-h:         64px;
  --transition:    .2s ease;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
button { cursor: pointer; font-family: inherit; }

/* --- PROGRESS BAR --- */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: 9999; transition: width .1s linear;
}

/* ============ NAV ============ */
.site-nav {
  position: sticky; top: 0; z-index: 500;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: var(--nav-h); gap: 32px;
}
.nav-logo { text-decoration: none; flex-shrink: 0; }
.nav-logo-mark {
  font-size: 1.1rem; font-weight: 900; color: var(--primary);
  letter-spacing: -.5px; line-height: 1;
}
.nav-logo-sub {
  font-size: .6rem; color: var(--light); font-weight: 500;
  letter-spacing: .02em; margin-top: 1px;
}
.nav-menu { display: flex; gap: 4px; list-style: none; flex: 1; }
.nav-menu a {
  text-decoration: none; color: var(--mid); font-size: .875rem;
  font-weight: 500; padding: 6px 10px; border-radius: 6px; transition: var(--transition);
  white-space: nowrap;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); background: var(--primary-bg); }
.nav-cta {
  background: var(--primary); color: var(--white) !important;
  padding: 8px 18px !important; border-radius: 8px; font-weight: 700 !important;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }
.nav-toggle {
  display: none; border: none; background: none; padding: 6px;
  color: var(--mid); flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: var(--transition); }
.mobile-menu {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0;
  background: var(--white); z-index: 400; overflow-y: auto; padding: 16px 24px 32px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 12px 0; color: var(--mid); font-weight: 500;
  text-decoration: none; border-bottom: 1px solid var(--border); font-size: .95rem;
}
.mobile-menu a:hover { color: var(--primary); }
.mobile-menu .m-cta {
  display: block; background: var(--primary); color: var(--white) !important;
  text-align: center; padding: 14px !important; border-radius: 10px;
  font-weight: 700 !important; margin-top: 16px; border: none;
}

/* ============ TRUST BAR ============ */
.trust-bar {
  background: linear-gradient(90deg, var(--dark) 0%, var(--dark-mid) 100%);
  padding: 8px 24px;
}
.trust-bar-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; align-items: center;
}
.trust-item { font-size: .75rem; color: #94A3B8; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.trust-item .dot { color: var(--accent); }

/* ============ HERO VARIANTS ============ */
.hero-gradient {
  background: url('/images/hero-bg.jpg') center / cover no-repeat;
  padding: 90px 24px 72px; position: relative; overflow: hidden;
}
/* Semi-transparent overlay — dark on left, lighter on right so photo shows through */
.hero-gradient::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(10,15,30, 0.82) 0%,
    rgba(10,15,30, 0.70) 45%,
    rgba(10,15,30, 0.42) 75%,
    rgba(10,15,30, 0.28) 100%
  );
}
.hero-inner { max-width: 1200px; margin: 0 auto; position: relative; }
/* Hero split: text left, form right */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 48px;
  align-items: center;
}
@media(max-width: 1024px) {
  .hero-split { grid-template-columns: 1fr; }
}
/* Form card sitting inside hero */
.hero-form-card {
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 12px 48px rgba(0,0,0,.45);
  position: relative; z-index: 2;
}
.hero-form-label {
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 6px;
}
.hero-form-title {
  font-size: 1.25rem; font-weight: 900; color: var(--dark);
  margin-bottom: 4px; letter-spacing: -.3px;
}
.hero-form-sub {
  font-size: .8rem; color: var(--mid); margin-bottom: 20px; line-height: 1.5;
}
/* Apply page form wrap */
.apply-form-embed {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
/* smooth scroll */
html { scroll-behavior: smooth; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: 50px; padding: 5px 16px; font-size: .78rem;
  color: #A5B4FC; font-weight: 600; margin-bottom: 14px; letter-spacing: .03em;
}
/* "everything you need to know about" label above brand name */
.hero-label {
  font-size: 1.05rem; color: rgba(255,255,255,.75); font-weight: 500;
  margin-bottom: 10px; letter-spacing: .01em;
}
.hero-h1 {
  margin-bottom: 20px; line-height: 1.0;
}
/* BIG brand name — the star of the hero */
.hero-brand {
  display: block;
  font-size: clamp(2.8rem, 7.5vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.0;
  background: linear-gradient(135deg, #10B981 0%, #34D399 35%, #818CF8 70%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 24px rgba(16,185,129,.35));
}
.hero-p {
  font-size: 1.05rem; color: rgba(255,255,255,.80); max-width: 560px;
  line-height: 1.65; margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.btn-hero-primary {
  background: var(--accent); color: var(--white); padding: 15px 28px;
  border-radius: 10px; text-decoration: none; font-weight: 700; font-size: .95rem;
  transition: opacity var(--transition); border: none; display: inline-block;
  box-shadow: 0 4px 20px rgba(16,185,129,.4);
}
.btn-hero-primary:hover { opacity: .9; color: var(--white); }
.btn-hero-ghost {
  background: rgba(255,255,255,.12); color: var(--white); padding: 15px 28px;
  border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid rgba(255,255,255,.25); transition: background var(--transition);
  display: inline-block; backdrop-filter: blur(4px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.20); color: var(--white); }
.hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stat {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; padding: 14px 18px; min-width: 110px; text-align: center;
  backdrop-filter: blur(6px);
}
.hero-stat-num { font-size: 1.4rem; font-weight: 900; color: var(--white); line-height: 1; }
.hero-stat-lbl { font-size: .68rem; color: rgba(255,255,255,.65); margin-top: 3px; font-weight: 500; letter-spacing: .03em; }

/* ============ PAGE HERO (smaller pages) ============ */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  padding: 52px 24px 44px;
}
.page-hero-inner { max-width: 860px; margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; color: var(--white);
  line-height: 1.2; letter-spacing: -.5px; margin-bottom: 12px;
}
.page-hero p { color: #94A3B8; font-size: .95rem; max-width: 580px; }
.page-hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 50px; padding: 4px 14px; font-size: .75rem; color: #A5B4FC;
  font-weight: 600; margin-bottom: 14px;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  max-width: var(--max-w); margin: 14px auto 0; padding: 0 24px;
  font-size: .78rem; color: var(--light); display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--light); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border-mid); }

/* ============ LAYOUT ============ */
.page-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 40px;
  padding: 48px 24px 80px; max-width: var(--max-w); margin: 0 auto; align-items: start;
}
@media(max-width: 900px) { .page-layout { grid-template-columns: 1fr; } }
.content-area h2 {
  font-size: 1.45rem; font-weight: 800; color: var(--dark); margin: 44px 0 14px;
  letter-spacing: -.4px; padding-top: 8px;
}
.content-area h3 { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin: 24px 0 10px; }
.content-area p { margin-bottom: 16px; color: var(--mid); line-height: 1.8; }
.content-area ul, .content-area ol { padding-left: 22px; margin-bottom: 16px; }
.content-area li { margin-bottom: 8px; color: var(--mid); line-height: 1.65; }
.content-area a { color: var(--primary); }

/* ============ SIDEBAR ============ */
.sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }
.toc-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.toc-title {
  font-size: .75rem; font-weight: 800; color: var(--primary); text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 14px;
}
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
  font-size: .82rem; color: var(--mid); text-decoration: none; display: block;
  padding: 4px 8px; border-radius: 6px; transition: var(--transition);
}
.toc-list a:hover { color: var(--primary); background: var(--primary-bg); }
.toc-list a.toc-active {
  color: var(--primary);
  background: var(--primary-bg);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}
.sidebar-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.sidebar-cta-title { font-size: .88rem; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.sidebar-cta-sub { font-size: .75rem; color: #C7D2FE; margin-bottom: 14px; line-height: 1.4; }
.sidebar-cta-btn {
  display: block; background: var(--white); color: var(--primary); padding: 10px 16px;
  border-radius: 8px; text-decoration: none; font-weight: 700; font-size: .82rem;
  transition: var(--transition);
}
.sidebar-cta-btn:hover { background: var(--primary-bg); }

/* ============ CARDS & COMPONENTS ============ */

/* Info boxes */
.info-box {
  border-radius: var(--radius); padding: 18px 20px; margin: 20px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.info-box.green { background: var(--accent-bg); border-left: 4px solid var(--accent); }
.info-box.blue  { background: var(--sky-bg);    border-left: 4px solid var(--sky); }
.info-box.warn  { background: var(--warn-bg);   border-left: 4px solid var(--warn); }
.info-box.red   { background: var(--danger-bg); border-left: 4px solid var(--danger); }
.info-box.purple{ background: var(--primary-bg);border-left: 4px solid var(--primary); }
.info-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1; }
.info-text { font-size: .88rem; color: var(--mid); line-height: 1.65; }
.info-text strong { color: var(--dark); }
.info-text a { color: var(--primary); }

/* Tables */
.data-table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.data-table thead { background: var(--primary); }
.data-table th {
  color: var(--white); padding: 12px 16px; text-align: left;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
}
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: .875rem; background: var(--white); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--bg); }
.td-pass { color: var(--accent); font-weight: 600; }
.td-warn { color: var(--warn); font-weight: 600; }
.td-fail { color: var(--danger); font-weight: 600; }
.td-bold { font-weight: 700; color: var(--dark); }

/* ============ COMPARISON TABLE WRAPPER ============ */
/* Wraps any comparison table for sticky first column on mobile */
.comparison-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
}
.comparison-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 500px;
}
.comparison-wrap th,
.comparison-wrap td {
  padding: 11px 16px;
  font-size: .875rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--white);
}
.comparison-wrap thead th {
  background: var(--primary);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.comparison-wrap tr:nth-child(even) td { background: var(--bg); }
.comparison-wrap tr:last-child td { border-bottom: none; }
/* Sticky first column */
.comparison-wrap th:first-child,
.comparison-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 110px;
  font-weight: 600;
  box-shadow: 2px 0 6px rgba(0,0,0,.07);
}
.comparison-wrap thead th:first-child {
  background: var(--primary);
  z-index: 3;
}
.comparison-wrap tr:nth-child(even) td:first-child {
  background: var(--bg);
}
/* Scroll hint fade on right edge */
.comparison-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 32px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.85));
  pointer-events: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}
@media (max-width: 768px) {
  .comparison-wrap th:first-child,
  .comparison-wrap td:first-child {
    min-width: 90px;
    font-size: .82rem;
  }
}

/* FAQ Accordion */
.faq-list { margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; text-align: left; border: none; background: var(--white);
  padding: 17px 20px; font-weight: 600; color: var(--dark); font-size: .95rem;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; transition: background var(--transition); line-height: 1.4;
}
.faq-q:hover { background: var(--bg); }
.faq-q.open { background: var(--primary-bg); color: var(--primary); }
.faq-arrow { font-size: .75rem; color: var(--light); transition: transform .25s; flex-shrink: 0; }
.faq-q.open .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-a {
  display: none; padding: 0 20px 18px; font-size: .88rem; color: var(--mid);
  line-height: 1.75; background: var(--white);
}
.faq-a.open { display: block; }

/* Plan Cards */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.plan-card {
  background: var(--white); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden; transition: box-shadow var(--transition);
}
.plan-card:hover { box-shadow: var(--shadow); }
.plan-card.featured { border-color: var(--primary); }
.plan-badge {
  position: absolute; top: 0; right: 0; background: var(--primary); color: var(--white);
  font-size: .65rem; font-weight: 700; padding: 4px 10px;
  border-radius: 0 var(--radius) 0 8px; letter-spacing: .05em;
}
.plan-tier { font-size: .72rem; font-weight: 700; color: var(--light); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.plan-price { font-size: 1.75rem; font-weight: 900; color: var(--dark); line-height: 1; }
.plan-price span { font-size: .82rem; font-weight: 400; color: var(--light); }
.plan-limit { font-size: .82rem; font-weight: 600; color: var(--accent); margin: 8px 0 14px; }
.plan-features { list-style: none; padding: 0; border-top: 1px solid var(--border); padding-top: 12px; }
.plan-features li { font-size: .8rem; color: var(--mid); padding: 5px 0; display: flex; gap: 7px; align-items: flex-start; }
.plan-features li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* Button system */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 9px; font-weight: 700; font-size: .9rem; text-decoration: none; transition: var(--transition); border: none; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-accent  { background: var(--accent); color: var(--white); }
.btn-accent:hover { opacity: .9; color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-lg { padding: 15px 30px; font-size: 1rem; border-radius: 11px; }
.btn-sm { padding: 8px 16px; font-size: .82rem; }

/* Tag / Badge */
.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 10px;
  border-radius: 50px; letter-spacing: .04em; text-transform: uppercase;
}
.tag-primary { background: var(--primary-bg); color: var(--primary); }
.tag-green   { background: var(--accent-bg); color: var(--accent); }
.tag-warn    { background: var(--warn-bg); color: #92400E; }
.tag-red     { background: var(--danger-bg); color: #991B1B; }

/* Stat row */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.stat-pill {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; min-width: 120px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-pill-num { font-size: 1.3rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-pill-lbl { font-size: .72rem; color: var(--light); margin-top: 3px; }

/* Score card */
.score-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius); padding: 20px; color: var(--white); display: flex; align-items: center; gap: 16px;
}
.score-num { font-size: 2.5rem; font-weight: 900; line-height: 1; }
.score-stars { font-size: 1rem; }
.score-label { font-size: .9rem; font-weight: 600; }
.score-sub { font-size: .75rem; color: #C7D2FE; margin-top: 2px; }

/* Comparison chips */
.comp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.comp-side {
  background: var(--white); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.comp-side.winner { border-color: var(--accent); }
.comp-side-name { font-size: .8rem; font-weight: 700; color: var(--light); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.comp-side-score { font-size: 2rem; font-weight: 900; color: var(--dark); }
.comp-side-verdict { font-size: .78rem; color: var(--mid); margin-top: 4px; }

/* Step cards */
.step-block { display: flex; gap: 18px; align-items: flex-start; margin: 20px 0; padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.step-block .step-num { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--white); font-weight: 800; font-size: 1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-block .step-num::before { content: none; }
.step-block .step-body { flex: 1; }
.step-block .step-body h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin: 0 0 8px; }
.step-block .step-body p { font-size: .88rem; color: var(--mid); line-height: 1.65; margin-bottom: 8px; }
@media(max-width: 600px) { .step-block { flex-direction: column; gap: 10px; } }
.step-list { display: flex; flex-direction: column; gap: 4px; margin: 24px 0; counter-reset: steps; }
.step-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; counter-increment: steps; }
.step-header { padding: 18px 22px; display: flex; align-items: flex-start; gap: 16px; }
.step-num {
  width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); font-weight: 800; font-size: .95rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-num::before { content: counter(steps); }
.step-info h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin: 0 0 3px; }
.step-time { font-size: .72rem; color: var(--light); font-weight: 500; }
.step-body { padding: 0 22px 18px 80px; }
.step-body p { font-size: .88rem; color: var(--mid); line-height: 1.65; margin-bottom: 10px; }
@media(max-width: 600px) { .step-body { padding: 0 18px 18px; } }

/* Author box */
.author-box {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; margin: 44px 0 16px;
}
.author-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center; color: var(--white);
  font-weight: 800; font-size: 1.1rem;
}
.author-name { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: 2px; }
.author-role { font-size: .75rem; color: var(--light); margin-bottom: 4px; }
.author-verified { font-size: .75rem; color: var(--accent); font-weight: 600; }

/* Disclosure */
.disclosure {
  font-size: .75rem; color: var(--light); line-height: 1.65;
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px;
}

/* Related links */
.related-box {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-top: 24px;
}
.related-title { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: 14px; }
.related-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--border); text-decoration: none;
  color: var(--mid); font-size: .875rem; transition: color var(--transition);
}
.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--primary); }
.related-link::before { content: '→'; color: var(--primary); font-weight: 700; }

/* ============ MOBILE CTA ============ */
.mobile-cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--white);
  border-top: 1px solid var(--border); padding: 12px 20px;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  z-index: 300; box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}
@media(max-width: 768px) { .mobile-cta-bar { display: flex; } }
.mobile-cta-text { font-size: .78rem; color: var(--mid); line-height: 1.3; }
.mobile-cta-btn {
  background: var(--primary); color: var(--white); padding: 10px 20px;
  border-radius: 9px; font-size: .82rem; font-weight: 700; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}

/* ============ CARDS GRID ============ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; margin: 24px 0; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon { font-size: 1.75rem; margin-bottom: 10px; }
.card-tag { font-size: .7rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; line-height: 1.3; }
.card-desc { font-size: .82rem; color: var(--mid); line-height: 1.6; margin-bottom: 14px; }
.card-link { font-size: .82rem; font-weight: 700; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 5px; }
.card-link:hover { text-decoration: underline; }

/* ============ CALCULATOR ============ */
.calc-wrapper {
  background: var(--white); border: 2px solid var(--primary); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); margin: 24px 0;
}
.calc-title { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.calc-field label { display: block; font-size: .8rem; font-weight: 600; color: var(--mid); margin-bottom: 6px; }
.calc-field input, .calc-field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-mid); border-radius: 8px;
  font-family: inherit; font-size: .9rem; color: var(--dark); background: var(--bg);
  transition: border-color var(--transition);
}
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--primary); background: var(--white); }
.calc-submit {
  width: 100%; background: var(--primary); color: var(--white); padding: 14px;
  border: none; border-radius: 9px; font-family: inherit; font-size: .95rem;
  font-weight: 700; cursor: pointer; transition: background var(--transition); margin-bottom: 20px;
}
.calc-submit:hover { background: var(--primary-dark); }
.calc-result-panel { display: none; border-top: 2px solid var(--border); padding-top: 20px; }
.calc-result-panel.show { display: block; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: .88rem; }
.result-row:last-child { border-bottom: none; }
.result-label { color: var(--mid); }
.result-value { font-weight: 700; color: var(--dark); }
.result-total { background: var(--primary-bg); border-radius: 8px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-weight: 800; }
.result-total .label { color: var(--primary); font-size: .9rem; }
.result-total .value { color: var(--primary); font-size: 1.1rem; }
.result-rec { font-size: .82rem; color: var(--mid); margin-top: 10px; padding: 10px 12px; background: var(--bg); border-radius: 7px; }

/* ============ APPLY FORM ============ */
.apply-form {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-lg); max-width: 600px; margin: 0 auto;
}
.form-step { display: none; }
.form-step.active { display: block; }
.form-step-title { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.form-step-sub { font-size: .85rem; color: var(--mid); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--dark); margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 13px 16px; border: 2px solid var(--border); border-radius: 9px;
  font-family: inherit; font-size: .95rem; color: var(--dark); background: var(--bg);
  transition: border-color var(--transition), background var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); background: var(--white);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-next, .form-submit {
  width: 100%; padding: 15px; border: none; border-radius: 10px; font-family: inherit;
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: background var(--transition);
}
.form-next { background: var(--primary); color: var(--white); }
.form-next:hover { background: var(--primary-dark); }
.form-submit { background: var(--accent); color: var(--white); }
.form-submit:hover { opacity: .9; }
.form-back { background: none; border: none; font-family: inherit; color: var(--light); font-size: .85rem; cursor: pointer; padding: 8px 0; display: block; text-align: center; width: 100%; margin-top: 10px; }
.form-back:hover { color: var(--mid); }
.progress-steps { display: flex; gap: 8px; margin-bottom: 28px; }
.progress-step { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background .3s; }
.progress-step.done { background: var(--accent); }
.progress-step.active { background: var(--primary); }
.qualify-result { text-align: center; padding: 24px 0; }
.qualify-result-icon { font-size: 3rem; margin-bottom: 12px; }
.qualify-result-title { font-size: 1.3rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.qualify-result-p { font-size: .88rem; color: var(--mid); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ============ STATE CHIPS ============ */
.state-chip {
  padding: 8px 12px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  text-align: center; letter-spacing: .01em; transition: transform .15s;
}
.state-chip:hover { transform: translateY(-1px); }
.state-ok {
  background: var(--accent-bg); color: #059669;
  border: 1px solid #A7F3D0;
}
.state-no {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #FECACA; font-weight: 700;
}

/* Mini calculator grid responsive */
@media(max-width: 640px) {
  .mini-calc-grid { grid-template-columns: 1fr !important; }
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--dark); color: var(--light); padding: 48px 24px 24px; margin-top: 80px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
@media(max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo { font-size: 1.1rem; font-weight: 900; color: var(--white); letter-spacing: -.3px; margin-bottom: 8px; }
.footer-brand p { font-size: .8rem; color: #64748B; line-height: 1.6; max-width: 240px; }
.footer-col-title { font-size: .78rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #64748B; text-decoration: none; font-size: .82rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #1E293B; padding-top: 20px; font-size: .72rem; color: #475569; line-height: 1.65; }

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed; bottom: 90px; right: 20px; z-index: 450;
  background: var(--primary); color: var(--white);
  border: none; border-radius: 50px;
  padding: 10px 18px; font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 18px rgba(79,70,229,.35);
  cursor: pointer; font-family: inherit;
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s, background var(--transition);
  pointer-events: none; white-space: nowrap;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { background: var(--primary-dark); }
@media(min-width: 769px) { #back-to-top { bottom: 32px; } }
@media(max-width: 480px) { #back-to-top { right: 14px; padding: 9px 14px; font-size: .78rem; } }

/* ============ HAMBURGER → ✕ ANIMATION ============ */
.nav-toggle span { transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

/* Tablet: 768–1024px */
@media(max-width: 1024px) and (min-width: 769px) {
  .nav-menu { gap: 2px; }
  .nav-menu a { padding: 6px 7px; font-size: .82rem; }
  .nav-logo-mark { font-size: 1rem; }
  .page-layout { padding: 36px 20px 64px; }
  .hero-gradient { padding: 72px 20px 56px; }
}

/* Mobile: ≤768px */
@media(max-width: 768px) {
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }
  .hero-gradient { padding: 56px 20px 48px; }
  .page-layout { padding: 32px 20px 60px; }
  .apply-form { padding: 24px 20px; }
  /* Ensure tables scroll horizontally */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 460px; }
  /* Better mobile nav logo */
  .nav-logo-mark { font-size: .95rem; }
  /* Touch targets ≥44px */
  .nav-menu a, .nav-cta { min-height: 44px; display: flex; align-items: center; }
  .faq-q { min-height: 52px; }
  /* Sidebar CTA button bigger hit area */
  .sidebar-cta-btn { padding: 13px 16px; }
}

/* Small phones: ≤480px */
@media(max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .comp-row { grid-template-columns: 1fr; }
  /* Hero tighter on small screens */
  .hero-gradient { padding: 44px 16px 40px; }
  .hero-brand { letter-spacing: -1px; }
  .hero-actions { flex-direction: column; }
  .btn-hero-primary, .btn-hero-ghost { width: 100%; text-align: center; justify-content: center; }
  .hero-stats { gap: 8px; }
  .hero-stat { min-width: 88px; padding: 10px 12px; }
  .hero-stat-num { font-size: 1.2rem; }
  /* Trust bar wraps gracefully */
  .trust-item { font-size: .68rem; }
  /* Sections less padding on tiny screens */
  .section { padding: 44px 16px; }
  /* Footer columns stack neatly */
  .footer-grid { gap: 20px; }
  /* Mobile CTA bar text size */
  .mobile-cta-text { font-size: .72rem; }
  /* Page hero less padding */
  .page-hero { padding: 40px 16px 36px; }
  /* Content area h2 smaller on tiny phone */
  .content-area h2 { font-size: 1.25rem; }
}

/* ============ UTILITY ============ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 24px; max-width: var(--max-w); margin: 0 auto; }
.section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 900; color: var(--dark); letter-spacing: -.5px; margin-bottom: 10px; }
.section-sub { color: var(--mid); font-size: .95rem; margin-bottom: 36px; max-width: 580px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--light); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ============ FAQ ACCORDION ============ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color var(--transition), box-shadow var(--transition);
}
.faq-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-item.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.08); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; font-weight: 700; font-size: .92rem; color: var(--dark);
  gap: 12px;
}
.faq-arrow {
  color: var(--light); font-size: .75rem; transition: transform var(--transition); flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-a {
  display: none; padding: 0 20px 20px; border-top: 1px solid var(--border);
  color: var(--mid); font-size: .88rem; line-height: 1.7;
}
.faq-a p { margin: 0 0 10px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul, .faq-a ol { margin: 8px 0; }
.faq-item.open .faq-a { display: block; }

/* ============ TEAM CARDS ============ */
.team-card-img {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 16px;
}

/* ============ QUICK ANSWER BOX ============ */
.quick-answer-box {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 1.5px solid #C7D2FE;
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 28px;
  position: relative;
}
.quick-answer-box::before {
  content: "⚡ สรุปสั้น";
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.quick-answer-box p {
  margin: 0 0 10px;
  font-size: .95rem;
  line-height: 1.65;
  color: #1e1b4b;
}
.quick-answer-box p:last-child { margin-bottom: 0; }
.quick-answer-box a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.quick-answer-box a:hover { text-decoration: underline; }
.quick-answer-box ul {
  margin: 6px 0 0 18px;
  font-size: .93rem;
  line-height: 1.7;
  color: #1e1b4b;
}
.quick-answer-box ul li { margin-bottom: 3px; }
/* Last Verified Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #15803d;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.verified-badge svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ============ WINNER BADGE ============ */
.winner-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: var(--white); font-size: .68rem; font-weight: 800; padding: 3px 10px;
  border-radius: 50px; letter-spacing: .05em; text-transform: uppercase;
}
