/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   PERBAIKAN: MENGHILANGKAN KABUT PUTIH PADA BACKGROUND
   ========================================================================== */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    /* Ubah background dasar menjadi agak gelap/warm sedikit agar gambar di atasnya kontras */
    background: #eef2f5; 
    color: #1A1F2C;
    scroll-behavior: smooth;
    position: relative;
}

/* Background utama website - Dibuat tajam dan menyatu tanpa kabut */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/bgweb.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Naikkan opacity sedikit agar warna aslinya keluar, lalu gunakan mix-blend-mode */
    opacity: 0.4; 
    mix-blend-mode: multiply; /* Membuat warna gambar menyatu sempurna dengan warna dasar */
    pointer-events: none;
    z-index: -2;
}

/* Gradient premium di belakang untuk memperkaya tone warna */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Menggunakan gradasi hijau bambu lembut dan orange hangat di dasar */
    background: radial-gradient(circle at 10% 20%, rgba(13, 97, 127, 0.05), rgba(230, 108, 44, 0.03));
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   HEADER PREMIUM
   ========================================================================== */
.main-header {
    width: 100%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-group {
    display: flex;
    gap: 20px;
    align-items: center;
}
.header-logo {
    height: 48px;
    width: auto;
    transition: transform 0.2s ease;
}
.header-logo:hover {
    transform: scale(1.02);
}
.nav-group {
    display: flex;
    gap: 16px;
}
.nav-item {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 40px;
    background: transparent;
    color: #1E2F3A;
    transition: 0.25s;
    letter-spacing: -0.2px;
    border: none;
    box-shadow: none;
}
.nav-item:hover, .nav-item.active {
    background: #0d617f;
    color: white;
    box-shadow: 0 4px 10px rgba(13,97,127,0.2);
    transform: translateY(-1px);
}
.mobile-toggle {
    display: none;
    font-size: 26px;
    color: #0d617f;
    cursor: pointer;
}

/* ==========================================================================
   SECTION TITLE
   ========================================================================== */
.section-title {
    text-align: center;
    margin: 60px 20px 50px;
    position: relative;
}
.pre-title {
    font-size: 0.85rem;
    letter-spacing: 5px;
    color: #e66c2c;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(230,108,44,0.1);
    display: inline-block;
    padding: 6px 18px;
    border-radius: 40px;
    margin-bottom: 18px;
}
.section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a3b44, #0d617f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -1px;
}
.section-title h2 span {
    background: linear-gradient(135deg, #e66c2c, #f0985e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.underline-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.underline-wrapper .line {
    width: 55px;
    height: 3px;
    background: linear-gradient(90deg, #0d617f, #e66c2c);
    border-radius: 4px;
}
.underline-wrapper i {
    color: #e66c2c;
    font-size: 1.2rem;
}

/* ==========================================================================
   STRUKTUR KATEGORI & GRID CARD
   ========================================================================== */
.category-container {
    max-width: 1300px;
    margin: 0 auto 60px;
    padding: 0 30px;
}

.category-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a3b44;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 5px solid #e66c2c;
    padding-left: 15px;
    letter-spacing: -0.5px;
}

.card-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
    margin-bottom: 20px;
    padding: 0;
}

/* ==========================================================================
   CARD STYLES WITH SMOOTH SCROLL REVEAL ANIMATION
   ========================================================================== */
.card {
    background: transparent; 
    backdrop-filter: none;   
    border-radius: 0;
    overflow: visible;       
    box-shadow: none;        
    border: none;            
    
    /* Mempertahankan animasi asli */
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    animation: munculSambilScroll linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;

    /* OPTIMALISASI: Mencegah lag saat animasi scroll reveal dipicu */
    will-change: transform;
    transform: translateZ(0);
}

.card:hover {
    transform: translateY(-5px) scale(1.01) !important;
    box-shadow: none;
    border-color: transparent;
}

/* ==========================================================================
   AREA MASKOT
   ========================================================================== */
.gambar {
    width: 100%;
    height: 300px; 
    background: transparent; 
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1);
    overflow: visible; 

    /* OPTIMALISASI: Isolasi render layer untuk efek blur agar diproses GPU */
    will-change: backdrop-filter, background;
    transform: translateZ(0);
    contain: strict; /* Mengunci ukuran elemen agar browser tidak kalkulasi ulang layout */
}

/* Jejak kaki panda */
.gambar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 60px 60px;
    background-position: center;
    filter: blur(1px); 
    transform: rotate(-15deg);
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.card:hover .gambar {
    /* Desain asli: efek blur halus tanpa putih kabut */
    background: transparent !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.card:hover .gambar::before {
    transform: rotate(-5deg) scale(1.1);
}

/* Pengaturan Ukuran Maskot Besar */
.gambar img {
    width: 95%;        
    max-height: 95%;   
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), filter 0.4s ease;
    filter: drop-shadow(0 15px 25px rgba(230, 108, 44, 0.18)) drop-shadow(0 5px 10px rgba(0,0,0,0.08));
    position: relative;
    z-index: 2;

    /* OPTIMALISASI: Mempercepat rendering drop-shadow yang berat pada gambar png */
    will-change: transform, filter;
}

.card:hover .gambar img {
    transform: scale(1.08) translateY(-10px); 
    filter: drop-shadow(0 25px 30px rgba(230, 108, 44, 0.25)) drop-shadow(0 8px 15px rgba(0,0,0,0.05));
}

/* ==========================================================================
   KONTEN UTAMA (JUDUL, DAFTAR, & JUKNIS)
   ========================================================================== */
.card-content {
    padding: 15px 10px 20px; 
}

.label {
    text-align: center; 
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(125deg, #1f4e5f, #0d617f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 15px;
}

.label span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #e66c2c;
    display: inline-block;
    background: rgba(230,108,44,0.1);
    padding: 2px 10px;
    border-radius: 30px;
    margin-left: 8px;
}
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}
.daftar, .download {
    width: 100%;
    padding: 12px 0;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
}
.daftar {
    background: #e66c2c;
    color: white;
    box-shadow: 0 4px 8px rgba(230,108,44,0.2);
}
.daftar:hover {
    background: #c4551f;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(230,108,44,0.3);
}
.download {
    background: #f0f2f5;
    color: #1e3a44;
    border: 1px solid #e2e8f0;
}
.download:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* ==========================================================================
   SISTEM DROPDOWN INTERAKTIF JUKNIS
   ========================================================================== */
.dropdown-juknis {
    position: relative;
    width: 100%;
}

.dropdown-content {
    display: none;
    position: absolute;
    bottom: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 24px rgba(0,0,0,0.15);
    border-radius: 20px;
    z-index: 10;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: slideUpFade 0.25s ease forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: #1e3a44;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f0f2f5;
    color: #e66c2c;
}

.dropdown-juknis.active .dropdown-content {
    display: block;
}

.dropdown-juknis.active .toggle-dropdown i:last-child {
    transform: rotate(180deg);
}

.toggle-dropdown i:last-child {
    transition: transform 0.2s ease;
    margin-left: auto;
}

/* ==========================================================================
   MODAL PREMIUM
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #ffffff;
    border-radius: 40px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 35px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.3);
    animation: fadeSlideUp 0.2s ease;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px 12px;
    border-bottom: 2px solid #f0eef3;
}
#modalTitle {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0d617f, #1e8baa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.close-modal {
    font-size: 32px;
    cursor: pointer;
    color: #8f9bb3;
    transition: 0.2s;
}
.close-modal:hover {
    color: #e66c2c;
}
#dynamicForm {
    padding: 18px 28px 32px;
}
#dynamicForm label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #0d617f;
    display: block;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}
#dynamicForm input, #dynamicForm textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e4e7ec;
    border-radius: 24px;
    font-size: 0.9rem;
    transition: 0.2s;
    margin-bottom: 18px;
    font-family: 'Inter', sans-serif;
    background: #fefefe;
}
#dynamicForm input:focus, #dynamicForm textarea:focus {
    outline: none;
    border-color: #e66c2c;
    box-shadow: 0 0 0 3px rgba(230,108,44,0.1);
}
.btn-kirim {
    width: 100%;
    background: #0d617f;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 12px;
}
.btn-kirim:hover {
    background: #094a61;
    transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
@media (max-width: 768px) {
    .header-container {
        padding: 12px 20px;
    }
    .logo-group img {
        height: 38px;
    }
    .nav-group {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 20px;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 20px 30px rgba(0,0,0,0.05);
        gap: 12px;
    }
    .nav-group.active {
        display: flex;
    }
    .mobile-toggle {
        display: block;
    }
    .section-title h2 {
        font-size: 2rem;
    }
    .category-container {
        padding: 0 20px;
        margin-bottom: 40px;
    }
    .category-title {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
    .card-wrapper {
        gap: 24px;
    }
}

/* ==========================================================================
   CUSTOM ELEMENT STYLES (SCROLLBAR & BADGES)
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #eef2f5;
}
::-webkit-scrollbar-thumb {
    background: #0d617f;
    border-radius: 10px;
}

.card .label .sub {
    font-size: 0.7rem;
    font-weight: 500;
}
i.fa, i.far, i.fas {
    pointer-events: none;
}

/* STYLING MODAL SUKSES GRUP WA */
.modal-sukses-overlay {
    position: fixed;
    z-index: 99999; /* Memastikan berada di paling depan */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-sukses-content {
    background: #ffffff;
    padding: 35px 25px;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: popIn 0.3s ease-out;
}

.modal-sukses-icon {
    font-size: 4.5rem;
    color: #10b981; /* Hijau sukses */
    margin-bottom: 15px;
}

.modal-sukses-content h2 {
    color: #1e293b;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-sukses-content p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.modal-sukses-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.modal-sukses-info p {
    color: #334155;
    margin: 0;
    font-size: 0.9rem;
}

/* Tombol WA Premium Style */
.btn-grup-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white !important;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-grup-wa:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.btn-nanti-saja {
    margin-top: 15px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-nanti-saja:hover {
    color: #64748b;
}

/* Animasi Muncul */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}