/* --- Gaya Dasar --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Membuat animasi perpindahan halaman menjadi mulus */
    overflow-x: hidden;
}

body {
    background-color: #000;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* JANGAN gunakan overflow: hidden di sini, karena akan mengunci scroll vertikal! */
}

/* Wadah Konten Agar Rapi di Tengah */
.container {
    width: 95%; /* Diubah agar lebih melebar hampir menyentuh ujung layar */
    max-width: none; /* Batas 1200px dihapus agar logo dan menu bisa mentok ke ujung */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Gaya Header (Navigasi) --- */
header {
    background-color: #000; /* Hitam solid */
    color: #fff;
    padding: 16px 0; /* Dari 1rem menjadi 16px */
    position: fixed; /* Header tetap di atas saat di-scroll */
    top: 0;
    width: 100%;
    z-index: 1000; /* Agar selalu di atas elemen lain */
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo .main-text {
    color: #ed1c24; /* Merah menyala */
    font-size: 24px; /* Dari 1.5rem menjadi 24px */
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .sub-text {
    color: #fff;
    font-size: 13px; /* Dari 0.8rem menjadi 13px */
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px; /* Dari 5rem menjadi 80px */
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px; /* Dari 0.9rem menjadi 14px */
    transition: color 0.3s ease; /* Efek transisi saat di-hover */
}

/* Efek Hover di Menu */
nav a:hover {
    color: #ed1c24; /* Merah saat kursor di atasnya */
}

/* --- Gaya Bagian Hero (Latar Foto) --- */
.hero {
    height: 100vh; /* Full tinggi layar */
    position: relative;
    background-image: url('Assets/FotoSekelas/hero.jpeg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efek Parallax sederhana */
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px; /* Jarak untuk header yang fixed */
}

/* Overlay Gelap di Atas Foto */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradien agar teks lebih mudah dibaca */
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.5), rgba(0,0,0,0.85));
    z-index: 1;
}

/* Konten Teks di Atas Overlay */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    transform: translateY(-60px); /* Menggeser seluruh blok teks agak ke atas */
}

.welcome-text {
    font-family: 'Gagalin', 'Poppins', cursive;
    font-size: 24px; /* Diperbesar dari asalnya 17.6px (1.1rem) */
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: -5px; /* Dibuat 0 agar rapat dengan judul merah di bawahnya */
}

.main-title {
    font-family: 'Gagalin', 'Poppins', cursive; 
    font-size: 110px; /* Diperbesar signifikan dari asalnya 80px (5rem) */
    font-weight: 700;
    color: #f10911; 
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1; /* Merapatkan tinggi baris bawaan font */
    margin-bottom: 0; /* Dibuat 0 agar rapat dengan teks di bawahnya */
    text-shadow: 5px 5px 6px rgba(0,0,0,0.4);
}

.subtitle {
    font-family: 'Gagalin', 'Poppins', cursive;
    font-size: 32px; /* Diperbesar dari asalnya 24px (1.5rem) */
    font-weight: 400;
    letter-spacing: 1.5px;
    margin-top: -5px; /* Menarik teks ini sedikit ke atas mendekati judul merah */
}

/* --- Styling Section Tentang Enchanteed --- */
.tentang-section {
    padding: 90px 20px;
    background-color: #050505;
    color: #fff;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 38px;
    color: #fff;
    letter-spacing: 2px;
}

.header-line {
    width: 120px; /* Panjang garis merah */
    height: 6px; /* Ketebalan garis merah */
    background-color: #ed1c24;
    margin: 0 auto 20px auto; /* Posisikan otomatis di tengah */
}

.tentang-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
    max-width: 1250px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.t-card {
    background: #0d0d0d;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.t-card:hover {
    border-color: #ed1c24;
    box-shadow: 0 10px 30px rgba(237, 28, 36, 0.12);
    transform: translateY(-5px);
}

/* Kartu Profil (Wali Kelas & Kepala Sekolah) */
.wali-card, .kepsek-card {
    width: 260px;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 18px;
}

.t-img-box {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #121212;
}

.t-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.t-card:hover .t-img-box img {
    transform: scale(1.05);
}

.t-details {
    padding-top: 15px;
}

.t-role {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ed1c24;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.t-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

/* Kartu Utama Sekolah di Tengah */
.school-main-card {
    width: 520px;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #0d0d0d;
}

.school-header-box {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #1f1f1f;
}

.school-header-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.school-content-box h3 {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.school-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13.5px;
    color: #bbb;
}

.school-meta p {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #161616;
    padding-bottom: 8px;
    margin: 0;
}

.school-meta span {
    font-weight: 600;
    color: #ed1c24;
    min-width: 65px;
    text-align: left;
}

.school-meta a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.school-meta a:hover {
    color: #ed1c24;
    text-decoration: underline;
}

/* --- Gaya Bagian Media Sosial --- */
.social-media {
    background-color: #000;
    padding: 100px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Efek pendaran cahaya merah samar di latar belakang */
.social-media::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 350px;
    background: radial-gradient(circle, rgba(237, 28, 36, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* Memodifikasi container khusus section ini agar menumpuk ke bawah (vertikal) */
.section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* --- Gaya Judul Section --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.red-line {
    width: 100px;
    height: 5px;
    background-color: #ed1c24;
    margin: 0 auto 20px auto;
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(237, 28, 36, 0.6); /* Garis merah jadi sedikit bercahaya */
}

.section-header p {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #aaa;
}

/* --- Gaya Wadah Kartu --- */
.cards-wrapper {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
}

/* --- Gaya Masing-Masing Kartu --- */
.card {
    background: linear-gradient(145deg, #151515, #0d0d0d); /* Gradien halus agar tidak flat */
    border: 1px solid rgba(255, 255, 255, 0.06); /* Border tipis elegan */
    border-radius: 24px;
    padding: 45px 30px;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

/* Garis aksen merah tipis di atas kartu yang muncul saat di-hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ed1c24;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-10px); /* Kartu naik lebih berasa */
    border-color: rgba(237, 28, 36, 0.4);
    box-shadow: 0 20px 45px rgba(237, 28, 36, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 75px;
    height: 75px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1); /* Ikon membesar interaktif saat kursor mendekat */
}

.card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.card p {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 35px;
    color: #b0b0b0;
    line-height: 1.5;
}

/* --- Gaya Tombol Merah --- */
.btn-red {
    background-color: #ed1c24;
    color: #fff;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 5px 15px rgba(237, 28, 36, 0.3);
    transition: all 0.3s ease;
}

/* Efek saat tombol disentuh kursor (hover) */
.btn-red:hover {
    background-color: #ff232a; /* Merah menyala */
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(237, 28, 36, 0.5); /* Efek tombol bercahaya */
}

/* --- Gaya Bagian Struktur Kelas (Luas, Elegan, & Longgar) --- */
.struktur-kelas {
    background-color: #000;
    padding: 120px 0; /* Ruang atas dan bawah diperbesar agar tidak sesak */
    color: #fff;
}

.org-wrapper {
    width: 100%;
    overflow-x: auto; /* Aman untuk digeser jika dibuka di layar kecil */
    padding-bottom: 20px;
}

.org-chart {
    --box-w: 220px; /* Kotak dibuat lebih lebar */
    --gap: 70px; /* Jarak antar kotak tetap agar garis panjang */
    --center-dist: calc(var(--box-w) + var(--gap));
    
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 940px;
    margin: 0 auto;
}

/* --- Gaya Judul Section --- */
.struktur-kelas .section-header {
    margin-bottom: 60px; /* Jarak judul ke bagan lebih longgar */
}

.struktur-kelas .section-header h2 {
    font-size: 48px;
    margin-bottom: 12px;
}

.struktur-kelas .red-line {
    width: 120px;
    height: 6px;
}

/* --- Gaya Kotak (Cards) --- */
.org-row {
    display: flex;
    justify-content: center;
    gap: var(--gap);
    width: 100%;
    position: relative;
}

.org-box {
    width: var(--box-w);
    background-color: #ed1c24;
    color: #fff;
    border-radius: 30px;
    padding: 10px 12px;
    min-height: 10px;
    text-align: center;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

.org-box h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.org-box span {
    font-size: 13px;
    font-weight: 700;
}

/* Khusus kotak Anggota */
.anggota-box {
    width: 220px;
    border-radius: 30px;
    padding: 12px 10px;
    min-height: 10px;
}
.anggota-box h4 {
    font-size: 20px;
    margin-bottom: 0;
}

/* Kotak tembus pandang */
.spacer-box {
    width: var(--box-w);
    position: relative;
    display: flex;
    justify-content: center;
}
.spacer-box::after {
    content: '';
    width: 2px;
    height: 100%;
    background-color: #fff;
}


/* --- Gaya Garis Penyambung (Ditinggikan Jaraknya) --- */

.org-conn-vert {
    width: 2px;
    height: 120px; /* Jarak vertikal antar baris diperpanjang */
    background-color: #fff;
}

.line-row2 {
    position: absolute;
    top: calc(50% - 1px);
    left: calc(50% - var(--center-dist));
    width: calc(var(--center-dist) * 2);
    height: 2px;
    background-color: #fff;
    z-index: 1;
}

.org-conn-fork {
    position: relative;
    width: 100%;
    height: 90px; /* Tinggi cabang diperpanjang */
}
.fork-center {
    position: absolute;
    left: calc(50% - 1px);
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #fff;
}
.fork-branch {
    position: absolute;
    top: 50%;
    left: calc(50% - var(--center-dist));
    width: calc(var(--center-dist) * 2);
    height: 2px;
    background-color: #fff;
}
.fork-drop.left {
    position: absolute;
    left: calc(50% - var(--center-dist) - 1px);
    top: 50%;
    bottom: 0;
    width: 2px;
    background-color: #fff;
}
.fork-drop.right {
    position: absolute;
    right: calc(50% - var(--center-dist) - 1px);
    top: 50%;
    bottom: 0;
    width: 2px;
    background-color: #fff;
}

.org-conn-3drop {
    position: relative;
    width: 100%;
    height: 90px; /* Tinggi cabang diperpanjang */
}
.org-conn-3drop .drop {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #fff;
}
.org-conn-3drop .left { left: calc(50% - var(--center-dist) - 1px); }
.org-conn-3drop .center { left: calc(50% - 1px); }
.org-conn-3drop .right { right: calc(50% - var(--center-dist) - 1px); }

/* --- Gaya Bagian Anggota Kelas (Coverflow Carousel) --- */
.anggota-kelas {
    background-color: #000;
    min-height: 100vh;
    padding: 100px 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.anggota-kelas .section-header {
    margin-bottom: 20px;
    text-align: center;
}

.anggota-kelas .section-header h2 {
    font-size: 48px;
    margin-bottom: 12px;
}

.anggota-kelas .red-line {
    width: 120px;
    height: 6px;
    margin: 0 auto;
    background-color: #ed1c24;
}

/* Wadah Utama Carousel */
.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto 10px auto;
    gap: 20px;
}

.carousel-track-container {
    overflow: visible;
    width: 100%;
    height: 440px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

/* --- Gaya Kartu ID Card (Potrait) --- */
.id-card {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 20px;
    overflow: hidden;
    background-color: #ed1c24;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.id-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Posisi & Ukuran Bertingkat (Coverflow Effect) */
.id-card.active {
    width: 240px;
    height: 360px;
    z-index: 5;
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: brightness(1);
}

.id-card.prev-1 {
    width: 200px;
    height: 300px;
    z-index: 4;
    transform: translateX(-220px) scale(0.9);
    opacity: 0.75;
    filter: brightness(0.8);
}

.id-card.next-1 {
    width: 200px;
    height: 300px;
    z-index: 4;
    transform: translateX(220px) scale(0.9);
    opacity: 0.75;
    filter: brightness(0.8);
}

.id-card.prev-2 {
    width: 160px;
    height: 240px;
    z-index: 3;
    transform: translateX(-410px) scale(0.8);
    opacity: 0.4;
    filter: brightness(0.5);
}

.id-card.next-2 {
    width: 160px;
    height: 240px;
    z-index: 3;
    transform: translateX(410px) scale(0.8);
    opacity: 0.4;
    filter: brightness(0.5);
}

/* Kartu di luar jangkauan pandangan disembunyikan */
.id-card.hide {
    transform: translateX(0) scale(0.5);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Tombol Panah Kiri & Kanan --- */
.carousel-btn {
    background-color: #ed1c24;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.carousel-btn:hover {
    background-color: #c4151c;
    transform: scale(1.1);
}

/* Indikator Angka (Contoh: 1 / 39) */
.carousel-indicator {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 10px;
    color: #fff;
}

/* --- Gaya Bagian Galeri Kelas --- */
.galeri-kelas {
    background-color: #000;
    min-height: 100vh;
    padding: 100px 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.galeri-kelas .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.galeri-kelas .section-header h2 {
    font-size: 48px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.galeri-kelas .red-line {
    width: 120px;
    height: 6px;
    background-color: #ed1c24;
    margin: 0 auto;
}

/* --- Grid Foto (2 Baris x 3 Kolom) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Kolom */
    grid-template-rows: repeat(2, 1fr);     /* 2 Baris (Total 6 foto per halaman) */
    gap: 30px; /* Jarak antar kartu */
    max-width: 1100px;
    width: 100%;
    margin: 0 auto 40px auto;
}

/* --- Gaya Kartu Foto Lanskap --- */
.gallery-card {
    background-color: #ed1c24; /* Warna dasar merah jika gambar belum dimuat */
    border-radius: 20px; /* Sudut membulat sesuai desain */
    overflow: hidden;
    height: 220px; /* Tinggi proporsional untuk lanskap */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan foto pas memenuhi kotak tanpa gepeng */
    transition: transform 0.4s ease;
}

/* Efek saat kursor menyentuh foto (Zoom halus) */
.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(237, 28, 36, 0.4);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* --- Navigasi Halaman (Pagination) --- */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.page-btn {
    background-color: #1a1a1a;
    color: #fff;
    border: 2px solid #333;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: #ed1c24;
    border-color: #ed1c24;
}

/* Tombol Halaman yang Sedang Aktif */
.page-btn.active {
    background-color: #ed1c24;
    border-color: #ed1c24;
    box-shadow: 0 4px 12px rgba(237, 28, 36, 0.5);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* --- Gaya Lightbox Modal Galeri --- */
.modal {
    display: none; /* Sembunyikan secara default */
    position: fixed;
    z-index: 3000; /* Paling atas di atas segalanya */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Hitam pekat transparan */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 85%;
    max-height: 85vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s ease;
}

/* Tombol Silang (Close) */
.close-modal {
    position: absolute;
    top: 25px;
    right: 40px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #ed1c24; /* Berubah jadi merah saat disentuh kursor */
}

/* Animasi Muncul */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

/* --- Gaya Footer --- */
.site-footer {
    background-color: #000;
    color: #fff;
    padding: 80px 0 30px 0;
    border-top: 2px solid #1a1a1a;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-col h3 {
    font-size: 28px;
    color: #ed1c24;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-quote {
    font-size: 14px;
    line-height: 1.6;
    color: #aaa;
    font-style: italic;
    max-width: 480px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #ed1c24;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ed1c24;
}

.footer-divider {
    border: none;
    height: 1px;
    background-color: #222;
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #777;
}

/* ========================================= */
/* --- RESPONSIVE MOBILE (Layar HP < 768px) --- */
/* ========================================= */

@media (max-width: 768px) {
    /* =========================================
       1. JUDUL & NAVIGASI MOBILE
       ========================================= */
    section h2, .section-title { 
        font-size: 22px !important; 
        margin-bottom: 20px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001; 
    }
    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: #fff;
        transition: 0.3s ease;
        border-radius: 2px;
    }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    nav {
        position: absolute;
        top: 100%;
        right: -100%; 
        width: 100%;
        background-color: #111; 
        transition: right 0.4s ease;
        border-bottom: 2px solid #ed1c24;
    }
    nav.active { right: 0; }
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        text-align: center;
    }
    nav ul li { margin-bottom: 15px; }

    /* =========================================
       2. HERO SECTION
       ========================================= */
    .hero {
        background-image: none; 
        background: radial-gradient(circle at center, #3a0a0d 0%, #000000 80%) !important;
        position: relative;
        overflow: hidden;
    }
    .hero::before {
        content: ''; position: absolute; top: -50px; left: -50px;
        width: 200px; height: 200px; border-radius: 50%;
        background: rgba(237, 28, 36, 0.2); filter: blur(50px);
    }
    .hero::after {
        content: ''; position: absolute; bottom: 10%; right: -20px;
        width: 150px; height: 150px; border-radius: 50%;
        background: rgba(237, 28, 36, 0.15); filter: blur(40px);
    }
    .hero-overlay { display: none; }
    .welcome-text { font-size: 18px; }
    .main-title { font-size: 55px; }
    .subtitle { font-size: 20px; }

    /* =========================================
       3. SECTION TENTANG (CARD INFORMASI SEKOLAH)
       ========================================= */
    .tentang-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .wali-card { order: 1; width: 100% !important; max-width: 320px; }
    .kepsek-card { order: 2; width: 100% !important; max-width: 320px; }
    .school-main-card { order: 3; width: 100% !important; max-width: 320px; }
    .t-img-box { height: 350px; }

    /* Memaksa Teks Info Sekolah Turun ke Bawah Judul Label */
    .school-main-card ul, 
    .school-main-card .info-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .school-main-card ul li, 
    .school-main-card .info-item,
    .school-main-card p {
        display: flex !important;
        flex-direction: column !important; /* Mengubah posisi jadi ATAS-BAWAH */
        align-items: flex-start !important;
        text-align: left !important;
        gap: 4px !important;
        width: 100% !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.15); /* Garis pemisah rapi */
        padding-bottom: 8px !important;
    }

    /* Judul Label (Alamat, Situs, dll) */
    .school-main-card ul li span:first-child,
    .school-main-card ul li strong,
    .school-main-card .info-label {
        display: block !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #ed1c24 !important; /* Akses merah */
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Isi Informasi / Link dibawah judul */
    .school-main-card ul li span:last-child,
    .school-main-card ul li a,
    .school-main-card .info-value {
        display: block !important;
        font-size: 14px !important;
        color: #ffffff !important;
        word-break: break-word; /* Mencegah link panjang merusak layar */
        line-height: 1.4 !important;
    }

    /* =========================================
       4. STRUKTUR KELAS (PAS LAYAR & BISA DISWIPE)
       ========================================= */
    .struktur-kelas {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 15px 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.org-chart {
    width: max-content !important;
    max-width: none !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    margin-left: auto !important;
    margin-right: auto !important;

    transform: scale(0.55) !important;
    transform-origin: top center !important;

    zoom: 1 !important;

    margin-top: 0 !important;
    margin-bottom: -190px !important;
}


/* =========================================
   BUBBLE
   ========================================= */

.org-box,
.anggota-box {
    padding: 10px 10px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
}


/* =========================================
   TEKS — DIBESARKAN
   ========================================= */

.org-box h4,
.anggota-box h4 {
    font-size: 14px !important;
    line-height: 1.25 !important;
    margin: 0 0 4px 0 !important;
    white-space: nowrap !important;
}

.org-box span,
.anggota-box span {
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
}

.org-chart {
    width: max-content !important;
    max-width: none !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    /* Hapus margin auto lama */
    margin-left: 0 !important;
    margin-right: 0 !important;

    /*
       Posisikan titik tengah struktur
       tepat di tengah layar HP
    */
    position: relative !important;
    left: 50% !important;

    transform: translateX(-50%) scale(0.40) !important;
    transform-origin: top center !important;

    zoom: 1 !important;

    margin-top: 0 !important;
    margin-bottom: -190px !important;

    gap: 5px !important;
}


    /* =========================================
       5. ANGGOTA KELAS (CAROUSEL SLIDER)
       ========================================= */
    .carousel-btn { display: none; }
    .carousel-track-container { 
        height: 350px; 
        touch-action: pan-y; 
    }
    .id-card.active { width: 180px; height: 270px; }
    .id-card.prev-1 { width: 140px; height: 210px; transform: translateX(-100px) scale(0.85) !important; }
    .id-card.next-1 { width: 140px; height: 210px; transform: translateX(100px) scale(0.85) !important; }
    .id-card.prev-2, .id-card.next-2 { display: none; } 

    /* =========================================
       6. GALERI (RASIO 1:1)
       ========================================= */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); 
        grid-template-rows: repeat(2, 1fr);  
        gap: 15px;
        padding: 0 15px;
    }
    .gallery-card {
        height: auto; 
        aspect-ratio: 1 / 1; 
    }

    /* =========================================
       7. TOMBOL HALAMAN / PAGINATION
       ========================================= */
    /* Mencegah tombol keluar layar dan memaksanya turun jika kepanjangan */
    .pagination, 
    .pagination-container, 
    .page-numbers, 
    .t-pagination {
        display: flex !important;
        flex-wrap: wrap !important; /* KUNCI: Biar sisa angka turun ke bawah, bukan tembus layar */
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 10px 15px !important;
        box-sizing: border-box !important;
    }

    /* Memperkecil ukuran tombol halamannya */
    .pagination button, 
    .pagination a, 
    .page-btn, 
    .page-item, 
    .t-pagination button {
        padding: 6px 10px !important;
        font-size: 12px !important;
        min-width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        margin: 0 !important;
    }

    .pagination button:nth-child(n+7) {
        display: none !important;
    }

    /* =========================================
       8. FOOTER (RAPI & HIRARKI TEKS TEGAS)
       ========================================= */
    footer, .footer {
        padding: 40px 20px 25px !important;
        background: #0a0a0a !important;
        border-top: 2px solid #ed1c24 !important;
        text-align: center !important;
    }

    .footer-container, .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
        align-items: center !important;
    }

    .footer-col {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    /* Judul Section Footer: Merah Tegas & Kapital */
    .footer-col h3, 
    .footer-col h4, 
    footer h3 {
        font-size: 18px !important;
        font-weight: 800 !important;
        color: #ed1c24 !important;
        margin-bottom: 8px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }

    /* Deskripsi / Subteks Footer: Abu-Abu Terang, Lebih Kecil */
    .footer-col p, 
    .footer-quote, 
    footer p,
    .footer-col span {
        font-size: 13px !important;
        color: #b0b0b0 !important; 
        font-weight: 400 !important;
        line-height: 1.6 !important;
        margin: 0 !important;
    }
}