/* ======================================================
   KIBSA — style.css
   Dipisahkan dari <style> internal index.html.
   Duplikasi aturan (mis. .ui-card, animasi modal) dari
   iterasi sebelumnya sudah dirapikan jadi satu definisi.
   ====================================================== */

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(to bottom, #bae6fd 0%, #e0f2fe 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 20%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 25%),
        radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 30%);
    z-index: -1;
}

/* NAVIGASI KAPSUL (desktop) */
.nav-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 2px solid transparent;
    font-weight: 700;
    color: #475569;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.25s ease;
    transform: translateY(0) scale(1);
}
.nav-pill:hover {
    background: #fff;
    border-color: #6366f1;
    color: #4338ca;
    box-shadow: 0 6px 14px -4px rgba(79, 70, 229, .35);
    transform: translateY(-3px) scale(1.03);
}
.nav-pill:active { transform: translateY(-1px) scale(0.97); }
.nav-pill.nav-pill-active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
    box-shadow: 0 8px 16px -4px rgba(79, 70, 229, .5);
}
.nav-pill.nav-pill-active:hover { background: #4338ca; color: #fff; }

.kelas-box { transition: all 0.3s ease; }
.kelas-box:hover { transform: translateY(-6px); }

/* Item Materi & Pembahasan */
.materi-item { transition: all 0.2s ease; cursor: pointer; }
.materi-item:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .15); }

/* Carousel "Sorotan KIBSA" */
#poster-carousel-track { transition: transform 0.6s ease-in-out; }
.carousel-dot { width: 8px; height: 8px; border-radius: 9999px; background: #cbd5e1; transition: all .25s ease; cursor: pointer; }
.carousel-dot.active { width: 22px; background: #4f46e5; }
.carousel-slide { position: relative; width: 100%; height: 100%; flex-shrink: 0; background: #1e293b; overflow: hidden; }
.carousel-slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.6); transform: scale(1.15); }
.carousel-slide-img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }

.portal-card { transition: all .25s ease; }
.portal-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px -6px rgba(0, 0, 0, .15); }

/* Kartu interaktif seragam (Fitur, Event/Program, Mitra Kolaborasi, Jejak Cerita) */
.ui-card {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ui-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -12px rgba(15, 23, 42, 0.25);
}

/* Animasi masuk modal (overlay fade + panel pop) */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-overlay-anim { animation: modalFadeIn 0.25s ease forwards; }
.modal-panel-anim { animation: modalPopIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* Animasi zoom lembut untuk gambar di dalam modal detail */
@keyframes modalImageZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.modal-img-zoom { animation: modalImageZoomIn 0.35s ease; }

/* Efek zoom lembut untuk gambar hero di dalam modal detail (varian lebih dramatis) */
@keyframes imageSoftZoom {
    from { opacity: 0; transform: scale(1.08); }
    to { opacity: 1; transform: scale(1); }
}
.modal-zoom-img { animation: imageSoftZoom 0.5s ease forwards; }

/* Kartu Mitra Kolaborasi — sedikit lebih besar dari kartu Info & Event */
.mitra-card-img { height: 20rem; }
@media (min-width: 768px) { .mitra-card-img { height: 22rem; } }

/* Modal Autentikasi: tab Masuk/Daftar */
.auth-tab { padding: .6rem 0; font-weight: 800; color: #94a3b8; border-bottom: 3px solid transparent; transition: all .2s ease; }
.auth-tab.auth-tab-active { color: #4f46e5; border-color: #4f46e5; }

/* ======================================================
   [BARU] BOTTOM NAVIGATION — gaya iOS/iPhone dock
   Mengambang, rounded, glassmorphism, shadow halus, dan
   indikator aktif yang berpindah dengan transisi lembut.
   ====================================================== */
.ios-dock {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 420px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.25), 0 2px 8px rgba(15, 23, 42, 0.06);
    z-index: 9999;
}

.ios-dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    padding: 8px 4px;
    border-radius: 18px;
    color: #64748b;
    background: transparent;
    border: none;
    transition: color 0.3s ease, background 0.3s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.ios-dock-item svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.ios-dock-item span {
    font-size: 10px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.ios-dock-item:active { transform: scale(0.92); }

/* Indikator aktif: latar lembut biru khas KIBSA, muncul dengan transisi halus */
.ios-dock-item.ios-dock-active {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.12);
}
.ios-dock-item.ios-dock-active svg {
    transform: translateY(-1px) scale(1.08);
}
