/* Interactive Badge */
.clickable-badge { cursor: pointer; transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; position: relative; overflow: hidden; animation: techGlow 3s ease-in-out infinite; will-change: transform, box-shadow; }
.clickable-badge:hover { transform: scale(1.1); background: #f59e0b !important; color: #fff; box-shadow: 0 0 15px rgba(255,158,11,0.5); animation-play-state: paused; }
.clickable-badge::after { content: ' ▶'; font-size: 0.7rem; vertical-align: middle; opacity: 0.7; }

@keyframes techGlow {
    0% { box-shadow: 0 0 5px rgba(255, 158, 11, 0.2); transform: scale(1); }
    50% { box-shadow: 0 0 20px rgba(255, 158, 11, 0.6); transform: scale(1.02); }
    100% { box-shadow: 0 0 5px rgba(255, 158, 11, 0.2); transform: scale(1); }
}

/* YouTube Video Modal Redesign */
.video-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.video-modal-overlay.active { opacity: 1; visibility: visible; }
.video-modal-container { position: relative; width: 95%; max-width: 1100px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 12px; transform: translateY(20px); transition: transform 0.3s ease; scrollbar-width: none; -ms-overflow-style: none; }
.video-modal-container::-webkit-scrollbar { display: none; }
.video-modal-overlay.active .video-modal-container { transform: translateY(0); }
.video-modal-close { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 1.5rem; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; z-index: 100; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.video-modal-close:hover { background: rgba(0,0,0,0.8); }

.video-modal-main { background: #fff; border-radius: 12px; overflow: hidden; }
.video-modal-content { background: #000; line-height: 0; }
.player-wrapper { position: relative; padding-top: 56.25%; background: #000; }
#sisterVideo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.video-info-section { padding: 16px 20px 24px; color: #0f0f0f; }
.yt-video-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4; color: #0f0f0f; }

.yt-action-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.yt-channel-info { display: flex; align-items: center; gap: 12px; }
.yt-channel-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #eee; }
.yt-channel-text { display: flex; flex-direction: column; }
.yt-channel-name { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 4px; }
.yt-channel-subs { font-size: 0.75rem; color: #606060; }

.yt-actions { display: flex; gap: 8px; }
.video-share-wrapper-inline { position: relative; }
.video-share-toggle { background: #f2f2f2; border: none; color: #0f0f0f; padding: 0 16px; height: 36px; border-radius: 18px; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; gap: 6px; }
.video-share-toggle:hover { background: #e5e5e5; }
.video-share-menu { position: absolute; bottom: 45px; right: 0; background: #fff; border-radius: 12px; padding: 8px; min-width: 180px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s ease; border: 1px solid #eee; z-index: 1000; }
.video-share-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.share-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #0f0f0f; font-size: 0.9rem; font-weight: 500; text-decoration: none; border-radius: 8px; transition: background 0.1s; }
.share-item:hover { background: #f2f2f2; }

.yt-description-box { background: #f2f2f2; border-radius: 12px; padding: 12px; font-size: 0.9rem; line-height: 1.5; color: #0f0f0f; }
.yt-desc-meta { font-weight: 700; margin-bottom: 4px; font-size: 0.85rem; }
.yt-desc-text { color: #3f3f3f; margin: 0; }
.mobile-close-btn { display: none; }

@media (max-width: 600px) {
    .yt-action-bar { flex-direction: column; align-items: flex-start; }
    .yt-actions { width: 100%; border-top: 1px solid #eee; padding-top: 12px; justify-content: flex-end; }
    .yt-video-title { font-size: 1.1rem; }
    .video-modal-container { width: 100%; border-radius: 0; height: 100vh; max-height: 100vh; }
    .video-modal-close { display: none; }
    .mobile-close-btn { 
        display: block; 
        width: 100%; 
        background: #f2f2f2; 
        border: 1px solid #e5e5e5; 
        color: #0f0f0f; 
        padding: 12px; 
        border-radius: 8px; 
        font-weight: 600; 
        margin-top: 20px; 
        cursor: pointer;
        text-align: center;
        font-size: 0.95rem;
        transition: background 0.2s;
    }
    .mobile-close-btn:active { background: #e5e5e5; }
}

/* PWA Modal Styles */
.pwa-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 200000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.pwa-modal-overlay.active { opacity: 1; visibility: visible; }
.pwa-modal-container { width: 90%; max-width: 400px; background: white; border-radius: 24px; overflow: hidden; transform: scale(0.9); transition: transform 0.3s ease; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.pwa-modal-overlay.active .pwa-modal-container { transform: scale(1); }
.pwa-modal-content { padding: 32px 24px; text-align: center; }
.pwa-icon-wrapper { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 20px; box-shadow: 0 10px 20px rgba(44,90,160,0.2); overflow: hidden; border: 2px solid #f1f5f9; }
.pwa-app-icon { width: 100%; height: 100%; object-fit: cover; }
.pwa-title { font-size: 1.6rem; font-weight: 800; color: #1e293b; margin-bottom: 8px; }
.pwa-subtitle-app { font-size: 0.85rem; font-weight: 600; color: #2c5aa0; margin-bottom: 20px; line-height: 1.4; letter-spacing: 0.5px; }
.pwa-description { font-size: 1rem; color: #475569; line-height: 1.5; margin-bottom: 32px; }
.pwa-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; }
.pwa-btn { padding: 14px; border-radius: 12px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; border: none; }
.pwa-cancel { background: #f1f5f9; color: #64748b; }
.pwa-cancel:hover { background: #e2e8f0; }
.pwa-confirm { background: linear-gradient(135deg, #2c5aa0, #1e3a8a); color: white; box-shadow: 0 4px 12px rgba(44,90,160,0.3); }
.pwa-confirm:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(44,90,160,0.4); }

@media (min-width: 769px) {
    #installPWA { display: none !important; }
}

/* UTILITY CLASSES */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

/* SECTION COMMON STYLES */
.section-title { font-size: 1.8rem; font-weight: 800; color: #1e293b; margin-bottom: 30px; text-align: left; display: flex; align-items: center; gap: 12px; }
.section-footer { margin-top: 32px; text-align: center; }
.see-more { display: inline-flex; align-items: center; padding: 12px 24px; background: #f1f5f9; color: #475569; border-radius: 12px; font-weight: 700; text-decoration: none; transition: all 0.3s ease; border: 1px solid #e2e8f0; }
.see-more:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(44,90,160,0.2); }

/* BERITA & PENGUMUMAN STYLES */
.berita-container { display: flex; flex-direction: column; gap: 20px; }
.berita-full-width { width: 100%; }

@media (min-width: 992px) {
    .berita-pengumuman-grid { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
    .berita-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .berita-container.full-width { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .berita-pengumuman-grid .news-side-card { flex-direction: column; }
    .berita-pengumuman-grid .news-side-image { width: 100%; min-width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .berita-pengumuman-grid .news-side-excerpt { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

.news-side-card { display: flex; gap: 20px; background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid #f1f5f9; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; color: inherit; position: relative; }
.news-side-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); border-color: rgba(44,90,160,0.2); }
.news-side-image { width: 220px; min-width: 220px; height: 180px; position: relative; overflow: hidden; }
.news-side-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.news-side-card:hover .news-side-img { transform: scale(1.1); }
.news-side-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.2), transparent); opacity: 0; transition: opacity 0.3s; }
.news-side-card:hover .news-side-overlay { opacity: 1; }
.news-side-placeholder { width: 100%; height: 100%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 2rem; }
.news-side-content { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.news-side-meta { display: flex; gap: 12px; margin-bottom: 10px; font-size: 0.8rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.news-side-date { display: flex; align-items: center; gap: 4px; }
.news-side-category { color: var(--color-primary); }
.news-side-title { font-size: 1.25rem; font-weight: 800; color: #1e293b; margin-bottom: 10px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-side-excerpt { font-size: 0.95rem; color: #475569; line-height: 1.6; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-side-actions { margin-top: auto; }
.news-side-readmore { font-size: 0.9rem; font-weight: 800; color: var(--color-primary); display: flex; align-items: center; gap: 4px; transition: gap 0.2s; }
.news-side-card:hover .news-side-readmore { gap: 8px; }

@media (min-width: 992px) {
    .pengumuman-container { background: #f8fafc; padding: 24px; border-radius: 24px; border: 1px solid #e2e8f0; position: sticky; top: 120px; align-self: start; }
}
@media (max-width: 991px) {
    .pengumuman-container { margin-top: 32px; padding: 0; }
}
.pengumuman-list { display: flex; flex-direction: column; gap: 16px; }
.pengumuman-card { background: #fff; padding: 16px; border-radius: 16px; border-left: 4px solid #cbd5e1; text-decoration: none; color: inherit; transition: all 0.2s; border: 1px solid #e2e8f0; border-left-width: 4px; }
.pengumuman-card.tinggi { border-left-color: #ef4444; background: #fff1f2; }
.pengumuman-card.sedang { border-left-color: #f59e0b; background: #fffbeb; }
.pengumuman-card:hover { transform: translateX(5px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.pengumuman-judul { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; line-height: 1.4; }
.pengumuman-content { display: flex; gap: 12px; }
.pengumuman-thumbnail { width: 80px; height: 80px; min-width: 80px; border-radius: 8px; overflow: hidden; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.pengumuman-img { width: 100%; height: 100%; object-fit: contain; }
.pengumuman-text { flex: 1; }
.pengumuman-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.75rem; color: #64748b; font-weight: 700; margin-bottom: 6px; }
.pengumuman-category { color: var(--color-primary); }
.pengumuman-isi { font-size: 0.85rem; color: #475569; line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pengumuman-readmore { font-size: 0.8rem; font-weight: 800; color: var(--color-primary); }

/* GALERI STYLES (UNIFORM MODERN GRID) */
.gallery-preview { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px; 
}

/* Base item style */
.gallery-item { 
    position: relative; 
    border-radius: 20px; 
    overflow: hidden; 
    aspect-ratio: 4 / 5; /* Bentuk vertikal elegan seperti bingkai foto/katalog */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    text-decoration: none; 
    transform: translateY(0) translateZ(0); 
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

/* Efek melayang saat disorot */
.gallery-item:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 20px 40px rgba(44,90,160,0.2);
}

/* Responsif: 2 kolom di tablet, 1 kolom di HP */
@media (max-width: 992px) {
    .gallery-preview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .gallery-preview { grid-template-columns: 1fr; }
    .gallery-item { aspect-ratio: 16 / 10; /* Lebih melebar di layar HP */ }
}

/* Efek Ken Burns (Zoom Mulus) */
.gallery-image { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); 
    will-change: transform;
}
.gallery-item:hover .gallery-image { transform: scale(1.1); }

/* Overlay & Info Container */
.gallery-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, transparent 100%); 
    display: flex; 
    align-items: flex-end; 
    padding: 24px; 
    opacity: 0.9; 
    transition: opacity 0.4s ease; 
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

/* Label Kategori Biasa (Lebih solid dan jelas) */
.gallery-category { 
    color: #fff; 
    font-size: 0.75rem; 
    font-weight: 800; 
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--color-primary); 
    padding: 6px 14px; 
    border-radius: 30px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Judul Foto */
.gallery-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transform: translateY(10px);
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gallery-item:hover .gallery-title { 
    transform: translateY(0); 
    opacity: 1; 
}

/* TENAGA PENDIDIK STYLES */
.guru-slideshow-container { position: relative; padding: 10px 0; }
.guru-slideshow-wrapper { display: flex; gap: 16px; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); overflow: visible; padding: 10px 0; touch-action: auto !important; }
.guru-card { min-width: 250px; width: 250px; background: #fff; padding: 24px 16px; border-radius: 20px; text-align: center; border: 1px solid #f1f5f9; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s; flex-shrink: 0; user-select: none; -webkit-user-drag: none; }
.guru-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); border-color: var(--color-primary); }
.guru-photo-container { width: 180px; height: 240px; margin: 0 auto 20px; border-radius: 16px; overflow: hidden; border: 3px solid var(--color-primary); box-shadow: 0 8px 25px rgba(44,90,160,0.2); background: #f8fafc; }
.guru-photo { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.guru-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: #cbd5e1; flex-direction: column; }
.guru-photo.placeholder .placeholder-text { font-size: 0.8rem; font-weight: 700; margin-top: 8px; }
.guru-name { font-size: 1.1rem; font-weight: 800; color: #1e293b; margin-bottom: 6px; line-height: 1.3; }
.guru-jabatan { font-size: 0.9rem; color: #64748b; font-weight: 600; margin-bottom: 8px; }
.guru-mapel { font-size: 0.85rem; color: var(--color-primary); font-weight: 700; margin-bottom: 12px; }
.guru-badge { display: inline-block; padding: 4px 12px; background: #e0f2fe; color: #0369a1; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.guru-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); cursor: pointer; z-index: 10; font-size: 1.2rem; color: var(--color-primary); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.guru-nav:hover { background: var(--color-primary); color: #fff; }
.guru-prev { left: -22px; }
.guru-next { right: -22px; }
.guru-dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.guru-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; border: none; cursor: pointer; transition: all 0.3s; }
.guru-dot.active { width: 30px; border-radius: 5px; background: var(--color-primary); }

/* ACCORDION SYSTEM STYLES (MOBILE ONLY) */
@media (max-width: 768px) {
    .section.accordion-section {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }
    .accordion-section { margin-bottom: 4px !important; }
    .accordion-section .container { padding: 0 !important; width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }
    
    .accordion-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        background: rgba(44, 90, 160, 0.05); /* Tipis background */
        border-radius: 12px;
        border: 1px solid rgba(44, 90, 160, 0.1);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    .accordion-header .section-title {
        margin: 0 !important;
        font-size: 1rem !important;
        text-align: left !important;
        color: var(--color-primary) !important;
        font-weight: 700 !important;
    }
    
    .accordion-header .collapse-btn {
        font-size: 0.75rem;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--color-primary);
        opacity: 0.6;
    }
    
    .accordion-content {
        display: grid;
        grid-template-rows: 0fr;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.4s ease, 
                    visibility 0.4s;
    }
    
    /* BERITA & PENGUMUMAN MOBILE OPTIMIZATION */
    .berita-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .news-side-card {
        flex-direction: column !important;
        gap: 0 !important;
        border-radius: 12px !important;
    }

    .news-side-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 0 !important;
        padding-bottom: 177% !important; /* EXACT 9:16 ratio */
        position: relative !important;
        display: block !important;
        overflow: hidden !important;
    }

    .news-side-img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .news-side-content {
        padding: 12px !important;
    }

    .news-side-title {
        font-size: 0.9rem !important;
        -webkit-line-clamp: 4 !important;
        line-clamp: 4 !important;
        margin-bottom: 4px !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        line-height: 1.3 !important;
    }

    .news-side-excerpt, .news-side-readmore, .news-side-meta .news-side-category {
        display: none !important;
    }

    .news-side-meta {
        margin-bottom: 6px !important;
        font-size: 0.65rem !important;
        gap: 8px !important;
    }

    .accordion-content > div { 
        min-height: 0; 
        width: 100% !important; 
        max-width: 100vw !important;
        overflow-x: visible !important; /* Allow gallery horizontal scroll */
        overflow-y: visible !important;
        display: block !important;
        padding: 5px 0 !important;
    }

    /* Galeri section: allow overflow for horizontal scroll ONLY when open */
    .accordion-section.is-open:has(.gallery-preview) .accordion-content,
    .accordion-section.is-open:has(.gallery-preview) .accordion-content > div {
        overflow: visible !important;
    }
    
    /* ===================================================
       PREMIUM MOBILE GALLERY — Luxury Horizontal Scroll
       =================================================== */


    .gallery-preview {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 14px !important;
        padding: 12px 16px 24px !important;
        margin: 0 0 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        scrollbar-width: none !important;
        grid-template-columns: unset !important;
    }

    .gallery-preview::-webkit-scrollbar {
        display: none !important;
    }

    .gallery-item {
        flex: 0 0 72vw !important;
        max-width: 300px !important;
        min-width: 220px !important;
        height: 320px !important;
        aspect-ratio: unset !important;
        border-radius: 20px !important;
        scroll-snap-align: start !important;
        overflow: hidden !important;
        position: relative !important;
        box-shadow:
            0 8px 32px rgba(0,0,0,0.18),
            0 2px 8px rgba(0,0,0,0.12) !important;
        transform: translateZ(0) !important;
        transition: box-shadow 0.3s ease, transform 0.3s ease !important;
        border: 1.5px solid rgba(255,215,0,0.18) !important;
        text-decoration: none !important;
        display: block !important;
    }

    .gallery-item:active {
        transform: scale(0.97) !important;
    }

    /* Shimmer gold border on scroll-snap focus */
    .gallery-item:focus-visible {
        outline: none !important;
        box-shadow:
            0 0 0 3px #ffd700,
            0 8px 32px rgba(0,0,0,0.25) !important;
    }

    .gallery-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        transition: transform 0.6s ease !important;
    }

    .gallery-item:active .gallery-image {
        transform: scale(1.04) !important;
    }

    /* Luxury gradient overlay — stronger bottom fade */
    .gallery-overlay {
        position: absolute !important;
        inset: 0 !important;
        background: linear-gradient(
            to top,
            rgba(5,10,25,0.92) 0%,
            rgba(5,10,25,0.55) 40%,
            rgba(5,10,25,0.08) 70%,
            transparent 100%
        ) !important;
        padding: 0 16px 18px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    /* Gold shimmer top accent line */
    .gallery-item::after {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 3px !important;
        background: linear-gradient(90deg, transparent, #ffd700, #f0b429, #ffd700, transparent) !important;
        opacity: 0.7 !important;
        z-index: 5 !important;
    }

    .gallery-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 7px !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    /* Gold pill category badge */
    .gallery-category {
        font-family: 'Poppins', -apple-system, sans-serif !important;
        font-size: 0.62rem !important;
        font-weight: 700 !important;
        letter-spacing: 1.2px !important;
        text-transform: uppercase !important;
        color: #0f172a !important;
        background: linear-gradient(90deg, #ffd700, #f0b429, #e8a000) !important;
        padding: 4px 11px !important;
        border-radius: 30px !important;
        box-shadow: 0 2px 10px rgba(240,180,41,0.35) !important;
        display: inline-block !important;
    }

    /* Judul foto — Playfair Display serif untuk kesan mewah */
    .gallery-title {
        font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        text-shadow: 0 2px 12px rgba(0,0,0,0.7) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        transform: none !important;
        opacity: 1 !important;
        letter-spacing: 0.2px !important;
    }

    /* Scroll hint indicator dots */
    .gallery-preview-wrapper {
        position: relative;
    }

    .guru-slideshow-container {
        width: 100% !important;
        overflow: visible !important; /* Pass scroll down to wrapper */
        padding: 10px 0 30px !important;
        display: block !important;
    }
    
    .guru-slideshow-wrapper {
        display: flex !important;
        width: 100% !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;
        gap: 15px !important;
        padding: 0 10vw !important;
        scroll-behavior: smooth;
        transform: none !important;
        transition: none !important;
        touch-action: pan-x pan-y !important; /* Restore touch panning */
    }

    /* Hide scrollbar on the actual scroll container */
    .guru-slideshow-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* Hide scrollbar but keep functionality */
    .guru-slideshow-container::-webkit-scrollbar {
        display: none;
    }

    .guru-nav, .guru-dots {
        display: none !important;
    }

    .guru-card {
        min-width: 80vw !important;
        width: 80vw !important;
        padding: 24px 16px !important;
        opacity: 1 !important; /* No JS focus effect needed for pure CSS */
        transform: none !important;
        scroll-snap-align: center !important;
        flex-shrink: 0 !important;
        filter: none !important;
    }

    .guru-card.active {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        box-shadow: 0 10px 25px rgba(44, 90, 160, 0.2) !important;
    }

    .guru-photo-container {
        width: 90% !important;
        max-width: 200px !important;
        aspect-ratio: 3 / 4 !important;
        height: auto !important;
        margin: 0 auto 15px !important;
    }

    /* News card fix */
    .news-side-card {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 12px !important;
    }
    
    /* Open State */
    .accordion-section.is-open .accordion-content {
        grid-template-rows: 1fr;
        opacity: 1;
        visibility: visible;
        overflow: visible;
        padding-top: 10px;
        padding-bottom: 15px;
    }
    
    .accordion-section.is-open .accordion-header {
        background: rgba(44, 90, 160, 0.1);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .accordion-section.is-open .accordion-header .collapse-btn {
        transform: rotate(180deg);
        opacity: 1;
    }
}

/* Desktop Fix - Restore original behavior */
@media (min-width: 769px) {
    .accordion-header { display: none !important; }
    .accordion-content { 
        display: contents !important; /* Biarkan anak-anaknya seolah-olah tanpa pembungkus */
    }
    .accordion-content > div {
        display: contents !important;
    }

    /* STATISTIK STYLES - DESKTOP */
    .stats-grid-detailed {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 24px;
        margin-top: 20px;
    }
    .stat-column {
        background: #fff;
        padding: 24px;
        border-radius: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        border: 1px solid #f1f5f9;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .stat-head-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--color-primary);
        margin: 0 0 10px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .stat-card-main {
        background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
        padding: 20px;
        border-radius: 16px;
        color: #fff;
        text-align: center;
        margin-bottom: 8px;
    }
    .stat-number-large {
        font-size: 2.5rem;
        font-weight: 800;
        line-height: 1;
        margin-bottom: 6px;
    }
    .stat-label-large {
        font-size: 0.9rem;
        opacity: 0.9;
        font-weight: 500;
    }
    .stat-row {
        display: flex;
        gap: 12px;
        margin-bottom: 12px;
    }
    .stat-item-small {
        flex: 1;
        background: #f8fafc;
        padding: 12px;
        border-radius: 12px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: 1px solid #e2e8f0;
    }
    .stat-val {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1e293b;
    }
    .stat-lbl {
        font-size: 0.75rem;
        color: #64748b;
        font-weight: 600;
    }
    .stat-item-mini {
        flex: 1;
        background: #f0f9ff;
        padding: 8px 12px;
        border-radius: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85rem;
        border: 1px solid #bae6fd;
    }
    .stat-item-mini.outline {
        background: transparent;
        border: 1px dashed #cbd5e1;
    }
    .mini-val { font-weight: 700; color: #0369a1; }
    .stat-item-mini.outline .mini-val { color: #475569; }
    .mini-lbl { color: #475569; font-weight: 500; }
}

@media (max-width: 768px) {
    .stats-grid-detailed { display: flex; flex-direction: column; gap: 20px; }
    .stat-column { 
        background: #fff; 
        padding: 20px; 
        border-radius: 20px; 
        border: 1px solid #f1f5f9;
        box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    }
    .stat-head-title { 
        font-size: 1.15rem; 
        margin-bottom: 15px; 
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .stat-card-main {
        background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
        padding: 20px;
        border-radius: 18px;
        box-shadow: 0 10px 20px rgba(44, 90, 160, 0.2);
        text-align: center;
    }
    
    .stat-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 15px;
    }
    
    /* Force 3 columns for certain small items if they fit */
    .per-kelas .stat-row, .per-rombel .stat-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    /* But for gender/total rombel maybe 2 cols is safer or keep 1 row with grid */
    .stat-group:not(.per-kelas):not(.per-rombel) .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-group:not(.per-kelas):not(.per-rombel) .stat-row .stat-item-small:last-child {
        grid-column: span 2;
    }

    .stat-item-small {
        background: #f8fafc;
        padding: 15px 10px;
        border-radius: 15px;
        border: 1px solid #e2e8f0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        transition: transform 0.2s ease;
    }
    .stat-val { font-size: 1.25rem; }
    .stat-lbl { font-size: 0.75rem; font-weight: 700; opacity: 0.8; }
    
    .stat-item-mini {
        padding: 10px 5px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    .mini-val { font-size: 1rem; }
    .mini-lbl { font-size: 0.7rem; }

    /* Gender Ratio Bar */
    .gender-ratio-wrapper {
        margin: 10px 0 20px;
        background: #f1f5f9;
        padding: 12px;
        border-radius: 12px;
    }
    .gender-ratio-bar {
        height: 8px;
        background: #e2e8f0;
        border-radius: 4px;
        display: flex;
        overflow: hidden;
        margin-bottom: 8px;
    }
    .ratio-fill.male { background: #3b82f6; }
    .ratio-fill.female { background: #ec4899; }
    .ratio-labels {
        display: flex;
        justify-content: space-between;
        font-size: 0.75rem;
        font-weight: 700;
        color: #64748b;
    }
}

/* DARK MODE SUPPORT FOR STATISTICS */
[data-theme="dark"] .stat-column {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
[data-theme="dark"] .stat-head-title { color: #60a5fa; }
[data-theme="dark"] .stat-item-small,
[data-theme="dark"] .stat-item-mini {
    background: rgba(255, 255, 255, 0.03);
    border-color: #334155;
}
[data-theme="dark"] .stat-val,
[data-theme="dark"] .mini-val { color: #f8fafc; }
[data-theme="dark"] .stat-lbl,
[data-theme="dark"] .mini-lbl { color: #94a3b8; }
[data-theme="dark"] .stat-item-mini.outline { border-color: #334155; }
[data-theme="dark"] .stat-item-mini.outline .mini-val { color: #cbd5e1; }
