.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.fade-in-up.muncul {
    opacity: 1;
    transform: translateY(0);
}

.hero-guru {
    background: linear-gradient(135deg, #0f766e 0%, #064e3b 100%);
    padding: 160px 20px 80px; 
    text-align: center;
    color: white;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}

.hero-guru h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 15px; }
.hero-guru p { font-size: 1.1rem; opacity: 0.9; }

.container-guru {
    max-width: 1200px;
    margin: 50px auto 80px; 
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.grid-guru { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 30px; 
}

.card-guru { 
    background-color: #ffffff; 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.06); 
    transition: all 0.4s ease;
    border: 1px solid #f1f5f9;
    text-align: center;
    padding-bottom: 25px;
}

.card-guru:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(15, 118, 110, 0.12); 
    border-color: #ccfbf1;
}

.card-guru-header {
    background: #f8fafc;
    padding: 30px 20px 0;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
}

.foto-guru {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    margin-bottom: -30px;
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.card-guru:hover .foto-guru {
    transform: scale(1.08) rotate(3deg);
}

/* BAGIAN TEKS */
.card-guru-body {
    padding: 40px 20px 10px; /* Padding atas besar karena fotonya turun ke bawah */
}

.nama-guru {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.badge-jabatan {
    display: inline-block;
    background: #ccfbf1;
    color: #0f766e;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.info-mapel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 15px;
    margin-top: 10px;
}

.info-mapel i {
    color: #0f766e;
}

/* =====================
   LAYOUT VIP KEPALA SEKOLAH
===================== */
.kepsek-container {
    max-width: 900px;
    margin: 0 auto 50px auto; /* Posisi di tengah, punya jarak ke bawah */
}

.kepsek-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(15, 118, 110, 0.12);
    border: 1px solid #ccfbf1;
    gap: 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.kepsek-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(15, 118, 110, 0.2);
}

/* Lingkaran dekorasi di pojok kartu */
.kepsek-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: rgba(15, 118, 110, 0.04);
    border-radius: 50%;
    z-index: 1;
}

.kepsek-image {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.kepsek-image img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid #ffffff;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.kepsek-info {
    z-index: 2;
}

.badge-kepsek {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f766e;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(15, 118, 110, 0.3);
}

.badge-kepsek i {
    color: #fde047; /* Bintang warna kuning emas */
}

.kepsek-info h2 {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 700;
}

.kepsek-quote {
    font-size: 1.1rem;
    color: #475569;
    font-style: italic;
    margin-bottom: 25px;
    line-height: 1.6;
    border-left: 4px solid #14b8a6;
    padding-left: 18px;
}

.kepsek-contact {
    color: #0f766e;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================
   GARIS PEMISAH ESTETIS
===================== */
.divider-guru {
    text-align: center;
    position: relative;
    margin: 70px 0 50px;
}

.divider-guru::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.divider-guru span {
    background: #f8fafc; /* Sama dengan warna body */
    padding: 0 25px;
    color: #0f766e;
    font-weight: 700;
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
}

/* =====================
   RESPONSIVE KEPSEK (HP)
===================== */
@media (max-width: 768px) {
    .kepsek-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }
    .kepsek-quote {
        border-left: none;
        padding-left: 0;
    }
    .kepsek-contact {
        justify-content: center;
    }
    .divider-guru span {
        font-size: 1rem;
        padding: 0 15px;
    }
}

/* =====================
   TOMBOL LIHAT DETAIL
===================== */
.btn-detail {
    display: block;
    width: 100%;
    margin-top: 15px;
    background-color: #f8fafc;
    color: #0f766e;
    border: 1px solid #ccfbf1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    background-color: #0f766e;
    color: #ffffff;
    border-color: #0f766e;
    box-shadow: 0 5px 15px rgba(15, 118, 110, 0.2);
}

/* Hilangkan style info mapel lama di card jika masih ada */
.info-mapel { display: none; }

/* =====================
   MODAL POP-UP ANIMASI
===================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Efek gelap di belakang */
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%; max-width: 650px;
    display: flex; position: relative;
    /* Animasi muncul dari bawah membesar */
    transform: scale(0.8) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    overflow: hidden;
}

.modal-overlay.show .modal-content { transform: scale(1) translateY(0); }

.modal-close {
    position: absolute; top: 15px; right: 15px;
    background: #ffffff; border: 1px solid #e2e8f0;
    border-radius: 50%; width: 32px; height: 32px;
    font-size: 1.2rem; cursor: pointer; color: #64748b;
    display: flex; justify-content: center; align-items: center;
    z-index: 10; transition: 0.2s;
}

.modal-close:hover { background: #fee2e2; color: #ef4444; border-color: #fecaca; }

/* MODAL: SISI KIRI (INFO) */
.modal-left { flex: 1; padding: 40px 30px; border-right: 1px solid #f1f5f9; }
.modal-header-info { display: flex; align-items: center; gap: 15px; }
.modal-avatar { width: 65px; height: 65px; border-radius: 50%; object-fit: cover; border: 3px solid #eff6ff; }
.modal-header-info h3 { font-size: 1.2rem; color: #1e293b; margin: 0 0 5px 0; font-weight: 700; }
.modal-badge { font-size: 0.85rem; color: #2563eb; font-weight: 600; margin: 0; }

.modal-divider { border: 0; height: 1px; background: #e2e8f0; margin: 25px 0; }
.modal-section-title { font-size: 0.8rem; color: #64748b; letter-spacing: 1px; margin-bottom: 15px; font-weight: 600;}

.modal-table { width: 100%; border-collapse: collapse; }
.modal-table td { padding: 8px 0; font-size: 0.95rem; color: #334155; }
.modal-table td:first-child { color: #64748b; width: 45%; }
.text-green { color: #10b981 !important; font-weight: 600; }

/* MODAL: SISI KANAN (FOTO) */
.modal-right {
    width: 260px; background: #f8fafc;
    padding: 30px 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.modal-foto-besar {
    width: 160px; height: 210px; object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); margin-bottom: 20px;
}
.status-badge-bottom {
    background: #d1fae5; color: #047857;
    padding: 6px 20px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 600;
}

/* RESPONSIVE MODAL HP */
@media (max-width: 640px) {
    .modal-content { flex-direction: column; }
    .modal-right { width: 100%; border-top: 1px solid #e2e8f0; }
}