/* ==========================================================================
   Dr. Bhagyashree Yewale-Goykar — Responsive layout
   Desktop first: each block below adjusts the layout for narrower screens.
   ========================================================================== */

/* The mobile menu panel exists only below the desktop navigation breakpoint */
@media (min-width: 1280px) {
    .mobile-menu {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Up to 1279px: the menu button replaces the navigation links
   -------------------------------------------------------------------------- */

@media (max-width: 1279px) {
    .site-nav {
        display: none;
    }

    .menu-toggle {
        display: grid;
    }

    .site-header__actions {
        margin-left: auto;
    }

    /* Footer: the logo column on its own row (three columns leave the logo
       too little room below 1280px), then contact and map side by side */
    .footer__top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .footer__about {
        max-width: 36rem;
    }
}

/* --------------------------------------------------------------------------
   Up to 1100px
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    /* Appointment banner: the text needs the full width here, so the
       artwork moves below it, 270px tall in the bottom right corner, with
       room kept for it under the button (its top edge is only faint leaves) */
    .cta {
        padding-bottom: 260px;
        background-position: right bottom;
        background-size: auto 270px;
    }

    /* Stages: two per row, no connecting lines; each column is kept narrow
       so the text stays close under its portrait */
    .stages {
        --photo: 180px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 56px 40px;
    }

    .stage {
        width: 100%;
        max-width: 360px;
        justify-self: center;
    }

    .stage__link {
        display: none;
    }

    .h-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --------------------------------------------------------------------------
   Up to 1023px: single-column hero, About and FAQ
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
    .hero__grid,
    .about__grid,
    .faq__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__content {
        max-width: 680px;
    }

    .hero__visual {
        top: 0;
        max-width: 520px;
        margin-top: 8px;
    }

    .about__visual {
        max-width: 540px;
    }

    .section-head--split {
        grid-template-columns: minmax(0, 1fr);
    }

    .faq__intro {
        position: static;
    }

    .faq__card {
        max-width: 520px;
    }
}

/* --------------------------------------------------------------------------
   Up to 900px
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .h-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Gallery: two photos in view */
    .g-track {
        --per-view: 2;
        --gap: 14px;
    }
}

/* --------------------------------------------------------------------------
   Up to 767px: phones in landscape and small tablets
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    :root {
        --bar-h: 80px;
        --header-top: 10px;
    }

    /* Phone strip: just the number, centred */
    :root:has(.topbar) {
        --topbar-h: 36px;
    }

    .topbar__inner {
        justify-content: center;
        padding-inline: var(--gutter);
    }

    .topbar__item--map {
        display: none;
    }

    body {
        font-size: 1rem;
    }

    .site-header__bar {
        gap: 10px;
        padding: 0 8px 0 10px;
    }

    .header-cta {
        display: none;
    }

    .menu-toggle {
        width: 46px;
        height: 46px;
    }

    .brand {
        gap: 9px;
    }

    /* No room for the qualifications in the phone header bar (they are in the
       hero just below); the footer keeps them, wrapping if it must */
    .site-header .brand__creds {
        display: none;
    }

    .footer__brand .brand__creds {
        white-space: normal;
    }

    /* Gallery arrows just inside the photos (the page margin is too narrow
       for them to hang over the edge) */
    .g-arrow {
        width: 44px;
        height: 44px;
    }

    .g-arrow--prev {
        left: 8px;
    }

    .g-arrow--next {
        right: 8px;
    }

    .brand__logo {
        width: 66px;
        height: 66px;
    }

    .footer__brand .brand__logo {
        width: 84px;
        height: 84px;
    }

    .brand__name {
        font-size: 1.08rem;
    }

    .brand__role {
        font-size: 0.68rem;
    }

    .mobile-menu {
        clip-path: circle(0 at calc(100% - 44px) calc(var(--topbar-h) - var(--topbar-shift, 0px) + 44px));
    }

    .site-header.is-menu-open .mobile-menu {
        clip-path: circle(150% at calc(100% - 44px) calc(var(--topbar-h) - var(--topbar-shift, 0px) + 44px));
    }

    .hero__eyebrow {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
    }

    /* Phones: the life-stages wheel first, the heading and text below it */
    .hero__visual {
        order: -1;
        margin-top: 0;
    }

    /* Appointment banner on phones: the artwork fills the section behind the
       text, softened by a cream veil so the heading and copy stay readable */
    .cta {
        padding-bottom: 56px;
        background:
            linear-gradient(rgba(254, 248, 244, 0.8), rgba(254, 248, 244, 0.8)),
            #FEF8F4 url("../images/gallery/banner.png") no-repeat right center / cover;
    }

    .about__note {
        right: 0;
        bottom: 0;
        max-width: 240px;
    }

    /* Expertise: smaller logo circle, one area per row */
    .x-wheel__hub {
        width: 200px;
        height: 200px;
        margin-bottom: 44px;
    }

    .x-wheel__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .x-item {
        gap: 18px;
    }

    .x-item__icon {
        width: 78px;
        height: 78px;
    }

    .x-item__icon .icon {
        width: 36px;
        height: 36px;
    }

    .x-item__num {
        font-size: 1.8rem;
    }

    .x-item__title {
        font-size: 1.42rem;
    }

    /* Stages: one per row */
    .stages {
        --photo: 170px;
        grid-template-columns: minmax(0, 1fr);
        gap: 52px;
    }

    .services__note {
        border-radius: var(--radius);
        padding: 18px 20px;
    }

    .lightbox__figure {
        max-width: calc(100vw - 32px);
    }

    .lightbox__nav {
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .lightbox__img {
        max-height: calc(100dvh - 190px);
    }

    .faq-item__q {
        padding: 18px 18px;
        font-size: 1.18rem;
    }

    .faq-item__a {
        padding: 0 18px 20px;
    }

    .footer__top {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .footer__map {
        height: 260px;
    }

    .footer__brand .brand__name {
        font-size: 1.2rem;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .float-actions {
        right: 14px;
        bottom: 14px;
    }

    .float-btn {
        width: 48px;
        height: 48px;
    }
}

/* --------------------------------------------------------------------------
   Up to 560px
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
    .h-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__actions .btn {
        flex: 1 1 100%;
    }

    .cta__actions .btn {
        flex: 1 1 100%;
    }

    /* Gallery: one photo in view on phones, with the edge of the next one
       showing so it is clear the row slides */
    .g-track {
        --per-view: 1.15;
    }

    .about__visual {
        margin-bottom: 20px;
    }
}

/* --------------------------------------------------------------------------
   Up to 420px: small phones
   -------------------------------------------------------------------------- */

@media (max-width: 420px) {
    .brand__logo {
        width: 58px;
        height: 58px;
    }

    .brand__name {
        font-size: 0.96rem;
    }

    .brand__role {
        font-size: 0.6rem;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .hero__tagline {
        font-size: 2.45rem;
    }
}

@media (max-width: 360px) {
    .brand {
        gap: 7px;
    }

    .brand__logo {
        width: 50px;
        height: 50px;
    }

    .brand__name {
        font-size: 0.86rem;
    }

    .brand__role {
        font-size: 0.55rem;
    }
}

@media (max-width: 340px) {
    .site-header__bar {
        gap: 6px;
        padding: 0 6px 0 4px;
    }

    .brand__logo {
        width: 42px;
        height: 42px;
    }

    .brand__name {
        font-size: 0.8rem;
    }

    .brand__role {
        font-size: 0.52rem;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }
}

/* --------------------------------------------------------------------------
   Touch screens: gallery captions are always shown (there is no hover)
   -------------------------------------------------------------------------- */

@media (hover: none) {
    .g-item::after,
    .g-item__caption {
        opacity: 1;
        transform: none;
    }
}
