/* ===========================================================
   Bariatric Surgeons of Kentuckiana — Dr. David Geller
   Shared stylesheet
   =========================================================== */

:root {
  --blue-900: #0b2a4a;
  --blue-800: #10396a;
  --blue-700: #1a4f8a;
  --blue-600: #1f66b0;
  --blue-500: #2c81d6;
  --blue-100: #e3eefb;
  --blue-50:  #f2f7fd;

  --ink:      #16202b;
  --ink-soft: #47566a;
  --ink-mute: #6b7b90;
  --line:     #dde5ef;
  --white:    #ffffff;
  --bg:       #ffffff;
  --bg-alt:   #f6f9fd;

  --green-400:#98C832;   /* logo gradient light */
  --green-600:#5F9E28;
  --accent:   #46801F;   /* logo green, darkened to 4.8:1 on white */
  --accent-dk:#3E721B;

  --radius:   14px;
  --radius-sm: 9px;
  --shadow:   0 1px 2px rgba(16,32,54,.05), 0 8px 24px rgba(16,32,54,.07);
  --shadow-lg:0 2px 4px rgba(16,32,54,.06), 0 18px 44px rgba(16,32,54,.12);

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--blue-900); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--tight { padding: 44px 0; }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--blue-600); margin: 0 0 .6em;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--blue-900); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- top utility bar ---------- */
.topbar {
  background: var(--blue-900); color: #cfe0f4; font-size: .88rem;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: flex-end; min-height: 40px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  flex: none; display: grid; place-items: center;
  height: 52px; width: auto;
}
.brand-mark img { height: 52px; width: auto; display: block; }
.brand:hover .brand-mark img { opacity: .85; }
.brand-name { font-weight: 800; color: var(--blue-900); font-size: 1.05rem; line-height: 1.15; }
.brand-sub { font-size: .78rem; color: var(--ink-mute); line-height: 1.2; }

.nav-toggle {
  display: none; background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font-size: .95rem; font-weight: 600;
  color: var(--blue-900); cursor: pointer; align-items: center; gap: 8px;
}
.nav-toggle:hover { background: var(--blue-50); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--ink); font-weight: 600; font-size: .88rem;
  padding: 9px 9px; border-radius: 8px; text-decoration: none; white-space: nowrap;
}
.nav a:hover { background: var(--blue-50); color: var(--blue-800); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--blue-700); background: var(--blue-100); }
.nav .btn { margin-left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 10px; font-weight: 700; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  min-height: 48px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--blue-700); color: #fff; }
.btn--ghost { background: #fff; color: var(--blue-700); border-color: #c6d8ee; }
.btn--ghost:hover { background: var(--blue-50); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dk); color: #fff; }
.btn--light { background: #fff; color: var(--blue-800); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: .9rem; min-height: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 82% -10%, rgba(44,129,214,.30), transparent 60%),
    linear-gradient(160deg, var(--blue-900), var(--blue-700));
  color: #eaf2fc; padding: 76px 0 84px;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { font-size: 1.15rem; color: #cfe0f4; max-width: 56ch; }
.hero .eyebrow { color: #8fc0f2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.hero-card {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.20);
  border-radius: var(--radius); padding: 26px; backdrop-filter: blur(6px);
}
.hero-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: .8em; }
.hero-card dl { margin: 0; display: grid; gap: 14px; }
.hero-card dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #8fc0f2; font-weight: 700; }
.hero-card dd { margin: 2px 0 0; color: #fff; font-weight: 600; }
.hero-card dd a { color: #fff; }

/* ---------- page banner (interior pages) ---------- */
.page-head {
  background: linear-gradient(160deg, var(--blue-900), var(--blue-700));
  color: #dbe9f8; padding: 52px 0 56px;
}
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: #cfe0f4; max-width: 62ch; margin-bottom: 0; }
.crumbs { font-size: .85rem; color: #9dc4ec; margin-bottom: 14px; }
.crumbs a { color: #9dc4ec; }
.crumbs span { opacity: .6; margin: 0 6px; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat b { display: block; font-size: clamp(1.6rem, 3.4vw, 2.15rem); color: var(--blue-700); line-height: 1.1; }
.stat span { font-size: .9rem; color: var(--ink-soft); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .45em; }
.card p:last-of-type { margin-bottom: 1em; }
.card .card-link { margin-top: auto; font-weight: 700; }
.card--link:hover { box-shadow: var(--shadow-lg); }
.icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--blue-100);
  color: var(--blue-700); display: grid; place-items: center; margin-bottom: 16px;
}
.icon svg { width: 22px; height: 22px; }

/* ---------- feature / split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ---------- callout ---------- */
.callout {
  border-left: 4px solid var(--blue-500); background: var(--blue-50);
  padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.6em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout--accent { border-left-color: var(--green-600); background: #f2f9ea; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--blue-800), var(--blue-600));
  color: #fff; padding: 56px 0; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d7e7f8; max-width: 60ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 8px; }

/* ---------- FAQ / disclosure ---------- */
details.faq {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0; margin-bottom: 12px; background: #fff;
}
details.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--blue-900);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--blue-600); font-weight: 400; line-height: 1; }
details.faq[open] summary::after { content: "\2013"; }
details.faq .faq-body { padding: 0 20px 6px; color: var(--ink-soft); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: .6em; border-radius: var(--radius-sm); }
.table-hint { font-size: .85rem; color: var(--ink-mute); margin-bottom: 1.4em; }
@media (min-width: 1000px) { .table-hint { display: none; } }
/* border-collapse:separate is required: collapsed borders do not travel with
   position:sticky cells, so the pinned column loses its edges while scrolling */
table.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
table.compare--wide { min-width: 880px; }
table.compare th, table.compare td {
  padding: 14px 16px; text-align: left; vertical-align: top; font-size: .95rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
table.compare tr > *:first-child { border-left: 1px solid var(--line); }
table.compare thead th { border-top: 1px solid var(--line); background: var(--blue-50); color: var(--blue-900); }
table.compare tbody th { background: #fbfdff; font-weight: 700; color: var(--ink); width: 170px; }

/* pin the whole first column — including the header row's corner cell,
   otherwise the header scrolls away while the body labels stay put */
table.compare--wide tbody th,
table.compare--wide thead th:first-child { position: sticky; left: 0; }
table.compare--wide tbody th { z-index: 2; }
table.compare--wide thead th:first-child { z-index: 3; }
table.compare--wide tr > *:first-child { box-shadow: 2px 0 4px -2px rgba(16,32,54,.16); }
/* tighter type in the 5-column table so it fits a desktop window without scrolling */
table.compare--wide th, table.compare--wide td { font-size: .9rem; padding: 12px 14px; }

@media (max-width: 640px) {
  table.compare th, table.compare td { padding: 12px 13px; font-size: .9rem; }
  table.compare tbody th { width: 128px; }
}

/* ---------- calculator ---------- */
.calc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.tabs { display: flex; gap: 8px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px;
  font: inherit; font-weight: 700; color: var(--ink-mute); cursor: pointer; min-height: 44px;
}
.tabs button[aria-selected="true"] { color: var(--blue-700); border-bottom-color: var(--blue-600); }
.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.field .input-wrap { position: relative; display: flex; align-items: center; }
.field input {
  width: 100%; font: inherit; padding: 12px 56px 12px 14px; border: 1px solid #c9d6e6;
  border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-height: 48px;
}
.field input:focus { border-color: var(--blue-500); }
.field .unit { position: absolute; right: 14px; color: var(--ink-mute); font-size: .9rem; font-weight: 600; pointer-events: none; }
.result {
  margin-top: 8px; background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm); padding: 22px; text-align: center;
}
.result .num { font-size: 2.6rem; font-weight: 800; color: var(--blue-800); line-height: 1; }
.result .cat { margin-top: 8px; font-weight: 700; color: var(--ink); }
.result .note { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); }
.bmi-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 18px; font-size: .74rem; text-align: center; }
.bmi-scale div { padding: 8px 4px; color: #fff; font-weight: 700; }
.bmi-scale div:nth-child(1) { background: #8fa3b8; border-radius: 6px 0 0 6px; }
.bmi-scale div:nth-child(2) { background: #4a9d5f; }
.bmi-scale div:nth-child(3) { background: #d99b2b; }
.bmi-scale div:nth-child(4) { background: #c2543f; border-radius: 0 6px 6px 0; }

/* ---------- video ---------- */
.video-frame {
  position: relative; padding-top: 56.25%; background: #0b2a4a;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.info-list li:last-child { border-bottom: 0; }
.info-list .icon { margin: 0; width: 40px; height: 40px; flex: none; }
.info-list b { display: block; color: var(--blue-900); }
.map-frame { border: 0; width: 100%; height: 320px; border-radius: var(--radius); box-shadow: var(--shadow); }

form .field textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c9d6e6;
  border-radius: var(--radius-sm); min-height: 130px; resize: vertical;
}
form .field select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c9d6e6;
  border-radius: var(--radius-sm); min-height: 48px; background: #fff;
}
.form-note { font-size: .85rem; color: var(--ink-mute); }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-900); color: #b9d0e8; padding: 52px 0 26px; font-size: .95rem; }
.footer-logo { height: 62px; width: auto; margin-bottom: 18px; opacity: .95; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 14px; }
.site-footer a { color: #dbe9f8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-legal {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .85rem;
}
.footer-legal a { color: #b9d0e8; }
.footer-legal a:hover { color: #fff; }
.footer-bottom {
  margin-top: 18px; padding-top: 0;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .85rem; color: #8fa9c6;
}
.disclaimer { font-size: .82rem; color: #8fa9c6; line-height: 1.6; margin-top: 14px; }

/* ---------- sticky mobile call bar ---------- */
.callbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 12px; font-size: 1rem; }
  .nav .btn { margin: 8px 0 0; }
  .site-header .wrap { position: relative; }
  .topbar .wrap { justify-content: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 46px 0; }
  .hero { padding: 52px 0 60px; }
  .grid-2, .grid-3, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .card { padding: 22px; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .hero .btn-row .btn, .cta-band .btn-row .btn { width: 100%; }
  body { padding-bottom: 66px; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
    background: var(--line); box-shadow: 0 -2px 14px rgba(16,32,54,.16);
  }
  .callbar a {
    background: var(--blue-700); color: #fff; text-align: center; font-weight: 700;
    padding: 15px 8px; text-decoration: none; font-size: .95rem;
  }
  .callbar a + a { background: var(--accent); }
}

@media print {
  .site-header, .topbar, .callbar, .cta-band, .site-footer { display: none; }
  body { color: #000; }
}
