/* ============================================================
   BloomHub Customer Portal - Mobile First Skeleton
   ============================================================ */
:root {
    --color-bg: #FFF5F3;
    --color-primary: #FE6B68;
    --color-primary-grad: linear-gradient(135deg, #FE6B68 0%, #ff8e6e 100%);
    --color-white: #FFFFFF;
    --color-text: #1A1A1A;
    --color-muted: #8C8C8C;
    --color-border: #F0E0DC;
    --header-height: 60px;
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* ── Main Title Cards & Section Heading Typography (Offline-Safe) ── */
.hero-title,
.section-heading {
    font-family: var(--font-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.portal-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

.portal-brand {
    font-size: 1.2rem;
    font-weight: 800;
}

.portal-brand span {
    color: var(--color-primary);
}

.portal-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/*
 * .portal-main: only margin-top to clear the fixed header.
 * Explicit resets guarantee no browser UA stylesheet or inherited
 * style can inject space between the header and the hero.
 */
.portal-main {
    margin-top: var(--header-height) !important;
    /* Tracks the CSS variable — always exact */
    padding-top: 0 !important;
    /* Belt-and-braces: no padding gap */
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ── Category Chips ──────────────────────────────────────── */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scrollbar-width: none;
    /* Firefox */
}

.category-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.chip {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    transition: all 0.2s;
}

.chip.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ── Product Grid ────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-border);
}

.product-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: #f8fafc;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
    position: relative;
    /*
     * MOBILE HERO HEIGHT
     * ─────────────────────────────────────────────────────────
     * calc(100vh - var(--header-height)) fills exactly the visible
     * area below the fixed header with zero gap and zero overflow.
     * min-height:400px is the safety floor for very short screens.
     */
    height: calc(100vh - var(--header-height));
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    /*
     * MARGIN COLLAPSE KILL SWITCH
     * ─────────────────────────────────────────────────────────
     * The <h1> inside .hero-content has a browser-default margin-top
     * (~21px). When a block child's margin has nothing to collapse
     * against inside its parent, CSS lets it "escape" upward through
     * the parent's top edge (margin collapse).
     *
     * overflow:hidden creates a Block Formatting Context (BFC) on
     * .hero-section. A BFC is an isolated layout region — margins
     * from descendants can never escape through its boundary.
     * This is the canonical, side-effect-free fix for this bug.
     */
    overflow: hidden;
    background-image: url('../images/portal/hero/hero.jpg');
    background-size: cover;
    /* Always fills the container — no white edges */
    background-position: center;
    background-repeat: no-repeat;
}

/*
 * MOBILE & TABLET HERO VIEWPORT LOCK (≤991px)
 * ─────────────────────────────────────────────────────────
 * The desktop block at ≥1024px sets height:85vh. On mobile the base
 * calc() rule above already handles it, but this query adds !important
 * as a specificity shield in case any other rule (e.g. JS inline style)
 * tries to override it on narrow viewports.
 *
 * 70px is used here instead of var(--header-height) because on mobile
 * the header's auto height may render taller than the 60px CSS variable
 * if OS font scaling is active. 70px provides a safe extra 10px buffer.
 * Adjust to match your header's measured mobile pixel height if needed.
 */
@media (max-width: 991px) {
    .hero-section {
        /* Fills the entire visible screen below the header — no dead space */
        min-height: calc(100vh - 70px) !important;
        height: calc(100vh - 70px) !important;
        /* Belt-and-braces: ensure background always covers the full height */
        background-size: cover !important;
    }
}


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Slightly darkened left side to ensure text readability */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
    color: var(--color-white);
    width: 100%;
}

.hero-content h1 {
    font-family: var(--font-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);
    font-size: 2.2rem;
    /* Reduced from 3.2rem to prevent mobile overflow */
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    /* Prevent long words from breaking the viewport */
    word-wrap: break-word;
    white-space: normal;
    width: 100%;
}

.btn-hero {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 14px rgba(254, 107, 104, 0.4);
}

.btn-hero:hover {
    background: #e55a57;
    transform: translateY(-2px);
}

/* ── About Section ───────────────────────────────────────── */
.about-section {
    padding: 60px 24px;
    background: var(--color-white);
    text-align: center;
}

.about-img-wrapper {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.about-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--color-bg);
}

.about-text h2 {
    font-family: var(--font-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);
    font-size: 2.2rem;
    color: var(--color-text);
    margin-bottom: 16px;
    font-weight: 800;
}

.about-text p {
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ── Footer ──────────────────────────────────────────────── */
.portal-footer {
    background: var(--color-text);
    color: var(--color-white);
    padding: 50px 24px;
    text-align: center;
}

.portal-footer h3 {
    font-family: var(--font-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--color-white);
}

.portal-footer p {
    color: #A0AEC0;
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
}

.social-links a {
    color: var(--color-white);
    font-size: 1.4rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid #2D3748;
    padding-top: 24px;
    font-size: 0.75rem;
    color: #718096;
}

/* ── Reviews Carousel ────────────────────────────────────── */
.reviews-carousel {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 24px 0 16px 0;
    scrollbar-width: none;
    /* Firefox */
    scroll-snap-type: x mandatory;
}

.reviews-carousel::-webkit-scrollbar {
    display: none;
    /* Safari/Chrome */
}

.review-image-card {
    flex: 0 0 82%;
    /* Shows 82% so the next image peeks */
    max-width: 340px;
    scroll-snap-align: center;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    /* Remove background/border to let the image be the full card */
}

.review-image-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 16px;
}

/* ── Artistic & Structured Mobile Menu ─────────────────────── */
.slide-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 1000;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.08);
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.slide-menu.active {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid #f2f2f2;
}

#menu-close {
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

#menu-close:hover {
    color: #333;
}

.menu-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ea0a5;
    /* Exact admin grey */
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0 16px 8px 16px;
}

.menu-links {
    display: flex;
    flex-direction: column;
    padding: 24px 12px;
    gap: 6px;
}

.menu-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #6e7687;
    /* Soft admin-style grey */
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    /* Scaled down for sleek SaaS look */
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    /* Standard admin curve */
    transition: all 0.2s ease;
}

.menu-links a i {
    font-size: 1.1rem;
    color: #aeb4c0;
    width: 22px;
    text-align: center;
    transition: color 0.2s ease;
}

/* The Admin "Solid Fill" Active/Hover State */
.menu-links a:hover,
.menu-links a.active {
    background: var(--color-primary, #FE6B68);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(254, 107, 104, 0.3);
}

.menu-links a:hover i,
.menu-links a.active i {
    color: #ffffff;
}

.menu-divider {
    border: 0;
    height: 1px;
    background: #f2f2f2;
    margin: 16px 0;
}

.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ── Scroll Reveal Animations ────────────────────────────── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Optional stagger delays for sibling elements */
.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* ── Site Header Base (Mobile-First) ─────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /*
     * EXPLICIT HEIGHT LOCK (mobile)
     * The CSS variable --header-height (60px) is the single source of
     * truth for the header's physical height on mobile. .portal-main's
     * margin-top reads the same variable, so they are always in sync.
     * No gap can appear between them.
     */
    height: var(--header-height);
    min-height: var(--header-height);
    /* Prevent flex/grid from shrinking it */
    max-height: var(--header-height);
    /* Prevent content from expanding it   */
    overflow: hidden;
    /* Clip anything that tries to overflow */
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0 !important;
    /* Hard boundary: no space below header */
    padding-bottom: 0 !important;
    /*
     * ICON SPLIT LAYOUT (Mobile)
     * ─────────────────────────────────────────────────────────
     * justify-content:space-between pushes ① hamburger to the left
     * and ④ .header-actions to the right. The brand ③ is pulled out
     * of flow via position:absolute so icon-count asymmetry never
     * displaces it.
     */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

/* Hide desktop-only elements on mobile */
.desktop-nav {
    display: none;
}

/*
 * .nav-login-btn — Desktop CTA button for admins/staff.
 * Hidden by default (mobile-first); revealed as a styled button
 * inside the ≥1024px media query below.
 */
.nav-login-btn {
    display: none;
}

/*
 * Hamburger is now a bare <i> — the first direct flex child.
 * These rules ensure it is vertically centred and has a
 * comfortable tap target without adding extra wrapper markup.
 */
.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    /* WCAG AA tap target (44×44 px minimum) */
    min-height: 44px;
    cursor: pointer;
}

/* Header brand — compact on mobile */
.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.header-brand img {
    width: 26px;
    height: auto;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ── TABLET & DESKTOP OPTIMIZATION (min-width: 1024px) ──────── */
@media (min-width: 1024px) {

    /*
     * SINGLE SOURCE OF TRUTH: Header Height
     * ─────────────────────────────────────────────────────────────────
     */
    :root {
        --header-height: 90px;
    }

    /* 1. The Header: CSS Grid Perfect Centering */
    .site-header {
        height: var(--header-height) !important;
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center;
        background-color: #ffffff !important;
        padding: 0 5%;
        min-height: unset;
        max-height: unset;
        overflow: visible;
    }

    .mobile-toggle {
        display: none !important;
        /* Hide hamburger on desktop */
    }

    .desktop-nav {
        display: flex;
        gap: 30px;
    }

    .desktop-nav a {
        text-decoration: none;
        font-family: 'Inter', sans-serif;
        font-size: 0.9rem;
        font-weight: 500;
        color: #444;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: color 0.3s;
    }

    .desktop-nav a:hover {
        color: var(--color-primary, #FE6B68);
    }

    .header-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: center;
    }

    .header-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 30px;
    }

    /* ── Desktop Login Button ───────────────────────────────── */
    .nav-login-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-decoration: none;
        font-family: 'Inter', sans-serif;
        font-size: 0.85rem;
        font-weight: 600;
        letter-spacing: 0.4px;
        color: #ffffff;
        background-color: var(--color-primary, #FE6B68);
        padding: 8px 22px;
        border-radius: 6px;
        border: 2px solid transparent;
        transition: background-color 0.25s ease, color 0.25s ease,
            transform 0.2s ease, box-shadow 0.25s ease;
        white-space: nowrap;
    }

    .nav-login-btn:hover {
        background-color: #ffffff;
        color: var(--color-primary, #FE6B68);
        border-color: var(--color-primary, #FE6B68);
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(254, 107, 104, 0.30);
    }

    .nav-login-btn:active {
        transform: translateY(0);
        box-shadow: none;
    }

    /* 2. The Hero Section: Perfectly Synced Viewport Fill */
    .hero-section {
        margin-top: 0 !important;
        height: calc(100vh - var(--header-height)) !important;
    }

    .hero-text h1 {
        font-size: 4.5rem;
        /* Massive editorial serif */
        max-width: 800px;
        margin: 0 auto;
    }

    .hero-text p {
        font-size: 1.2rem;
    }

    /* 3. Our Story: 50/50 Split Grid */
    .story-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 6rem;
        padding: 100px 10%;
    }

    .story-image-container {
        order: 1;
        /* Puts image on the left */
    }

    .story-text-container {
        order: 2;
        /* Puts text on the right */
        text-align: left;
    }

    /* 4. Reviews/Gallery: Grid instead of Scroll-Snap */
    .reviews-gallery {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        overflow: visible;
        /* Kill the scroll snap */
        padding: 0 5%;
    }

    .review-card {
        scroll-snap-align: none;
        min-width: auto;
    }
}

/* ============================================================
   TASK 1 — Hero Typography & Button Scaling
   ============================================================ */

/* ── Tablet (≥768px) ─────────────────────────────────────── */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 3.8rem;
        /* Step up from 2.2rem mobile */
        letter-spacing: 2px;
    }

    .btn-hero {
        padding: 16px 44px;
        font-size: 1.15rem;
    }
}

/* ── Desktop (≥1024px) ───────────────────────────────────── */
@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 6rem;
        /* Editorial — commands the full canvas */
        letter-spacing: 4px;
        line-height: 1.05;
    }

    .btn-hero {
        padding: 18px 56px;
        font-size: 1.25rem;
        letter-spacing: 0.5px;
    }
}

/* ============================================================
   TASK 2 — "Our Story" Image Overlay Design
   ============================================================ */

/* ── Mobile base: classic stacked layout ─────────────────── */
.story-block {
    position: relative;
    /* Anchor for absolute overlays */
}

.story-image img {
    width: 100%;
    max-height: 360px;
    /* Constrain on mobile so image doesn't dominate */
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Hide overlay elements on mobile — text sits below the image */
.story-overlay {
    display: none;
}

.story-text {
    padding: 32px 24px;
    background: var(--color-white);
    text-align: center;
}

.story-text h2 {
    font-family: var(--font-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 14px;
}

.story-text p {
    font-size: 0.97rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.story-btn {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.story-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ── Tablet+ (≥768px): Overlay layout ───────────────────── */
@media (min-width: 768px) {

    /*
     * FIX: Switch story-block to a flex container for centering.
     * Using position:absolute + top:50% + translateY(-50%) on the text
     * caused bottom-clipping when the content height exceeded half the
     * container. Flexbox centers the child without any overflow math.
     */
    .story-block {
        /* Responsive min-height: tall enough for all text, never collapses */
        min-height: 480px;
        height: 480px;
        overflow: hidden;
        /* Flex centering — positions .story-text without absolute math */
        display: flex;
        align-items: center;
        /* Vertical center */
        justify-content: flex-start;
        /* Left-aligned */
    }

    /* Image fills the full block via absolute positioning */
    .story-image {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .story-image img {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        border-radius: 0;
    }

    /* Dark gradient shield — left-heavy to protect text readability */
    .story-overlay {
        display: block;
        position: absolute;
        inset: 0;
        background: linear-gradient(to right,
                rgba(0, 0, 0, 0.72) 0%,
                rgba(0, 0, 0, 0.45) 55%,
                rgba(0, 0, 0, 0.10) 100%);
        z-index: 1;
    }

    /*
     * Text is now a normal flex child — vertically centered by the parent.
     * Padding top/bottom acts as a safety buffer so the button can never
     * physically touch or overflow the edge of the image bounds.
     */
    .story-text {
        position: relative;
        /* Participates in flex flow */
        z-index: 2;
        background: transparent;
        text-align: left;
        max-width: 480px;
        /* Left indent + vertical safety buffer */
        margin-left: 6%;
        padding: 40px 0;
        /* Top/bottom buffer — prevents button clipping */
        color: var(--color-white);
        /* Internal flex column so children stack cleanly */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .story-text h2 {
        color: var(--color-white);
        font-size: 2.6rem;
        text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        margin-bottom: 16px;
    }

    .story-text p {
        color: rgba(255, 255, 255, 0.88);
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .story-btn {
        border-color: rgba(255, 255, 255, 0.85);
        color: var(--color-white);
        /* Prevent button from stretching full width inside flex column */
        align-self: flex-start;
    }

    .story-btn:hover {
        background: var(--color-white);
        color: var(--color-text);
        border-color: var(--color-white);
    }
}

/* ── Desktop (≥1024px): Taller canvas, bigger type ──────── */
@media (min-width: 1024px) {
    .story-block {
        min-height: 560px;
        height: 560px;
    }

    .story-text h2 {
        font-size: 3.2rem;
    }

    .story-text p {
        font-size: 1.05rem;
        max-width: 420px;
    }
}

/* ============================================================
   TASK 3 — Reviews Marquee & Lightbox
   ============================================================ */

/* ── Section wrapper ─────────────────────────────────────── */
.reviews-section {
    padding: 60px 0;
    background: var(--color-bg);
    overflow: hidden;
    /* Clip the scrolling track */
}

.reviews-heading {
    font-family: var(--font-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);
    font-size: 2.2rem;
    text-align: center;
    color: var(--color-text);
    font-weight: 800;
    margin-bottom: 32px;
    padding: 0 16px;
}

/* ── Marquee container ───────────────────────────────────── */
.reviews-marquee-wrapper {
    overflow: hidden;
    /* Hard clip — JS handles the loop */
    width: 100%;
    cursor: default;
}

/* The scrolling track — JS drives translateX */
.reviews-marquee-track {
    display: flex;
    gap: 20px;
    /* Perfectly even spacing between all cards */
    will-change: transform;
    padding: 8px 0 16px 0;
    /* Vertical breathing room */
}

/* ── Review cards ─────────────────────────────────────────── */
/* Override the old carousel flex-shrink values */
.reviews-marquee-track .review-image-card {
    flex: 0 0 280px;
    /* Fixed width — consistent on all viewports */
    max-width: 280px;
    scroll-snap-align: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reviews-marquee-track .review-image-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

/* Hover lift effect (desktop) */
@media (min-width: 768px) {
    .reviews-marquee-track .review-image-card {
        cursor: pointer;
    }

    .reviews-marquee-track .review-image-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.13);
    }
}

/* ── Lightbox Modal ──────────────────────────────────────── */
.lightbox {
    display: none;
    /* JS adds .active to show */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    /* Flex for centering */
    opacity: 1;
    animation: lb-fade-in 0.3s ease forwards;
}

@keyframes lb-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* The image frame inside the lightbox */
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-inner img {
    display: block;
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
}

/* Close button ── top-right corner */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    font-size: 1.8rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9001;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* ============================================================
   MOBILE & TABLET HEADER — Centered Brand (≤991px)
   ============================================================

   WHY ABSOLUTE CENTERING?
   ─────────────────────────────────────────────────────────────
   On mobile, .desktop-nav is display:none, leaving only
   .header-brand and .header-actions in the flex row.
   justify-content:space-between would push the brand hard-left,
   while justify-content:center would crowd it against the cart/
   hamburger icons if the right side is heavier than the left.

   The solution: keep the header as position:relative so it acts
   as the containing block, then pull .header-brand OUT of the
   normal flex flow with position:absolute. Anchoring it at
   left:50% + translateX(-50%) gives a true geometric center
   that is completely independent of the icon counts on either
   side — no matter how wide or narrow the viewport gets.

   The two flex siblings (.desktop-nav / .header-actions) remain
   in flow and handle their own left/right alignment via the
   existing justify-content:space-between rule — they never
   "see" the absolutely positioned brand, so there is zero
   interference in either direction.
   ============================================================ */

@media (max-width: 991px) {

    /*
     * ── MOBILE HEADER LOCKDOWN ────────────────────────────────
     *
     * ROOT CAUSE OF THE GAP (NOW FIXED):
     * ─────────────────────────────────────────────────────────
     * This block previously set position:relative on .site-header,
     * which OVERRODE the base position:fixed rule. That yanked the
     * header back into normal document flow on mobile. As a result,
     * .portal-main's margin-top:60px pushed content down 60px BELOW
     * the now-in-flow header, exposing a 60px stripe of body
     * background (the pink gap).
     *
     * FIX: position:fixed !important — the header MUST remain fixed
     * on all viewports. The brand centering is achieved by
     * position:absolute on .header-brand (which positions relative
     * to its nearest positioned ancestor — the fixed header).
     * ─────────────────────────────────────────────────────────
     */
    .site-header {
        position: fixed !important;
        /* CRITICAL — never override to relative */
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;

        /* Strict single-line height lock */
        height: 60px !important;
        /* Match --header-height exactly */
        min-height: 60px !important;
        max-height: 60px !important;

        /*
         * flex-wrap:nowrap prevents any desktop-nav ghost items or
         * icon overflow from silently wrapping to a second row and
         * invisibly expanding the header's rendered height.
         */
        flex-wrap: nowrap !important;

        /* Clip anything that tries to overflow and expand the height */
        overflow: hidden !important;

        /* Hard boundary — no space can leak below the header */
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        padding-top: 0 !important;
    }

    /* 2. Pull the brand out of flex flow and pin it to the exact center */
    .header-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);

        /* Safety cap: prevents the brand from growing so wide it clips
           behind the icon groups on either side at narrow viewports */
        max-width: calc(100% - 140px);
    }

    /* 3. Slightly downscale the logo image for phone/tablet comfort */
    .header-brand img {
        width: 20px;
        /* Down from 26px desktop */
    }

    /* 4. Reduce brand text size so it never wraps inside the header bar */
    .header-brand>span {
        font-size: 1rem;
        /* Down from 1.2rem — legible on all phones */
    }

    /*
     * ── HERO BOUNDARY ZERO-OUT ────────────────────────────────
     * Belt-and-braces: explicitly zero any margin/padding that a
     * mobile UA stylesheet or inherited rule could inject between
     * .portal-main and the hero section.
     */
    .portal-main {
        margin-top: 60px !important;
        /* Exactly the header height — no more, no less */
        padding-top: 0 !important;
    }

    .hero-section {
        margin-top: 0 !important;
        /* Hero touches .portal-main top edge directly */
        padding-top: 0 !important;
    }
}