/* assets/css/style.css */
:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1d4ed8;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-sec: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --success: #10b981;
    --warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.animate-item { animation: fadeInUp 0.5s ease-out forwards; }

/* Header */
.main-header {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}
.header-flex {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.logo h1 { font-size: 1.2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.logo span { font-size: 0.75rem; color: var(--text-sec); font-weight: 400; }

/* Search & Actions */
.search-bar { flex: 1; position: relative; max-width: 500px; }
.search-bar input {
    width: 100%; padding: 0.8rem 1rem 0.8rem 2.8rem; border: 2px solid var(--border);
    border-radius: 50px; background: var(--bg-body); font-family: 'Poppins', sans-serif; transition: all 0.3s;
}
.search-bar input:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 4px var(--primary-light); }
.search-bar i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-sec); }
.header-actions { display: flex; gap: 1rem; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 0.7rem 1.5rem;
    border-radius: 50px; font-weight: 500; font-size: 0.9rem; cursor: pointer;
    border: none; text-decoration: none; transition: all 0.2s; font-family: 'Poppins', sans-serif;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.4); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: white; border: 2px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

/* Main Layout */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar */
.sidebar-filter {
    position: sticky;
    top: 100px;
    height: fit-content;
    transition: transform 0.3s ease;
}

/* Overlay untuk mobile (default hidden) */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Tombol Menu Mobile (default hidden di desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding-right: 10px;
}

.close-sidebar-btn {
    display: none; /* Hidden di desktop */
    position: absolute;
    top: 10px;
    right: 10px;
    background: #eee;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

.sidebar-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 1.5rem; position: relative; }
.sidebar-card h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-sec); margin-bottom: 1rem; font-weight: 600; }
.filter-list { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-item { display: flex; align-items: center; gap: 10px; padding: 0.8rem 1rem; border-radius: 8px; cursor: pointer; font-size: 0.9rem; color: var(--text-main); transition: all 0.2s; }
.filter-item:hover { background: var(--bg-body); }
.filter-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.filter-item i { width: 20px; text-align: center; opacity: 0.7; }

.stats-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-radius: var(--radius); padding: 1.5rem; position: relative; overflow: hidden; }
.stats-card::after { content: ''; position: absolute; right: -20px; bottom: -20px; width: 100px; height: 100px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.stats-card h4 { font-size: 2.5rem; margin: 0; line-height: 1; }
.stats-card p { margin: 0; opacity: 0.9; font-size: 0.9rem; }
/* Untuk Kartu Kampus Serang di Sidebar */
.filter-highlight {
    background: linear-gradient(135deg, #fff3cd, #ffeeba) !important;
    color: #856404 !important;
    font-weight: 600;
    border: 1px solid #ffc107;
    margin: 0.5rem 0;
}
.filter-highlight i { color: #d39e00; }
/* ========================================== */
/* GALLERY LINK CARD */
/* ========================================== */
.gallery-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px -3px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

/* Dekorasi lingkaran transparan */
.gallery-link-card::before {
    content: '';
    position: absolute;
    right: -15px;
    top: -15px;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.gallery-link-card::after {
    content: '';
    position: absolute;
    right: 25px;
    bottom: -20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

/* Hover Effect */
.gallery-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -3px rgba(139, 92, 246, 0.5);
}

/* Ikon Gallery */
.gallery-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.gallery-link-card:hover .gallery-card-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Teks */
.gallery-card-text {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.gallery-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.gallery-card-subtitle {
    font-size: 0.72rem;
    opacity: 0.85;
    margin-top: 2px;
}

/* Panah */
.gallery-card-arrow {
    margin-left: auto;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.gallery-link-card:hover .gallery-card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ========================================== */
/* RESPONSIVE: Gallery Card di Mobile */
/* ========================================== */
@media (max-width: 900px) {
    .gallery-link-card {
        border-radius: 15px;
        padding: 0.9rem 1rem;
    }
    
    .gallery-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .gallery-card-title {
        font-size: 0.9rem;
    }
}
/* ========================================== */
/* CONTENT GRID & CARDS */
/* ========================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    column-gap: 1.5rem;
    row-gap: 0.3rem; /* ← Kurangi jarak antar baris */
    align-items: start;
}

/* Prodi Card - Desktop Style */
.book-card {
    aspect-ratio: 1 / 1; /* Square di desktop */
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Area Gambar */
.book-cover {
    flex: 1 1 auto; 
    min-height: 55%; 
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
    position: relative;
    border-radius: 12px 12px 0 0; 
    transition: transform 0.5s ease;
    overflow: hidden;
}

.book-cover h3 {
    display: flex; align-items: center; justify-content: center; height: 100%; width: 100%;
    text-align: center; padding: 1rem; color: var(--text-sec); font-size: 0.9rem; font-weight: 500; line-height: 1.3;
}
.book-card:hover .book-cover { transform: scale(1.05); }
.book-card::after { display: none; }

/* Area Info (Bawah) */
.book-info {
    flex: 0 0 auto; 
    background: white;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.tag-fakultas {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    align-self: flex-start;
    background: var(--primary-light);
    color: var(--primary);
}

.book-info h3 {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 600;
    /* Potong teks jika lebih dari 2 baris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.book-info p { 
    font-size: 0.75rem; 
    color: var(--text-sec); 
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.25rem;
    white-space: nowrap;
}

/* Modals */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 2rem; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-card); border-radius: var(--radius); width: 100%; max-width: 850px;
    max-height: 90vh; overflow-y: auto; position: relative; transform: scale(0.9); transition: transform 0.3s; box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal-content { transform: scale(1); animation: slideIn 0.3s ease-out; }
.close-btn {
    position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-body); border: none; cursor: pointer; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center; z-index: 10; color: var(--text-sec);
}
.close-btn:hover { background: #e2e8f0; }

/* Detail Modal */
.detail-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; padding: 2rem; }
.detail-left { text-align: center; }
.main-cover { width: 100%; height: 350px; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-lg); margin-bottom: 1rem; }
.gallery-thumbs { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.gallery-thumbs img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.6; border: 2px solid transparent; transition: all 0.2s; }
.gallery-thumbs img:hover { opacity: 1; }
.gallery-thumbs img.active { border-color: var(--primary); opacity: 1; }

.category-tag { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; color: white; margin-bottom: 0.5rem; }
.detail-title { margin-bottom: 0.5rem; font-size: 1.5rem; }

/* Meta Info Cards */
.meta-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.meta-card { background: var(--bg-body); border-radius: 10px; padding: 1rem; border: 1px solid var(--border); transition: all 0.2s; }
.meta-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.meta-card-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; font-size: 0.9rem; }
.meta-card-icon.blue { background: var(--primary-light); color: var(--primary); }
.meta-card-icon.green { background: #d1fae5; color: #059669; }
.meta-card-icon.orange { background: #fef3c7; color: #d97706; }
.meta-card-icon.purple { background: #ede9fe; color: #7c3aed; }
.meta-card h4 { font-size: 0.75rem; color: var(--text-sec); margin: 0 0 0.2rem 0; text-transform: uppercase; letter-spacing: 0.5px; }
.meta-card p { margin: 0; font-weight: 600; font-size: 0.9rem; color: var(--text-main); }

/* Grid Stats */
.grid-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { background: linear-gradient(135deg, var(--primary-light), #eff6ff); padding: 1.2rem; border-radius: 10px; text-align: center; border: 1px solid rgba(37, 99, 235, 0.1); }
.stat-box h3 { margin: 0; font-size: 1.5rem; color: var(--primary); }
.stat-box span { font-size: 0.8rem; color: var(--text-sec); }

/* Section Styles */
.section-card { background: var(--bg-body); border-radius: 10px; padding: 1.2rem; margin-bottom: 1rem; border: 1px solid var(--border); }
.section-title { font-size: 0.85rem; color: var(--primary); border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; margin: 0 0 0.8rem 0; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.section-title i { opacity: 0.7; }

/* Kurikulum Button */
.kurikulum-btn { display: flex; align-items: center; gap: 1rem; background: linear-gradient(135deg, #10b981, #059669); color: white; padding: 1rem 1.5rem; border-radius: 10px; text-decoration: none; transition: all 0.3s; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3); }
.kurikulum-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px -1px rgba(16, 185, 129, 0.4); }
.kurikulum-btn i:first-child { font-size: 1.5rem; }
.kurikulum-btn .text { display: flex; flex-direction: column; }
.kurikulum-btn .text span:first-child { font-weight: 600; font-size: 0.95rem; }
.kurikulum-btn .text span:last-child { font-size: 0.75rem; opacity: 0.9; }
.kurikulum-btn .arrow { margin-left: auto; font-size: 1.2rem; opacity: 0.8; }

/* Info Modal */
.info-card { padding: 2rem; max-width: 520px; }
.info-card h2 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.info-group { margin-bottom: 1rem; }
.info-group label { display: block; font-size: 0.8rem; color: var(--text-sec); margin-bottom: 0.3rem; font-weight: 500; }
.info-group select, .info-group input { width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px; font-family: 'Poppins'; }
.highlight-text { font-size: 1.1rem; font-weight: 600; color: var(--primary); }
.social-links { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.social-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--bg-body); border-radius: 50px; text-decoration: none; color: var(--text-main); font-size: 0.8rem; transition: 0.2s; border: 1px solid var(--border); }
.social-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }

/* Info Tabs */
.info-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tab-btn { flex: 1; padding: 0.6rem; border: 1px solid var(--border); background: var(--bg-body); border-radius: 6px; cursor: pointer; font-family: 'Poppins'; font-size: 0.8rem; transition: 0.2s; color: var(--text-sec); }
.tab-btn:hover { background: var(--bg-body); color: var(--text-main); }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
/* ========================================== */
/* LIGHTBOX GALLERY STYLE */
/* ========================================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92); /* Gelap pekat */
    z-index: 2000; /* Di atas modal biasa */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out; /* Kursor zoom out di background */
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    z-index: 2001;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    cursor: default; /* Kursor default di gambar */
}

/* Animasi Zoom */
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Tombol Close */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 2002;
    transition: all 0.2s;
}
.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* Tombol Navigasi (Prev/Next) */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 2002;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-nav:hover {
    background: var(--primary);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Caption */
.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 2002;
    opacity: 0;
    transition: opacity 0.3s;
}
.lightbox-overlay:hover .lightbox-caption { opacity: 1; }

/* Responsive Lightbox untuk Mobile */
@media (max-width: 768px) {
    .lightbox-nav { 
        width: 40px; height: 40px; font-size: 16px;
        background: rgba(0,0,0,0.5); /* Lebih gelap biar kelihatan */
    }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
    .lightbox-close { top: 10px; right: 10px; width: 35px; height: 35px; }
    
    /* Di mobile, tutup hanya dengan klik tombol close/background, nonaktifkan swipe sementara */
    .lightbox-content img {
        max-height: 80vh;
        border-radius: 4px;
    }
}
/* ========================================== */
/* RESPONSIVE MOBILE (Updated) */
/* ========================================== */
@media (max-width: 900px) {
    /* Layout jadi 1 kolom */
    .app-layout { grid-template-columns: 1fr; padding: 1rem; }
    
    /* Tampilkan Tombol Hamburger */
    .mobile-menu-btn { display: block; }
    
    /* --- PERBAIKAN HEADER & SEARCH BAR --- */
    .header-flex {
        flex-wrap: wrap; /* Izinkan turun baris */
        gap: 0.5rem;
        padding: 1rem;
    }
    
    /* Atur urutan elemen header */
    .mobile-menu-btn { order: 1; }
    .logo { order: 2; flex: 1; } /* Logo mengisi sisa ruang */
    .header-actions { order: 3; } /* Tombol Info di pojok kanan */
    
    /* Search Bar Muncul di bawah (Baris ke-2) */
    .search-bar {
        display: block; /* Munculkan kembali */
        order: 4; /* Posisi paling akhir */
        max-width: 100%;
        width: 100%;
        margin-top: 0.8rem; /* Jarak dari header atas */
    }

    /* --- PERBAIKAN SIDEBAR MOBILE (Transparan & Friendly) --- */
    .sidebar-filter {
        position: fixed;
        left: -300px; /* Sembunyikan ke kiri */
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 9999;
        
        /* PERUBAHAN: Background transparan/glass effect */
        background: rgba(255, 255, 255, 0.85); 
        backdrop-filter: blur(10px); /* Efek blur kaca */
        -webkit-backdrop-filter: blur(10px);
        
        box-shadow: 4px 0 15px rgba(0,0,0,0.1);
        padding: 80px 15px 20px 15px; /* Padding: Atas besar untuk tombol close, Kiri-Kanan 15px biar ga mentok */
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .sidebar-filter.active {
        left: 0;
    }

    /* Style Kartu di dalam Sidebar Mobile */
    .sidebar-filter .sidebar-card {
        background: rgba(255, 255, 255, 0.9);
        border-radius: 15px; /* Bulat lebih halus */
        border: 1px solid rgba(255,255,255,0.5);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        margin-bottom: 1rem;
    }
   

    /* Tombol Close Sidebar */
    .close-sidebar-btn { display: block; }
    
    /* Overlay */
    .mobile-sidebar-overlay.active { display: block; opacity: 1; }

    /* Atur ulang header actions di mobile */
    .header-actions .btn span { display: none; } /* Sembunyikan teks "Info Daftar", biar icon doang */
    .header-actions .btn { padding: 0.6rem; }

    /* Atur Modal Detail */
  /* 1. Buat Modal Utama tidak mentok ke tepi layar (Margin) */
    .modal-content {
        margin: 15px; /* Jarak dari tepi layar HP */
        width: calc(100% - 30px); /* Lebar dikurangi jarak kiri-kanan */
        max-height: 90vh; /* Batasi tinggi */
        border-radius: 15px; /* Bulatkan sudut biar kelihatan seperti kartu */
    }

    /* 2. Atur Konten di Dalam Modal (Detail Prodi) */
    .detail-layout {
        grid-template-columns: 1fr; /* 1 Kolom */
        padding: 1.5rem; /* Tambah jarak dalam menjadi 1.5rem (24px) biar tidak mentok */
    }

    .detail-left { 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
    }
    
    /* Gambar utama pas di tengah */
    .main-cover { 
        height: 200px; 
        max-width: 300px; 
        width: 100%;
        object-fit: cover;
    }
    
    /* Kartu Info (Akreditas/Lokasi) */
    .meta-cards { 
        grid-template-columns: 1fr; 
        gap: 1rem; 
    }

    /* 3. Perbaiki Card Section (Profil Lulusan, Prestasi) */
    .section-card {
        padding: 1.2rem; /* Padding dalam kartu */
        margin-bottom: 1rem; /* Jarak antar kartu */
        /* Pastikan kartu tidak keluar dari container */
        width: 100%; 
        box-sizing: border-box;
    }

    /* Styling khusus untuk list di dalam kartu */
    .section-card ul {
        padding-left: 20px; /* Indentasi list */
        margin: 0;
    }
    
    .section-card li {
        /* Jika teks prestasi panjang, biarkan turun baris tapi rapi */
        word-break: break-word; 
        margin-bottom: 0.3rem;
    }
     /* --- FIX: MODAL INFO PENDAFTARAN --- */
    .info-card {
        padding: 1.5rem;
        max-height: 92vh; /* Batasi tinggi */
        overflow-y: auto;
    }

    /* Agar list persyaratan tidak terpotong */
    .info-group ul {
        padding-left: 20px;
        margin: 0;
        /* Biarkan scroll natural jika list sangat panjang, atau biarkan parent scroll */
    } 
    
    /* Pastikan teks bisa wrap (turun baris) jika panjang */
    .info-group li, .section-card li {
        white-space: normal;
        word-break: break-word;
        margin-bottom: 0.3rem;
    }
}

@media (max-width: 600px) {
    /* Grid 2 Kolom di HP */
    .content-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 1rem;
    }

    /* FIX: Kartu Tidak Kepotong di HP */
    .book-card {
        aspect-ratio: auto; /* Hapus paksaan square */
        min-height: 180px; /* Tinggi minimal */
    }

    .book-cover {
        height: 100px; /* Tinggi gambar fix di HP */
        min-height: unset;
        flex: none;
    }

    .book-info {
        padding: 0.6rem 0.8rem;
        height: auto; /* Tinggi info mengikuti isi */
    }

    .book-info h3 {
        -webkit-line-clamp: 3; /* Maks 3 baris di HP */
        font-size: 0.85rem;
    }
    
    .tag-fakultas { font-size: 0.6rem; }
}

