/* ═══════════════════════════════════════════════════════════
   NGO Parallax Story Slider  ·  Frontend Styles  v1.0.0
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────────────── */
.ngo-parallax-slider {
    position: relative;
    width: 100%;
    height: var(--ngo-h, 620px);
    overflow: hidden;
    background: #0d0d0d;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Tablet */
@media (max-width: 900px) {
    .ngo-parallax-slider {
        height: clamp(260px, 60vw, 460px);
    }
}

/* Mobile portrait — uses admin-set value, falls back to 320px */
@media (max-width: 600px) {
    .ngo-parallax-slider {
        height: var(--ngo-mh, 320px);
    }
}

/* ── Track & Slides ──────────────────────────────────────── */
.ngo-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ngo-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
}

.ngo-slide--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

/* Transitioning states set by JS */
.ngo-slide--leaving  { z-index: 2; }
.ngo-slide--entering { z-index: 3; opacity: 1; visibility: visible; }

/* ── Parallax Background ─────────────────────────────────── */
.ngo-bg {
    position: absolute;
    top: -12%;
    left: 0;
    right: 0;
    width: 100%;
    height: 124%;          /* Extra room for parallax travel on desktop */
    background-size: cover;
    background-position: center 30%; /* Bias upward — shows faces/action, not ground */
    will-change: transform;
    transform: translateY(0) scale(1.04);
    transition: transform 0.05s linear;
}

/* On mobile: kill the parallax overshoot — just fill the frame cleanly */
@media (max-width: 600px) {
    .ngo-bg {
        top: 0;
        height: 100%;
        background-position: center center;
        transform: none !important;  /* Disable parallax movement on small screens */
        transition: none !important;
    }
}

/* ── Overlay ─────────────────────────────────────────────── */
.ngo-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,  rgba(0,0,0,.72) 0%, rgba(0,0,0,.18) 65%, rgba(0,0,0,.04) 100%),
        linear-gradient(to top,    rgba(0,0,0,.50) 0%, transparent 55%);
    z-index: 1;
}

/* ── Decorative Corner Lines ─────────────────────────────── */
.ngo-corner {
    position: absolute;
    z-index: 2;
    width: 40px;
    height: 40px;
    opacity: 0;
    transition: opacity .6s ease .8s;
}
.ngo-slide--active .ngo-corner { opacity: .5; }

.ngo-corner--tl {
    top: 24px; left: 24px;
    border-top: 1.5px solid rgba(255,255,255,.7);
    border-left: 1.5px solid rgba(255,255,255,.7);
}
.ngo-corner--br {
    bottom: 24px; right: 24px;
    border-bottom: 1.5px solid rgba(255,255,255,.7);
    border-right: 1.5px solid rgba(255,255,255,.7);
}

@media (max-width: 600px) {
    .ngo-corner { display: none; }
}

/* ── Content Layer ───────────────────────────────────────── */
.ngo-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 6vw, 80px);
    max-width: 680px;
}

/* ── Logo ────────────────────────────────────────────────── */
.ngo-logo {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(16px);
}
.ngo-slide--active .ngo-logo {
    animation: ngoRiseIn .6s cubic-bezier(.16,1,.3,1) .15s forwards;
}
.ngo-logo img {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .88;
}

/* ── Title ───────────────────────────────────────────────── */
.ngo-title {
    font-size: clamp(1.7rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.025em;
    color: #fff;
    margin: 0 0 14px;
    opacity: 0;
    transform: translateY(24px);
    text-shadow: 0 3px 24px rgba(0,0,0,.35);
}
.ngo-slide--active .ngo-title {
    animation: ngoRiseIn .8s cubic-bezier(.16,1,.3,1) .3s forwards;
}

/* ── Body Text ───────────────────────────────────────────── */
.ngo-text {
    font-size: clamp(.9rem, 1.7vw, 1.1rem);
    line-height: 1.65;
    color: rgba(255,255,255,.85);
    max-width: 520px;
    margin: 0 0 26px;
    opacity: 0;
    transform: translateY(18px);
}
.ngo-slide--active .ngo-text {
    animation: ngoRiseIn .8s cubic-bezier(.16,1,.3,1) .46s forwards;
}

/* ── CTA Button ──────────────────────────────────────────── */
.ngo-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: 2px solid rgba(255,255,255,.85);
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: color .35s ease, border-color .35s ease;
    align-self: flex-start;
}
.ngo-slide--active .ngo-cta {
    animation: ngoRiseIn .8s cubic-bezier(.16,1,.3,1) .6s forwards;
}
.ngo-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .38s cubic-bezier(.16,1,.3,1);
    z-index: -1;
}
.ngo-cta:hover { color: #111; border-color: #fff; }
.ngo-cta:hover::before { transform: scaleX(1); }
.ngo-cta svg {
    width: 16px;
    height: 16px;
    transition: transform .3s ease;
    flex-shrink: 0;
}
.ngo-cta:hover svg { transform: translateX(4px); }

/* ── Slide Counter ───────────────────────────────────────── */
.ngo-counter {
    position: absolute;
    right: clamp(18px, 3.5vw, 44px);
    bottom: clamp(18px, 3.5vw, 44px);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: rgba(255,255,255,.55);
}
.ngo-counter__line {
    display: block;
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,.35);
}
.ngo-counter__cur { color: rgba(255,255,255,.9); }

@media (max-width: 600px) { .ngo-counter { display: none; } }

/* ── Prev / Next Arrows ──────────────────────────────────── */
.ngo-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border: 1.5px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    transition: background .3s, border-color .3s, transform .3s;
}
.ngo-arrow svg { width: 18px; height: 18px; pointer-events: none; }
.ngo-arrow:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.9);
    transform: translateY(-50%) scale(1.08);
}
.ngo-arrow--prev { left: clamp(12px, 2.5vw, 32px); }
.ngo-arrow--next { right: clamp(12px, 2.5vw, 32px); }

@media (max-width: 500px) {
    .ngo-arrow { width: 38px; height: 38px; }
    .ngo-arrow svg { width: 15px; height: 15px; }
}

/* ── Dot Navigation ──────────────────────────────────────── */
.ngo-dots {
    position: absolute;
    bottom: clamp(16px, 3vw, 36px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ngo-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: rgba(255,255,255,.38);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all .4s cubic-bezier(.16,1,.3,1);
}
.ngo-dot--active {
    background: #fff;
    width: 26px;
}
.ngo-dot:hover:not(.ngo-dot--active) {
    background: rgba(255,255,255,.65);
}

/* ── Progress Bar ────────────────────────────────────────── */
.ngo-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,.18);
    z-index: 10;
    overflow: hidden;
}
.ngo-progress__fill {
    height: 100%;
    background: rgba(255,255,255,.85);
    transform-origin: left center;
    animation: ngoProgress linear forwards;
    will-change: transform;
}
.ngo-progress__fill--paused { animation-play-state: paused; }

@keyframes ngoProgress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ── Keyframe: Rise In ───────────────────────────────────── */
@keyframes ngoRiseIn {
    from { opacity: 0; transform: translateY(var(--ngo-from-y, 20px)); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Slide Wipe Transitions ──────────────────────────────── */
/* Entering: clip-path wipe from the chosen direction */
.ngo-slide--entering-next {
    animation: ngoWipeFromRight .85s cubic-bezier(.77,0,.18,1) forwards;
}
.ngo-slide--entering-prev {
    animation: ngoWipeFromLeft .85s cubic-bezier(.77,0,.18,1) forwards;
}

/* Leaving: subtle scale + fade */
.ngo-slide--leaving {
    animation: ngoFadeLeave .85s cubic-bezier(.77,0,.18,1) forwards;
}

@keyframes ngoWipeFromRight {
    from {
        clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
        opacity: 1;
    }
    to {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

@keyframes ngoWipeFromLeft {
    from {
        clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
        opacity: 1;
    }
    to {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

@keyframes ngoFadeLeave {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.03); }
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ngo-logo, .ngo-title, .ngo-text, .ngo-cta,
    .ngo-slide--entering-next, .ngo-slide--entering-prev,
    .ngo-slide--leaving {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
    .ngo-bg { transition: none !important; }
    .ngo-progress__fill { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   HERO MODE  — added for Elementor full-viewport hero
   ═══════════════════════════════════════════════════════════ */

/* ── Hero: fill the full viewport ───────────────────────── */
.ngo-slider--hero {
    height: 100vh;
    height: 100svh; /* safe-area aware on iOS */
    min-height: 480px;
    max-height: none;
}

/* Tablet: still full viewport but safe */
@media (max-width: 900px) {
    .ngo-slider--hero {
        height: 90vh;
        height: 90svh;
        min-height: 360px;
    }
}

/* Mobile portrait: use 70% of the viewport — feels intentional, not accidentally tall */
@media (max-width: 600px) {
    .ngo-slider--hero {
        height: 70vh;
        height: 70svh;
        min-height: 300px;
    }
}

/* ── Content Position: Center ────────────────────────────── */
.ngo-slider--center .ngo-content {
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 820px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding-bottom: clamp(60px, 10vh, 120px); /* clear the dots */
}
.ngo-slider--center .ngo-overlay {
    background:
        radial-gradient(ellipse at center, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 70%),
        linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 40%);
}
.ngo-slider--center .ngo-title {
    font-size: clamp(2rem, 5.5vw, 4.2rem);
}
.ngo-slider--center .ngo-cta {
    align-self: center;
    margin: 0 auto;
}
.ngo-slider--center .ngo-counter { display: none; }

/* ── Content Position: Middle-left ───────────────────────── */
.ngo-slider--middle-left .ngo-content {
    justify-content: center;
    top: 0;
    bottom: 0;
}

/* ── Scroll-down Arrow ───────────────────────────────────── */
.ngo-scroll-arrow {
    position: absolute;
    bottom: clamp(18px, 4vh, 36px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border: 1.5px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    padding: 0;
    animation: ngoBounce 2.2s ease-in-out infinite;
    transition: background .3s, border-color .3s;
}
.ngo-scroll-arrow:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.9);
    animation-play-state: paused;
}
.ngo-scroll-arrow svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

@keyframes ngoBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
}

/* Push dots up when scroll arrow is present */
.ngo-slider--hero .ngo-dots {
    bottom: clamp(62px, 9vh, 90px);
}

/* ── Elementor Compatibility ─────────────────────────────── */
/* Remove default widget padding so slider bleeds edge-to-edge */
.elementor-widget-shortcode .elementor-widget-container:has(.ngo-parallax-slider) {
    padding: 0 !important;
    margin: 0 !important;
}
/* Fallback for browsers without :has() support */
.elementor-section.elementor-section-full_width .ngo-parallax-slider,
.e-con-full .ngo-parallax-slider,
.elementor-container .ngo-parallax-slider {
    width: 100%;
    max-width: none;
}
/* Prevent Elementor column gutters from affecting the slider */
.elementor-column .ngo-parallax-slider {
    margin-left: 0;
    margin-right: 0;
}

/* ── Reduced motion: hero bounce ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ngo-scroll-arrow { animation: none; }
}
