/* --- RESET & VARIABLES --- */
:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --dark: #0f172a;
    --glass: rgba(15, 21, 53, 0.8); 
    --text: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }

/* === BODY === */
body {
    background: #0a0e27; 
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === BACKGROUND ANIMASI GRID === */
.background-grid {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    display: flex; justify-content: center; align-items: center;
    gap: 2px; flex-wrap: wrap; overflow: hidden;
    z-index: -10; 
}
.background-grid::before {
    content: ''; position: absolute; width: 100%; height: 100%;
    background: linear-gradient(#0a0e27, #00d4ff, #0099ff, #0a0e27);
    animation: animateGrid 6s linear infinite;
    z-index: 1; 
}
@keyframes animateGrid { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

.background-grid span {
    position: relative; display: block;
    width: calc(6.25vw - 2px); height: calc(6.25vw - 2px);
    background: #0f1535; z-index: 2; transition: 1.5s;
}
.background-grid span:hover { background: linear-gradient(135deg, #00d4ff, #0099ff); transition: 0s; }
@media (max-width: 900px) { .background-grid span { width: calc(10vw - 2px); height: calc(10vw - 2px); } }
@media (max-width: 600px) { .background-grid span { width: calc(20vw - 2px); height: calc(20vw - 2px); } }

/* --- UTILITIES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; position: relative; z-index: 10; }

h2 {
    text-align: center; font-size: 3rem; margin-bottom: 2.5rem; font-weight: 800;
    background: linear-gradient(to right, #ffffff 0%, #4facfe 50%, #00f2fe 100%);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-transform: uppercase; letter-spacing: 3px;
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.9));
}

/* --- HEADER & HERO --- */
header {
    height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; text-align: center; overflow: hidden; z-index: 10;
    border-bottom: 4px solid #00d4ff;
    box-shadow: 0 10px 30px -10px rgba(0, 212, 255, 0.6);
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: brightness(0.4); z-index: -1; 
    transition: background-image 1s ease-in-out; 
}
.zoom-effect { animation: zoomBg 20s infinite alternate; }
@keyframes zoomBg { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }

.class-profile { display: flex; flex-direction: column; align-items: center; gap: 15px; z-index: 2; }
.admin-photo {
    width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--secondary);
    object-fit: cover; box-shadow: 0 0 30px rgba(37, 117, 252, 0.6);
    background-image: url('assets/foto-kelas.png'); background-size: cover;
}
.class-name { font-size: 4rem; font-weight: 800; text-shadow: 0 10px 20px rgba(0,0,0,0.5); }

/* --- Scroll Down Button --- */
.scroll-down { 
    margin-top: 50px; 
    animation: bounce 2s infinite; 
    font-size: 1.5rem; 
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    text-decoration: none;
    z-index: 100;
}
.scroll-down:hover {
    color: #ffffff;
}
@keyframes bounce { 0%, 100% {transform: translateY(0);} 50% {transform: translateY(-10px);} }

/* --- WALI KELAS SECTION --- */
.teacher-section { padding: 80px 20px 20px 20px; background: transparent; position: relative; z-index: 10; }
.teacher-wrapper { display: flex; justify-content: center; }
.teacher-card {
    max-width: 350px; width: 100%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(106, 17, 203, 0.4);
    background: var(--glass);
    backdrop-filter: blur(5px);
}
.teacher-card img {
    width: 150px; height: 150px; border-radius: 50%;
    object-fit: cover; margin-bottom: 15px; border: 4px solid #fff;
}
.teacher-card p { font-size: 0.9rem; color: #ccc; }

/* --- STUDENTS SECTION --- */
.students-section { padding: 100px 20px; background: transparent; position: relative; z-index: 10; }
.grid-students { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }

.card {
    background: var(--glass); backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px; padding: 20px;
    text-align: center; transition: all 0.4s ease; position: relative; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.card:hover { transform: translateY(-10px); background: rgba(15, 21, 53, 0.9); border-color: var(--secondary); }

.profile-link { display: inline-block; cursor: pointer; }
.profile-link img {
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
    margin-bottom: 15px; border: 3px solid transparent; transition: 0.3s;
}
.card:hover .profile-link img { border-color: #fff; transform: scale(1.1); }

.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.ig-btn {
    display: inline-block; padding: 8px 20px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white; text-decoration: none; border-radius: 30px; font-size: 0.9rem; transition: 0.3s;
}
.ig-btn:hover { transform: scale(1.1); box-shadow: 0 0 15px #dc2743; }

/* --- MOMENTS SECTION --- */
.moments-section { padding: 100px 20px; position: relative; z-index: 10; }
.grid-moments { columns: 4 200px; gap: 20px; }
.moment-item {
    margin-bottom: 20px; break-inside: avoid; border-radius: 15px; overflow: hidden;
    position: relative; cursor: pointer; transition: transform 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.2);
}
.moment-item:hover { transform: scale(1.02); }
.moment-item img { width: 100%; display: block; transition: transform 0.5s ease; }
.overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); opacity: 0; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.moment-item:hover .overlay { opacity: 1; }

/* --- LIGHTBOX (POPUP FOTO & TEXT) --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
    padding: 20px;
}
.lightbox.active { display: flex; opacity: 1; }

.lightbox-content {
    display: flex; flex-direction: column; 
    align-items: center; text-align: center;
    max-width: 90%;
}

.lightbox img {
    max-width: 90vw; max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2); 
    transform: scale(0.8); transition: transform 0.3s;
    margin-bottom: 20px;
}
.lightbox.active img { transform: scale(1); }

/* CSS PESAN */
.lightbox-caption {
    color: #fff;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 500;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 15px;
    border-left: 4px solid #00d4ff;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.5s ease 0.3s forwards;
    opacity: 0; transform: translateY(20px);
}

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.close-lightbox {
    position: absolute; top: 20px; right: 30px; color: white;
    font-size: 40px; cursor: pointer; z-index: 1001;
}

/* --- FOOTER & BUTTON --- */
footer { padding: 50px; text-align: center; background: rgba(10, 14, 39, 0.9); border-top: 1px solid rgba(255,255,255,0.1); position: relative; z-index: 10; }
.footer-cta p { margin-bottom: 15px; font-size: 1.1rem; color: #ddd; }
.btn-class-ig {
    display: inline-block; padding: 12px 30px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white; text-decoration: none; border-radius: 50px;
    font-size: 1.2rem; font-weight: bold; transition: 0.3s;
    box-shadow: 0 5px 20px rgba(220, 39, 67, 0.4);
}
.btn-class-ig:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 10px 30px rgba(220, 39, 67, 0.6); }

/* --- TOMBOL MUSIK --- */
.music-btn {
    position: fixed; bottom: 20px; left: 20px; width: 50px; height: 50px;
    background: #00d4ff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 9999; box-shadow: 0 0 15px rgba(255,255,255,0.5); border: 2px solid white;
    transition: 0.3s; animation: pulseMusic 2s infinite;
}
.music-btn:hover { transform: scale(1.1); background: #0099ff; }
.music-btn i { color: white; font-size: 20px; }
@keyframes pulseMusic {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

/* === CSS UNTUK HAPPY GRADUATION === */
.graduation-section { 
    padding: 100px 20px; 
    position: relative; 
    z-index: 10; 
}
.grid-graduation { 
    columns: 4 200px; 
    gap: 20px; 
}
.grid-graduation .moment-item {
    margin-bottom: 20px; break-inside: avoid; border-radius: 15px; overflow: hidden;
    position: relative; cursor: pointer; transition: transform 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.2);
}
.grid-graduation .moment-item:hover { transform: scale(1.02); }
.grid-graduation .moment-item img { width: 100%; display: block; }
.grid-graduation .moment-item:hover .overlay { opacity: 1; }

@media (max-width: 768px) { 
    .class-name { font-size: 2.5rem; } 
    .grid-moments, .grid-graduation { columns: 2 150px; } 
}