/* --- STYLE BACK TO TOP (SINKRON SAMA WA) --- */
.back-to-top {
    position: fixed;
    /* Jarak bottom: 20px (WA) + 60px (Tinggi WA) + 15px (Jarak) = 95px */
    bottom: 181px; 
    right: 20px; /* Samain sama right WA desktop */
    width: 60px; /* Lebar samain sama WA */
    height: 60px; /* Tinggi samain sama WA */
    background-color: #0f3d2e; /* Hijau Masjid */
    color: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: all 0.3s ease;
    
    /* Awalnya sembunyi */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 0.5;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #198754;
    transform: scale(1.1); /* Efek hover samain sama WA */
    color: white;
}

/* --- PENYESUAIAN UNTUK HP (SINKRON SAMA WA) --- */
@media (max-width: 768px) {
    .back-to-top {
        width: 55px;  /* Samain lebar WA di HP */
        height: 55px; /* Samain tinggi WA di    HP */
        /* Jarak bottom: 28px (WA HP) + 55px (Tinggi WA HP) + 12px (Jarak) = 95px */
        bottom: 173px; 
        right: 28px;  /* Samain right WA di HP */
        font-size: 20px;
    }
}
/* Styling Tombol WA Melayang */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366; /* Warna khas WA */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000; /* Pastikan di atas semua elemen termasuk modal */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

/* Tooltip teks (muncul di samping tombol kalau di desktop) */
.wa-text-tooltip {
    position: absolute;
    right: 50px; /* Posisi awal agak di dalem */
    background: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px); /* Efek awal geser ke kanan dikit */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Biar ada efek pegas/bounce */
    pointer-events: none; /* Biar gak ganggu klik */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.whatsapp-float:hover .wa-text-tooltip {
   opacity: 1;
    visibility: visible;
    right: 75px; /* Geser keluar ke kiri */
    transform: translateX(0); /* Balik ke posisi normal */
}

/* Penyesuaian untuk HP */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 28px;
        right: 28px;
        font-size: 25px;
    }
    .wa-text-tooltip {
        display: block !important; /* Kita paksa muncul di HP */
        right: 45px;
        font-size: 11px;
        padding: 6px 10px;
    }
    .whatsapp-float:hover .wa-text-tooltip {
        right: 65px; /* Jarak di HP jangan terlalu jauh biar gak kena layar kiri */
    }
}

/* Tombol Portal Masjid */
.portal-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 100px; /* Di atas tombol WA (20px + 60px + jarak) */
    right: 20px;
    background-color: #333; /* Abu-abu gelap biar gak nyentreng */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Pas Hover: Berubah jadi Hijau Nyala */
.portal-float:hover {
    background-color: #15803d; /* Hijau Masjid */
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(21, 128, 61, 0.5);
    color: white;
}

/* Tooltip Teks buat Portal */
.portal-text-tooltip {
    position: absolute;
    right: 50px;
    background: #15803d;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.portal-float:hover .portal-text-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
    transform: translateX(0);
}

/* Penyesuaian HP */
@media (max-width: 768px) {
    .portal-float {
        width: 55px;
        height: 55px;
        bottom: 100px; /* Tetap di atas WA walau di HP */
        right: 28px;
        font-size: 20px;
    }
    .portal-text-tooltip {
        right: 45px;
        font-size: 11px;
    }
    .portal-float:hover .portal-text-tooltip {
        right: 65px;
    }
}

  /* Sembunyiin body pas awal banget */
body { opacity: 0; transition: opacity 0.5s ease-in-out; }
body.loaded { opacity: 1; }

/* Gaya buat layar loading */
#wifi-loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #ffffff; /* Putih bersih */
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 9999;
}
.dark #wifi-loader { background: #020617; }

.wifi-circle {
    width: 60px; height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #15803d; /* Warna hijau yayasan */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
        html { scroll-behavior: smooth; }
        body { font-family: 'PT Serif', serif; transition: background-color 0.3s, color 0.3s; }
        h1, h2, h3, h4, h5 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; }
        
        .nav-link { 
            font-weight: 700; 
            transition: color 0.2s; 
            font-size: 12px; 
            text-transform: uppercase; 
            letter-spacing: 1px; 
        }

        .marquee-container { overflow: hidden; width: 100%; white-space: nowrap; position: relative; padding: 15px 0; }
       /* Pastikan ini translateX(-50%) dan width marquee-content-nya pas */
@keyframes marquee-loop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

.marquee-content { 
    display: flex; 
    width: max-content; /* Ini krusial */
    animation: marquee-loop 20s linear infinite; 
}

        .partner-item { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 180px; flex-shrink: 0; padding: 0 10px; }
        .partner-logo { width: 75px; height: 75px; object-fit: cover; border-radius: 9999px; filter: grayscale(100%); opacity: 0.6; transition: 0.3s; margin-bottom: 10px; }
        .partner-item:hover .partner-logo { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }
        
        #nav-list { transition: all 0.3s ease-in-out; transform: scaleY(0); transform-origin: top; opacity: 0; }
        #nav-list.active { transform: scaleY(1); opacity: 1; }

        /* Custom Dark Scrollbar */
        .dark ::-webkit-scrollbar { width: 10px; }
        .dark ::-webkit-scrollbar-track { background: #1a1a1a; }
        .dark ::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }

        span{
            text-align: center;
        }

        /* Style Pop-up Ramadhan/Eid (Versi Update) */
.eid-modal-overlay {
    display: none; /* Sembunyi dulu */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Background gelap */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    
    /* Animasi FADE IN/OUT buat Overlay */
    opacity: 0;
    transition: opacity 0.4s ease, display 0.4s ease allow-discrete;
}

/* Class untuk memunculkan overlay */
.eid-modal-overlay.show {
    opacity: 1;
    display: flex;
}

.eid-modal-content {
    position: relative;
    /* --- UKURAN DIET --- */
    max-width: 450px; /* Di laptop/desktop gak bakal lebih dari ini */
    width: 85%; /* Di HP bakal nyesuain layar */
    /* ------------------- */
    max-height: 80vh;
    
    /* Animasi ZOOM IN/OUT buat konten */
    transform: scale(0.7);
    transition: transform 0.4s ease;
}

/* Class untuk memunculkan konten */
.eid-modal-overlay.show .eid-modal-content {
    transform: scale(1);
}

.eid-modal-content img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: block;
}

.eid-close-btn {
    position: absolute;
    top: -12px; /* Disesuaikan dikit */
    right: -12px;
    background: #0f3d2e;
    color: white;
    width: 30px; /* Dikecilin dikit biar proporsional */
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    border: 2px solid white;
    z-index: 10000;
    transition: background 0.3s;
}

.eid-close-btn:hover {
    background: #e74c3c; /* Merah pas di-hover */
}
/* Gaya Khusus buat Link di dalam Modal */
.eid-modal-content a {
    display: block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 15px;
}

.eid-modal-content img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

/* Efek zoom dikit pas gambar di-hover sebelum diklik */
.eid-modal-content a:hover img {
    transform: scale(1.03);
}