
/* =====================================
   PENGUMUMAN RA - PORTAL BERITA
===================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #edf5f5;
    color: #263b3c;
}

/* =====================================
   HEADER SEKOLAH
===================================== */

.sekolah {
    display: flex;
    align-items: center;
    gap: 35px;
    width: min(1200px, 90%);
    margin: 40px auto;
}

.sekolah .foto {
    flex: 0 0 42%;
}

.sekolah .foto img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

.sekolah .keterangan {
    flex: 1;
}

.sekolah .keterangan p:first-child {
    color: #6c8989;
    font-size: 14px;
    margin-bottom: 12px;
}

.sekolah .keterangan h1 {
    font-size: 34px;
    color: #063b3d;
    margin-bottom: 12px;
}

.sekolah .keterangan p:last-child {
    color: #627879;
    font-size: 16px;
}

/* =====================================
   KATEGORI SEKOLAH
===================================== */

.kategori-sekolah {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 35px auto 45px;
    padding: 0 20px;
}

.kategori-navbar a {
    display: block;
    min-width: 115px;
    text-align: center;
    text-decoration: none;
    color: #063b3d;
    background: white;
    border: 1px solid #c5dddd;
    border-radius: 30px;
    padding: 13px 25px;
    font-weight: 600;
    transition: 0.3s;
}

.kategori-navbar a:hover {
    background: #063b3d;
    color: white;
}

/* =====================================
   CONTAINER BERITA
===================================== */

.berita-container {
    width: min(1050px, 90%);
    margin: 0 auto 70px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* =====================================
   CARD BERITA
===================================== */

.berita-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(6, 59, 61, 0.08);
    border: 1px solid #e0ebeb;
}

/* =====================================
   FOTO UTAMA
===================================== */

.berita-foto-utama {
    width: 100%;
    height: 390px;
    overflow: hidden;
    background: #dceaea;
}

.berita-foto-utama img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s;
}

.berita-foto-utama img:hover {
    transform: scale(1.03);
}

/* =====================================
   ISI BERITA
===================================== */

.berita-content {
    padding: 30px 35px 35px;
}

.berita-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    color: #6d8989;
    font-size: 13px;
}

.berita-meta span {
    background: #edf6f6;
    padding: 7px 13px;
    border-radius: 20px;
}

.berita-content h2 {
    color: #063b3d;
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 18px;
}

.berita-isi {
    color: #526566;
    font-size: 16px;
    line-height: 1.9;
    text-align: justify;
    overflow-wrap: anywhere;
}

/* =====================================
   DOKUMENTASI KEGIATAN
===================================== */

.dokumentasi-section {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e4eeee;
}

.dokumentasi-section h3 {
    color: #063b3d;
    font-size: 21px;
    margin-bottom: 20px;
}

.galeri-dokumentasi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dokumentasi-item {
    background: #f4f8f8;
    border-radius: 12px;
    overflow: hidden;
}

.dokumentasi-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
}

.dokumentasi-item img:hover {
    transform: scale(1.04);
}

.dokumentasi-item p {
    padding: 12px 14px;
    color: #526566;
    font-size: 14px;
    line-height: 1.6;
}

/* =====================================
   JIKA BELUM ADA PENGUMUMAN
===================================== */

.berita-kosong {
    background: white;
    border-radius: 18px;
    padding: 60px 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(6, 59, 61, 0.06);
}

.berita-kosong h2 {
    color: #063b3d;
    margin-bottom: 12px;
}

.berita-kosong p {
    color: #718585;
    line-height: 1.7;
}

/* =====================================
   MODAL FOTO
===================================== */

.modal-foto {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    padding: 50px 20px;
    justify-content: center;
    align-items: center;
}

.modal-foto.aktif {
    display: flex;
}

.modal-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 10px;
}

.modal-content p {
    color: white;
    font-size: 16px;
    margin-top: 15px;
}

.modal-tutup {
    position: absolute;
    top: 20px;
    right: 35px;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* =====================================
   RESPONSIVE TABLET
===================================== */

@media (max-width: 768px) {

    .sekolah {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .sekolah .foto img {
        height: 230px;
    }

    .sekolah .keterangan h1 {
        font-size: 27px;
    }

    .berita-container {
        width: 92%;
    }

    .berita-foto-utama {
        height: 280px;
    }

    .berita-content {
        padding: 23px;
    }

    .berita-content h2 {
        font-size: 23px;
    }

    .galeri-dokumentasi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =====================================
   RESPONSIVE HP
===================================== */

@media (max-width: 480px) {

    .kategori-sekolah {
        gap: 8px;
    }

    .kategori-navbar a {
        min-width: auto;
        padding: 10px 20px;
    }

    .berita-foto-utama {
        height: 220px;
    }

    .berita-content {
        padding: 20px;
    }

    .berita-content h2 {
        font-size: 21px;
    }

    .berita-isi {
        font-size: 14px;
    }

    .galeri-dokumentasi {
        grid-template-columns: 1fr;
    }

    .dokumentasi-item img {
        height: 230px;
    }

    .modal-tutup {
        right: 20px;
    }
}
