/* ==========================================================================
   Hero banner carousel — shared across every page's hero section
   (home/.hero, about/.about-hero, service/.sv-hero, gallery/.gl-hero,
   contact/.cu-hero). Only takes visual effect on a [data-hero-carousel]
   section that also received a data-hero-carousel-data JSON payload, i.e.
   when that page/position has 2+ active banners; see hero-carousel.js.
   With 0-1 banners these rules never trigger and the hero renders exactly
   as its own page CSS already defines it.
   ========================================================================== */
/* Dark fallback behind the swapped media - without this, the instant the
   old <img>/<video> is replaced (mid fade, opacity 0) shows the page's
   white background through the transparent hero section instead of the
   design's navy tone. */
[data-hero-carousel] {
    background: #0b1326;
}

[data-hero-media],
[data-hero-content] {
    transition:
        opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-hero-media].is-fading,
[data-hero-content].is-fading {
    opacity: 0;
    transform: translateY(8px);
}

.hero-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(11, 19, 38, 0.4);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 200ms,
        border-color 200ms;
}

.hero-carousel-arrow:hover {
    background: rgba(11, 19, 38, 0.7);
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-carousel-prev {
    left: 32px;
}

.hero-carousel-next {
    right: 32px;
}

.hero-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-carousel-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition:
        background 200ms,
        transform 200ms;
}

.hero-carousel-dot.is-active {
    background: var(--color-accent-cyan-light, #a4e6ff);
    transform: scale(1.2);
}

/* Keep hero text clear of the prev/next arrows: 32px offset + 48px button
   + 16px gap = 96px from the viewport edge. The centered .container already
   contributes (100vw - container-width) / 2 of side margin, so only the
   shortfall is added as padding (never below the normal 24px gutter).
   Only applies when arrows are rendered (2+ banners). */
@media (min-width: 1024px) and (max-width: 1350px) {
    [data-hero-carousel]:has(.hero-carousel-arrow)
        .container:has(> [data-hero-content]),
    [data-hero-carousel]:has(.hero-carousel-arrow)
        .container[data-hero-content] {
        padding-inline: max(
            24px,
            calc(96px - max(0px, (100vw - var(--container-width)) / 2))
        );
    }
}

@media (max-width: 1024px) {
    .hero-carousel-arrow {
        display: none;
    }
}
