/* Floating coverflow carousel hero */
.nh-carousel-hero {
    position: relative;
    min-height: clamp(420px, 72vh, 720px);
    overflow: hidden;
    background: #0b1220;
    color: #fff;
    isolation: isolate;
}

.nh-carousel-bg {
    position: absolute;
    inset: -40px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(28px) saturate(1.15);
    transform: scale(1.08);
    transition: background-image 0.6s ease, opacity 0.45s ease;
    z-index: 0;
}

.nh-carousel-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 12, 24, 0.28) 0%, rgba(8, 12, 24, 0.45) 100%),
        radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.35) 100%);
}

.nh-carousel-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: inherit;
    padding: 48px 16px 56px;
}

.nh-carousel-viewport {
    position: relative;
    width: min(100%, 1100px);
    height: clamp(280px, 48vh, 460px);
    perspective: 1200px;
}

.nh-carousel-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(58%, 420px);
    aspect-ratio: 3 / 4;
    max-height: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: #111827 center/cover no-repeat;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0.55;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, box-shadow 0.45s ease, border-color 0.35s ease;
    border: 0 solid transparent;
    cursor: pointer;
    z-index: 1;
}

.nh-carousel-card.is-prev {
    transform: translate(calc(-50% - 38%), -50%) scale(0.78);
    opacity: 0.78;
    z-index: 2;
}

.nh-carousel-card.is-next {
    transform: translate(calc(-50% + 38%), -50%) scale(0.78);
    opacity: 0.78;
    z-index: 2;
}

.nh-carousel-card.is-far-prev {
    transform: translate(calc(-50% - 68%), -50%) scale(0.64);
    opacity: 0.35;
    z-index: 1;
}

.nh-carousel-card.is-far-next {
    transform: translate(calc(-50% + 68%), -50%) scale(0.64);
    opacity: 0.35;
    z-index: 1;
}

.nh-carousel-card.is-active {
    width: min(64%, 460px);
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 5;
    border: 5px solid #fff;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.nh-carousel-card.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.5);
}

.nh-carousel-card-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.nh-carousel-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 18px 22px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    z-index: 1;
}

.nh-carousel-card-caption strong {
    display: block;
    font-family: "DM Sans", Inter, sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.nh-carousel-card:not(.is-active) .nh-carousel-card-caption {
    opacity: 0.85;
}

.nh-card-progress {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
}

.nh-carousel-card.is-active .nh-card-progress {
    opacity: 1;
}

.nh-card-progress > span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: #f5d547;
    box-shadow: 0 0 10px rgba(245, 213, 71, 0.55);
}

.nh-carousel-card.is-active .nh-card-progress > span.is-running {
    animation: nhCardProgress var(--nh-slide-ms, 5500ms) linear forwards;
}

@keyframes nhCardProgress {
    from { width: 0%; }
    to { width: 100%; }
}

.nh-carousel-rail {
    position: relative;
    z-index: 2;
    width: min(70%, 520px);
    height: 3px;
    margin-top: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.nh-carousel-rail > span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: #fff;
    transition: width 0.45s ease;
}

.nh-carousel-nav {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nh-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.05);
}

.nh-carousel-nav.prev { left: max(12px, 3vw); }
.nh-carousel-nav.next { right: max(12px, 3vw); }

@media (max-width: 760px) {
    .nh-carousel-hero {
        min-height: 520px;
    }

    .nh-carousel-viewport {
        height: 360px;
        width: 100%;
    }

    .nh-carousel-card,
    .nh-carousel-card.is-active {
        width: min(78%, 300px);
    }

    .nh-carousel-card.is-prev {
        transform: translate(calc(-50% - 52%), -50%) scale(0.72);
    }

    .nh-carousel-card.is-next {
        transform: translate(calc(-50% + 52%), -50%) scale(0.72);
    }

    .nh-carousel-card.is-far-prev,
    .nh-carousel-card.is-far-next {
        opacity: 0;
        pointer-events: none;
    }

    .nh-carousel-nav {
        width: 38px;
        height: 38px;
    }

    .nh-carousel-rail {
        width: min(84%, 360px);
        margin-top: 20px;
    }
}

/* Videos section variant — same coverflow, shorter stage inside page */
.nh-carousel-hero.nh-carousel-videos {
    min-height: clamp(380px, 58vh, 560px);
    border-radius: 22px;
    margin-top: 0.5rem;
}

.nh-carousel-hero.nh-carousel-videos .nh-carousel-stage {
    padding: 28px 12px 40px;
}

.nh-carousel-hero.nh-carousel-videos .nh-carousel-viewport {
    height: clamp(260px, 42vh, 400px);
}

.nh-carousel-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 64px;
    height: 64px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    transition: opacity 0.3s ease, transform 0.35s ease;
}

.nh-carousel-play i {
    font-size: 1.15rem;
    margin-left: 3px;
}

.nh-carousel-card.is-active .nh-carousel-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.nh-carousel-hero.nh-carousel-videos .nh-carousel-card-link {
    pointer-events: none;
}

@media (max-width: 760px) {
    .nh-carousel-hero.nh-carousel-videos {
        min-height: 460px;
        border-radius: 16px;
    }

    .nh-carousel-play {
        width: 54px;
        height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nh-carousel-card,
    .nh-carousel-bg,
    .nh-carousel-rail > span,
    .nh-carousel-play {
        transition: none;
    }

    .nh-carousel-card.is-active .nh-card-progress > span.is-running {
        animation: none;
        width: 100%;
    }
}
