/*
 * Hero Scroll Gallery — Divi Module CSS
 * All classes namespaced .hsg-* to avoid conflicts.
 * CSS custom properties are injected by PHP from the Divi Design panel.
 */

/* ── Box sizing reset ─────────────────────────────────────────────────── */
.et_pb_hero_scroll_gallery *,
.et_pb_hero_scroll_gallery *::before,
.et_pb_hero_scroll_gallery *::after {
    box-sizing: border-box;
}

/* ── Module outer wrapper ─────────────────────────────────────────────── */
.et_pb_hero_scroll_gallery {
    display: block;
    width: 100%;
    position: relative;
}

/* ── Inner hero wrapper ───────────────────────────────────────────────── */
.hsg-hero-wrapper {
    width: 100%;
    overflow: hidden;
    background: var(--hsg-bg, #ffffff);
}

/* ── Font ─────────────────────────────────────────────────────────────── */
.hsg-premium-font {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    letter-spacing: -0.03em;
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION  (frontend — full viewport, scroll-pinned)
══════════════════════════════════════════════════════════════════════ */
.hsg-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--hsg-bg, #ffffff);
    color: var(--hsg-headline-color, #141414);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════
   BACKGROUND SLIDER
══════════════════════════════════════════════════════════════════════ */
.hsg-hero-header {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    will-change: transform;
}

.hsg-bg-swiper {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.hsg-bg-swiper .swiper-wrapper,
.hsg-bg-swiper .swiper-slide {
    width: 100% !important;
    height: 100% !important;
}

.hsg-bg-swiper .swiper-slide {
    position: relative;
    overflow: hidden;
    opacity: 0 !important;
    transition: opacity 1.2s ease !important;
}

.hsg-bg-swiper .swiper-slide-active {
    opacity: 1 !important;
}

.hsg-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hsg-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        var(--hsg-overlay-start, rgba(250,250,250,0.52)) 0%,
        var(--hsg-overlay-mid,   rgba(250,250,250,0.28)) 45%,
        var(--hsg-overlay-end,   rgba(250,250,250,0.78)) 100%
    );
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMATED IMAGE STRIP
   Frontend: position:fixed so it stays visible while section is pinned.
   VB mode: position:absolute inside the 100vh container.
══════════════════════════════════════════════════════════════════════ */
.hsg-animated-icons {
    position: absolute;
    bottom: var(--hsg-strip-bottom, 2.5rem);
    left: 5%;
    width: 90%;
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    z-index: 2;
    will-change: transform;
}



.hsg-animated-icon {
    flex: 1 1 0%;
    aspect-ratio: 1 / 1;
    border-radius: var(--hsg-strip-radius, 4px);
    overflow: hidden;
    background: var(--hsg-strip-bg, #f3f4f6);
    will-change: transform;
}

.hsg-animated-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Duplicate icons are created by JS for the flight animation */
.hsg-duplicate-icon {
    overflow: hidden;
    border-radius: var(--hsg-strip-radius, 4px);
    display: none; /* hidden until JS shows them */
}

.hsg-duplicate-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADLINE
   Structural rules only — font-family, size, weight, color,
   line-height and letter-spacing are all controlled by Divi's
   native Typography panel (fonts system) and injected automatically.
══════════════════════════════════════════════════════════════════════ */
.hsg-animated-text {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
    text-align: center;
    /* Fallback defaults (overridden by Divi fonts system output) */
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(1.4rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: #141414;
}

.hsg-text-segment {
    opacity: 0;
    transition: opacity 0.1s;
}



/* ── Placeholder inline icon (marks where flying images land) ─────── */
.hsg-placeholder-icon {
    display: inline-block;
    vertical-align: middle;
    width: var(--hsg-icon-size-mobile, 2rem);
    height: var(--hsg-icon-size-mobile, 2rem);
    margin: 0 0.25rem;
    visibility: hidden;  /* Space is reserved; JS shows duplicate on top */
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — tablet & desktop
══════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .hsg-hero {
        padding: 0 1.5rem;
    }

    .hsg-animated-icons {
        left: 5%;
        width: 90%;
        max-width: 100%;
    }

    .hsg-animated-text {
        max-width: 100%;
    }

    .hsg-placeholder-icon {
        width: var(--hsg-icon-size-desktop, 4rem);
        height: var(--hsg-icon-size-desktop, 4rem);
        margin-top: -0.375rem;
    }
}

@media (max-width: 480px) {
    .hsg-animated-icons {
        left: 2%;
        width: 96%;
    }
}

