/* Responsive overrides for exosome-wellness. Loaded after style.css. */

@media (max-width: 768px) {
    .section,
    .page-content,
    .block-hero { padding-block: var(--spacing-xl); }
}

@media (max-width: 480px) {
    :root { --container-pad: 16px; }
    .section,
    .page-content,
    .block-hero { padding-block: var(--spacing-lg); }
}

/* ==========================================================================
   SITE-HEADER
   ========================================================================== */
@media (max-width: 1440px) {
    .site-header__inner,
    .site-header__nav,
    .site-nav__menu { gap: var(--spacing-md); }
}

@media (max-width: 1024px) {
    .site-header__inner {
        justify-content: space-between;
        gap: var(--spacing-md);
    }

    /* Swap the injected centre logo for the always-visible bar logo. */
    .site-header__logo { display: block; }
    .site-nav__logo-item { display: none; }

    /* Reveal the burger. */
    .site-header__burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 44px;  /* hardcoded tap target */
        height: 44px; /* hardcoded tap target */
        padding: 0;
        background: transparent;
        border: 0;
        cursor: pointer;
    }
    .site-header__burger-box {
        position: relative;
        display: block;
        width: 26px;  /* hardcoded burger width */
        height: 18px; /* hardcoded burger height */
    }
    .site-header__burger-line {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--color-text);
        transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
    }
    .site-header__burger-line:nth-child(1) { top: 0; }
    .site-header__burger-line:nth-child(2) { top: 8px; }
    .site-header__burger-line:nth-child(3) { top: 16px; }

    /* Burger -> cross while the menu is open. */
    .site-header__burger.is-active .site-header__burger-line:nth-child(1) { top: 8px; transform: rotate(45deg); }
    .site-header__burger.is-active .site-header__burger-line:nth-child(2) { opacity: 0; }
    .site-header__burger.is-active .site-header__burger-line:nth-child(3) { top: 8px; transform: rotate(-45deg); }

    /* Nav collapses into a dropdown panel below the bar. */
    .site-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--color-bg);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); /* hardcoded shadow */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.35s ease, opacity 0.3s ease, visibility 0.3s;
    }
    .site-header.is-menu-open .site-header__nav {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
    }

    .site-nav { width: 100%; }
    .site-nav__menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .site-nav__menu a {
        justify-content: space-between;
        padding: var(--spacing-md) var(--container-pad);
        border-bottom: 1px solid var(--color-border);
        white-space: normal;
    }

    /* Submenus stack statically inside the open dropdown. */
    .site-nav__menu .sub-menu {
        position: static;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.02); /* hardcoded subtle tint */
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .site-nav__menu .sub-menu a { padding-left: var(--spacing-xl); }
    .site-nav__menu .menu-item-has-children:hover > a::after { transform: none; }

    /* CTA moves into the dropdown. */
    .site-header__cta {
        margin: var(--spacing-md) var(--container-pad);
        justify-content: center;
    }
}

@media (max-width: 475px) {
    .site-header__inner { min-height: 64px; } /* hardcoded compact bar height */
    .site-header.is-menu-open .site-header__nav { max-height: calc(100vh - 64px); }
}

/* ==========================================================================
   BLOCK-HOME-HERO
   ========================================================================== */
@media (max-width: 1440px) {
    .block-home-hero { min-height: 540px; } /* hardcoded */
    .block-home-hero__title { font-size: 48px; } /* hardcoded */
}

@media (max-width: 1024px) {
    .block-home-hero {
        min-height: 460px; /* hardcoded */
        padding-block: var(--spacing-xl);
    }
    .block-home-hero__content { max-width: 60%; } /* hardcoded */
    .block-home-hero__title { font-size: 40px; } /* hardcoded */
}

@media (max-width: 475px) {
    .block-home-hero {
        min-height: 0;
        padding-block: var(--spacing-xl);
        /* Stronger overlay so text stays readable over the cropped image. */
        background-image:
            linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 0.7) 100%),
            var(--hero-bg, none);
    }
    .block-home-hero__content { max-width: 100%; }
    .block-home-hero__subtitle { font-size: 12px; } /* hardcoded */
    .block-home-hero__title { font-size: 32px; } /* hardcoded */
    .block-home-hero__actions { flex-direction: column; align-items: stretch; }
    .block-home-hero__btn { width: 100%; }
}

/* ==========================================================================
   BLOCK-AT-HOME-PROTOCOL
   ========================================================================== */
@media (max-width: 1024px) {
    .block-at-home-protocol__title { font-size: 32px; } /* hardcoded */
    .block-at-home-protocol__logos { gap: var(--spacing-xl); }
}

@media (max-width: 475px) {
    .block-at-home-protocol__card {
        padding: var(--spacing-xl) var(--spacing-md);
        border-radius: 14px; /* hardcoded: smaller radius on mobile */
    }
    .block-at-home-protocol__title { font-size: 26px; } /* hardcoded */
    .block-at-home-protocol__cta { width: 100%; }
    .block-at-home-protocol__logos { gap: var(--spacing-lg); }
    .block-at-home-protocol__logo img { max-height: 24px; } /* hardcoded */
}

/* ==========================================================================
   BLOCK-FEATURED-SERVICES
   ========================================================================== */
@media (max-width: 1024px) {
    .block-featured-services__grid { grid-template-columns: repeat(2, 1fr); }
    .block-featured-services__title { font-size: 30px; } /* hardcoded */
}

@media (max-width: 475px) {
    .block-featured-services__grid { grid-template-columns: 1fr; }
    .block-featured-services__title { font-size: 26px; } /* hardcoded */
    .block-featured-services__card,
    .block-featured-services__card-inner { min-height: 420px; } /* hardcoded: shorter on mobile */
}

/* ==========================================================================
   BLOCK-WHAT-OPTIMIZE
   ========================================================================== */
@media (max-width: 1024px) {
    .block-what-optimize__title { font-size: 30px; } /* hardcoded */
    .block-what-optimize__row { gap: var(--spacing-xl); }
    .block-what-optimize__rows { gap: var(--spacing-xl); }
    .block-what-optimize__row-title { font-size: 28px; } /* hardcoded */
}

@media (max-width: 475px) {
    .block-what-optimize__title { font-size: 26px; } /* hardcoded */

    /* Stack each row; image always on top regardless of odd/even. */
    .block-what-optimize__row { grid-template-columns: 1fr; gap: var(--spacing-md); }
    .block-what-optimize__row:nth-child(even) .block-what-optimize__media { order: 0; }

    .block-what-optimize__row-title { font-size: 24px; } /* hardcoded */
}

/* ==========================================================================
   BLOCK-PHYSICIAN-GUIDED
   ========================================================================== */
@media (max-width: 1024px) {
    /* Stack intro above the steps; steps go two-up and connectors are dropped. */
    .block-physician-guided__inner { grid-template-columns: 1fr; gap: var(--spacing-xl); }
    .block-physician-guided__title { font-size: 30px; } /* hardcoded */
    .block-physician-guided__steps { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-xl); }
    .block-physician-guided__step:not(:last-child)::after { display: none; }
}

@media (max-width: 475px) {
    .block-physician-guided__title { font-size: 26px; } /* hardcoded */
    .block-physician-guided__steps { grid-template-columns: 1fr; gap: var(--spacing-lg); }
}

/* ==========================================================================
   BLOCK-PATIENT-REVIEWS
   ========================================================================== */
@media (max-width: 1024px) {
    .block-patient-reviews__title { font-size: 30px; } /* hardcoded */
    .block-patient-reviews__grid { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-lg); }
}

@media (max-width: 475px) {
    .block-patient-reviews__title { font-size: 26px; } /* hardcoded */
    .block-patient-reviews__grid { grid-template-columns: 1fr; gap: var(--spacing-xl); }
    .block-patient-reviews__toggle { min-width: 100%; }
}
