/**
 * MPD Custom Styles - banner anti-FOUC + layout guards.
 * Theme: Hyundai Fuel Hello Elementor Child
 */

/* Layout guard: prevent the off-screen ship from creating horizontal overflow. */
html, body {
    overflow-x: hidden;
}
.home-baner-section {
    overflow-x: clip;
}

/* Fixed header pinned to viewport top; JS sets matching margin-top on the page body so content isn't covered. */
.elementor-location-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}
body.admin-bar .elementor-location-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .elementor-location-header {
        top: 46px;
    }
}

/* Ship base: promote to its own compositor layer for smooth GSAP transforms. */
.home-baner-section .banner-boat {
    will-change: transform;
    backface-visibility: hidden;
}

/* Disable Elementor's default 0.4s transition on transform — it fights with GSAP and blocks instant updates. */
.home-baner-section .banner-boat,
.home-baner-section .banner-heading-top,
.home-baner-section .banner-heading-bottom {
    transition: none !important;
}

/* Anti-FOUC initial state — only on the live frontend. Elementor editor (<html class="elementor-html">) skips these so the editor shows content in place. */
html:not(.elementor-html) .home-baner-section .banner-boat {
    transform: translate3d(-1200px, 0, 0);
}
html:not(.elementor-html) .home-baner-section .banner-heading-top,
html:not(.elementor-html) .home-baner-section .banner-heading-bottom {
    visibility: hidden;
}

/* Guard: any banner rendered inside a <footer> template (duplicate) must NOT animate — keep content visible. */
footer .home-baner-section .banner-boat,
footer .home-baner-section .banner-heading-top,
footer .home-baner-section .banner-heading-bottom {
    transform: none !important;
}

/* About section ship background: drift down at constant ~30%/s to match video (9–16s). */
.home-about-hyundai {
    background-position-y: 0% !important;            /* initial: ship at top (avoids overlap with icon bar) */
    transition: background-position-y 1s cubic-bezier(0.45, 0, 0.55, 1) !important;
    will-change: background-position;
}
.home-about-hyundai.parent-active-1 {
    background-position-y: 20% !important;           /* ship slightly higher in viewport than before */
    transition-duration: 0.67s !important;           /* delta 20% → 0.67s at 30%/s */
    transition-delay: 500ms !important;              /* settle pause before ship starts drifting */
}
.home-about-hyundai.parent-active-2 {
    background-position-y: 100% !important;          /* delta 80% → 2.67s (constant speed) */
    transition-duration: 2.67s !important;
}