/* --- PENGUNCI LAYAR GLOBAL --- */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
    margin: 0;
    padding: 0;
}

/* --- KEYFRAMES --- */
@keyframes zoomOutBg {
    0% {
        transform: scale(1.15);
        filter: brightness(1.1);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes smashInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px) skewX(4deg);
        /* Dikurangi jaraknya dari -60px agar tidak bocor di HP */
    }

    100% {
        opacity: 1;
        transform: translateX(0) skewX(0);
    }
}

@keyframes smashInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlowOrange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 107, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 0, 0);
    }
}

/* --- OVERRIDE BOOTSTRAP TEXT COLORS UNTUK THEME BARU --- */
.text-primary {
    color: #0A5A35 !important;
}

/* --- HERO SECTION WITH IMAGE BACKGROUND --- */
.hero-section-premium {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
    overflow: hidden;
    /* Mengunci agar partikel atau animasi background tidak melar keluar */
    color: #ffffff;
}

.hero-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 90, 53, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%), url('/assets/images/hero.webp') center/cover no-repeat;
    z-index: -1;
    animation: zoomOutBg 12s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-content-box {
    max-width: 680px;
    position: relative;
    z-index: 2;
    width: 100%;
    /* Memaksa konten fleksibel mengikuti lebar container */
}

/* --- STAGGERED ANIMATIONS --- */
.hero-badge-premium {
    background: rgba(255, 255, 255, 0.1);
    color: #FFC107;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    display: inline-block;
    text-transform: uppercase;
    border: 1px solid rgba(255, 193, 7, 0.4);
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: smashInLeft 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
}

.hero-title-premium {
    font-size: 84px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    color: #ffffff;
    margin-top: 20px;
    margin-bottom: 25px;
    opacity: 0;
    animation: smashInLeft 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s forwards;
}

.hero-title-premium span {
    background: linear-gradient(45deg, #FF6B00, #D81B24) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 0 35px rgba(255, 107, 0, 0.5) !important;
}

.animasi-info-bar {
    animation: smashInUp 1s ease 1s forwards;
    opacity: 0;
}

.hero-desc-premium {
    font-size: 20px;
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0;
    animation: smashInLeft 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: smashInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.8s forwards;
}

.hero-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    animation: smashInUp 1s ease 1s forwards;
}

.hero-info-grid small {
    color: #94a3b8 !important;
}

.hero-info-grid strong {
    color: #ffffff !important;
}

.hero-info-grid i {
    color: #FF6B00 !important;
}

/* --- TOMBOL THEME PROPOSAL --- */
.btn-blue-primary {
    background: linear-gradient(45deg, #FF6B00, #D81B24) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    animation: pulseGlowOrange 2.5s infinite;
}

.btn-blue-primary:hover {
    transform: translateY(-6px) scale(1.05) !important;
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.7);
}

.btn-outline-premium {
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease !important;
}

.btn-outline-premium:hover {
    border-color: #0A5A35 !important;
    background: #0A5A35 !important;
    color: #ffffff !important;
    transform: translateY(-5px) !important;
}

/* --- CARD HOVER EXTREME --- */
.package-card-premium {
    border: 1px solid #e2e8f0 !important;
    border-radius: 24px !important;
    background: #ffffff;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.package-card-premium:hover {
    transform: translateY(-16px) scale(1.03) !important;
    border-color: #0A5A35 !important;
    box-shadow: 0 35px 60px -15px rgba(10, 90, 53, 0.25) !important;
}

.package-card-premium .mb-4 span {
    color: #0A5A35 !important;
}

.info-card-premium {
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.4s ease !important;
}

.info-card-premium:hover {
    transform: translateY(-8px) scale(1.02) !important;
    border-bottom: 4px solid #FF6B00 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06) !important;
}

.info-icon-box i {
    color: #0A5A35;
    font-size: 32px;
}

/* --- SAFETY PADDING FOR BOOTSTRAP ROWS --- */
.row {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* --- RESPONSIVE MOBILE SINKRONISASI --- */
@media(max-width: 768px) {
    .hero-section-premium {
        padding: 110px 10px 60px;
        /* Dipersempit agar tidak terlalu jauh dari navbar di HP */
        text-align: center;
        min-height: auto;
    }

    .hero-title-premium {
        font-size: 46px;
        /* Dikecilkan sedikit lagi dari 52px agar teks "Funrun 2026" tidak pecah baris merusak layar */
        letter-spacing: -1px;
    }

    .hero-desc-premium {
        font-size: 15px;
        line-height: 1.6;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100% !important;
        margin-right: 0 !important;
    }

    /* Mencegah tulisan select dropdown terpotong kaku */
    .form-select {
        text-overflow: ellipsis;
        padding-right: 2.25rem;
    }

    /* === FIX TOTAL PILL-SHAPE DI HP === */
    .hero-info-grid {
        display: block !important;
        margin-top: 35px;
    }

    .hero-content-box .rounded-pill {
        display: flex !important;
        flex-direction: column !important;
        border-radius: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        gap: 0 !important;
    }

    .hero-content-box .rounded-pill>div {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 12px 0 !important;
        text-align: center !important;
    }

    .hero-content-box .rounded-pill>div:last-child {
        border-bottom: none !important;
    }

    .hero-content-box .rounded-pill small {
        color: #6c757d !important;
    }

    .hero-content-box .rounded-pill strong {
        color: #212529 !important;
    }

    .hero-content-box .rounded-pill i {
        color: #0A5A35 !important;
    }
}

/* ==========================================================================
   NEW SPONSOR SLIDER CAROUSEL (SLIDE EFFECT WITH ARROWS)
   ========================================================================== */

/* 1. Pengunci Ukuran Wadah Utama (Berlaku untuk Desktop & Tablet) */
#carouselSponsors {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 2. Pengaturan Logo Sponsor */
.sponsor-logo-item {
    width: 240px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.sponsor-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sponsor-logo-item img:hover {
    transform: scale(1.08);
    /* Efek zoom sedikit saat mouse diarahkan */
}

/* 3. Efek Animasi Geser (Sliding) Super Smooth & Premium */
#carouselSponsors .carousel-item {
    transition: transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 4. Modifikasi Tombol Panah & Hover */
.carousel-control-prev,
.carousel-control-next {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev:hover i,
.carousel-control-next:hover i {
    background: #FF6B00 !important;
    /* Latar berubah jadi orange Yosuka */
    color: #ffffff !important;
    /* Ikon panah jadi putih */
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

/* 5. Penyesuaian Khusus Layar HP (Mobile) */
@media (max-width: 768px) {
    #carouselSponsors {
        max-width: 340px !important;
        /* Wadah menyempit di HP agar panah ketarik ke tengah */
    }

    .sponsor-logo-item {
        width: 100px;
        height: 60px;
        padding: 5px;
    }

    #carouselSponsors .carousel-inner {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

    /* Tombol panah diperkecil areanya */
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px !important;
    }

    .carousel-control-prev i,
    .carousel-control-next i {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
        /* Ikon panah lebih kecil dan presisi di HP */
    }
}

/* ==========================================================================
   HALAMAN SPONSOR & PARTNER GRID (MINIMALIS)
   ========================================================================== */
.sponsor-grid-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sponsor-grid-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Efek Hover Nyala & Membesar */
.sponsor-grid-card:hover {
    border-color: #FF6B00;
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.15);
    transform: translateY(-5px);
}

.sponsor-grid-card:hover img {
    transform: scale(1.05);
}

/* Ukuran per kasta (Tier) */
.tier-plat .sponsor-grid-card { height: 160px; padding: 30px; border-width: 2px; }
.tier-gold .sponsor-grid-card { height: 120px; padding: 25px; }
.tier-part .sponsor-grid-card { height: 80px; padding: 15px; border-style: dashed; }

/* SPONSOR CARD PREMIUM (HOME) */
.sponsor-card-premium {
    width: 250px;
    height: 150px;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 24px !important;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
@media (max-width: 768px) {
    .sponsor-card-premium {
        flex: 1;
        height: 70px;
        border-radius: 12px !important;
        padding: 5px !important;
    }
    .sponsor-card-premium img {
        max-height: 50px !important;
    }
}

.sponsor-card-premium:hover {
    transform: translateY(-12px) scale(1.03) !important;
    border-color: #0A5A35 !important;
    box-shadow: 0 25px 50px -12px rgba(10, 90, 53, 0.25) !important;
}

/* --- INDEX ADDITIONAL STYLES --- */
.icon-circle-premium {
    width: 60px;
    height: 60px;
    background: rgba(10, 90, 53, 0.1);
    color: #FF6B00;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.info-card-premium:hover .icon-circle-premium {
    background: #FF6B00;
    color: #ffffff;
    transform: scale(1.1) rotate(5deg);
}

/* CSS Tambahan untuk List Racepack */
.racepack-list-item {
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid transparent;
}
.racepack-list-item:hover {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transform: translateX(10px);
}

/* STYLING COUNTDOWN PREMIUM & ELEGAN */
.countdown-box {
    padding: 15px 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}
.countdown-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.03);
    border-color: #cbd5e1;
}
.highlight-seconds {
    background: rgba(255, 107, 0, 0.01) !important;
    border-color: rgba(255, 107, 0, 0.2) !important;
}
.countdown-number {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    display: inline-block;
}
.countdown-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
    display: block;
}
.text-gradient-green {
    background: linear-gradient(135deg, #0A5A35 0%, #177a49 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-orange {
    background: linear-gradient(135deg, #FF6B00 0%, #ff8533 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-orange-muted {
    color: #d15902 !important;
}

/* Perbaikan Jarak Responsif khusus Layar Mobile (HP) */
@media (max-width: 576px) {
    .countdown-container-overlap {
        margin-top: -35px !important;
        margin-bottom: 30px !important;
    }
    .countdown-number { font-size: 24px; }
    .countdown-label { font-size: 9px; margin-top: 4px; }
    .countdown-box { min-height: 75px; padding: 10px 2px; border-radius: 12px; }
}