/* ───────────── MOBILE FIXES (≤768px only) ─────────────
   Loaded with media="(max-width: 768px)" — cannot affect desktop. */

/* ─── WAVE DIVIDERS ───────────────────────────────────────
   Compressed heights so wave shape stays gentle on narrow viewports,
   and -2px on top/bottom to eliminate sub-pixel white seams. */
.grass {
    margin: -2px 0;
    line-height: 0;
    display: block;
    overflow: hidden;
}
.grass svg {
    display: block;
    vertical-align: top;
    width: 100%;
}
.grass svg[style*="height:60px"] { height: 18px !important; }
.grass svg[style*="height:50px"] { height: 14px !important; }
.grass svg[style*="height:40px"] { height: 12px !important; }

/* ─── HERO EDGE WAVE ──────────────────────────────────────
   The hero wave path is asymmetric by design (left ~y66, right ~y30).
   Drop the height way down + hide secondary decorative wave layer
   so the slope is barely perceptible. */
.hero-edge { height: 12px; overflow: hidden; }
.hero-edge svg { height: 12px !important; }
.hero-edge svg path:nth-of-type(2) { display: none; }

/* ─── RESTORE DOCTOR + WELCOME PHOTOS ─────────────────────
   Base CSS hides them at <900px with display:none. On phones we want
   them visible. Use 3:4 aspect ratio matching the actual photos. */
.doctor-photo,
.welcome-img {
    display: block !important;
    height: auto !important;
    aspect-ratio: 3/4;
    max-width: 380px;
    max-height: 500px;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.doctor-photo img,
.welcome-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center !important;
}

/* ─── HEADER — fit cleanly at phone widths ────────────────
   Block any horizontal overflow at the root. */
html, body { overflow-x: hidden; max-width: 100vw; }

@media (max-width: 600px) {
    .top-header-inner {
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    .hdr-logo { gap: 7px !important; }
    .hdr-logo img.logo-mark-img { height: 44px !important; }
    .hdr-logo-text .top-line { font-size: 22px !important; }
    .hdr-logo-text .bottom-line {
        font-size: 8.5px !important;
        letter-spacing: 0.8px !important;
    }

    /* All 3 action buttons stay visible, just smaller */
    .hdr-btns { gap: 3px !important; }
    .hdr-btn { padding: 4px !important; }
    .hdr-btn-circle { width: 28px !important; height: 28px !important; }
    .hdr-btn-circle svg { width: 14px !important; height: 14px !important; }

    /* Hamburger: icon only */
    .nav-toggle {
        padding: 8px 10px !important;
        font-size: 0 !important;
        gap: 0 !important;
        border: 1.5px solid rgba(31,58,95,0.25) !important;
    }
    .nav-toggle svg { width: 18px !important; height: 18px !important; }
}

/* iPhone SE territory — even tighter */
@media (max-width: 400px) {
    .top-header-inner { padding: 6px 8px !important; gap: 4px !important; }
    .hdr-logo img.logo-mark-img { height: 38px !important; }
    .hdr-logo-text .top-line { font-size: 19px !important; }
    .hdr-logo-text .bottom-line { font-size: 7.5px !important; }
    .hdr-btn-circle { width: 26px !important; height: 26px !important; }
    .hdr-btn-circle svg { width: 13px !important; height: 13px !important; }
    .nav-toggle { padding: 7px 8px !important; }
}

/* ─── HAMBURGER DROPDOWN — items span full width ──────────
   Base nav uses justify-content:center which leaves empty
   space on the right when dropdown is open vertically. */
.nav-bar.open {
    width: 100%;
}
.nav-bar.open .nav-inner {
    padding: 0;
    display: block;
    max-width: none;
}
.nav-bar.open .nav-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.nav-bar.open .nav-menu li {
    width: 100%;
    text-align: center;
}
.nav-bar.open .nav-menu li a {
    display: block;
    width: 100%;
    padding: 16px 24px;
}
