/* 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%; }
}

/* ==========================================================================
   SITE-NAV-DROPDOWNS
   ========================================================================== */
@media (max-width: 1024px) {
    /* Panels become static accordions inside the burger dropdown. */
    .site-nav__menu > li.site-nav__item--cards { position: relative; }

    .site-nav__panel {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .site-nav__item--dropdown.is-open .site-nav__panel { display: block; }

    .site-nav__panel--cards {
        padding: var(--spacing-md) var(--container-pad);
        background: rgba(0, 0, 0, 0.02); /* hardcoded subtle tint */
        border-bottom: 1px solid var(--color-border);
    }

    .site-nav__cards {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .site-nav__card-title,
    .site-nav__card-badge {
        padding: 4px 10px; /* hardcoded: compact pill */
        font-size: 12px;   /* hardcoded: compact pill text */
    }

    .site-nav__card-title { left: 8px; bottom: 8px; }
    .site-nav__card-badge { left: 8px; top: 8px; }

    .site-nav__panel--links {
        min-width: 0;
        padding: 0;
        background: rgba(0, 0, 0, 0.02); /* hardcoded subtle tint */
    }

    .site-nav__menu .site-nav__panel--links a { padding-left: var(--spacing-xl); }
}

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

@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-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-PARTNER-LOGOS
   ========================================================================== */
@media (max-width: 1024px) {
    .block-partner-logos__logos { gap: var(--spacing-xl); }
}

@media (max-width: 475px) {
    .block-partner-logos__logos { gap: var(--spacing-lg); }
    .block-partner-logos__logo img { max-height: 24px; } /* hardcoded */
}

/* ==========================================================================
   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 */

    /* Fixed backgrounds are janky / ignored on touch devices (iOS Safari), so
       fall back to a normal scrolling background here. With scroll attachment
       the size is relative to the element, so cover is needed to avoid gaps. */
    .block-what-optimize__media {
        background-attachment: scroll;
        background-size: cover;
    }
}

@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-what-optimize__content{
        padding: 0;
    }
}

/* ==========================================================================
   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%; }
}

/* ==========================================================================
   BLOCK-TRUSTED-PERFORMERS
   ========================================================================== */
@media (max-width: 1024px) {
    .block-trusted-performers__title { font-size: 30px; } /* hardcoded */
    .block-trusted-performers__card { width: 240px; } /* hardcoded */
}

@media (max-width: 475px) {
    .block-trusted-performers__title { font-size: 26px; } /* hardcoded */
    .block-trusted-performers__card { width: 200px; } /* hardcoded */
    .block-trusted-performers__card-title { font-size: 14px; } /* hardcoded */
}

/* ==========================================================================
   SITE-FOOTER
   ========================================================================== */
@media (max-width: 1024px) {
    /* Brand column spans the top, the four link columns sit two-up below. */
    .site-footer__inner { grid-template-columns: 1fr 1fr; gap: var(--spacing-xl); }
    .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 475px) {
    .site-footer__inner { grid-template-columns: 1fr; gap: var(--spacing-lg); }
    .site-footer__brand { grid-column: auto; }
}

/* ==========================================================================
   SERVICES-SINGLE
   ========================================================================== */
@media (max-width: 1024px) {
    .services-single__grid { grid-template-columns: 1fr; gap: var(--spacing-xl); }
    .services-single__title { font-size: 36px; } /* hardcoded */
}

@media (max-width: 475px) {
    .services-single__title { font-size: 30px; } /* hardcoded */
    .services-single__options { gap: var(--spacing-sm); }
    .services-single__option span { flex: 1 1 auto; padding-inline: var(--spacing-lg); }
}

/* ==========================================================================
   SERVICES-POPUP (booking form)
   ========================================================================== */
@media (max-width: 475px) {
    .services-popup { padding: var(--spacing-sm); }
    .services-popup__dialog { padding: var(--spacing-lg); }
    .services-popup__title { font-size: 26px; } /* hardcoded */

    /* Stack the two-up fields on small screens. */
    .services-popup__form .frm_half,
    .services-popup__form .frm6 { flex: 1 1 100%; }

    .services-popup__form .frm_submit { justify-content: stretch; }
    .services-popup__form .frm_button_submit { width: 100%; }
}

/* ==========================================================================
   BLOCK-SERVICE-IMAGE-CONTENT
   ========================================================================== */
@media (max-width: 1024px) {
    .block-service-image-content__text { font-size: 20px; } /* hardcoded */
}

@media (max-width: 475px) {
    .block-service-image-content { min-height: 360px; } /* hardcoded */
    .block-service-image-content__card { padding: var(--spacing-xl) var(--spacing-lg); }
    .block-service-image-content__text { font-size: 18px; } /* hardcoded */
}

/* ==========================================================================
   BLOCK-SERVICE-FAQS
   ========================================================================== */
@media (max-width: 1024px) {
    .block-service-faqs__title { font-size: 30px; } /* hardcoded */
    .block-service-faqs__grid { column-gap: var(--spacing-xl); }
}

@media (max-width: 475px) {
    .block-service-faqs__card { padding: var(--spacing-xl) var(--spacing-lg); }
    .block-service-faqs__title { font-size: 26px; } /* hardcoded */
    .block-service-faqs__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   THANK-YOU
   ========================================================================== */
@media (max-width: 1024px) {
    .thank-you__title { font-size: 36px; } /* hardcoded */
}

@media (max-width: 475px) {
    .thank-you__title { font-size: 28px; } /* hardcoded */
    .thank-you__text { font-size: 16px; }
    .thank-you__btn { width: 100%; }
}

/* ==========================================================================
   BLOCK-CONTACT-US
   ========================================================================== */
@media (max-width: 1024px) {
    /* Stack the locations card above the form. */
    .block-contact-us__inner { grid-template-columns: 1fr; }
}

@media (max-width: 475px) {
    .block-contact-us { padding-block: var(--spacing-xl); }
    .block-contact-us__card { padding: var(--spacing-lg); }
    .block-contact-us__heading { font-size: 20px; } /* hardcoded */
    .block-contact-us__title { font-size: 28px; } /* hardcoded */

    /* Stack the two-up fields and let the submit fill the width. */
    .block-contact-us__form .frm_half,
    .block-contact-us__form .frm6 { flex: 1 1 100%; }
    .block-contact-us__form .frm_submit { justify-content: stretch; }
    .block-contact-us__form .frm_button_submit { width: 100%; }
}

/* ==========================================================================
   BLOCK-BLOG-SECTION
   ========================================================================== */
@media (max-width: 1024px) {
    .block-blog-section__grid { grid-template-columns: repeat(2, 1fr); }
    .block-blog-section__title { font-size: 26px; } /* hardcoded */
}

@media (max-width: 475px) {
    .block-blog-section { padding-block: var(--spacing-xl); }
    .block-blog-section__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SINGLE-POST
   ========================================================================== */
@media (max-width: 1024px) {
    .single-post__title { font-size: 34px; } /* hardcoded */
}

@media (max-width: 475px) {
    .single-post__title { font-size: 28px; } /* hardcoded */
    .single-post__content h2 { font-size: 24px; } /* hardcoded */
    .single-post__content h3 { font-size: 20px; } /* hardcoded */
}
