/* ========================================
   TK ISLAM JOGLO - PUBLIC CSS
   ======================================== */

:root {
    --color-primary: #7C3AED;
    --color-primary-light: #8B5CF6;
    --color-primary-lighter: #A78BFA;
    --color-primary-bg: #EDE9FE;
    --color-secondary: #4ECDC4;
    --color-accent: #FFD93D;
    --gradient-hero: linear-gradient(135deg, #5B21B6 0%, #7C3AED 40%, #8B5CF6 70%, #A78BFA 100%);
    --gradient-footer: linear-gradient(135deg, #5B21B6, #7C3AED);
    --shadow-sm: 0 2px 8px rgba(124, 58, 237, 0.15);
    --shadow-md: 0 4px 16px rgba(124, 58, 237, 0.2);
    --shadow-lg: 0 8px 32px rgba(124, 58, 237, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Quicksand', 'Patrick Hand', cursive, sans-serif;
    background: #F8F5FF;
    color: #2D3748;
    overflow-x: hidden;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 768px) { .container { padding: 0 1rem; } }

/* ======================================== PRELOADER ======================================== */
.preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 50%, #A78BFA 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; }
.preloader-container { text-align: center; animation: pulse 1.5s ease-in-out infinite; }
.preloader-logo {
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: bounce 1s ease-in-out infinite;
    font-size: 4rem;
}
.preloader-spinner {
    width: 60px; height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}
.preloader-text { color: white; font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; font-family: 'Patrick Hand', cursive; margin-bottom: 1rem; }
.preloader-dots { display: flex; justify-content: center; gap: 0.5rem; }
.preloader-dots span {
    width: 12px; height: 12px;
    background: white;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}
.preloader-dots span:nth-child(2) { animation-delay: 0.2s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes dotPulse { 0%, 60%, 100% { transform: scale(1); opacity: 0.6; } 30% { transform: scale(1.3); opacity: 1; } }

/* ======================================== NAVBAR ======================================== */
.navbar {
    background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 100%);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.logo-title { font-weight: 700; font-size: 1.25rem; color: white; font-family: 'Patrick Hand', cursive; }
.logo-subtitle { font-size: 0.8rem; color: rgba(255,255,255,0.85); font-weight: 500; }
.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    background: none;
    border: none;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.2); }
.nav-link.active { color: white; background: rgba(255,255,255,0.25); }
.nav-btn {
    background: white;
    color: #7C3AED;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 0.95rem;
}
.nav-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }

/* ======================================== BACK TO MENU BUTTON ======================================== */
.btn-back-menu {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Quicksand', sans-serif;
}

.btn-back-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-back-menu i {
    font-size: 0.9rem;
}

/* Footer Back Button */
.footer-back-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Quicksand', sans-serif;
    margin-top: 0.5rem;
}

.footer-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.footer-back-btn i {
    font-size: 0.9rem;
}

/* Mobile menu back button */
.mobile-menu a[onclick*="backToMenu"] {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    color: #FFD93D;
}

/* ======================================== RESPONSIVE NAVBAR ======================================== */
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.mobile-menu { display: none; background: #7C3AED; padding: 1rem; flex-direction: column; gap: 0.5rem; }
.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    cursor: pointer;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
}
.mobile-menu a:hover { background: rgba(255,255,255,0.2); }
.mobile-menu.hidden { display: none; }
@media (max-width: 1024px) { 
    .nav-menu { display: none; } 
    .mobile-menu-btn { display: block; } 
    .mobile-menu:not(.hidden) { display: flex; } 
}

/* ======================================== HERO SLIDER - FULL FIX ======================================== */
.hero-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 550px;
    background: #5B21B6;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 550px;
    overflow: hidden;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    min-height: 550px;
    overflow: hidden;
    position: relative;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 550px;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.slide-item {
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    min-height: 550px;
    position: relative;
}

.slide-bg {
    width: 100%;
    height: 100%;
    min-height: 550px;
    display: flex;
    align-items: center;
    padding: 3rem 2rem;
    position: relative;
}

.slide-content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Slide Text */
.slide-text {
    color: white;
    max-width: 600px;
}

.slide-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
}

.slide-text h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-family: 'Patrick Hand', cursive;
}

.highlight-text {
    color: #FFD93D;
    text-shadow: 0 2px 20px rgba(255,217,61,0.3);
}

.slide-text p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.slide-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Slide Image */
.slide-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-image img {
    width: 100%;
    max-width: 550px;
    border-radius: 30px;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.3);
    object-fit: cover;
    height: 350px;
    border: 3px solid rgba(255,255,255,0.15);
    transition: transform 0.5s ease;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
}

.slider-dots {
    display: flex;
    gap: 0.75rem;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.slider-dots .dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.slider-dots .dot:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.1);
}

.slider-arrow {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.4);
}

.slider-arrow:active {
    transform: scale(0.95);
}

/* Responsive Slider */
@media (max-width: 1024px) {
    .hero-slider,
    .slider-container,
    .slider-wrapper,
    .slider-track,
    .slide-item,
    .slide-bg {
        min-height: 500px;
    }
    
    .slide-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    
    .slide-text {
        max-width: 100%;
    }
    
    .slide-text h1 {
        font-size: 2.4rem;
    }
    
    .slide-buttons {
        justify-content: center;
    }
    
    .slide-image img {
        max-width: 400px;
        height: 280px;
    }
    
    .slider-controls {
        bottom: 20px;
        padding: 0.5rem 1rem;
        gap: 1rem;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider,
    .slider-container,
    .slider-wrapper,
    .slider-track,
    .slide-item,
    .slide-bg {
        min-height: 450px;
    }
    
    .slide-text h1 {
        font-size: 1.8rem;
    }
    
    .slide-text p {
        font-size: 0.95rem;
    }
    
    .slide-badge {
        font-size: 0.8rem;
        padding: 0.3rem 1rem;
    }
    
    .slide-image img {
        max-width: 300px;
        height: 200px;
    }
    
    .slider-controls {
        bottom: 15px;
        padding: 0.4rem 0.8rem;
        gap: 0.75rem;
    }
    
    .slider-dots .dot {
        width: 10px;
        height: 10px;
    }
    
    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .btn-primary,
    .btn-outline {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-slider,
    .slider-container,
    .slider-wrapper,
    .slider-track,
    .slide-item,
    .slide-bg {
        min-height: 400px;
    }
    
    .slide-text h1 {
        font-size: 1.5rem;
    }
    
    .slide-text p {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }
    
    .slide-image img {
        max-width: 250px;
        height: 160px;
    }
    
    .slider-controls {
        bottom: 12px;
        padding: 0.3rem 0.6rem;
        gap: 0.5rem;
    }
    
    .slider-dots .dot {
        width: 8px;
        height: 8px;
    }
    
    .slider-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

/* ======================================== BUTTONS ======================================== */
.btn-primary {
    background: white;
    color: #7C3AED;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px rgba(124,58,237,0.3); }
.btn-outline {
    border: 2px solid white;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    text-decoration: none;
    font-size: 1rem;
}
.btn-outline:hover { background: white; color: #7C3AED; transform: translateY(-3px); }
.btn-secondary {
    border: 2px solid #7C3AED;
    color: #7C3AED;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    text-decoration: none;
    font-size: 1rem;
}
.btn-secondary:hover { background: #7C3AED; color: white; transform: translateY(-3px); }
.w-full { width: 100%; }

/* ======================================== STATS ======================================== */
.stats { padding: 4rem 0; background: white; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat-card {
    background: var(--color-primary-bg);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid rgba(124,58,237,0.1);
}
.stat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: #7C3AED; }
.stat-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: #7C3AED; font-family: 'Patrick Hand', cursive; }
.stat-label { font-size: 0.9rem; color: #6B7280; font-weight: 600; }
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ======================================== WELCOME ======================================== */
.welcome { padding: 4rem 0; background: #F8F5FF; }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    color: white;
    padding: 0.3rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1A202C;
    font-family: 'Patrick Hand', cursive;
}
.section-subtitle { color: #6B7280; margin-top: 0.5rem; font-size: 1.05rem; }
.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    margin: 1rem auto 0;
    border-radius: 2px;
}
.welcome-text {
    color: #4A5568;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}
.welcome-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.welcome-item { display: flex; align-items: center; gap: 0.75rem; font-size: 1rem; font-weight: 500; }
.welcome-item span:first-child { font-size: 1.5rem; }
.welcome-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.welcome-image { position: relative; }
.welcome-image img { border-radius: 30px; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.welcome-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.welcome-badge .font-bold { font-weight: 700; color: #7C3AED; }
.welcome-badge .text-sm { font-size: 0.8rem; color: #6B7280; }
@media (max-width: 768px) { .welcome-grid { grid-template-columns: 1fr; } .section-title { font-size: 2rem; } }

/* ======================================== QUICK LINKS ======================================== */
.quick-links { padding: 4rem 0; background: white; }
.section-header { text-align: center; margin-bottom: 3rem; }
.quick-links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.quick-link-card {
    background: #F8F5FF;
    padding: 2.5rem 2rem;
    border-radius: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--card-color, #7C3AED);
    transform: scaleX(0);
    transition: transform 0.3s;
}
.quick-link-card:hover::before { transform: scaleX(1); }
.quick-link-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--card-color, #7C3AED); }
.quick-link-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.quick-link-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: #1A202C; }
.quick-link-card p { font-size: 0.9rem; color: #6B7280; }
@media (max-width: 768px) { .quick-links-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .quick-links-grid { grid-template-columns: 1fr; } }

/* ======================================== PROFIL ======================================== */
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.profil-sejarah { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-bottom: 4rem; }
.profil-sejarah-text h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; font-family: 'Patrick Hand', cursive; color: #1A202C; }
.profil-sejarah-text p { color: #4A5568; line-height: 1.8; font-size: 1.05rem; }
.profil-sejarah-image { position: relative; }
.profil-sejarah-image img { border-radius: 30px; width: 100%; }
.year-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}
.year-number { font-size: 2rem; font-weight: 800; color: #7C3AED; font-family: 'Patrick Hand', cursive; }
.year-label { font-size: 0.8rem; color: #6B7280; font-weight: 600; }

.visi-misi { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 4rem; }
.visi-card, .misi-card {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    border-radius: 30px;
    padding: 2.5rem;
    color: white;
}
.visi-icon { font-size: 3rem; margin-bottom: 1rem; }
.visi-card h3, .misi-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; font-family: 'Patrick Hand', cursive; }
.visi-card p { color: rgba(255,255,255,0.9); line-height: 1.8; font-size: 1.05rem; }
.misi-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.misi-card li { display: flex; align-items: center; gap: 0.75rem; font-size: 1rem; color: rgba(255,255,255,0.9); }
.misi-card li::before { content: '⭐'; }

.akreditasi {
    background: var(--color-primary-bg);
    border-radius: 30px;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    border: 2px solid rgba(124,58,237,0.1);
}
.akreditasi-text h3 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; font-family: 'Patrick Hand', cursive; }
.akreditasi-text p { color: #4A5568; margin-bottom: 1.5rem; font-size: 1.05rem; }
.akreditasi-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}
.akreditasi-icon { font-size: 2rem; }
.akreditasi-nilai { font-size: 1.75rem; font-weight: 800; color: #7C3AED; }
.akreditasi-circle .circle {
    width: 120px; height: 120px;
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(124,58,237,0.3);
}
.akreditasi-circle .circle-text { text-align: center; }
.akreditasi-circle .circle-text div:first-child { font-size: 2.5rem; font-weight: 800; }
.akreditasi-circle .circle-text div:last-child { font-size: 0.8rem; font-weight: 600; }

@media (max-width: 768px) {
    .profil-sejarah, .visi-misi, .akreditasi { grid-template-columns: 1fr; }
}

/* ======================================== BERITA ======================================== */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}
.berita-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(124,58,237,0.08);
    transition: all 0.3s ease;
}
.berita-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: #7C3AED; }
.berita-card img { width: 100%; height: 200px; object-fit: cover; }
.berita-content { padding: 1.25rem; }
.berita-date { font-size: 0.8rem; color: #6B7280; margin-bottom: 0.5rem; }
.berita-card h3 { font-weight: 700; margin-bottom: 0.5rem; font-size: 1.1rem; color: #1A202C; }
.berita-card p { font-size: 0.9rem; color: #6B7280; margin-bottom: 1rem; line-height: 1.6; }
.berita-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.berita-link {
    font-size: 0.9rem;
    color: #7C3AED;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
}
.berita-link:hover { text-decoration: underline; }
@media (max-width: 768px) { .berita-grid { grid-template-columns: 1fr; } }

/* ======================================== PRESTASI CUSTOM GRID ======================================== */
.prestasi-grid-custom {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.prestasi-card-custom {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(124,58,237,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}
.prestasi-card-custom:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: #7C3AED;
}
.prestasi-card-custom .card-image {
    height: 200px;
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.prestasi-card-custom .card-image .icon {
    font-size: 5rem;
    opacity: 0.4;
}
.prestasi-card-custom .card-image .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
}
.prestasi-card-custom .card-image .kategori-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}
.prestasi-card-custom .card-image .kategori-badge.siswa { background: #7C3AED; }
.prestasi-card-custom .card-image .kategori-badge.guru { background: #4ECDC4; }
.prestasi-card-custom .card-image .kategori-badge.sekolah { background: #F59E0B; }

.prestasi-card-custom .card-body {
    padding: 1.5rem;
}
.prestasi-card-custom .card-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1A202C;
}
.prestasi-card-custom .card-body .penerima {
    color: #7C3AED;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.prestasi-card-custom .card-body .detail {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6B7280;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.prestasi-card-custom .card-body .detail span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.prestasi-card-custom .card-body .detail .tingkat {
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.7rem;
}
.prestasi-card-custom .card-body .detail .tingkat.sekolah { background: #E5E7EB; color: #4B5563; }
.prestasi-card-custom .card-body .detail .tingkat.kecamatan { background: #D1FAE5; color: #065F46; }
.prestasi-card-custom .card-body .detail .tingkat.kota { background: #DBEAFE; color: #1E40AF; }
.prestasi-card-custom .card-body .detail .tingkat.provinsi { background: #EDE9FE; color: #5B21B6; }
.prestasi-card-custom .card-body .detail .tingkat.nasional { background: #FEF3C7; color: #92400E; }
.prestasi-card-custom .card-body .detail .tingkat.internasional { background: #FEE2E2; color: #991B1B; }

.prestasi-card-custom .card-body .pencapaian {
    color: #4A5568;
    line-height: 1.6;
    font-size: 0.95rem;
}
.prestasi-card-custom .card-footer {
    padding: 1rem 1.5rem;
    background: #FAFAFA;
    border-top: 1px solid #F3F4F6;
    text-align: center;
    transition: all 0.3s;
}
.prestasi-card-custom:hover .card-footer {
    background: #7C3AED;
}
.prestasi-card-custom:hover .card-footer .detail-btn {
    color: white;
}
.prestasi-card-custom .card-footer .detail-btn {
    font-weight: 600;
    font-size: 0.9rem;
    color: #6B7280;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
}
.prestasi-card-custom .card-footer .detail-btn i {
    transition: transform 0.3s;
}
.prestasi-card-custom:hover .card-footer .detail-btn i {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .prestasi-grid-custom { grid-template-columns: 1fr; }
}

/* ======================================== GALERI ======================================== */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.galeri-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background: #F3F4F6;
}

.galeri-item:hover {
    transform: scale(1.03) translateY(-5px);
    border-color: #7C3AED;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.galeri-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeri-item:hover img {
    transform: scale(1.1);
}

.galeri-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(124, 58, 237, 0.85), rgba(167, 139, 250, 0.3));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeri-item:hover .galeri-overlay {
    opacity: 1;
}

.galeri-overlay p {
    color: white;
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin: 0;
    line-height: 1.4;
}

.galeri-overlay p span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 0.25rem;
}

/* Empty state untuk galeri */
.galeri-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #9CA3AF;
}

.galeri-empty i {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    color: #D1D5DB;
}

.galeri-empty p {
    font-size: 1.1rem;
}

/* Responsive Galeri */
@media (max-width: 1024px) {
    .galeri-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .galeri-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .galeri-overlay p {
        font-size: 0.8rem;
    }
    
    .galeri-overlay {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .galeri-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .galeri-item {
        border-radius: 12px;
    }
}

/* ======================================== GALERI SLIDE MODAL ======================================== */
#galeriSlideModal .modal-content {
    max-width: 800px;
    width: 95%;
}

#galeriSlideModal .slide-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

#galeriSlideModal .slide-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 15px;
    background: #F3F4F6;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#galeriSlideModal .slide-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#galeriSlideModal .slide-content img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
}

#galeriSlideModal .slide-nav {
    background: rgba(124, 58, 237, 0.8);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#galeriSlideModal .slide-nav:hover {
    background: #7C3AED;
    transform: scale(1.1);
}

#galeriSlideModal .slide-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}

#galeriSlideModal .slide-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

#galeriSlideModal .slide-thumbnails img.active {
    border-color: #7C3AED;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

#galeriSlideModal .slide-thumbnails img:hover {
    transform: scale(1.05);
}

#galeriSlideModal .slide-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

#galeriSlideModal .slide-indicators .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D1D5DB;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

#galeriSlideModal .slide-indicators .dot.active {
    background: #7C3AED;
    transform: scale(1.2);
}

#galeriSlideModal .slide-caption {
    text-align: center;
    margin-top: 0.75rem;
    color: #6B7280;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive Modal Galeri */
@media (max-width: 768px) {
    #galeriSlideModal .slide-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    #galeriSlideModal .slide-content img {
        max-height: 300px;
    }
    
    #galeriSlideModal .slide-thumbnails img {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    #galeriSlideModal .slide-nav {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    #galeriSlideModal .slide-content img {
        max-height: 250px;
    }
    
    #galeriSlideModal .slide-thumbnails img {
        width: 35px;
        height: 35px;
    }
}

/* ======================================== KONTAK ======================================== */
.kontak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.kontak-info {
    background: white;
    border-radius: 30px;
    padding: 2rem;
    border: 2px solid rgba(124,58,237,0.1);
    box-shadow: var(--shadow-sm);
}
.kontak-info h3, .kontak-form h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; font-family: 'Patrick Hand', cursive; }
.kontak-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #F8F5FF;
    border-radius: 15px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}
.kontak-item:hover { background: #EDE9FE; }
.kontak-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.kontak-icon.blue { background: #DBEAFE; color: #3B82F6; }
.kontak-icon.green { background: #D1FAE5; color: #10B981; }
.kontak-icon.purple { background: #EDE9FE; color: #7C3AED; }
.kontak-icon.orange { background: #FEF3C7; color: #F59E0B; }
.kontak-item div p { font-size: 0.7rem; color: #6B7280; }
.kontak-item div span { font-size: 0.9rem; font-weight: 600; }

.kontak-form {
    background: white;
    border-radius: 30px;
    padding: 2rem;
    border: 2px solid rgba(124,58,237,0.1);
    box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 1rem; }
.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #F3F4F6;
    border-radius: 15px;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s;
    font-size: 0.95rem;
    background: #F8F5FF;
}
.form-input:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 4px rgba(124,58,237,0.1); }
.form-input.is-invalid { border-color: #EF4444; }
.form-error { color: #EF4444; font-size: 0.8rem; margin-top: 0.25rem; display: none; }
.form-error.show { display: block; }

.sosmed-section { text-align: center; margin-top: 2rem; }
.sosmed-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; font-family: 'Patrick Hand', cursive; }
.sosmed-icons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.sosmed-icons a {
    width: 50px; height: 50px;
    background: #EDE9FE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7C3AED;
    font-size: 1.3rem;
    transition: all 0.3s;
    text-decoration: none;
    border: 2px solid transparent;
}
.sosmed-icons a:hover { background: #7C3AED; color: white; transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #7C3AED; }
@media (max-width: 768px) { .kontak-grid { grid-template-columns: 1fr; } }

/* ======================================== MODAL ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal.active { display: flex; opacity: 1; visibility: visible; }
.modal-content {
    background: white;
    border-radius: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-lg { max-width: 700px; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    padding: 1rem 1.5rem;
    border-radius: 30px 30px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: sticky;
    top: 0;
}
.modal-header h3 { font-size: 1.25rem; font-weight: 700; font-family: 'Patrick Hand', cursive; }
.modal-close { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; transition: opacity 0.3s; }
.modal-close:hover { opacity: 0.8; }
.modal-body { padding: 1.5rem; }
.modal-website-btn {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s;
}
.modal-website-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ======================================== FOOTER ======================================== */
.footer {
    background: var(--gradient-footer);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-logo-icon {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.footer-logo span { font-weight: 700; font-size: 1.2rem; font-family: 'Patrick Hand', cursive; }
.footer-about p { color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1rem; }
.footer-social { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.footer-social a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
    text-decoration: none;
}
.footer-social a:hover { background: white; color: #7C3AED; transform: translateY(-3px); }
.footer-links h4, .footer-contact h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Patrick Hand', cursive;
}
.footer-links ul, .footer-contact ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
}
.footer-links a:hover { color: #FFD93D; }
.footer-contact li { color: rgba(255,255,255,0.85); font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-contact li i { width: 20px; color: #FFD93D; }
.footer-bottom { padding: 1.5rem 0; text-align: center; font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.footer-bottom p:first-child { font-weight: 700; font-family: 'Patrick Hand', cursive; font-size: 1.1rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; text-align: center; } .footer-social { justify-content: center; } .footer-contact li { justify-content: center; } }

/* ======================================== UTILITIES ======================================== */
.page { display: none; animation: fadeInPage 0.5s ease-out; }
.page.active { display: block; }
@keyframes fadeInPage { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.empty-state { text-align: center; padding: 3rem; color: #9CA3AF; }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; }

/* ======================================== TOAST ======================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: white;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    border-left: 4px solid #7C3AED;
    min-width: 300px;
}
.toast.success { border-left-color: #34D399; }
.toast.error { border-left-color: #EF4444; }
.toast.warning { border-left-color: #F59E0B; }
.toast.info { border-left-color: #60A5FA; }
.toast i { font-size: 1.25rem; }
.toast.success i { color: #34D399; }
.toast.error i { color: #EF4444; }
.toast.warning i { color: #F59E0B; }
.toast.info i { color: #60A5FA; }
.toast-title { font-weight: 700; font-size: 0.875rem; }
.toast-message { font-size: 0.8rem; color: #6B7280; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 768px) { .section-title { font-size: 1.8rem; } .stat-number { font-size: 1.8rem; } }

/* =======================================================
   PERBAIKAN TAMPILAN SEJARAH & MISI FINAL
   ======================================================= */

.profil-sejarah-text p, .visi-card p, .misi-card li, .berita-detail-content {
    text-align: justify !important;
    line-height: 1.8 !important;
}

/* 1. SEJARAH: Horizontal & Responsif */
.profil-sejarah {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
}
.profil-sejarah-image {
    order: -1 !important;
    width: 100%;
}
.profil-sejarah-image img {
    height: 400px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 20px !important;
}

/* 2. MISI: Hilangkan bintang, Sesuaikan spasi */
.misi-card li::before {
    content: none !important;
    display: none !important;
}
.misi-card li {
    display: block !important;
    margin-bottom: 12px !important;
    padding-left: 0 !important;
}
.misi-card ul {
    max-height: 400px !important; 
    overflow-y: auto !important;
    padding-right: 15px !important;
    display: block !important;
    list-style: none !important;
}
.misi-card ul::-webkit-scrollbar { width: 6px; }
.misi-card ul::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.misi-card ul::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.5); border-radius: 10px; }

/* 3. CARD BERITA AGAR RAPI (Sesuai Gambar 3) */
.berita-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}