/* ===================================================
   Forward Medical Billing — Global Stylesheet
   =================================================== */

:root {
  --color-primary: #0E2A47;      /* navy */
  --color-primary-light: #14395E;
  --color-accent: #12B76A;       /* emerald */
  --color-accent-light: #34D399;
  --color-teal: #0F9E75;
  --color-dark: #081A2E;
  --color-text: #1F2937;
  --color-text-light: #475569;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFC;
  --color-border: #E2E8F0;
  --gradient-main: linear-gradient(135deg, #0E2A47 0%, #0F6E56 55%, #12B76A 100%);
  --gradient-soft: linear-gradient(135deg, #ECFDF5 0%, #EFF6FF 100%);
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(8, 26, 46, 0.06);
  --shadow-md: 0 8px 30px rgba(8, 26, 46, 0.12);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

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

h1, h2, h3, h4 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
  margin: 0 0 16px;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 16px; color: var(--color-text-light); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0F6E56;
  background: #ECFDF5;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(124,58,237,0.28); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.btn-white {
  background: #fff;
  color: var(--color-primary);
}
.btn-white:hover { transform: translateY(-2px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 18px; height: 18px; }
.site-footer .logo-mark { background: #FFFFFF; }
.nav-links {
  display: flex;
  gap: 34px;
  align-items: center;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}
.nav-links a:hover { color: var(--color-accent); }
.nav-cta { display: flex; gap: 14px; align-items: center; }
.nav-phone { font-weight: 700; color: var(--color-primary); font-size: 0.95rem; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; }

/* Hero */
.hero {
  background: var(--gradient-soft);
  padding: 90px 0 70px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero p.lead { font-size: 1.15rem; color: var(--color-text-light); max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.hero-stat strong { display: block; font-size: 1.8rem; font-family: 'Sora', sans-serif; color: var(--color-primary); }
.hero-stat span { font-size: 0.85rem; color: var(--color-text-light); }
.hero-visual {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 28px;
  border: 1px solid var(--color-border);
}
.hero-visual .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.9rem;
}
.hero-visual .row:last-child { border-bottom: none; }
.badge-live {
  background: #DCFCE7; color: #15803D; font-weight: 700; font-size: 0.72rem;
  padding: 4px 10px; border-radius: 999px;
}

/* Sections */
section { padding: 80px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 680px; margin-bottom: 50px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Cards / Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px;
  transition: all 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gradient-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.95rem; }
.card ul { margin-top: 14px; }
.card ul li { font-size: 0.88rem; color: var(--color-text-light); padding: 4px 0; padding-left: 20px; position: relative; }
.card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--color-teal); font-weight: 700; }

.tag-addon {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #FEF3C7;
  color: #92400E;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tag-core {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #E6EEF5;
  color: #0E2A47;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 10px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: #fff; font-weight: 800; font-family: 'Sora', sans-serif;
  margin-bottom: 16px;
}

/* CTA band */
.cta-band {
  background: var(--gradient-main);
  border-radius: 24px;
  padding: 56px;
  text-align: center;
  color: #fff;
  margin: 0 24px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 28px; }

/* Testimonial / trust */
.trust-strip {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.trust-item { text-align: center; flex: 1; min-width: 140px; }
.trust-item strong { display: block; font-size: 1.6rem; font-family: 'Sora', sans-serif; color: var(--color-primary); }
.trust-item span { font-size: 0.82rem; color: var(--color-text-light); }

/* Forms */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--color-dark); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-accent); }

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #CBD5E1;
  padding: 64px 0 26px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 18px; }
.footer-grid a { display: block; color: #94A3B8; font-size: 0.9rem; padding: 5px 0; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: #64748B;
}
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a { color: #64748B; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.logo-text { display: inline-block; }
.tm { font-size: 0.5em; vertical-align: top; position: relative; top: 0.15em; margin-left: 1px; }

.legal-content h2 { font-size: 1.35rem; margin-top: 38px; }
.legal-content ul { list-style: disc; padding-left: 22px; margin: 0 0 16px; }
.legal-content li { margin-bottom: 8px; color: var(--color-text-light); }
.legal-content a { color: var(--color-primary); text-decoration: underline; }
.legal-content p:first-child { font-size: 0.95rem; color: var(--color-text-light); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); padding: 22px 0; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.faq-item p { margin: 0; }

/* Page header (interior pages) */
.page-hero {
  background: var(--gradient-soft);
  padding: 60px 0 50px;
  text-align: center;
}
.page-hero p { max-width: 600px; margin: 0 auto; }

.breadcrumb { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 16px; }
.breadcrumb a { color: var(--color-primary); font-weight: 600; }

/* ===================================================
   Responsive — three tiers: desktop (default) / tablet
   (≤1024px) / mobile (≤640px), plus a small-phone
   refinement (≤380px). Mobile nav uses a toggled class
   (.nav-links.open) scoped inside the tablet query, so
   it can never leak into the desktop layout regardless
   of resize/rotation order.
   =================================================== */

/* Large tablet / iPad landscape and below */
@media (max-width: 1024px) {
  .nav-wrap { position: relative; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 14px 24px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .nav-links a:last-child { border-bottom: none; }
  .menu-toggle { display: block; }

  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 30px 24px; }
  .trust-strip { justify-content: flex-start; }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 44px; }
  section { padding: 60px 0; }
}

/* Phone */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }

  .nav-wrap { padding: 12px 16px; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .logo-mark svg { width: 16px; height: 16px; }
  .nav-phone { display: none; }
  .nav-cta .btn { padding: 10px 16px; font-size: 0.85rem; }

  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .hero p.lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px 28px; margin-top: 32px; }
  .hero-visual { padding: 20px; }

  section { padding: 48px 0; }
  .section-head { margin-bottom: 34px; }

  .card { padding: 22px; }
  .form-card { padding: 22px; }
  .cta-band { margin: 0 12px; padding: 34px 22px; border-radius: 18px; }

  .trust-strip { gap: 14px; padding: 24px 0; }
  .trust-item { min-width: 42%; }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Small phone */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-stats { gap: 16px 22px; }
  .btn { padding: 12px 20px; font-size: 0.9rem; }
}

/* WhatsApp chat widget */
.whatsapp-widget {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
}
.whatsapp-float {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease;
  order: 2;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; position: relative; z-index: 1; }
.whatsapp-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.55;
  animation: wa-pulse 2.2s infinite;
  z-index: 0;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}
.whatsapp-tooltip {
  order: 1;
  background: var(--color-dark);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.whatsapp-widget:hover .whatsapp-tooltip { opacity: 1; transform: translateX(0); }
@media (max-width: 640px) {
  .whatsapp-widget { bottom: 16px; right: 16px; }
  .whatsapp-float { width: 52px; height: 52px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
  .whatsapp-tooltip { display: none; }
}
