/* ------------------------------------------------------
   WARNA DASAR
------------------------------------------------------ */
:root {
    --primary: #1E8449;
    --primary-dark: #145A32;
    --light-bg: #F0F8F4;
    --text-dark: #222;
    --text-light: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ------------------------------------------------------
   NAVBAR
------------------------------------------------------ */
nav {
    background: var(--primary);
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .logo {
    font-size: 1.4rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    gap: 25px;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px;
    transition: 0.3s;
}

nav ul li a:hover {
    background: var(--primary-dark);
    border-radius: 6px;
}

/* ------------------------------------------------------
   HERO SECTION
------------------------------------------------------ */
.hero {
    background: url("") center/cover no-repeat;
    height: auto;
    display: flex;
    justify-content: center;   /* tetap horizontal center */
    text-align: center;
    color: rgb(10, 10, 10);
    padding: 20px 20px 40px;   /* bebas atur */
}


.hero h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-top: 10px;
}

/* ------------------------------------------------------
   KONTEN GRID (Profil, Berita, dll.)
------------------------------------------------------ */
.section {
    padding: 50px 20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    border-radius: 10px;
}

.card h3 {
    margin-top: 10px;
    color: var(--primary);
}

.card p {
    margin-top: 8px;
    font-size: 0.95rem;
}

/* ------------------------------------------------------
   FOOTER
------------------------------------------------------ */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 30px;
    text-align: center;
    margin-top: 50px;
}

/* ------------------------------------------------------
   RESPONSIVE CSS
------------------------------------------------------ */

/* Tablet */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav ul {
        gap: 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* HP / Mobile */
@media (max-width: 600px) {

    nav {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 10px;
        flex-direction: column;
    }

    .hero {
        height: 50vh;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
/* -----------------------------------------
   SLIDER FOTO
--------------------------------------------*/
.slider {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
}

.slides {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.slides img {
    width: 100%;         /* WAJIB → 1 slide per gambar */
    height: 50vh;
    object-fit: cover;
    flex-shrink: 0;      /* WAJIB → jangan mengecil! */
}

/* Tombol Next/Prev */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    user-select: none;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* Teks Hero */
.hero {
    position: relative;
    display: flex;
    height: 40vh;
    align-items: center;
    justify-content: center;
}

.hero-text {
    position: absolute;
    z-index: 10;
    text-align: center;
    color: rgb(0,0,0,0.7);
    text-shadow: 2px 2px 8px rgb(248, 246, 246);
}

/* RESPONSIVE SLIDER */
@media (max-width: 600px) {
    .slides img {
        height: 45vh;
    }

    .nav-btn {
        font-size: 1.4rem;
        padding: 6px 10px;
    }
}
/* Tombol hamburger */
.menu-toggle {
    display: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* SIDEBAR NAV MOBILE */
.nav-links {
    display: flex;
    gap: 25px;
}

.close-btn {
    display: none;
}

/* Tablet & HP */
@media (max-width: 900px) {

    .menu-toggle {
        display: block;
    }

    nav {
        justify-content: space-between;
    }

    .nav-links {
        position: fixed;
        left: -250px;
        top: 0;
        width: 250px;
        height: 100%;
        background: var(--primary-dark);
        flex-direction: column;
        padding-top: 70px;
        gap: 20px;
        transition: 0.3s ease;
        z-index: 999;
    }

    .nav-links li a {
        padding: 10px 20px;
        display: block;
        font-size: 1.1rem;
    }

    .nav-links.show {
        left: 0;
    }

    /* Tombol close (X) di sidebar */
    .close-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 2.2rem;
        color: rgb(253, 22, 5);
        cursor: pointer;
    }

    /* Sembunyikan menu horizontal */
    nav ul {
        gap: 0;
    }
}
nav {
    background: rgba(30, 132, 73, 0.7); /* hijau transparan */
    transition: 0.3s ease;
    backdrop-filter: blur(00.8s);
}

/* Navbar setelah scroll */
nav.scrolled {
    background: var(--primary-dark); /* hijau lebih gelap */
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
/* NAVBAR LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;       /* jarak antara gambar dan teks */
    font-size: 20px; /* ukuran teks */
    font-weight: bold;
    color: #fff;     /* sesuaikan warna */
}

.logo img {
    height: 45px;   /* atur ukuran gambar */
    width: auto;    /* biar proporsional */
}

/* RESPONSIVE (TABLET / HP) */
@media (max-width: 768px) {
    .logo img {
        height: 35px;  /* lebih kecil di mobile */
    }

    .logo {
        font-size: 18px;
    }
}
/* ===============================
   TABEL UMUM
================================ */
.table-wrapper {
    width: 100%;
    overflow-x: auto;        /* supaya bisa scroll di HP */
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* HEADER */
table thead {
    background: #145A32;     /* hijau madrasah */
    color: #ffffff;
}

table th {
    padding: 14px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

/* BODY */
table td {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid #e6e6e6;
}

/* ZEBRA STRIPE */
table tbody tr:nth-child(even) {
    background: #F0F8F4;
}

/* HOVER */
table tbody tr:hover {
    background: #D5F5E3;
}

/* RATA KIRI UNTUK TEKS PANJANG */
.table-text-left {
    text-align: left;
}

/* ===============================
   RESPONSIVE (HP)
================================ */
@media (max-width: 768px) {
    table {
        font-size: 0.85rem;
    }

    table th, table td {
        padding: 10px 8px;
    }
}


.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: #fff;
  padding: 20px;
  width: 300px;
  border-radius: 10px;
  text-align: center;
}

.modal-box h3 {
  margin-bottom: 15px;
}

.modal-box input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
}

.modal-btn {
  display: flex;
  justify-content: space-between;
}

.modal-btn button {
  padding: 6px 15px;
  cursor: pointer;
}

#errorText {
  color: red;
  font-size: 13px;
  margin-top: 8px;
}

