@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

html{
    scroll-behavior: smooth;
}

:root {
    --primary-green: #4CAF50;
    --dark-green: #0ab448;
    --gradient-start: #a29504;
    --gradient-end: #38a409;
    --text-color: #333;
    --light-green: #E8F5E9;
    --white: #FFF;
}

body{
    background-image: url("asset/img/acarafoto/2.jpg");
    background-size: cover;
    background-attachment: fixed; 
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

.parallax-bg {
    position: fixed;
    inset: 0;
    background-image: url("asset/img/acarafoto/2.jpg");
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateY(0);
    transition: transform 0.1s linear;
    will-change: transform;
}

.kotak{
    background-color: rgba(255, 255, 255, 0.752);
}


.main-header {
    background-color: var(--white);
    padding: 10px 5%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); 
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    margin-right: 15px;
}

.school-info h1 {
    font-size: 1.4em;
    color: var(--primary-green);
    margin: 0;
}

.school-info .tagline {
    font-size: 0.75em;
    color: #666;
    margin-top: -3px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-green);
}

/* =============================================== */
/* SLIDESHOW BARU SUPER SMOOTH */
/* =============================================== */
.kotak1 {
    position: relative;
    height: 80vh;
    overflow: hidden;
}

/* Layer gambar */
.kotak1 .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: fadezoom 24s infinite;
    opacity: 0;
}

/* Gambar yang muncul bergantian */
.kotak1 .s1 { background-image: url("../img/foto/sekolah.jpg"); animation-delay: 0s; }
.kotak1 .s2 { background-image: url("../img/acarafoto/11.jpg"); animation-delay: 6s; }
.kotak1 .s3 { background-image: url("../img/acarafoto/21.jpg"); animation-delay: 12s; }
.kotak1 .s4 { background-image: url("../img/acarafoto/1.jpg"); animation-delay: 18s; }

/* Fade + Zoom animasi */
@keyframes fadezoom {
    0%   { opacity: 0; transform: scale(1); }
    5%   { opacity: 1; transform: scale(1.05); }
    25%  { opacity: 1; transform: scale(1.1); }
    30%  { opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; }
}

/* Overlay gelap */
.overlay-anim {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2;
}

/* Isi teks di beranda */
.isi1 {
    height: 100%;
    margin-top: 0; 
    justify-content: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 3;
}

.kotak1 h1{ 
    font-size: 70px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4bf951, rgb(236, 236, 61));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeDown 1.5s ease forwards;
}

.kotak1 p{
    margin-top: 0;
    color: white;
    font-size: 23px;
    opacity: 0;
    animation: fadeDown 2s ease forwards;
}

.kotak1 a{
    background: linear-gradient(to right, #3a9c41, rgb(144, 194, 150));
    font-size: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    opacity: 0;
    animation: fadeDown 2.5s ease forwards;
}

@keyframes fadeDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =============================================== */
/* Konten lainnya */
/* =============================================== */

.kotak-tentang{
    background-color: rgba(182, 239, 232, 0.798);
}

.isi-tentang{
    padding: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.isi-tentang img{
    margin-left: 20px;
    border-radius: 10px;
    width: 350px;
    box-shadow: 3px 8px 10px rgba(0, 0, 0, 0.1);

}

.gambar-tentang img{
    border-radius: 10px;
    width: 300px;
}

.keterangan-tentang h2{
    font-size: 35px;
}

.keterangan-tentang p{
    color: #545754;
    font-weight: 450;
    margin-bottom: 30px;
}

.keterangan-tentang a{
    background-color: rgb(255, 165, 81);
    color: white;
    text-decoration: none;
    padding: 10px;
}

.keterangan-tentang a:hover{
    background-color: rgb(253, 190, 131);
}

.berita-judul{
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 30px;
}

.berita{
    padding: 50px;
    margin: 30px;
}

.berita img{
    width: 350px;
    border-radius: 10px;

}

.berita-terbaru{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

.berita p{
    background-color: #fff;
    padding:30px;
    width: 350px;
    margin-top: 0;
}

.berita a{
    text-decoration: none;
    color: white;
    background-color: #0ab448;
    padding: 5px 15px;
    border-radius: 10px;
}

.berita a:hover{
    transform: scale(1.07);
}

.kotak2{
    padding: 50px;
    margin: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kotak2 h2{
    color: #33923a;
    background: linear-gradient(to right, rgb(162, 236, 138), rgb(201, 243, 179)) ;
    padding: 10px;
    margin-bottom: 30px;
    border-radius: 10px;
    color: #33923a;
    text-align: center;
}

.fasilitas{
    display: flex;
    justify-content: center;
    gap: 100px;
}

.fasilitas img{
    width: 150px;
}

.fas1, .fas2, .fas3, .fas4 {
    background-color: #61b164ab;
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.kotak3{
    background-color: #fff;
    padding: 50px;
    margin: 30px;
    border-radius: 10px;
    box-shadow: 3px 8px 10px rgba(0, 0, 0, 0.1);
}

.kotak3 h2{
    background: linear-gradient(to right, rgb(162, 236, 138), rgb(201, 243, 179)) ;
    padding: 10px;
    margin-bottom: 30px;
    border-radius: 10px;
    color: #33923a;
    text-align: center;
}

.foto-prestasi{
    display: flex;
    justify-content: center;
    gap: 30px;
}

.foto-prestasi img{
    width: 275px;
    height: 350px;
}

.foto-prestasi img:hover{
    transform: scale(1.07);
}

.foto p{
    background-color: #fff;
    text-align: center;
    margin-top: 0;
}

.tombol-selengkap{
    margin: 30px;
    display: flex;
    justify-content: center;
}

.kotak3 a{
    text-decoration: none;
    color: white;
    background-color: #0ab448;
    padding: 5px 15px;
    border-radius: 10px;
}

.kotak3 a:hover{
    transform: scale(1.07);
}

.kotak4{
    background:linear-gradient(to right, #0ab44837,#fff82537) ;
    padding: 50px;
    margin: 30px;
    border-radius: 10px;
}

.kotak4 h2{
    background: linear-gradient(to right, rgb(162, 236, 138), rgb(201, 243, 179)) ;
    padding: 10px;
    margin-bottom: 30px;
    border-radius: 10px;
    color: #33923a;
    text-align: center;

}

.tombol-selengkap{
    margin: 30px;
    display: flex;
    justify-content: center;
}

.kotak4 a{
    text-decoration: none;
    color: white;
    background-color: #0ab448;
    padding: 5px 15px;
    border-radius: 10px;
}

.kotak4 a:hover{
    transform: scale(1.07);
}

.guru-slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guru-slider-wrapper {
    width: 100%;
    overflow: hidden;
}

.guru-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.guru-item {
    flex: 0 0 25%; /* TAMPIL 4 FOTO */
    display: flex;
    justify-content: center;
}

.guru-item img {
    width: 90%;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}


.guru-prev, .guru-next {
    background: #2f8f2f;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 22px;
    cursor: pointer;
    margin: 0 10px;
}

.guru-prev:hover, .guru-next:hover {
    background: #1d691d;
}

/* --- CSS DROPDOWN MENU (REVISI FINAL) --- */
.main-nav li { 
    position: relative; 
}

.dropdown-menu {
    /* PENTING: Pakai !important biar gak kalah sama CSS navbar atasnya */
    display: none !important; 
    
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 9999;
    padding: 0;
    
    /* Paksa susunan ke bawah, bukan ke samping */
    flex-direction: column !important; 
    border-top: 3px solid #4CAF50;
}

.dropdown-menu li { 
    display: block; 
    width: 100%; 
    margin: 0; 
}

.dropdown-menu li a {
    padding: 12px 20px;
    color: #333 !important;
    display: block;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-weight: normal;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: #4CAF50 !important;
}

/* Munculkan HANYA saat di-hover */
.main-nav li:hover .dropdown-menu { 
    display: block !important; 
}

/* =============================== */
/* RESPONSIVE MODE (TABLET & HP) */
/* =============================== */

/* Tablet */
@media (max-width: 1075px) {

    /* HEADER */
    .main-header {
        padding: 10px 20px;
    }

    .main-nav ul {
        gap: 15px;
        font-size: 14px;
    }

    /* SLIDESHOW */
    .kotak1 h1 {
        font-size: 50px;
        text-align: center;
    }

    .kotak1 p {
        font-size: 18px;
        text-align: center;
    }

    /* TENTANG KAMI */
    .isi-tentang {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .isi-tentang img {
        width: 250px;
    }

    .gambar-tentang img {
        width: 200px;
    }

    /* BERITA */
    .berita-terbaru {
        flex-wrap: wrap;
        display: flex;
        gap: 40px;
    }

    .berita img {
        gap: 40px;
        width: 100%;
    }

    .berita p {
        width: 80%;
        margin: auto;
    }

    /* FASILITAS */
    .fasilitas {
        flex-wrap: wrap;
        gap: 40px;
    }

    .fasilitas img {
        width: 120px;
    }

    /* PRESTASI */
    .foto-prestasi {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        justify-items: center;
        padding: 20px;
    }

    .foto-prestasi img {
        width: 90%;
    }

    /* GURU SLIDER */
    .guru-slider-container {
        width: 100%;
    }
}

/* HP */
@media (max-width: 600px) {

    /* HEADER */
    .main-header {
        padding: 10px;
    }

    .school-info h1 {
        font-size: 1.1em;
    }

    .main-nav ul {
        gap: 10px;
        font-size: 12px;
    }

    /* SLIDESHOW */
    .kotak1 {
        height: 60vh;
    }

    .isi1 {
        padding-top: 40px; 
    }

    .kotak1 h1 {
        font-size: 45px;
        text-align: center;
    }

    .kotak1 p {
        font-size: 15px;
        text-align: center;
    }

    .kotak1 a {
        font-size: 13px;
        padding: 10px 15px;
    }

    /* TENTANG */
    .isi-tentang img {
        width: 200px;
    }

    .gambar-tentang {
        display: flex;
        justify-content: center;
        gap: 20px;
    }

    .gambar-tentang img {
        width: 150px;
    }

    /* BERITA */
    .berita img {
        width: 100%;     
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
        width: 100%;
    }

    .berita p {
        width: 100%;
    }

    /* FASILITAS */
    .fasilitas {
        width: 100%;     
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .fasilitas img {
        width: 150px;
    }

    /* PRESTASI */
    .foto-prestasi {
        grid-template-columns: 1fr;
    }

    /* GURU SLIDER */
    .guru-slider img {
        width: 140px;
    }
}















/* ini yang gua tambahin buat tampilan pengumuman beranda */
    /* dibawah nih tampilan css berita terbaru */




















/* ======================================================= */
/* 📰 CSS KHUSUS BERITA TERBARU (PENGUMUMAN)               */
/* ======================================================= */

/* Container Grid Berita */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsif Otomatis */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Kartu Berita */
.news-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

/* Efek Hover pada Kartu */
.news-card:hover {
    transform: translateY(-10px); /* Naik dikit */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Gambar Berita */
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover img {
    transform: scale(1.05); /* Zoom halus */
}

/* Isi Konten Berita */
.card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left; /* Pastikan rata kiri */
}

/* Badge Kategori */
.category-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Warna Badge (Sama dengan Pengumuman.php) */
.bg-akademik { background-color: #2196F3; } 
.bg-prestasi { background-color: #FF9800; } 
.bg-kesiswaan { background-color: #4CAF50; } 
.bg-kegiatan { background-color: #9C27B0; } 
.bg-umum { background-color: #607D8B; }

/* Judul Berita */
.news-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
    line-height: 1.4;
}

/* Deskripsi Singkat */
.news-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Dorong tombol ke bawah */
}

/* Tombol Baca Selengkapnya */
.news-card a {
    color: #4CAF50;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
    padding: 0; /* Reset padding bawaan */
    background: none; /* Reset background bawaan */
    border-radius: 0;
}

.news-card a:hover {
    color: #2E7D32;
    transform: translateX(5px); /* Geser kanan dikit */
}

/* Penyesuaian Responsif HP */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr; /* Jadi 1 kolom ke bawah */
        padding: 0 20px;
    }
    
    .news-card {
        margin-bottom: 20px;
    }
}

/* Mengatur container agar anak-anaknya sejajar */
    .news-grid {
        display: flex;
        justify-content: center; /* Posisi di tengah */
        gap: 30px; /* Jarak antar kartu */
        flex-wrap: wrap; /* Agar jika layar kecil (HP), kartu turun ke bawah */
        margin-top: 30px;
    }

    /* Mengatur ukuran masing-masing kartu */
    .news-card {
        flex: 1; /* Kartu akan mengisi ruang yang tersedia */
        min-width: 300px; /* Lebar minimum kartu */
        max-width: 350px; /* Lebar maksimum kartu agar tidak terlalu lebar */
        background: #fff;
        border-radius: 10px; /* Membuat sudut tumpul */
        display: flex;
        flex-direction: column; /* Isi di dalam kartu tetap vertikal */
        transition: transform 0.3s ease; /* Efek animasi saat dihover */
    }

    /* Opsional: Efek saat mouse diarahkan ke kartu */
    .news-card:hover {
        transform: translateY(-5px); /* Kartu naik sedikit */
    }
















    

    .foto-prestasi {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }
    .foto {
        flex: 1;
        min-width: 200px; /* Agar responsif di HP */
        max-width: 25%;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-radius: 10px;
        overflow: hidden;
    }
