/* =========================
   practice.css — Clinic page sections only
   (Hero stays controlled by home.css)
   ========================= */

/* ---------------------------------------------------------
   HERO additions (minimal, safe)
   --------------------------------------------------------- */

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: .85rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.hero-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 0;
}

.hero-pills .status-pill {
    cursor: default;
    user-select: none;
}

/* ---------------------------------------------------------
   Clinic wrapper + layout
   --------------------------------------------------------- */

html[data-brand="clinic"] .clinic {
    padding: 78px 0 40px;
}

html[data-brand="clinic"] .clinic-section {
    padding: 18px 0 0;
    text-rendering: geometricPrecision;
}

html[data-brand="clinic"] .clinic-divider {
    height: 1px;
    margin: 34px 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .10), transparent);
}

/* section header row */
html[data-brand="clinic"] .clinic-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

html[data-brand="clinic"] .clinic-head-left {
    max-width: 78ch;
}

html[data-brand="clinic"] .clinic-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* two-panel body (default desktop/tablet wide) */
html[data-brand="clinic"] .clinic-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

/* ---------------------------------------------------------
   Typography (single source of truth)
   Matches the feel of your other pages
   --------------------------------------------------------- */

html[data-brand="clinic"] .clinic-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: .85rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

html[data-brand="clinic"] .clinic-title {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-size: clamp(2rem, 3.1vw, 2.75rem);
}

html[data-brand="clinic"] .clinic-title .status-pill {
    margin-left: 10px;
    transform: translateY(-2px);
}

html[data-brand="clinic"] .clinic-sub {
    margin: 10px 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.55;
}

html[data-brand="clinic"] .clinic-mini-title {
    margin: 0 0 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .92);
}

html[data-brand="clinic"] .clinic-bullets {
    margin: 0;
    padding-left: 18px;
    color: rgba(255, 255, 255, .86);
    line-height: 1.6;
    font-size: .98rem;
    display: grid;
    gap: 10px;
}

html[data-brand="clinic"] .clinic-bullets li+li {
    margin-top: 0;
}

html[data-brand="clinic"] .fineprint,
html[data-brand="clinic"] .status-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   Panels
   --------------------------------------------------------- */

html[data-brand="clinic"] .clinic-panel {
    border-radius: var(--radius-xl);
    padding: 18px 18px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    box-shadow: var(--shadow-soft);
}

/* ---------------------------------------------------------
   Doctor grid + cards
   --------------------------------------------------------- */

html[data-brand="clinic"] .doc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 12px;
}

html[data-brand="clinic"] .doc-grid--single {
    grid-template-columns: 1fr;
}

/* Doctor card becomes a “soft tile” with a hairline, not a hard box */
html[data-brand="clinic"] .doc-card {
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

html[data-brand="clinic"] .doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .36);
    border-color: rgba(255, 255, 255, .12);
}

html[data-brand="clinic"] .doc-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

/* subtle fade so image blends into body (reduces “two rectangles” feeling) */
html[data-brand="clinic"] .doc-card .doc-img {
    mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
}

html[data-brand="clinic"] .doc-grid--single .doc-img {
    height: 320px;
}

html[data-brand="clinic"] .doc-body {
    padding: 14px;
    display: grid;
    gap: 10px;
}

html[data-brand="clinic"] .doc-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

html[data-brand="clinic"] .doc-inline-status {
    display: inline-flex;
    margin: -4px 0 0;
    font-size: .78rem;
}

html[data-brand="clinic"] .doc-body .btn {
    justify-self: start;
}

/* ---------------------------------------------------------
   Status pills + note bars
   --------------------------------------------------------- */

html[data-brand="clinic"] .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .82rem;
    line-height: 1;
    background: rgba(0, 0, 0, .18);
    color: rgba(255, 255, 255, .82);
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, .10);
}

html[data-brand="clinic"] .status-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
}

html[data-brand="clinic"] .status-pill--open {
    background: rgba(18, 192, 138, .12);
    color: rgba(255, 255, 255, .92);
    border-color: rgba(18, 192, 138, .22);
}

html[data-brand="clinic"] .status-pill--open::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(18, 192, 138, .14);
}

html[data-brand="clinic"] .status-pill--wait {
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .75);
    border-color: rgba(255, 255, 255, .10);
}

html[data-brand="clinic"] .status-pill--wait::before {
    background: rgba(255, 255, 255, .35);
}

/* status note bars */
html[data-brand="clinic"] .status-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, .14);
    color: rgba(255, 255, 255, .78);
    font-size: .95rem;
}

html[data-brand="clinic"] .status-note--open {
    background: rgba(18, 192, 138, .10);
}

html[data-brand="clinic"] .status-note--wait {
    background: rgba(255, 255, 255, .06);
}

html[data-brand="clinic"] .fineprint {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .65);
    font-size: .92rem;
}

/* ---------------------------------------------------------
   Staff/provider panel: remove outer “card outline”
   (keeps the common panel boxed; provider feels embedded)
   --------------------------------------------------------- */

html[data-brand="clinic"] .clinic-panel.clinic-panel--soft {
    position: relative;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 8px 6px 0 !important;
}

html[data-brand="clinic"] .clinic-panel.clinic-panel--soft::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: var(--radius-xl);
    pointer-events: none;
    opacity: .9;
}

/* ---------------------------------------------------------
   CTA strip
   --------------------------------------------------------- */

html[data-brand="clinic"] .clinic-cta {
    padding: 24px 0 86px;
}

html[data-brand="clinic"] .clinic-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(900px 420px at 15% 10%, rgba(18, 192, 138, .14), transparent 60%),
        rgba(18, 192, 138, .08);
    box-shadow: var(--shadow-soft);
}

html[data-brand="clinic"] .clinic-cta-inner h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

html[data-brand="clinic"] .clinic-cta-inner p {
    margin: 0;
    color: rgba(255, 255, 255, .80);
    max-width: 70ch;
    line-height: 1.55;
}

html[data-brand="clinic"] .clinic-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------
   Alternate layout: flip columns for sections that opt-in
   (only when you're actually in 2-col mode)
   --------------------------------------------------------- */

@media (min-width: 1251px) {
    html[data-brand="clinic"] .clinic-section--flip .clinic-body> :first-child {
        order: 2;
        /* boxed info goes right */
    }

    html[data-brand="clinic"] .clinic-section--flip .clinic-body> :last-child {
        order: 1;
        /* provider/staff goes left */
    }
}

/* ---------------------------------------------------------
   Family Practice: make doctors panel 2/3 (desktop only)
   --------------------------------------------------------- */

@media (min-width: 1251px) {
    html[data-brand="clinic"] #family .clinic-body {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

/* ≤ 1250px: stack panels + stack doc cards */
@media (max-width: 1250px) {
    html[data-brand="clinic"] .clinic-head {
        flex-direction: column;
        align-items: flex-start;
    }

    html[data-brand="clinic"] .clinic-body {
        grid-template-columns: 1fr;
    }

    html[data-brand="clinic"] .doc-grid {
        grid-template-columns: 1fr;
    }

    html[data-brand="clinic"] .doc-grid--single .doc-img {
        height: 280px;
    }
}

/* ≤ 981px: small tweaks only */
@media (max-width: 981px) {
    html[data-brand="clinic"] .doc-grid--single .doc-img {
        height: 240px;
    }

    html[data-brand="clinic"] .clinic-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ≤ 620px: optional extra tightening (kept from your earlier version) */
@media (max-width: 620px) {
    html[data-brand="clinic"] .doc-grid--single .doc-img {
        height: 240px;
    }
}

/* ---------------------------------------------------------
   Small-screen button tightening (prevent stacking)
   ONLY inside the clinic page content areas (NOT header/nav)
   --------------------------------------------------------- */

@media (max-width: 620px) {

    /* keep action rows on one line */
    html[data-brand="clinic"] .clinic-head-actions,
    html[data-brand="clinic"] .doc-actions,
    html[data-brand="clinic"] .clinic-cta-actions {
        flex-wrap: nowrap;
        gap: 8px;
    }

    /* shrink ONLY the buttons inside those action rows */
    html[data-brand="clinic"] .clinic-head-actions .btn,
    html[data-brand="clinic"] .doc-actions .btn,
    html[data-brand="clinic"] .clinic-cta-actions .btn {
        padding: 6px 10px;
        font-size: .78rem;
        border-radius: 999px;
        white-space: nowrap;
    }

    /* outline buttons can be a hair tighter (scoped too) */
    html[data-brand="clinic"] .clinic-head-actions .btn-outline,
    html[data-brand="clinic"] .doc-actions .btn-outline,
    html[data-brand="clinic"] .clinic-cta-actions .btn-outline {
        padding: 6px 9px;
    }
}

/* =========================================================
   CLINIC PAGE — Provider card layout (founder-card style)
   - Keeps your clinic-head + actions + bullets
   - 1-provider sections: bullets LEFT, provider RIGHT
   - 2-provider sections: bullets TOP, providers BELOW
   Scoped to html[data-brand="clinic"] .clinic
   ========================================================= */

html[data-brand="clinic"] .clinic .clinic-layout {
    margin-top: clamp(18px, 2.6vw, 26px);
    display: grid;
    gap: clamp(14px, 2.2vw, 18px);
}

/* 1 provider: 2 columns (bullets left, provider right) */
html[data-brand="clinic"] .clinic .clinic-layout--split {
    grid-template-columns: 1.05fr .95fr;
    align-items: start;
}

/* 2 providers: bullets top then providers below */
html[data-brand="clinic"] .clinic .clinic-layout--stack {
    grid-template-columns: 1fr;
}

/* Panels keep your existing “clinic-panel” vibe but cleaner */
html[data-brand="clinic"] .clinic .clinic-panel {
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .03));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* Panel padding */
html[data-brand="clinic"] .clinic .clinic-panel--bullets {
    padding: clamp(16px, 2.2vw, 22px);
}

html[data-brand="clinic"] .clinic .clinic-panel--providers {
    padding: clamp(16px, 2.2vw, 22px);
}

/* Providers grid (2-up when available) */
html[data-brand="clinic"] .clinic .providers-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 16px);
}

/* Single provider card just sits nicely */
html[data-brand="clinic"] .clinic .provider-card--single {
    margin-top: 12px;
}

/* =========================================================
   PROVIDER CARD (founder-card vibe)
   ========================================================= */

html[data-brand="clinic"] .clinic .provider-card {
    display: grid;
    grid-template-columns: clamp(150px, 18vw, 200px) 1fr;
    gap: clamp(14px, 2vw, 18px);
    align-items: stretch;

    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, .10);

    background:
        radial-gradient(600px 240px at 14% 18%, rgba(18, 192, 138, .12), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .03));

    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

/* Flip (image on right) */
html[data-brand="clinic"] .clinic .provider-card--flip {
    grid-template-columns: 1fr clamp(150px, 18vw, 200px);
}

html[data-brand="clinic"] .clinic .provider-card--flip .provider-media {
    order: 2;
}

html[data-brand="clinic"] .clinic .provider-card--flip .provider-body {
    order: 1;
}

/* Media */
html[data-brand="clinic"] .clinic .provider-media {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
}

html[data-brand="clinic"] .clinic .provider-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 22%;
}

/* subtle letterbox bands (like your founders) */
html[data-brand="clinic"] .clinic .provider-media::before,
html[data-brand="clinic"] .clinic .provider-media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 12%;
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
}

html[data-brand="clinic"] .clinic .provider-media::before {
    top: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .30), rgba(0, 0, 0, .08));
}

html[data-brand="clinic"] .clinic .provider-media::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .10));
}

/* Body */
html[data-brand="clinic"] .clinic .provider-body {
    padding: clamp(14px, 2vw, 18px) clamp(14px, 2.2vw, 20px) clamp(14px, 2vw, 18px) 0;
    display: grid;
    align-content: center;
    gap: 10px;
}

html[data-brand="clinic"] .clinic .provider-card--flip .provider-body {
    padding: clamp(14px, 2vw, 18px) 0 clamp(14px, 2vw, 18px) clamp(14px, 2.2vw, 20px);
}

html[data-brand="clinic"] .clinic .provider-kicker {
    margin: 0 0 4px;
    font-size: .80rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .68);
    font-weight: 800;
}

html[data-brand="clinic"] .clinic .provider-name {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .92);
}

/* Actions: scoped so nav buttons never get hit */
html[data-brand="clinic"] .clinic .provider-actions {
    margin-top: 6px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

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

/* Make split go stacked earlier */
@media (max-width: 1210px) {
    html[data-brand="clinic"] .clinic .clinic-layout--split {
        grid-template-columns: 1fr;
    }

    html[data-brand="clinic"] .clinic .providers-grid {
        grid-template-columns: 1fr;
    }
}

/* Phone: provider cards become stacked (image on top) */
@media (max-width: 635px) {

    html[data-brand="clinic"] .clinic .provider-card,
    html[data-brand="clinic"] .clinic .provider-card--flip {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 0 !important;
        border-radius: var(--radius-lg);
    }

    html[data-brand="clinic"] .clinic .provider-media {
        min-height: 220px;
        max-height: 320px;
    }

    html[data-brand="clinic"] .clinic .provider-media::before,
    html[data-brand="clinic"] .clinic .provider-media::after {
        height: 8%;
        backdrop-filter: blur(16px) saturate(1.06);
        -webkit-backdrop-filter: blur(16px) saturate(1.06);
    }

    html[data-brand="clinic"] .clinic .provider-body {
        padding: 12px 14px 14px !important;
        gap: 8px;
    }

    html[data-brand="clinic"] .clinic .provider-actions {
        margin-top: 10px;
    }

    /* even flipped cards should be image first on mobile */
    html[data-brand="clinic"] .clinic .provider-card--flip .provider-media {
        order: 1 !important;
    }

    html[data-brand="clinic"] .clinic .provider-card--flip .provider-body {
        order: 2 !important;
    }
}

/* =========================================================
   FIX: remove the "double bubble"
   Keep bullets panel boxed, but make providers wrapper invisible
   ========================================================= */

/* Only affect the providers wrapper panel */
html[data-brand="clinic"] .clinic .clinic-panel--providers {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Give the title + fineprint a little breathing room without re-adding a card */
html[data-brand="clinic"] .clinic .clinic-panel--providers .clinic-mini-title {
    margin: 0 0 12px;
    padding: 0 2px;
}

html[data-brand="clinic"] .clinic .clinic-panel--providers .fineprint {
    margin: 12px 0 0;
    padding: 0 2px;
}

/* Optional: if you still feel it’s “too puffy”, soften card shadow slightly */
html[data-brand="clinic"] .clinic .provider-card {
    box-shadow: 0 14px 38px rgba(0, 0, 0, .30);
}