/* Custom CSS - Dinas Perhubungan Barito Utara */

/* =====================================================
   CUSTOM PAGE PRELOADER
   ===================================================== */
#custom-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0b1d3a;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader-content {
    text-align: center;
}

/* Wadah utama pembungkus ring dan logo */
.loader-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 25px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ring/Lingkaran yang Berputar */
.dishub-loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top: 4px solid #ffcc00;
    border-bottom: 4px solid #0055ff;
    border-radius: 50%;
    animation: putarRing 1.5s linear infinite;
    box-sizing: border-box;
}

/* Logo di Tengah (Diam / tidak ikut berputar) */
.loader-logo {
    position: absolute;
    width: 65px;
    height: auto;
    animation: denyutLogo 2s ease-in-out infinite;
}

.preloader-text {
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 5px 0;
}

/* Animasi berputar */
@keyframes putarRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animasi logo berdenyut halus */
@keyframes denyutLogo {
    0% {
        transform: scale(0.95);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* Kelas pemicu untuk menyembunyikan loader */
.preloader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* =====================================================
   TOPBAR TEKS BERJALAN (Di atas Menu Navigasi)
   ===================================================== */
#dishub-topbar-ticker {
    width: 100%;
    background-color: #0b1d3a;
    border-bottom: 2px solid #ffcc00;
    overflow: hidden;
    position: relative;
    z-index: 1000;
}

.topbar-ticker-inner {
    display: flex;
    align-items: center;
    height: 36px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.topbar-ticker-label {
    background: #ffcc00;
    color: #0b1d3a;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 2px;
    margin-right: 12px;
    text-transform: uppercase;
}

.topbar-ticker-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.topbar-ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: topbarBerjalan 28s linear infinite;
    will-change: transform;
}

.topbar-ticker-track span {
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 0.3px;
}

@keyframes topbarBerjalan {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause saat hover */
/* ---- Sembunyikan Kotak / Ikon Edit Module Joomla Frontend Editing ---- */
.jmoddiv,
.btn-edit-module,
[class*="jmod-"],
.sp-edit-layout {
    display: none !important;
}

/* ---- Hilangkan Ruang Kosong Putih di Bawah Header ---- */
#sp-header {
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

#sp-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

#sp-main-body {
    padding: 0 !important;
}

.sp-page-builder,
#sp-page-builder {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Helper class untuk Background Overlay Gelap Transparan pada Section SP Page Builder */
.hero-overlay-dark {
    position: relative;
}

.hero-overlay-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 29, 58, 0.85), rgba(0, 0, 0, 0.7));
    z-index: 1;
    pointer-events: none;
}

.hero-overlay-dark>* {
    position: relative;
    z-index: 2;
}

/* =====================================================
   HERO BANNER STYLING DISHUB - FULLY FLUID RESPONSIVE
   ===================================================== */
#heroDishub,
#heroDishub .carousel-inner,
#heroDishub .carousel-item {
    border-radius: 0px !important;
}

/* Carousel controls & indicators - diperkecil agar tidak menimpa tombol konten */
#heroDishub .carousel-control-prev,
#heroDishub .carousel-control-next {
    width: 36px;
    height: 36px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    opacity: 0.7;
}

#heroDishub .carousel-control-prev {
    left: 8px;
}

#heroDishub .carousel-control-next {
    right: 8px;
}

#heroDishub .carousel-control-prev-icon,
#heroDishub .carousel-control-next-icon {
    width: 16px;
    height: 16px;
}

#heroDishub .carousel-indicators {
    bottom: 4px;
    margin-bottom: 0;
    gap: 4px;
}

#heroDishub .carousel-indicators button {
    width: 20px !important;
    height: 3px !important;
    border-radius: 2px;
    opacity: 0.5;
}

#heroDishub .carousel-indicators button.active {
    opacity: 1;
    width: 28px !important;
}

/* Di HP lebih kecil lagi */
@media (max-width: 576px) {

    #heroDishub .carousel-control-prev,
    #heroDishub .carousel-control-next {
        width: 26px;
        height: 26px;
    }

    #heroDishub .carousel-control-prev-icon,
    #heroDishub .carousel-control-next-icon {
        width: 12px;
        height: 12px;
    }

    /* Sembunyikan indikator di HP agar tidak menimpa tombol */
    #heroDishub .carousel-indicators {
        display: none !important;
    }
}


/* Gambar selalu 100% lebar, proporsi dilindungi agar tidak merusak layout */
.hero-banner-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 5; /* Memaksa kotak selalu 16:5 di desktop */
    object-fit: cover;    /* Gambar yang beda ukuran akan dicrop rapi, BUKAN dipenyet */
    object-position: center;
    display: block;
}

/* Di HP, kita bisa buat aspect-rationya sedikit lebih tinggi (misal 2:1) agar teks tidak tumpah */
@media (max-width: 576px) {
    .hero-banner-img {
        aspect-ratio: 2 / 1.2; 
    }
}

/* Overlay melayang di atas gambar */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 29, 58, 0.85), rgba(0, 29, 61, 0.65));
    display: flex;
    align-items: center;
    padding: 3% 5%;
    overflow: hidden;
}

/* Konten teks di dalam overlay */
.hero-content {
    max-width: 60%;
    text-align: left !important;
}

.hero-content * {
    text-align: left !important;
}

/* Badge "WEBSITE RESMI" */
.hero-badge {
    display: inline-block;
    background: #ffffff;
    color: #0b1d3a;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 4px;
    font-size: clamp(7px, 0.8vw, 11px);
    padding: clamp(2px, 0.3vw, 6px) clamp(5px, 0.8vw, 12px);
    margin-bottom: clamp(3px, 0.5vw, 10px);
}

/* Judul H1 */
.hero-title {
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    text-align: left !important;
    font-size: clamp(12px, 3vw, 38px) !important;
    margin-bottom: clamp(3px, 0.6vw, 12px) !important;
}

/* Warna kuning "BARITO UTARA" */
.hero-accent {
    color: #ffcc00;
}

/* Deskripsi */
.hero-desc {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: clamp(8px, 1vw, 15px) !important;
    margin-bottom: clamp(4px, 0.8vw, 16px) !important;
}

/* Baris tombol */
.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, 0.6vw, 10px);
}

/* Override tombol KHUSUS di dalam hero banner agar fluid & solid (tanpa gradient) */
#heroDishub .btn-dishub-primary {
    background: #ffcc00 !important;
    font-size: clamp(8px, 1.1vw, 14px) !important;
    padding: clamp(5px, 0.8vw, 12px) clamp(10px, 1.5vw, 28px) !important;
    letter-spacing: clamp(0px, 0.1vw, 1px) !important;
}
#heroDishub .btn-dishub-secondary {
    font-size: clamp(8px, 1.1vw, 14px) !important;
    padding: clamp(5px, 0.8vw, 12px) clamp(10px, 1.5vw, 28px) !important;
    letter-spacing: clamp(0px, 0.1vw, 1px) !important;
}

/* Mobile: rata tengah */
@media (max-width: 576px) {
    #heroDishub .hero-desc {
        display: none !important;
    }

    #heroDishub .hero-content {
        max-width: 90%;
        text-align: center !important;
    }

    #heroDishub .hero-content,
    #heroDishub .hero-content * {
        text-align: center !important;
    }

    #heroDishub .hero-overlay {
        align-items: center;
        justify-content: center;
        padding: 5% 4%;
    }

    #heroDishub .hero-btns {
        justify-content: center !important;
    }
}

@media (max-width: 350px) {
    #heroDishub .hero-badge {
        display: none !important;
    }
}

/* Tombol Glowing Dishub */
.btn-dishub-primary,
.sppb-btn-primary {
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%) !important;
    color: #0b1d3a !important;
    font-family: Arial, sans-serif !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    padding: 12px 28px !important;
    border-radius: 30px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: inline-block !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
}

.btn-dishub-primary:hover,
.sppb-btn-primary:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.6) !important;
    color: #000000 !important;
}

.btn-dishub-secondary {
    background: transparent !important;
    color: #ffffff !important;
    font-family: Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    padding: 11px 26px !important;
    border-radius: 30px !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
}

.btn-dishub-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffcc00 !important;
    border-color: #ffcc00 !important;
    transform: translateY(-3px) !important;
}

/* =====================================================
   POSISI LOGO HEADER DI MOBILE (GESER KE KANAN ABSOLUT)
   ===================================================== */
@media (max-width: 991px) {
    #sp-header {
        position: relative !important;
    }
    #sp-header .logo {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: auto !important;
        margin: 0 !important;
    }
}

/* =====================================================
   PERBAIKAN GAP/CELAH PADA MENU DROPDOWN
   ===================================================== */
.sp-megamenu-parent .sp-dropdown {
    margin-top: 0 !important;
    top: 100% !important;
    border-top: 3px solid #ffcc00 !important; /* Tambahan aksen kuning agar lebih menyatu dengan header */
}