/* ==========================
   FONT GLOBAL
   ========================== */
body {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(14px, 2vw, 16px); /* auto responsive body */
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ==========================
   HEADINGS (H1 – H6)
   ========================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 0.75em;
    color: #1E3A8A; /* biru tua elegan */
}

h1 { font-size: clamp(24px, 4vw, 36px); color: #1E88E5; }
h2 { font-size: clamp(20px, 3.5vw, 28px); color: #1E88E5; text-align: center; letter-spacing: 0.5px; border-bottom: 3px solid #2E7D32; display: inline-block; padding-bottom: 5px; margin: 30px 0 20px; }
h3 { font-size: clamp(18px, 3vw, 24px); color: #2E7D32; }
h4 { font-size: clamp(16px, 2.5vw, 20px); color: #424242; }
h5 { font-size: clamp(15px, 2vw, 18px); font-weight: 600; }
h6 { font-size: clamp(14px, 1.8vw, 16px); font-weight: 600; color: #616161; }

/* ==========================
   LOGO HEADER
   ========================== */
#sp-header .logo a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 28px);
    line-height: 1.2;
    letter-spacing: 0.5px;
    display: inline-block;
    padding: 10px 0;
    color: #0D47A1 !important;
}

/* ==========================
   SECTION GRADIENT BMKG
   ========================== */
.section-gradient-bmkg {
    background: linear-gradient(90deg, #1E3A8A 0%, #2196F3 40%, #26C6DA 70%, #2E7D32 100%);
    color: #fff;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Desktop: teks kiri, carousel kanan */
.section-gradient-bmkg .sppb-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Kolom teks kiri */
.section-gradient-bmkg .sppb-column:first-child {
    flex: 1 1 60%;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* teks tetap rata tengah vertikal */
}

/* Kolom carousel kanan */
.section-gradient-bmkg .sppb-column:last-child {
    flex: 1 1 40%;
    display: flex;
    justify-content: center; /* tengah horizontal */
    align-items: center; /* tengah vertikal */
    text-align: center;
}

/* Carousel wrapper */
.section-gradient-bmkg .sppb-carousel-extended {
    width: 100%;
    max-width: 300px; /* batasi ukuran biar proporsional */
}

/* Gambar di dalam carousel */
.section-gradient-bmkg .sppb-carousel-extended img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

    .section-gradient-bmkg h6 {
        font-size: 40px  !important;
}

/* ==========================
   NAVIGATION MENU
   ========================== */
.sp-megamenu-parent > li > a {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Hilangkan badge menu "NEW" */
.sp-menu-badge, .sp-menu-badge-right {
    display: none !important;
}

/* ==========================
   BUTTONS
   ========================== */
.btn, a.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 20px;
    background-color: #1E88E5;
    color: #fff !important;
    border: none;
    transition: 0.3s ease;
}
.btn:hover, a.btn:hover {
    background-color: #1565C0;
    color: #fff !important;
}

/* ==========================
   IMAGE CAROUSEL (all types)
   ========================== */
.carousel-inner,
.sppb-carousel-inner,
.sppb-addon-image-carousel,
.sppb-addon-article-carousel,
.sppb-tab-carousel {
    width: auto;
    height: auto !important;
    max-height: 650px;
    overflow: hidden;
}

.carousel-inner img,
.sppb-carousel-inner img,
.sppb-addon-image-carousel img,
.sppb-addon-article-carousel img,
.sppb-tab-carousel img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block;
    margin: 0 auto;
}

/* Extended carousel */
.sppb-carousel-extended-item img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block;
    margin: 0 auto;
}
.sppb-carousel-extended-outer-stage,
.sppb-carousel-extended-item {
    height: auto !important;
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 1024px) {
    .section-gradient-bmkg h6 { font-size: clamp(20px, 3.5vw, 32px); }
    .section-gradient-bmkg h3 { font-size: clamp(18px, 3vw, 24px); }
    .section-gradient-bmkg .sppb-addon-image-carousel img { max-width: 150px; }
}

@media (max-width: 768px) {
    h1 { font-size: 28px; }
    h2 { font-size: 20px; border-bottom: 2px solid #2E7D32; }
    h3 { font-size: 18px; }
    #sp-header .logo a { font-size: 16px; }

    .section-gradient-bmkg .sppb-row {
        flex-direction: column; /* teks atas, carousel bawah */
        align-items: center;
        text-align: center;
    }
    .section-gradient-bmkg .sppb-column {
        flex: 1 1 100%;
        text-align: center;
    }
    .section-gradient-bmkg .sppb-addon-image-carousel img {
        max-width: 120px;
        margin-top: 15px;
    }
    .sppb-carousel-extended-item img {
        max-height: 200px;
    }
    .section-gradient-bmkg h6 {
        font-size: 18px !important;
        margin-bottom: 10px;
    }
    .section-gradient-bmkg h3 {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .section-gradient-bmkg {
        padding: 20px 15px;
        text-align: center;
    }

    /* Menyusun .sppb-row agar konten terpusat */
    .sppb-row {
        display: flex;
        flex-direction: column; /* Membuat kolom saling vertikal */
        justify-content: center; /* Pastikan konten terpusat */
        align-items: center; /* memastikan elemen berada di tengah */
        text-align: center;
    }

    .sppb-column {
        width: 100%; /* Memastikan kolom mengambil seluruh lebar */
        margin: 0 auto; /* Memastikan kolom terpusat */
        padding: 10px 0;
        box-sizing: border-box;
    }

    .section-gradient-bmkg h6 {
        font-size: 14px !important;
        margin-bottom: 10px;
    }

    .section-gradient-bmkg h3 {
        font-size: 12px !important;
    }

    /* Mengatur gambar di carousel */
    .section-gradient-bmkg .sppb-addon-image-carousel img {
        width: 100%; /* Memastikan gambar tidak lebih lebar dari layar */
        height: auto;
        max-height: 180px;
    }

    /* Menangani animasi teks scrolling */
    .scrolling-text span {
        font-size: 18px; /* Ukuran font yang sesuai di perangkat kecil */
        padding-left: 100%;
        animation: scroll-left 12s linear infinite;
    }

    /* Animasi geser */
    @keyframes scroll-left {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-100%);
        }
    }
}
