/* ============================================================================
   Curative GI - full site clone styles (loaded with curative.css for variables).
   Header mega-menu, page hero, content/prose, footer, language toggle.
   ========================================================================== */

/* ---------- site header + mega menu ---------- */
.nav-top { background: var(--brand-800); color: #cfe0f0; font-size: 13.5px; }
.nav-top .wrap { display: flex; align-items: center; gap: 18px; min-height: 38px; flex-wrap: wrap; }
.nav-top a { color: #dcebff; color: #d6e6f5; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nav-top a:hover { color: #fff; }
.nav-top .sep { margin-left: auto; }
.nav-top svg { width: 14px; height: 14px; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap, .nav-top .wrap { max-width: 1460px; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 84px; }
.site-header .brand { flex-shrink: 0; }           /* never let the logo collapse (it did on the wider ES menu) */
.site-header .brand .bn { display: none; }        /* logo image already carries the name */
.site-header .brand img { height: 60px; flex-shrink: 0; }
.site-header .hdr-tools { flex-shrink: 0; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--brand-800); padding: 6px; }
.menu-toggle svg { width: 26px; height: 26px; }

.mainmenu { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.mainmenu > .mi { position: relative; }
.mainmenu > .mi > a { display: inline-flex; align-items: center; gap: 3px; padding: 9px 7px; border-radius: 9px;
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: .15s; }
.mainmenu > .mi > a:hover { background: var(--brand-050); color: var(--brand-700); }
.mainmenu > .mi.has > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; }
.dropdown { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  min-width: 270px; padding: 8px; opacity: 0; visibility: hidden; transition: .18s; z-index: 70; }
.mainmenu > .mi:hover .dropdown, .mainmenu > .mi:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: block; padding: 10px 15px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 500; transition: .12s; }
.dropdown a:hover { background: var(--brand-050); color: var(--brand-700); }

.hdr-tools { display: flex; align-items: center; gap: 10px; }
.lang-toggle { display: inline-flex; border: 1.5px solid var(--brand-100); border-radius: 999px; overflow: hidden; font-weight: 700; font-size: 13px; }
.lang-toggle a { padding: 7px 12px; color: var(--brand-700); text-decoration: none; background: #fff; transition: .15s; }
.lang-toggle a.on { background: var(--brand); color: #fff; }
.lang-toggle a:hover:not(.on) { background: var(--brand-050); }

/* footer internal-link hub (keeps high-intent local pages out of orphan status) */
.foot-seo { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.14); margin-top: 10px; padding-top: 18px; }
.foot-seo > b { display: block; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .75; margin-bottom: 11px; }
.foot-seo-links { display: flex; flex-wrap: wrap; gap: 9px 20px; }
.foot-seo-links a { font-size: 13.5px; opacity: .85; }
.foot-seo-links a:hover { opacity: 1; text-decoration: underline; }

/* gracious, low-pressure review invitation under the patient reviews */
.review-cta { max-width: 560px; margin: 32px auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.review-cta svg { width: 26px; height: 26px; color: #f5a623; }
.review-cta p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; margin: 0; }

/* ---------- page hero (interior pages) ---------- */
.page-hero { position: relative; background:
    radial-gradient(90% 120% at 100% 0, rgba(95,208,198,.16), transparent 55%),
    linear-gradient(180deg, var(--brand-800), var(--brand-700)); color: #fff; overflow: hidden; }
.page-hero .wrap { padding: 40px 22px 44px; position: relative; z-index: 2; }
.crumbs { font-size: 13px; color: #bcd3ea; margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: #bcd3ea; text-decoration: none; } .crumbs a:hover { color: #fff; text-decoration: underline; }
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.6vw, 40px); max-width: 18em; }
.page-hero p.sub { color: #cfe0f0; font-size: 17px; max-width: 44em; margin-top: 10px; }
.page-hero .hero-img { position: absolute; right: 0; top: 0; bottom: 0; width: 38%; object-fit: cover; opacity: .22;
  mix-blend-mode: luminosity; }

/* ---------- content / prose ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; padding: 44px 0 56px; }
.prose { min-width: 0; font-size: 16.5px; color: var(--ink-soft); }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--brand-800); margin: 1.5em 0 .5em; line-height: 1.25; }
.prose h2 { font-size: 26px; padding-bottom: 8px; border-bottom: 2px solid var(--brand-050); }
.prose h3 { font-size: 20px; } .prose h4 { font-size: 17px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 28px; margin: .5em 0; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(95,208,198,.18); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; position: relative; padding-left: 38px; margin: .55em 0; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: -1px; width: 26px; height: 26px;
  border-radius: 8px; background: var(--brand-050); color: var(--brand-700); font-weight: 700; font-size: 13px;
  display: grid; place-items: center; }
.prose img { border-radius: var(--r-md); box-shadow: var(--shadow); margin: 1.2em 0; width: 100%; }
.prose figure { margin: 1.4em 0; } .prose figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.prose blockquote { margin: 1.4em 0; padding: 16px 22px; background: var(--brand-050); border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0; color: var(--ink); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 15px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; }
.prose th, .prose tr:first-child td { background: var(--brand-050); color: var(--brand-800); font-weight: 700; }
.prose .btn { margin: 6px 10px 18px 0; }
.prose a.btn { color: #fff; }                    /* keep button text white, not the prose-link blue */
.prose a.btn-ghost { color: var(--brand-700); }
/* in-prose links: subtle accent, normal weight, light underline (not heavy/bold) */
.prose a:not(.btn) { color: var(--brand); font-weight: inherit; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: rgba(18,74,126,.32);
  transition: color .15s, text-decoration-color .15s; }
.prose a:not(.btn):hover { color: var(--brand-700); text-decoration-color: var(--brand); }
/* links inside headings inherit the heading color and drop the underline
   (:not(.btn) bumps specificity above the in-prose link rule above) */
.prose h1 a:not(.btn), .prose h2 a:not(.btn), .prose h3 a:not(.btn),
.prose h4 a:not(.btn), .prose h5 a:not(.btn), .prose h6 a:not(.btn) { color: inherit; text-decoration: none; }
.prose h2 a:not(.btn):hover, .prose h3 a:not(.btn):hover, .prose h4 a:not(.btn):hover { color: var(--brand); }

/* sidebar CTA */
.side { position: sticky; top: 96px; display: grid; gap: 16px; }
.side .card { padding: 22px; }
.side .card h3 { font-size: 18px; color: var(--brand-800); margin: 0 0 6px; }
.side .card p { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; }
.side .btn { width: 100%; justify-content: center; margin-bottom: 9px; }
.side .mini { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); padding: 7px 0; }
.side .mini svg { width: 17px; height: 17px; color: var(--brand); flex: none; }
.side .card.accent { background: linear-gradient(160deg, var(--brand-800), var(--brand-700)); color: #fff; }
.side .card.accent h3 { color: #fff; } .side .card.accent p { color: #cfe0f0; }

/* related */
.related .wrap { padding: 10px 0 56px; }
.related h2 { font-size: 22px; color: var(--brand-800); margin-bottom: 18px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rel-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; transition: .15s; }
.rel-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.rel-card b { color: var(--brand-800); font-family: var(--font-display); display: block; margin-bottom: 5px; }
.rel-card span { color: var(--muted); font-size: 13.5px; }

/* services strip on landing */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.svc { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; transition: .15s; }
.svc:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.svc .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-050); color: var(--brand); display: grid; place-items: center; margin-bottom: 10px; }
.svc .ic svg { width: 22px; height: 22px; }
.svc b { color: var(--brand-800); display: block; font-size: 15px; }
.svc span { color: var(--muted); font-size: 13px; }

/* ---------- footer fixes (icons were unsized -> giant) ---------- */
footer.site .wrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px 24px; align-items: start; }
footer.site a { display: flex; align-items: center; gap: 8px; }
footer.site svg { width: 16px; height: 16px; flex: none; opacity: .85; }
footer.site .legal { display: block; }
footer.site b { display: block; }

/* ---------- landing: faithful home content ---------- */
.homewrap .prose { max-width: 940px; margin: 0 auto; }
.homewrap .prose h2 { text-align: left; }
.home-hi .card { text-align: center; }
.home-hi .ic { margin: 0 auto 12px; }
/* images were rendering full-width / gigantic; cap + center them */
.prose img { width: auto; max-width: 520px; height: auto; margin: 1.4em auto; display: block; }
.prose figure { text-align: center; }

/* home feature cards (provider + service cards, matching the original layout) */
.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 1.8em 0; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; box-shadow: var(--shadow-sm); text-align: center; display: flex; flex-direction: column; transition: .15s; }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-card img { width: 116px; height: 116px; max-width: 116px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; box-shadow: var(--shadow-sm); }
.feature-card.wide { text-align: left; }
.feature-card.wide img { width: 100%; height: 188px; max-width: none; border-radius: 12px; margin: 0 0 16px; }
.feature-card h3 { color: var(--brand-700); font-size: 18px; font-family: var(--font-display); margin: 0 0 8px; }
.feature-card h3 a { color: inherit; text-decoration: none; }
.feature-card h3 a:hover { text-decoration: underline; }
.feature-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; flex: 1; }
.feature-card .more { color: var(--brand); font-weight: 700; font-size: 14px; text-decoration: none; align-self: flex-start; }
.feature-card .more:hover { text-decoration: underline; }
@media (max-width: 860px) { .feature-cards { grid-template-columns: 1fr; } }

/* ---------- blog index ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.blog-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; text-decoration: none; transition: .15s; }
.blog-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.blog-card b { display: block; color: var(--brand-800); font-family: var(--font-display); font-size: 17px; line-height: 1.3; margin-bottom: 8px; }
.blog-card span { color: var(--ink-soft); font-size: 14px; }

/* ---------- reviews / testimonials ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.review .stars { color: #f5a623; font-size: 15px; letter-spacing: 2px; margin-bottom: 10px; }
.review p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; flex: 1; }
.review .who { display: flex; align-items: center; gap: 11px; }
.review .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(180deg,var(--brand),var(--brand-700)); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); flex: none; }
.review .nm { font-weight: 700; color: var(--brand-800); font-size: 14.5px; }
.review .src { color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } .reviews-grid { grid-template-columns: 1fr; } footer.site .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ---------- responsive header (full menu only where the wider ES menu fits) ---------- */
@media (max-width: 1430px) {
  /* the header's backdrop-filter makes it the containing block for position:fixed,
     which traps the slide-out menu inside the 60px header bar (only "About" shows).
     Drop the blur on mobile so the fixed menu is measured against the viewport. */
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-toggle { display: block; order: 3; margin-left: auto; }
  .site-header .mainmenu { position: fixed; top: 84px; left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; padding: 12px 16px 40px; overflow-y: auto; -webkit-overflow-scrolling: touch;
    display: none; margin: 0; z-index: 55; height: calc(100vh - 84px); height: calc(100dvh - 84px); }
  .site-header .mainmenu.open { display: flex; }
  .mainmenu > .mi > a { display: flex; width: 100%; border-radius: 0; padding: 17px 4px;
    border-bottom: 1px solid var(--line-soft); font-size: 18px; font-weight: 600; justify-content: space-between; }
  .mainmenu > .mi:last-child > a { border-bottom: 0; }
  .mainmenu > .mi.has > a::after { width: 9px; height: 9px; opacity: .9; margin-right: 2px;
    transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
  .mainmenu > .mi.has.open > a::after { transform: rotate(225deg) translateY(-3px); }
  /* full reset of the desktop dropdown so nothing (transition/transform/absolute pos) leaks into
     the mobile accordion — leaked props left submenu links blank or shoved off-screen on iOS */
  .dropdown { position: static; top: auto; left: auto; right: auto; transform: none; transition: none;
    opacity: 1; visibility: visible; background: none; box-shadow: none; border: 0; border-radius: 0;
    width: auto; min-width: 0; max-width: none; padding: 0 0 8px 12px; z-index: auto; display: none; }
  .mainmenu > .mi.open .dropdown { display: block; transform: translateZ(0); }
  .hdr-tools .hide-sm { display: none; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .rel-grid, .svc-grid { grid-template-columns: 1fr 1fr; }
}
/* prevent any horizontal overflow on phones */
.prose { overflow-wrap: break-word; }
@media (max-width: 600px) {
  .rel-grid, .svc-grid, .reviews-grid, .blog-grid, .feature-cards { grid-template-columns: 1fr; }
  .nav-top { display: none; }
  .page-hero .hero-img { display: none; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 68px; }
  .site-header .brand img { height: 48px; }
  .site-header .mainmenu { top: 68px; height: calc(100vh - 68px); height: calc(100dvh - 68px); }
  .page-hero .wrap { padding: 24px 16px 28px; }
  .page-hero h1 { font-size: 25px; }
  .page-hero p.sub { font-size: 15.5px; }
  section.block { padding: 38px 0; }
  .sec-head { margin-bottom: 24px; }
  .sec-head h2 { font-size: 23px; }
  .layout { padding: 24px 0 36px; gap: 22px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 21px; }
  .prose h3 { font-size: 18px; }
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .feature-card.wide img { height: 150px; }
  .band { padding: 30px 20px; }
  .reviews-grid, .blog-grid, .feature-cards { gap: 14px; }
  .btn { padding: 13px 20px; font-size: 15px; }   /* comfortable tap targets */
  .hero .chat { min-height: 440px; }
  footer.site { padding: 36px 0 28px; }
  footer.site .wrap { grid-template-columns: 1fr; gap: 22px; }
  footer.site a { overflow-wrap: anywhere; }
}
