/* --- GLOBAL STYLING --- */
:root {
    --primary-green: #2e7d32;
    --secondary-green: #4caf50;
    --accent-gold: #FFC107;
    --text-dark: #333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-green);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--secondary-green);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.text-center {
    text-align: center;
}

/* --- HEADER & NAVBAR --- */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-green);
}

.nav-logo img {
    height: 45px;
    margin-right: 10px;
}

.nav-logo span {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    padding: 8px 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-green);
}

.btn-ppdb {
    background-color: var(--accent-gold);
    color: var(--text-dark);
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-left: 15px;
}

.btn-ppdb:hover {
    background-color: #ffca2c;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
}

.btn-rdm {
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 6px 16px; /* Sedikit lebih kecil dari PPDB */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-left: 15px;
    display: inline-block;
}

.btn-rdm:hover {
    background-color: var(--primary-green);
    color: var(--text-light);
}

/* Responsif untuk HP */
@media (max-width: 768px) {
    .btn-rdm {
        display: inline-block;
        margin: 10px 0;
    }
}

/* --- HERO SECTION & SLIDER (METODE POSITION ABSOLUTE) --- */
.hero-section {
    min-height: 100vh;
    position: relative;
    color: var(--text-light);
}

.swiper {
    width: 100%;
    height: 100vh;
}

.swiper-slide {
    position: relative;

    background-size: cover;
    background-position: center;
    padding: 20px;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1500px;
    text-align: center;
}

.hero-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Definisikan gambar untuk setiap slide */
.slide-1 {
    background-image: linear-gradient(rgba(0, 66, 22, 0.7), rgba(0, 66, 22, 0.7)), url('../img/hero-bg.png');
}

.slide-2 {
    background-image: linear-gradient(rgba(0, 66, 22, 0.7), rgba(0, 66, 22, 0.7)), url('../img/galeri6.jpg');
}

.slide-3 {
    background-image: linear-gradient(rgba(0, 66, 22, 0.7), rgba(0, 66, 22, 0.7)), url('../img/berita3.webp');
}

/* Kustomisasi Tombol Slider Swiper.js */
.swiper-button-next,
.swiper-button-prev {
    color: var(--accent-gold) !important;
}

.swiper-pagination-bullet-active {
    background-color: var(--accent-gold) !important;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: center;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin: 0 10px;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--text-dark);
}

.btn-primary:hover {
    background-color: #ffca2c;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--text-dark);
    transform: translateY(-3px);
}

/* --- SAMBUTAN & KEUNGGULAN --- */
.sambutan-section {
    background-color: var(--bg-white);
}

.sambutan-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.sambutan-img {
    flex-basis: 40%;
}

.sambutan-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.sambutan-text {
    flex-basis: 60%;
}

.keunggulan-section {
    background-color: var(--bg-light);
}

.keunggulan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.keunggulan-card {
    background-color: var(--bg-white);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.keunggulan-card:hover {
    transform: translateY(-10px);
}

.keunggulan-card i {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.keunggulan-card h3 {
    margin-bottom: 10px;
    color: var(--primary-green);
}

/* --- GALERI SECTION --- */
.galeri-section {
    background-color: var(--bg-white);
}

.galeri-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.galeri-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.galeri-grid img:hover {
    transform: scale(1.05);
}

/* --- PPDB SECTION --- */
.ppdb-section {
    background-color: var(--bg-light);
}

.ppdb-alur {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.ppdb-step {
    text-align: center;
    flex: 1;
}

.ppdb-step span {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.ppdb-step h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.ppdb-arrow {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-top: 50px;
}

/* --- BERITA SECTION --- */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.berita-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s;
}

.berita-card:hover {
    transform: translateY(-5px);
}

.berita-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.berita-content {
    padding: 20px;
}

.berita-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.berita-content p {
    color: var(--primary-green);
    font-weight: 600;
    cursor: pointer;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-green);
    color: #e0e0e0;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 15px;
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-col p i {
    color: var(--accent-gold);
    margin-right: 10px;
}

.yayasan-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-right: 15px;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #4caf50;
    padding: 20px 0;
    text-align: center;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .keunggulan-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .galeri-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .berita-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ppdb-alur {
        flex-direction: column;
        align-items: center;
    }

    .ppdb-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;

    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 280px;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 100px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 998;
    }

    .nav-menu.active {
        right: 0;
        left: auto;
    }

    .btn-ppdb {
        display: inline-block;
        margin: 20px 0;
        text-align: center;
    }

    .hamburger {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .sambutan-content {
        flex-direction: column;
    }

    .keunggulan-grid {
        grid-template-columns: 1fr;
    }

    .galeri-grid {
        grid-template-columns: 1fr;
    }

    .header.scrolled {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
    }

    .ppdb-section .text-center a {
        display: block;
        margin: 10px auto;
    }
}

.website-stats p {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 10px;
    padding: 0;
    line-height: 1.5;
}

/* --- PERBAIKAN AGRESIF GLIGHTBOX --- */

.goverlay {
    z-index: 99999 !important;
    box-sizing: content-box !important;
}

.gcontainer {
    z-index: 999999 !important;
    box-sizing: content-box !important;
}

.gclose {
    z-index: 9999999 !important;
    /* Paling atas */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: content-box !important;
}

.gslide,
.gprev,
.gnext,
.ginner-container {
    box-sizing: content-box !important;
}

/* --- TOMBOL WHATSAPP MENGAMBANG --- */
.wa-floating-button {
    position: fixed;
    /* Posisikan 15px di atas tombol scroll-to-top */
    bottom: 80px;
    right: 20px;
    z-index: 500;
    width: 45px;
    height: 45px;
    background-color: #25d366;
    /* Warna Hijau WhatsApp */
    color: var(--text-light);
    text-align: center;
    line-height: 45px;
    font-size: 1.8rem;
    /* Ikon sedikit lebih besar */
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.wa-floating-button:hover {
    background-color: #128C7E;
    /* Warna WA lebih gelap */
    color: var(--text-light);
    transform: translateY(-3px);
    /* Efek sedikit terangkat */
}

/* --- SCROLL TO TOP BUTTON --- */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500;
    width: 45px;
    height: 45px;
    background-color: var(--primary-green);
    color: var(--text-light);
    text-align: center;
    line-height: 45px;
    font-size: 1.2rem;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--secondary-green);
    color: var(--text-light);
}

/* --- PERBAIKAN TAMPILAN LIST BERITA (DETAIL) --- */

.berita-content-full ul,
.berita-content-full ol {
    padding-left: 40px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.berita-content-full li {
    margin-bottom: 0.5rem;
}

.berita-content-full p {
    margin-bottom: 1rem;
}

/* --- STYLING PAGINATION KUSTOM --- */
.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    /* Menghilangkan bullet points */
    margin-top: 2rem;
}

.page-item {
    margin: 0 5px;
    /* Memberi jarak antar tombol */
}

.page-link {
    display: block;
    padding: 0.5rem 0.75rem;
    min-width: 40px;
    /* Agar tombol bulatnya seragam */
    text-align: center;
    text-decoration: none;
    color: var(--primary-green);
    /* Warna teks hijau */
    background-color: var(--bg-white);
    border: 1px solid #ddd;
    border-radius: 50px;
    /* Membuatnya bulat */
    transition: all 0.3s;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.page-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-green);
    border-color: #ccc;
}

/* Style untuk halaman yang sedang aktif */
.page-item.active .page-link {
    z-index: 3;
    color: var(--text-dark);
    background-color: var(--accent-gold);
    /* Warna emas (aktif) */
    border-color: var(--accent-gold);
}

/* Style untuk tombol (misal "Previous") yang nonaktif */
.page-item.disabled .page-link {
    color: #aaa;
    pointer-events: none;
    background-color: var(--bg-white);
    border-color: #ddd;
}