
/**
 * Hero Slider — Plugin pnbelopa/heroslider
 *
 * Refactored: pakai responsive design tokens (--fs-*, --sp-*) untuk scaling
 * smooth antar breakpoint. Media query hanya untuk perubahan LAYOUT, bukan size.
 *
 * Background image di-inject via inline CSS custom property `--hero-bg`
 * pada element .hero-carousel (lihat default.htm).
 */

/* ── Carousel container ─────────────────────────── */
.hero-carousel {
    position: relative;
    width: 100%;
    /* Transparan untuk pointer-events; hanya child tertentu yang aktif */
    pointer-events: none;
}

.hero-swiper,
.hero-carousel .hero-progress-outer {
    pointer-events: auto;
}

/* Swiper perlu overflow hidden agar slide tidak terlihat saat transisi */
.hero-swiper {
    overflow: hidden;
}

/* ── Slide dasar ───────────────────────────────── */
.hero-slide {
    position: relative;
    width: 100%;
    height: var(--pn-hero-h);
    background: var(--hero-bg, none) center/cover no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: var(--pn-overlay-soft);
    pointer-events: none;
}

.hero-slide::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -80px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

/* Offset navbar + bottom padding agar konten ter-push ke atas saat di-center */
.hero-slide > .container {
    padding-top: var(--sp-xl);
    padding-bottom: var(--sp-4xl);
}

.hero-text-col {
    padding-top: 0;
    padding-bottom: 0;
    z-index: var(--pn-z-overlay);
}

.hero-img-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    z-index: var(--pn-z-overlay);
}

/* ── Slide: tipe teks + gambar mengambang ──────── */
.hero-float-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--pn-radius-lg);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.50),
        0 10px 30px rgba(0, 0, 0, 0.30),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: heroFloat 5s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-18px); }
}

/* ── Slide: tipe background image ──────────────── */
.hero-slide-bg {
    position: relative;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, var(--hero-overlay-opacity, 0.5));
}

.hero-bg-content {
    position: relative;
    z-index: var(--pn-z-overlay);
}

/* ── Title & description (fluid scale via tokens + dvh) ── */
/* min() memastikan teks mengecil saat layar pendek (100dvh HP) */
.hero-title {
    font-size: min(var(--fs-2xl), 5dvh);
    font-weight: 700;
    margin-bottom: var(--sp-md);
    color: var(--pn-text-on-dark);
    line-height: var(--lh-tight);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: min(var(--fs-base), 2.4dvh);
    margin-bottom: var(--sp-sm);
    color: var(--pn-text-on-dark-soft);
    line-height: var(--lh-normal);
}

.hero-text-col .btn {
    font-size: min(var(--fs-sm), 2dvh);
    padding: var(--sp-sm) var(--sp-lg);
    margin-top: var(--sp-sm);
    min-height: min(var(--tap-min), 5dvh);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Arrow controls (visible on hover) ─────────── */

/* Outer wrapper: covers full carousel height, centered like Bootstrap container */
.hero-arrows-outer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--pn-z-arrow);
    pointer-events: none;
}

.hero-arrows-outer .container {
    position: relative;
    height: 100%;
}

.hero-carousel .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--pn-overlay-dark);
    color: var(--pn-text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, background var(--pn-transition-fast);
    cursor: pointer;
}

.hero-carousel .hero-arrow-prev { left: 0; }
.hero-carousel .hero-arrow-next { right: 0; }

.hero-carousel.inner-hovered .hero-arrow {
    opacity: 1;
    pointer-events: auto;
}

.hero-carousel .hero-arrow:hover {
    background: var(--pn-overlay-darker);
}

/* ── Progress indicator dots (hidden by default, show on hover) ── */
.hero-progress-outer {
    position: absolute;
    bottom: 80px;
    left: 0; right: 0;
    z-index: var(--pn-z-indicator);
    pointer-events: none;
    opacity: 1;
}

.hero-carousel.inner-hovered .hero-progress-wrap {
    pointer-events: auto;
}

.hero-progress-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.hero-carousel.inner-hovered .hero-progress-wrap {
    pointer-events: auto;
}

.hero-pb {
    width: 8px; height: 8px;
    border-radius: var(--pn-radius-pill);
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    flex-shrink: 0;
    transition:
        width var(--pn-transition-base) cubic-bezier(.4, 0, .2, 1),
        border-radius var(--pn-transition-base),
        background var(--pn-transition-base);
    overflow: hidden;
    position: relative;
}

.hero-pb:hover {
    background: rgba(255, 255, 255, 0.55);
}

.hero-pb.active {
    width: 60px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-pb-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%; width: 0;
    background: var(--pn-yellow);
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — hanya untuk perubahan LAYOUT
   (font/spacing sudah fluid via clamp di token)
   ═══════════════════════════════════════════════ */

/* ── Tablet landscape & below: progress dots lebih kompak ── */
@media (max-width: 992px) {
    .hero-progress-outer { bottom: 80px; }
    .hero-progress-outer .container { display: flex; justify-content: center; }
    .hero-progress-wrap { gap: 6px; }
    .hero-pb { width: 7px; height: 7px; }
    .hero-pb.active { width: 44px; height: 7px; }
    .hero-slide { height: 100dvh; }
    .hero-text-col { text-align: center; }
}

/* ── Tablet landscape (992-1199): konten ke atas via asymmetric padding ── */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-slide > .container {
        padding-top: 40px;
        padding-bottom: 160px;
    }
}

/* ── Tablet portrait & below: vertical stack untuk tipe teks+gambar ── */
@media (max-width: 991px) {
    .hero-progress-outer { bottom: 60px; }

    .hero-slide {
        height: 100dvh;
    }

    .hero-slide > .container {
        padding-top: 65px;
        padding-bottom: var(--sp-lg);
    }

    .hero-slide:not(.hero-slide-bg) {
        align-items: flex-start;
        padding-bottom: var(--sp-md);
    }

    .hero-slide:not(.hero-slide-bg) .container {
        height: auto;
    }

    .hero-slide:not(.hero-slide-bg) .row {
        flex-direction: column;
        flex-wrap: nowrap;
        height: auto;
    }

    .hero-slide:not(.hero-slide-bg) .hero-img-col {
        display: flex;
        order: -1;
        align-items: center;
        justify-content: center;
        padding-top: 0;
        padding-bottom: var(--sp-lg);
    }

    .hero-slide:not(.hero-slide-bg) .hero-float-img {
        height: 35vh;
        width: 100%;
        object-fit: cover;
        animation: none;
    }

    .hero-slide:not(.hero-slide-bg) .hero-text-col {
        padding-left: var(--sp-lg);
        padding-right: var(--sp-lg);
        padding-bottom: 0;
        text-align: center;
    }
}

/* ── HP small portrait: gambar sedikit lebih pendek ── */
@media (max-width: 576px) {
    .hero-progress-outer { bottom: 40px; }

    .hero-slide:not(.hero-slide-bg) .hero-float-img {
        height: 32vh;
    }
}


