/*
Theme Name: exosome-wellness
Theme URI:
Author: Geeks360
Author URI: https://geeks360.net
Description: Custom ACF-based WordPress theme for exosome-wellness. Pages are built with an ACF Flexible Content field (page_sections); global header and footer are managed from the Theme Settings options page.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: exosome-wellness
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
    /* Colors - replace with the brand palette */
    --color-primary: #1a1a1a;
    --color-secondary: #f5a623;
    --color-text: #1a1a1a;
    --color-muted: #6b7280;
    --color-bg: #ffffff;
    --color-border: #e5e7eb;

    /* Typography */
    --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --fs-body: 16px;
    --lh-body: 1.5;

    /* Spacing scale */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    --spacing-2xl: 64px;

    /* Layout */
    --container-max: 1240px;
    --container-pad: 20px;
    --radius: 8px;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--color-text);
    background: var(--color-bg);
}

img,
svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin: 0 0 var(--spacing-sm);
}

p { margin: 0 0 var(--spacing-md); }

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.site-main { min-height: 50vh; }

.section,
.page-content { padding-block: var(--spacing-2xl); }

/* ==========================================================================
   BLOCK-HERO
   ========================================================================== */
.block-hero { padding-block: var(--spacing-2xl); }

.block-hero__heading { margin: 0 0 var(--spacing-md); }

.block-hero__text {
    max-width: 60ch;
    color: var(--color-muted);
    margin: 0 0 var(--spacing-lg);
}

.block-hero__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* ==========================================================================
   SITE-HEADER
   ========================================================================== */
.site-header {
    position: relative;
    z-index: 1000; /* hardcoded: stacking above page content */
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    min-height: 80px; /* hardcoded: header bar height */
}

/* Bar logo - shown on tablet/mobile only; on desktop the logo is injected
   into the centre of the menu by the nav walker. */
.site-header__logo { display: none; }
.site-header__logo img { max-height: 40px; width: auto; } /* hardcoded logo height */

/* Nav wrapper - on desktop the full-width row that holds the menu + CTA. */
.site-header__nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex: 1 1 auto;
}

.site-nav { flex: 1 1 auto; }

.site-nav__menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__menu > li { position: relative; }

.site-nav__menu a {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-heading);
    line-height: 1.2;
    white-space: nowrap;
}

.site-nav__menu a:hover { color: var(--color-secondary); }

/* Logo injected at the midpoint - centres itself, pinning the two groups
   to the left and right. */
.site-nav__logo-item { margin-inline: auto; }
.site-nav__logo-item img { max-height: 44px; width: auto; } /* hardcoded logo height */

/* Down-arrow on items that have a submenu (WP .menu-item-has-children). */
.site-nav__menu .menu-item-has-children > a::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: var(--spacing-xs);
    transition: transform 0.2s ease;
}

.site-nav__menu .menu-item-has-children:hover > a::after { transform: rotate(180deg); }

/* Submenu (one level deep) - desktop hover dropdown. */
.site-nav__menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px; /* hardcoded submenu width */
    margin: 0;
    padding: var(--spacing-sm) 0;
    list-style: none;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); /* hardcoded shadow */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 10;
}

.site-nav__menu .menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-nav__menu .sub-menu a { display: block; padding: var(--spacing-xs) var(--spacing-md); }

/* CTA (Book Consultation) - ACF link field, not part of the menu. */
.site-header__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--color-text);
    border: 1px solid var(--color-primary);
    border-radius: 999px; /* hardcoded pill radius */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header__cta:hover { background: var(--color-primary); color: var(--color-bg); }

/* Burger - hidden on desktop, revealed at the tablet breakpoint. */
.site-header__burger { display: none; }

/* Sticky state, toggled from main.js after the scroll threshold. */
.site-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); /* hardcoded shadow */
    animation: site-header-drop 0.3s ease;
}

@keyframes site-header-drop {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* ==========================================================================
   BLOCK-HOME-HERO
   ========================================================================== */
.block-home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 620px; /* hardcoded: hero height (no token) */
    padding-block: var(--spacing-2xl);
    /* Readability gradient over the dynamic --hero-bg image (set inline). */
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 42%, rgba(255, 255, 255, 0) 70%),
        var(--hero-bg, none);
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
}

.block-home-hero__content { max-width: 540px; } /* hardcoded: content column width */

.block-home-hero__subtitle {
    margin: 0 0 var(--spacing-md);
    color: var(--color-muted);
    font-size: 13px; /* hardcoded: eyebrow size (no token) */
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.block-home-hero__title {
    margin: 0 0 var(--spacing-md);
    color: var(--color-text);
    font-weight: 400;
    font-size: 56px; /* hardcoded: hero title size (no token) */
    line-height: 1.1;
}

.block-home-hero__description {
    max-width: 46ch;
    margin: 0 0 var(--spacing-lg);
    color: var(--color-muted);
}

.block-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.block-home-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 999px; /* hardcoded: pill radius */
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.block-home-hero__btn--primary {
    background: #1f4d3f; /* hardcoded: brand dark green (no token) */
    color: var(--color-bg);
    border: 1px solid #1f4d3f; /* hardcoded: matches fill */
}

.block-home-hero__btn--primary:hover { background: #173a30; border-color: #173a30; } /* hardcoded: darker green */

.block-home-hero__btn--secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.block-home-hero__btn--secondary:hover { border-color: var(--color-text); }

/* ==========================================================================
   BLOCK-AT-HOME-PROTOCOL
   ========================================================================== */
.block-at-home-protocol { padding-block: var(--spacing-2xl); }

.block-at-home-protocol__card {
    background: #1f4d3f; /* hardcoded: brand dark green (no token) */
    border-radius: 20px; /* hardcoded: card radius (larger than --radius) */
    padding: var(--spacing-2xl) var(--spacing-xl);
    text-align: center;
}

.block-at-home-protocol__title {
    max-width: 880px;
    margin: 0 auto var(--spacing-md);
    color: var(--color-bg);
    font-weight: 400;
    font-size: 40px; /* hardcoded: title size (no token) */
    line-height: 1.15;
}

.block-at-home-protocol__description {
    max-width: 728px;
    margin: 0 auto var(--spacing-lg);
    color: rgba(255, 255, 255, 0.85); /* hardcoded: muted white on green */
}

.block-at-home-protocol__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--color-bg);
    border: 1px solid rgba(255, 255, 255, 0.6); /* hardcoded: translucent white outline */
    border-radius: 999px; /* hardcoded: pill radius */
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.block-at-home-protocol__cta:hover {
    background: var(--color-bg);
    color: #1f4d3f; /* hardcoded: brand dark green */
    border-color: var(--color-bg);
}

.block-at-home-protocol__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2xl);
    margin: var(--spacing-2xl) 0 0;
    padding: 0;
    list-style: none;
}

.block-at-home-protocol__logo { display: flex; align-items: center; }

.block-at-home-protocol__logo img {
    width: auto;
    max-height: 30px; /* hardcoded: logo height (no token) */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.block-at-home-protocol__logo img:hover { opacity: 1; }

/* ==========================================================================
   SERVICES-SINGLE (stub)
   ========================================================================== */
.services-single { padding-block: var(--spacing-2xl); }

.services-single__inner { max-width: 800px; } /* hardcoded: readable column width */

.services-single__title { margin: 0 0 var(--spacing-lg); }

.services-single__image {
    width: 100%;
    height: auto;
    margin: 0 0 var(--spacing-lg);
    border-radius: var(--radius);
}

.services-single__description { color: var(--color-muted); }

/* ==========================================================================
   SERVICE-CARD
   ========================================================================== */
.service-card {
    height: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px); /* hardcoded: lift on hover */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); /* hardcoded shadow */
}

.service-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.service-card__media {
    aspect-ratio: 16 / 10; /* hardcoded: card image ratio */
    overflow: hidden;
}

.service-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
}

.service-card__types {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-card__type {
    padding: 2px var(--spacing-sm); /* hardcoded: chip vertical padding */
    font-size: 12px; /* hardcoded: chip text size (no token) */
    line-height: 1.4;
    color: var(--color-muted);
    background: var(--color-border);
    border-radius: 999px; /* hardcoded: pill radius */
}

.service-card__title { margin: 0; }

.service-card__excerpt {
    margin: 0;
    color: var(--color-muted);
}

/* ==========================================================================
   BLOCK-FEATURED-SERVICES
   ========================================================================== */
.block-featured-services { 
    padding-block: var(--spacing-2xl); 
    background: #F8F8F8;
}

.block-featured-services__head { margin-bottom: var(--spacing-xl); }

.block-featured-services__subtitle {
    margin: 0 0 var(--spacing-sm);
    color: var(--color-muted);
    font-size: 13px; /* hardcoded: eyebrow size (no token) */
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.block-featured-services__title {
    margin: 0;
    font-weight: 400;
    font-size: 36px; /* hardcoded: title size (no token) */
    line-height: 1.15;
}

.block-featured-services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    transition: opacity 0.2s ease;
}

.block-featured-services.is-loading .block-featured-services__grid {
    opacity: 0.5;
    pointer-events: none;
}

/* Card - the service main_image is the blurred cover background. */
.block-featured-services__card {
    position: relative;
    overflow: hidden;
    min-height: 460px; /* hardcoded: card height (no token) */
    border-radius: 16px; /* hardcoded: card radius */
    background: var(--color-border);
    box-shadow: 0px 14px 37px rgba(0, 0, 0, 0.13);
}

.block-featured-services__card-bg {
    position: absolute;
    inset: -12px; /* hardcoded: overscan so blurred edges stay covered */
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.55)),
        var(--card-bg, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(1px); /* hardcoded: readability blur */
    z-index: 0;
}

.block-featured-services__card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 460px; /* hardcoded: matches card height */
    padding: var(--spacing-lg);
}

.block-featured-services__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.block-featured-services__tag {
    padding: 4px var(--spacing-sm); /* hardcoded: chip vertical padding */
    font-size: 11px; /* hardcoded: chip size (no token) */
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    background: rgba(255, 255, 255, 0.6); /* hardcoded: translucent chip */
    border: 1px solid rgba(0, 0, 0, 0.08); /* hardcoded: faint border */
    border-radius: 999px; /* hardcoded: pill radius */
}

.block-featured-services__card-content { margin-top: auto; }

.block-featured-services__card-title {
    margin: 0 0 var(--spacing-sm);
    color: var(--color-text);
    font-weight: 400;
    font-size: 22px; /* hardcoded: card title size (no token) */
}

.block-featured-services__card-text {
    margin: 0 0 var(--spacing-md);
    color: var(--color-text);
    font-size: 14px; /* hardcoded: card text size (no token) */
}

.block-featured-services__card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.55); /* hardcoded: translucent fill */
    border: 1px solid var(--color-text);
    border-radius: 999px; /* hardcoded: pill radius */
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.block-featured-services__card-link:hover { background: var(--color-text); color: var(--color-bg); }

/* Numbered pagination. */
.block-featured-services__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.block-featured-services__page {
    min-width: 40px; /* hardcoded: page button size */
    height: 40px; /* hardcoded: page button size */
    padding: 0 var(--spacing-sm);
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px; /* hardcoded: pill radius */
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.block-featured-services__page:hover { border-color: var(--color-text); }

.block-featured-services__page.is-active {
    color: var(--color-bg);
    background: #1f4d3f; /* hardcoded: brand dark green (no token) */
    border-color: #1f4d3f;
    cursor: default;
}

/* ==========================================================================
   BLOCK-WHAT-OPTIMIZE
   ========================================================================== */
.block-what-optimize__head {
    background: #1f4d3f; /* hardcoded: brand dark green (no token) */
    padding-block: var(--spacing-xl);
    text-align: center;
}

.block-what-optimize__subtitle {
    margin: 0 0 var(--spacing-sm);
    color: rgba(255, 255, 255, 0.75); /* hardcoded: muted white on green */
    font-size: 13px; /* hardcoded: eyebrow size (no token) */
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.block-what-optimize__title {
    margin: 0;
    color: var(--color-bg);
    font-weight: 400;
    font-size: 36px; /* hardcoded: title size (no token) */
    line-height: 1.15;
}

.block-what-optimize__rows {
    display: flex;
    flex-direction: column;
    /* gap: var(--spacing-2xl); */
    padding-block: var(--spacing-2xl);
}

.block-what-optimize__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: var(--spacing-2xl); */
    align-items: center;
}

.block-what-optimize__content{
    padding: 0 60px;
}

.block-what-optimize__rows .block-what-optimize__row:nth-child(even) .block-what-optimize__content{
    padding-left: 0;
}

/* Even rows flip: content on the left, image on the right. */
.block-what-optimize__row:nth-child(even) .block-what-optimize__media { order: 2; }

.block-what-optimize__image {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 11; /* hardcoded: row image ratio */
    object-fit: cover;
}

.block-what-optimize__row-title {
    margin: 0 0 var(--spacing-md);
    font-weight: 400;
    font-size: 32px; /* hardcoded: row title size (no token) */
    line-height: 1.15;
}

.block-what-optimize__row-text {
    /* max-width: 42ch; */
    margin: 0 0 var(--spacing-lg);
    color: var(--color-muted);
}

.block-what-optimize__row-link {
    display: inline-block;
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 4px; /* hardcoded: underline spacing */
}

.block-what-optimize__row-link:hover { color: var(--color-muted); }

/* ==========================================================================
   BLOCK-PHYSICIAN-GUIDED
   ========================================================================== */
.block-physician-guided { 
    padding-block: var(--spacing-2xl); 
    background: #F8F8F8;
}

.block-physician-guided__inner {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr; /* hardcoded: intro column width */
    gap: var(--spacing-2xl);
    align-items: center;
}

.block-physician-guided__title {
    margin: 0 0 var(--spacing-md);
    font-weight: 400;
    font-size: 34px; /* hardcoded: title size (no token) */
    line-height: 1.15;
}

.block-physician-guided__description {
    margin: 0;
    max-width: 36ch;
    color: var(--color-muted);
}

.block-physician-guided__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
    list-style: none;
}

.block-physician-guided__step {
    position: relative;
    text-align: center;
}

/* Connector line between adjacent step icons (single-row desktop only). */
/* .block-physician-guided__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 32px;
    left: calc(50% + 40px);
    right: calc(-50% + 40px);
    border-top: 1px solid var(--color-border);
} */

.block-physician-guided__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px; /* hardcoded: icon circle size */
    height: 64px; /* hardcoded: icon circle size */
    margin-bottom: var(--spacing-md);
    background: var(--color-bg);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); /* hardcoded soft shadow */
}

.block-physician-guided__icon img {
    width: auto;
    /* max-height: 26px; hardcoded: icon glyph size */
}

.block-physician-guided__step-num {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-muted);
    font-size: 12px; /* hardcoded: step label size (no token) */
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.block-physician-guided__step-title {
    margin: 0 0 var(--spacing-sm);
    font-size: 16px; /* hardcoded: step title size */
    font-weight: 600;
}

.block-physician-guided__step-text {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px; /* hardcoded: step text size (no token) */
}

/* ==========================================================================
   BLOCK-PATIENT-REVIEWS
   ========================================================================== */
.block-patient-reviews { padding-block: var(--spacing-2xl); }

.block-patient-reviews__head {
    margin-bottom: var(--spacing-2xl);
    text-align: center;
}

.block-patient-reviews__subtitle {
    margin: 0 0 var(--spacing-sm);
    color: var(--color-muted);
    font-size: 13px; /* hardcoded: eyebrow size (no token) */
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.block-patient-reviews__title {
    margin: 0;
    font-weight: 400;
    font-size: 36px; /* hardcoded: title size (no token) */
    line-height: 1.15;
}

.block-patient-reviews__grid {
    position: relative; /* offsetParent for the collapse measurement in main.js */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    transition: max-height 0.4s ease;
}

.block-patient-reviews__item {
    text-align: center;
    padding-inline: var(--spacing-md);
}

.block-patient-reviews__icon {
    width: 34px; /* hardcoded: quote icon size */
    height: auto;
    margin: 0 auto var(--spacing-md);
}

.block-patient-reviews__item-title {
    margin: 0 0 var(--spacing-md);
    font-size: 16px; /* hardcoded: review title size */
    font-weight: 600;
}

.block-patient-reviews__item-text {
    margin: 0;
    color: var(--color-muted);
}

.block-patient-reviews__actions {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.block-patient-reviews__toggle {
    min-width: 280px; /* hardcoded: button width (matches design) */
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--color-text);
    background: var(--color-border);
    border: 0;
    border-radius: var(--radius);
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.block-patient-reviews__toggle:hover { background: #d7dbe0; } /* hardcoded: slightly darker grey */
