/* Variabel Warna - Biru Denim Minimalis (Revisi Final & Rapi) */
:root {
    --primary-denim: #2C3E50;
    --denim-blue: #4682B4;
    --light-denim: #6A9ACF;
    --accent-gold: #FFD700;
    --light-gray: #F8F8F8;
    --medium-gray: #E0E0E0;
    --white: #FFFFFF;
    --text-dark: #222222;
    --text-light: #555555;
    --text-lighter: #888888;
    --border-color: #D3D3D3; /* Tambahan untuk border elemen form */
}

/* ------------------------------------ */
/* GENERAL STYLING */
/* ------------------------------------ */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    color: var(--text-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: 'Inter', sans-serif;
    color: var(--primary-denim);
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.3;
    font-weight: 600;
}

h2 {
    font-size: 2.6em;
    margin-top: 50px;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--denim-blue);
    border-radius: 0;
}

h3 {
    font-size: 1.7em;
    font-weight: 500;
}

p {
    margin-bottom: 18px;
    color: var(--text-light);
}

.section-spacing {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-gray);
}

.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--denim-blue);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.05em;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: #3a70a0;
    transform: translateY(-2px);
}

/* Tombol PPDB di navigasi */
.btn-nav {
    padding: 8px 18px;
    font-size: 0.9em;
    border-radius: 5px;
    background-color: var(--accent-gold);
    color: var(--primary-denim);
    white-space: nowrap; /* Mencegah teks PPDB pecah */
}

.btn-nav:hover {
    background-color: #e6c200;
    color: var(--primary-denim);
}

/* Styles for active/focus states of buttons */
.btn:active,
.btn:focus {
    background-color: #2a5f8e; /* Warna sedikit lebih gelap dari denim-blue */
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    outline: none; /* Hapus outline browser */
    -webkit-tap-highlight-color: transparent; /* Hapus highlight di mobile */
}

.ppdb-btn:active,
.ppdb-btn:focus {
    background-color: #d1b300; /* Warna sedikit lebih gelap dari accent-gold */
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    color: var(--primary-denim); /* Pastikan teks tetap gelap */
    outline: none; /* Hapus outline browser */
    -webkit-tap-highlight-color: transparent; /* Hapus highlight di mobile */
}


/* ------------------------------------ */
/* HEADER STYLING */
/* ------------------------------------ */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-denim);
    color: #E0E0E0;
    padding: 10px 25px;
    font-size: 0.85em;
    flex-wrap: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-top .contact-info span {
    margin-right: 25px;
    white-space: nowrap;
}

.header-top .contact-info i {
    margin-right: 8px;
    color: var(--accent-gold);
}

.header-top .social-links a {
    color: #E0E0E0;
    margin-left: 18px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.header-top .social-links a:hover {
    color: var(--accent-gold);
}

.main-header {
    background-color: var(--primary-denim);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 55px;
    width: 55px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--accent-gold);
}

.logo-text h1 {
    margin: 0;
    color: var(--white);
    font-size: 1.6em;
    text-align: left;
    font-weight: 700;
    line-height: 1.2;
}

.logo-text p {
    margin: 0;
    font-size: 0.8em;
    color: #ccc;
    text-align: left;
}

/* Sembunyikan ikon menu hamburger secara default (untuk desktop) */
.menu-icon {
    display: none;
    color: var(--white);
    font-size: 2em;
    cursor: pointer;
}

/* Sembunyikan checkbox menu-toggle */
#menu-toggle {
    display: none;
}

/* Gaya navigasi utama untuk desktop */
.main-nav .nav-links { /* TARGET KELAS 'nav-links' */
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Tampilkan sebagai flexbox horizontal */
    align-items: center;
}

.main-nav .nav-links li {
    position: relative;
    margin-left: 30px;
}

.main-nav .nav-links li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease; /* Transisi yang benar */
    font-size: 1em;
}

.main-nav .nav-links li a:hover {
    color: var(--accent-gold);
}

/* Gaya dropdown menu untuk desktop */
.dropdown-content {
    display: none; /* Sembunyikan secara default */
    position: absolute;
    background-color: var(--primary-denim); /* Background sama dengan header */
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1; /* Pastikan di atas konten lain */
    border-top: 3px solid var(--denim-blue);
    border-radius: 0 0 5px 5px;
    list-style: none;
    padding: 5px 0;
    opacity: 0; /* Untuk transisi fade-in */
    visibility: hidden; /* Untuk transisi fade-in */
    transform: translateY(10px); /* Untuk transisi geser */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* Tampilkan dropdown saat hover di desktop */
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content li a {
    color: var(--white);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    white-space: nowrap;
    font-size: 0.95em;
}

.dropdown-content li a:hover {
    background-color: #3a4f63;
    color: var(--accent-gold);
}


/* ------------------------------------ */
/* HERO SLIDER */
/* ------------------------------------ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background-color: var(--primary-denim);
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.active {
    opacity: 1;
}

/* Specific background images for slider items */
/* Pastikan ini mengarah ke URL gambar Anda yang benar */
.slider-item:nth-child(1) { background-image: url('https://raw.githubusercontent.com/ridhopryg/Madrasah-aliyah1/main/images/Gedung%20sekolah%201.jpeg'); }
.slider-item:nth-child(2) { background-image: url('https://raw.githubusercontent.com/ridhopryg/Madrasah-aliyah1/main/images/Gedung%20sekolah%202.jpeg'); }
.slider-item:nth-child(3) { background-image: url('https://raw.githubusercontent.com/ridhopryg/Madrasah-aliyah1/main/images/Gedung%20sekolah%203.jpeg'); }
/* Tambahkan lebih banyak jika ada */


.slider-content {
    text-align: center;
    color: var(--white);
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    max-width: 900px;
}

.slider-content h2 {
    color: var(--white);
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.slider-content p {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: #eee;
}

.hero-btn {
    font-size: 1.2em;
    padding: 18px 40px;
    background-color: var(--accent-gold);
    color: var(--primary-denim);
    font-weight: 600;
}

.hero-btn:hover {
    background-color: #e6c200;
    color: var(--primary-denim);
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dot {
    width: 14px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: var(--accent-gold);
}

/* ------------------------------------ */
/* ANNOUNCEMENT TICKER */
/* ------------------------------------ */
.announcements-section {
    background-color: var(--denim-blue);
    color: var(--white);
    padding: 15px 0;
    overflow: hidden; /* Keep this to contain the scrolling text */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.announcement-ticker {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Keep for the label, but .ticker-content will manage its items */
    gap: 20px; /* Add some gap between label and content */
}

.ticker-label {
    font-weight: 600;
    /* margin-right: 20px; */ /* Removed, using gap now */
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.05em;
    flex-shrink: 0; /* Prevents label from shrinking */
}

.ticker-label .fas {
    margin-right: 8px; /* Added margin for icon */
    color: var(--accent-gold); /* Ensure icon color is consistent */
}

.ticker-content {
    position: relative; /* Essential for positioning absolute children */
    height: 1.8em; /* Ensure enough height for one line of text */
    overflow: hidden; /* Hide anything outside this box */
    flex-grow: 1; /* Allow content to take up available space */
}

.ticker-content .ticker-item {
    position: absolute; /* Crucial for overlapping items */
    top: 0;
    left: 0;
    width: 100%;
    white-space: nowrap; /* Keep text on one line */
    opacity: 0; /* Hidden by default */
    visibility: hidden; /* Also hide from screen readers/interaction */
    transition: opacity 0.7s ease-in-out, visibility 0.7s ease-in-out; /* Smooth fade transition */
    text-overflow: ellipsis; /* Add ellipsis for long text */
    overflow: hidden; /* Hide overflowing text */
}

.ticker-content .ticker-item.active {
    opacity: 1; /* Fully visible when active */
    visibility: visible; /* Make visible */
    position: relative; /* Switch to relative to occupy space in the document flow once active */
}
/* ------------------------------------ */
/* ABOUT US SECTION */
/* ------------------------------------ */
.about-us {
    background-color: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
    flex-wrap: nowrap;
    justify-content: center;
}

.about-image {
    width: 48%;
    max-width: 550px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.about-image:hover {
    transform: translateY(-5px);
}

.about-text {
    width: 52%;
    text-align: left;
}

.about-text p {
    color: var(--text-light);
    font-size: 1.05em;
    margin-bottom: 25px;
}

/* .read-more-btn tidak lagi digunakan untuk bagian ini */


/* ------------------------------------ */
/* PROGRAMS SECTION */
/* ------------------------------------ */
.programs {
    background-color: var(--light-gray);
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
    margin-top: 50px;
}

.program-item {
    background-color: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid var(--denim-blue);
}

.program-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.program-icon {
    font-size: 3.2em;
    color: var(--denim-blue);
    margin-bottom: 25px;
}

.program-item h3 {
    color: var(--primary-denim);
    margin-bottom: 12px;
    font-size: 1.7em;
    font-weight: 600;
}

.program-item p {
    color: var(--text-light);
    font-size: 0.98em;
}

/* ------------------------------------ */
/* NEWS & EVENTS SECTION */
/* ------------------------------------ */
.news-events {
    background-color: var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 50px;
}

.news-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.news-item h3 {
    color: var(--primary-denim);
    text-align: left;
    font-size: 1.5em;
    margin: 20px 25px 10px;
    font-weight: 600;
}

.news-item .date {
    font-size: 0.9em;
    color: var(--text-lighter);
    margin: 0 25px 15px;
    display: block;
}
.news-item .date i {
    margin-right: 8px;
    color: var(--denim-blue);
}

.news-item p {
    font-size: 0.98em;
    margin: 0 25px 25px;
    color: var(--text-light);
}

/* `read-more` hanya untuk news, bukan prestasi */
.news-item .read-more {
    color: var(--primary-denim);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0 25px 25px;
}

.news-item .read-more:hover {
    color: var(--denim-blue);
}
.news-item .read-more i {
    margin-left: 8px;
}

/* Tombol lihat semua berita */
.view-more-news-btn { /* Mengganti dari .view-all-btn agar tidak bentrok dengan ID Prestasi */
    background-color: var(--primary-denim);
    margin-top: 35px;
}
.view-more-news-btn:hover {
    background-color: #3a4f63;
}


/* ------------------------------------ */
/* PRESTASI (ACHIEVEMENTS) SECTION - BARU */
/* ------------------------------------ */
.achievements-section {
    padding: 80px 0;
    background-color: var(--white);
    text-align: center; /* Untuk memusatkan elemen seperti select dan tombol */
}

.achievements-section h2 {
    margin-bottom: 30px; /* Sedikit lebih banyak ruang dari judul ke filter */
}

.filter-controls {
    margin-bottom: 40px; /* Jarak antara filter dan grid prestasi */
    display: flex; /* Menggunakan flexbox untuk penempatan label dan select */
    justify-content: center; /* Pusatkan di tengah */
    align-items: center;
    gap: 15px; /* Jarak antara label dan select */
}

#prestasi-year-select {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1.05em;
    color: var(--text-dark);
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none; /* Menghilangkan default style dropdown di WebKit */
    -moz-appearance: none; /* Menghilangkan default style dropdown di Mozilla */
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%232C3E50%22%20d%3D%22M287%2C197.915L146.2%2C57.115L5.4%2C197.915c-6.8%2C6.8-6.8%2C17.9%2C0%2C24.7c6.8%2C6.8%2C17.9%2C6.8%2C24.7%2C0l116.1-116.1l116.1%2C116.1c6.8%2C6.8%2C17.9%2C6.8%2C24.7%2C0C293.8%2C215.815%2C293.8%2C204.715%2C287%2C197.915z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%, center;
    background-size: 12px auto;
}

#prestasi-year-select:focus {
    border-color: var(--denim-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.15);
}


#prestasi-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Lebih fleksibel */
    gap: 30px; /* Jarak antar kartu */
    margin-top: 0; /* Sudah ada margin dari filter-controls */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0; /* Container utama sudah ada padding */
}

.achievement-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* Pusatkan konten di dalam kartu */
    text-align: center; /* Pusatkan teks di dalam kartu */
    padding: 25px 20px; /* Padding internal kartu */
    border-bottom: 3px solid var(--denim-blue); /* Garis biru di bawah kartu */
    cursor: pointer; /* Menunjukkan bahwa kartu bisa diklik */
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    font-size: 3.5em; /* Ukuran ikon */
    color: var(--accent-gold); /* Warna ikon */
    margin-bottom: 20px;
}

.achievement-card h3.achievement-title {
    font-size: 1.6em;
    color: var(--primary-denim);
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center; /* Pastikan judul di tengah */
}

.achievement-card p.achievement-student,
.achievement-card p.achievement-date {
    font-size: 0.95em;
    color: var(--text-lighter);
    margin-bottom: 8px;
}

/* Tombol "Lihat Semua Prestasi" */
#view-all-prestasi-btn {
    margin-top: 40px; /* Memberikan jarak dari grid prestasi */
}

/* ------------------------------------ */
/* MODAL POP-UP (Prestasi Detail) */
/* ------------------------------------ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Pastikan di atas semua elemen lain */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    padding: 35px;
    border-radius: 10px;
    max-width: 650px;
    width: 90%; /* Responsif */
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: left; /* Konten modal rata kiri */
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: var(--text-lighter);
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--primary-denim);
}

.modal-content h3#modal-title {
    font-size: 2.2em;
    color: var(--primary-denim);
    margin-bottom: 15px;
    text-align: left; /* Override h3 global */
    font-weight: 700;
}

.modal-content p#modal-student,
.modal-content p#modal-date {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
}

.modal-content p#modal-date {
    font-style: italic;
    color: var(--text-lighter);
}

.modal-content p#modal-description {
    font-size: 1.05em;
    color: var(--text-dark);
    margin-top: 20px;
    line-height: 1.7;
    white-space: pre-wrap; /* Mempertahankan format baris baru dari deskripsi */
}

/* ------------------------------------ */
/* GALLERY SECTION */
/* ------------------------------------ */
.gallery-section {
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

/* Styling umum untuk setiap item di grid galeri, termasuk gambar dan embed Reels */
.gallery-grid > a, /* untuk link gambar */
.gallery-grid > div.gallery-item { /* untuk div pembungkus reels */
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Penting untuk menangani konten yang mungkin melebihi batas */
    display: flex; /* Menggunakan flexbox untuk memusatkan konten di dalam kotak */
    flex-direction: column;
    justify-content: center; /* Pusatkan konten vertikal */
    align-items: center; /* Pusatkan konten horizontal */
    text-align: center; /* Untuk teks di dalam embed Instagram */
    height: 220px; /* Tetapkan tinggi yang sama dengan gambar untuk konsistensi */
    box-sizing: border-box; /* Pastikan padding tidak menambah ukuran total */
    padding: 5px; /* Beri sedikit padding agar konten tidak menempel tepi */
    transition: transform 0.3s ease, opacity 0.3s ease; /* Tambahkan transisi hover */
}

/* Hover effect yang sama untuk semua item galeri */
.gallery-grid > a:hover,
.gallery-grid > div.gallery-item:hover {
    transform: scale(1.02);
    opacity: 0.95;
}


/* Styling untuk gambar di galeri */
.gallery-grid img {
    width: 100%;
    height: 100%; /* Pastikan gambar mengisi tinggi parent .gallery-item */
    object-fit: cover;
    border-radius: 8px; /* Pastikan border-radius pada gambar itu sendiri */
    /* Box shadow dan transition sudah diatur di parent .gallery-grid > a */
    cursor: pointer;
}

/* --- Penyesuaian untuk Reels Instagram di Galeri --- */

/* Ini menargetkan div pembungkus reels Instagram */
.instagram-reel-embed {
    width: 100%; /* Pastikan wrapper Reels mengisi 100% lebar kolom */
    max-width: 540px; /* Batasi lebar maksimum sesuai rekomendasi Instagram */
    height: 100%; /* Penting: Pastikan ini mengisi tinggi parent */
    display: flex; /* Untuk memusatkan blockquote di dalamnya */
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Penting untuk mencegah konten Reels melebihi */
}

/* Menimpa gaya inline dari Instagram agar Reels responsif dan mengisi kotak */
.instagram-reel-embed .instagram-media {
    width: 100% !important; /* Sangat penting: Timpa lebar bawaan Instagram */
    max-width: 100% !important; /* Penting agar tidak melebihi parent .instagram-reel-embed */
    min-width: unset !important; /* Hapus min-width bawaan yang bisa membuat scroll horizontal */
    height: 100% !important; /* Sangat penting: Pastikan Reels mengisi tinggi parent */
    margin: 0 !important; /* Hapus margin auto bawaan */
    box-shadow: none !important; /* Opsional: Hapus shadow default Instagram */
    border-radius: 0 !important; /* Opsional: Hapus border-radius default Instagram */
    display: flex; /* Agar konten di dalamnya (link dan div) bisa diatur flexbox */
    flex-direction: column;
    justify-content: center; /* Pusatkan konten vertikal di dalam embed */
    align-items: center; /* Pusatkan konten horizontal di dalam embed */
}

/* Menyesuaikan konten di dalam instagram-media agar tidak terlalu besar */
.instagram-reel-embed .instagram-media > div:first-child { /* Ini adalah div padding di dalam blockquote */
    padding: 0 !important; /* Hapus padding default Instagram di sini jika menyebabkan ruang kosong */
    height: 100%; /* Biarkan div ini mengambil tinggi penuh */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.instagram-reel-embed .instagram-media > div:first-child > a {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Untuk iframe di dalam embed Instagram (pemutar sebenarnya) */
.instagram-reel-embed .instagram-media iframe {
    width: 100% !important;
    height: 100% !important; /* Coba ini untuk mengisi tinggi */
    object-fit: cover; /* Mirip dengan gambar, coba untuk mengisi ruang */
    min-height: 150px; /* Beri tinggi minimum agar tidak terlalu kecil */
}

/* Media Queries untuk Responsif */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid > a,
    .gallery-grid > div.gallery-item {
        height: auto; /* Biarkan tinggi menyesuaikan konten di layar kecil */
        min-height: 200px; /* Minimal tinggi agar tidak terlalu gepeng */
    }
}


/* ------------------------------------ */
/* TESTIMONIALS SECTION */
/* ------------------------------------ */
.testimonials-section {
    background-color: var(--light-gray);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 50px;
}

.testimonial-item {
    background-color: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-left: 4px solid var(--accent-gold);
}

.testimonial-item .quote {
    font-style: italic;
    font-size: 1.15em;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.8;
}

.testimonial-item .author {
    font-weight: 600;
    color: var(--primary-denim);
    font-size: 0.98em;
}

/* ------------------------------------ */
/* PPDB CTA SECTION */
/* ------------------------------------ */
.ppdb-cta {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('https://via.placeholder.com/1500x400/4682B4/ffffff?text=Background+PPDB') no-repeat center center/cover;
    color: var(--white);
    padding: 90px 0;
    text-align: center;
}

.ppdb-cta h2 {
    color: var(--white);
    font-size: 3.2em;
    margin-bottom: 25px;
    font-weight: 700;
}

.ppdb-cta p {
    font-size: 1.3em;
    max-width: 750px;
    margin: 0 auto 35px;
    color: #eee;
}

.ppdb-btn {
    background-color: var(--accent-gold);
    padding: 18px 45px;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--primary-denim);
}

.ppdb-btn:hover {
    background-color: #e6c200;
    color: var(--primary-denim);
}

.ppdb-deadline {
    margin-top: 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ------------------------------------ */
/* CONTACT SECTION */
/* ------------------------------------ */
.contact-section {
    background-color: var(--white);
}

.contact-content {
    display: flex;
    gap: 50px;
    margin-top: 50px;
    flex-wrap: nowrap;
    justify-content: center;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info h3, .contact-form h3 {
    text-align: left;
    font-size: 2.1em;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 8px;
    font-weight: 600;
    color: var(--primary-denim);
}
.contact-info h3::after, .contact-form h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--denim-blue);
    border-radius: 0;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.contact-info ul li {
    margin-bottom: 18px;
    font-size: 1.05em;
    color: var(--text-light);
}

.contact-info ul li i {
    margin-right: 15px;
    color: var(--denim-blue);
    font-size: 1.25em;
    width: 28px;
    text-align: center;
}

.map-container {
    margin-top: 35px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.map-container iframe {
    border: 0;
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

.contact-form .form-group {
    margin-bottom: 22px;
}

.contact-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--primary-denim);
    font-size: 1.05em;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-dark);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--denim-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    width: auto;
    padding: 14px 35px;
    font-size: 1.15em;
    background-color: var(--denim-blue);
    color: var(--white);
}
.submit-btn:hover {
    background-color: #3a70a0;
}

/* ------------------------------------ */
/* FOOTER */
/* ------------------------------------ */
.main-footer {
    background-color: var(--primary-denim);
    color: var(--white);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col h3 {
    color: var(--white);
    text-align: left;
    margin-bottom: 25px;
    font-size: 1.7em;
    position: relative;
    padding-bottom: 8px;
    font-weight: 600;
}
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--denim-blue);
    border-radius: 0;
}

.footer-col p, .footer-col li {
    font-size: 0.95em;
    color: #D0D0D0;
    margin-bottom: 12px;
    line-height: 1.7;
}

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

.footer-col ul li a {
    color: #D0D0D0;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 6px 0;
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
}

.social-links-footer {
    margin-top: 25px;
}

.social-links-footer a {
    color: var(--white);
    font-size: 1.6em;
    margin-right: 18px;
    transition: color 0.3s ease;
}

.social-links-footer a:hover {
    color: var(--accent-gold);
}

.contact-footer i {
    margin-right: 12px;
    color: var(--denim-blue);
}

.footer-bottom {
    background-color: #21303e;
    padding: 25px 0;
    text-align: center;
    font-size: 0.85em;
    color: #A0A0A0;
    margin-top: 25px;
}

/* ------------------------------------ */
/* RESPONSIVE DESIGN - MEDIA QUERIES */
/* ------------------------------------ */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    h2 {
        font-size: 2.8em;
    }
    .hero-slider {
        height: 600px;
    }
    .slider-content h2 {
        font-size: 4.2em;
    }
    .slider-content p {
        font-size: 1.5em;
    }
    .ppdb-cta h2 {
        font-size: 3.5em;
    }
}

/* Tablet Landscape (992px-1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    /* Adjust grid layouts for tablet */
    .program-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Facilities section was removed, so no need for .facility-grid */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Prestasi (Achievements) Responsif */
    #prestasi-gallery-container { /* Ganti dari .achievement-grid ke ID */
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di tablet landscape */
    }

    /* About section tablet adjustment */
    .about-content {
        flex-direction: column;
    }
    .about-image, .about-text {
        width: 100%;
        max-width: 700px;
    }
    .about-text {
        text-align: center;
    }
    
    /* Contact section tablet adjustment */
    .contact-content {
        flex-direction: column;
    }
    .contact-info, .contact-form {
        width: 100%;
        max-width: 700px;
    }
}

/* Tablet Portrait (max-width: 991px) dan Mobile */
@media (max-width: 991px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header adjustments */
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }
    .header-top .contact-info, 
    .header-top .social-links {
        width: 100%;
        margin-bottom: 5px;
    }
    .header-top .social-links {
        margin-top: 5px;
        text-align: left; /* Sesuaikan penempatan ikon sosial */
    }
    .header-top .social-links a {
        margin-left: 0;
        margin-right: 18px;
    }

    /* Tampilkan ikon menu hamburger */
    .menu-icon {
        display: block; /* Hamburger icon muncul di bawah 991px */
    }

    /* Sembunyikan checkbox menu-toggle */
    #menu-toggle {
        display: none;
    }

    /* Sembunyikan menu utama dan atur sebagai kolom */
    .main-nav .nav-links { /* TARGET KELAS 'nav-links' */
        display: none; /* Sembunyikan menu secara default */
        flex-direction: column; /* Atur vertikal */
        position: absolute;
        left: 0;
        top: 100%; /* Tempatkan di bawah header */
        width: 100%;
        background-color: var(--primary-denim); /* Background menu hamburger */
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        z-index: 999; /* Pastikan di atas konten lain tapi di bawah sticky header */
        padding: 10px 0; /* Padding vertikal untuk item menu */
    }

    /* Tampilkan menu utama saat #menu-toggle dicentang */
    #menu-toggle:checked ~ .nav-links { /* TARGET KELAS 'nav-links' */
        display: flex; /* Tampilkan menu */
    }

    /* Gaya item menu dalam hamburger menu */
    .main-nav .nav-links li {
        width: 100%; /* Setiap item mengambil lebar penuh */
        text-align: left; /* Teks rata kiri */
        margin: 0; /* Hapus margin horizontal */
    }

    .main-nav .nav-links li a {
        padding: 12px 25px; /* Padding untuk area klik */
        border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Garis pemisah */
        color: var(--white); /* Pastikan warna teks putih */
    }

    .main-nav .nav-links li:last-child a {
        border-bottom: none; /* Hapus garis untuk item terakhir */
    }

    /* Penyesuaian dropdown di mode mobile */
    .main-nav .nav-links .dropdown-content {
        position: static; /* Hilangkan posisi absolut */
        display: none; /* Sembunyikan secara default */
        background-color: #21303e; /* Warna background untuk sub-menu (lebih gelap dari primary-denim) */
        box-shadow: none; /* Hapus bayangan */
        border-top: none; /* Hapus border top */
        border-radius: 0; /* Hapus border radius */
        padding: 0; /* Hapus padding */
        opacity: 1; /* Pastikan terlihat */
        visibility: visible;
        transform: translateY(0); /* Reset transform */
    }

    .main-nav .nav-links .dropdown-content li a {
        padding-left: 45px; /* Indentasi untuk sub-menu */
        font-size: 0.9em;
        background-color: transparent; /* Pastikan tidak ada background aneh */
        color: #D0D0D0; /* Warna teks untuk sub-menu */
    }

    /* Untuk membuat dropdown berfungsi di mobile (membutuhkan JavaScript untuk toggle class 'active') */
    .main-nav .nav-links .dropdown.active > .dropdown-content { 
        display: block; 
    }

    /* Grid layouts */
    .program-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Facilities section was removed, so no need for .facility-grid */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Prestasi (Achievements) Responsif */
    #prestasi-gallery-container { /* Ganti dari .achievement-grid ke ID */
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di tablet portrait */
        gap: 25px; /* Sesuaikan gap */
    }

    /* About section */
    .about-content {
        flex-direction: column;
    }
    .about-image, .about-text {
        width: 100%;
        max-width: 700px; /* Atur max-width agar tidak terlalu lebar */
    }
    .about-text {
        text-align: center;
    }
    
    /* Contact section */
    .contact-content {
        flex-direction: column;
    }
    .contact-info, .contact-form {
        width: 100%;
        max-width: 700px; /* Atur max-width */
    }
    .contact-info h3, .contact-form h3 {
        text-align: center; /* Sesuaikan perataan teks */
    }
    .contact-info h3::after, .contact-form h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .contact-info ul {
        text-align: center; /* Pusatkan info kontak */
    }
    .contact-info ul li {
        justify-content: center; /* Pusatkan item list */
        display: flex;
        align-items: center;
    }

    /* Modal Responsiveness for smaller screens */
    .modal-content {
        max-width: 95%; /* Lebih lebar di layar kecil */
        padding: 25px 20px;
    }
    .modal-content h3#modal-title {
        font-size: 1.8em;
    }
    .modal-content p#modal-student,
    .modal-content p#modal-date,
    .modal-content p#modal-description {
        font-size: 1em;
    }
    .modal-close-btn {
        font-size: 2em;
        top: 10px;
        right: 10px;
    }
}

/* Mobile (max-width: 767px) - Override untuk layar yang lebih kecil */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header adjustments */
    .logo img {
        height: 45px;
        width: 45px;
    }
    .logo-text h1 {
        font-size: 1.3em;
    }
    .logo-text p {
        font-size: 0.7em;
    }
    
    /* Hero slider */
    .hero-slider {
        height: 400px;
    }
    .slider-content h2 {
        font-size: 2.5em;
    }
    .slider-content p {
        font-size: 1.1em;
    }
    
    /* Single column layouts */
    .program-grid,
    /* .facility-grid (removed), */
    .news-grid,
    .testimonial-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Gallery stays 2 columns (default dari @media 991px) */
    /* Jika ingin 1 kolom di HP kecil: */
    /* .gallery-grid {
        grid-template-columns: 1fr;
    } */
    
    /* Prestasi (Achievements) Responsif */
    #prestasi-gallery-container { /* Ganti dari .achievement-grid ke ID */
        grid-template-columns: 1fr; /* 1 kolom di mobile */
        gap: 20px; /* Sesuaikan gap */
    }

    /* Adjust card paddings */
    .program-item,
    /* .facility-item (removed), */
    .news-item,
    .testimonial-item,
    .achievement-card { /* Tambahkan achievement-card di sini */
        padding: 25px;
    }
    /* Khusus untuk .achievement-card .card-content */
    /* Ini dihapus karena achievement-card tidak lagi punya .card-content */
    /* .achievement-card .card-content {
        padding: 20px 25px 25px;
    } */
    
    /* PPDB CTA */
    .ppdb-cta h2 {
        font-size: 2.2em;
    }
    .ppdb-cta p {
        font-size: 1em;
    }
    
    /* Footer */
    .footer-col h3 {
        font-size: 1.5em;
        text-align: center; /* Pusatkan judul footer di mobile */
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-col p, .footer-col li {
        text-align: center; /* Pusatkan teks footer di mobile */
    }
    .footer-col ul {
        text-align: center;
    }
    .footer-col ul li a {
        display: inline-block; /* Agar bisa dipusatkan */
    }
    .social-links-footer {
        text-align: center; /* Pusatkan ikon sosial footer */
    }
    .contact-footer i {
        margin-right: 8px; /* Sesuaikan margin ikon kontak footer */
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Further adjustments for very small screens */
    .hero-slider {
        height: 350px;
    }
    .slider-content h2 {
        font-size: 2em;
    }
    .slider-content p {
        font-size: 0.9em;
    }
    
    .btn, .hero-btn, .ppdb-btn {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    /* Gallery becomes single column on very small screens */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Filter kontrol prestasi */
    .filter-controls {
        flex-direction: column; /* Label dan select jadi vertikal */
        gap: 10px; /* Kurangi jarak */
    }
}
