/* ==========================
   Global Layout Public
========================== */

/* Reset dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    color: #333;
}

/* ==========================
   Global Container System
========================== */

.container-public {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================
   Header Atas Responsif Lanjut
========================== */
#top-header {
    background-color: #f8f9fa;
    padding: 10px 0;
    font-size: 0.9rem;
}

.header-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* biar elemen bisa turun jika sempit */
    gap: 10px;
}

/* Bagian kiri: logo + nama/tagline */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 300px;
    /* minimal 300px, fleksibel */
    min-width: 0;
    /* penting agar teks bisa wrap */
}

.header-left .logo {
    width: 60px;
    height: auto;
    flex-shrink: 0;
    /* logo tidak mengecil */
}

.header-left .text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* teks wrap rapi */
}

.header-left .text h1 {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
    /* bisa diganti wrap jika perlu */
    text-overflow: ellipsis;
    overflow: hidden;
}

.header-left .text p {
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
    /* bisa wrap juga jika mau */
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Bagian kanan: kontak & alamat */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex: 1 1 200px;
    min-width: 0;
}

.header-right p {
    font-size: 0.85rem;
    margin: 0;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------
   Navbar
--------------------------- */
#main-navbar {
    background-color: #0992C2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 10px 0;
}

/* --------------------------
   Navbar Links Hover dengan garis bawah animasi
--------------------------- */
.navbar-menu li a,
.navbar-menu li .dropdown-toggle {
    text-decoration: none;
    color: #fff;
    position: relative;
    /* perlu untuk ::after */
    transition: color 0.2s;
    cursor: pointer;
}

/* Pseudo-element untuk garis bawah */
.navbar-menu li a::after,
.navbar-menu li .dropdown-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    /* jarak sedikit di bawah teks */
    width: 0%;
    height: 2px;
    background-color: #f8f9fa;
    /* warna garis */
    transition: width 0.3s ease;
    /* animasi melebar */
}

/* Hover: garis melebar penuh */
.navbar-menu li a:hover::after,
.navbar-menu li .dropdown-toggle:hover::after {
    width: 100%;
}

/* Warna teks juga bisa berubah sedikit saat hover */
.navbar-menu li a:hover,
.navbar-menu li .dropdown-toggle:hover {
    color: #fff;
}

/* --------------------------
   Dropdown Menu Profil Sekolah
--------------------------- */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: " ▾";
    /* tanda panah */
    font-size: 0.8rem;
    margin-left: 4px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    list-style: none;
    min-width: 200px;
    padding: 5px 0;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

/* Tampilkan dropdown saat hover */
.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Item di dropdown */
.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: #333;
    text-decoration: none;
    position: relative;
}

/* Hover efek garis bawah untuk dropdown juga */
.dropdown-menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #0992C2;
    transition: width 0.3s ease;
}

.dropdown-menu li a:hover::after {
    width: 100%;
}

.dropdown-menu li a:hover {
    color: #0992C2;
    background-color: #f5f5f5;
    border-radius: 3px;
}

/* ==========================
   FOOTER MODERN
========================== */

.site-footer {
    background: #111F35;
    color: #fff;
    padding: 60px 20px 40px;
    position: relative;
}

.site-content {
    flex: 1;
}

/* garis aksen atas */
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0992C2;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col {
    width: 100%;
}

/* ==========================
   Kolom Sekolah
========================== */

.footer-school {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.footer-logo {
    width: 85px;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-school-name {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ==========================
   Judul Kolom
========================== */

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40%;
    height: 2px;
    background: #0992C2;
}

/* ==========================
   Kontak
========================== */

.footer-contact p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.footer-contact .social-links {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.footer-contact .social-link i {
    font-size: 24px;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #cbd5e1;
}

.footer-contact .social-link:hover i {
    transform: scale(1.2);
    color: #ffffff;
}

/* ==========================
   Maps
========================== */

.map-wrapper {
    display: block;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.map-wrapper:hover {
    transform: translateY(-4px);
}

.map-wrapper iframe {
    width: 100%;
    height: 220px;
    border: 0;
}

/* ==========================
   Footer Bottom
========================== */

.footer-bottom {
    background: #0b1120;
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* Hamburger */
#navbar-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* =====================================================
   SECTION DIVIDER
===================================================== */

.section-divider {
    width: 70%;
    height: 1px;
    margin: 2rem auto;
    /* sebelumnya 4rem */
    background: linear-gradient(to right,
            transparent,
            rgba(0, 0, 0, 0.25),
            transparent);
}

.section-divider-wide {
    width: 85%;
}

.section-divider-soft {
    background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 1100px) {

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-school {
        grid-column: span 2;
        /* full lebar di tablet */
    }
}

/* ==========================
   RESPONSIVE MOBILE
========================== */

@media (max-width: 768px) {

    /* HEADER */
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .header-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex: 1 1 auto;
    }

    .header-left .text h1,
    .header-left .text p,
    .header-right p {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .header-right {
        align-items: center;
        text-align: center;
        margin-top: 5px;
        flex: 1 1 auto;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    /* RESET span supaya tidak bentrok */
    .footer-school {
        grid-column: auto;
    }

    .footer-school,
    .footer-contact {
        text-align: center;
        align-items: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .map-wrapper iframe {
        height: 180px;
    }
}

@media (max-width: 600px) {
    #navbar-toggle {
        display: block;
        color: #fff;
        text-align: right;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 0;
        display: none;
        padding: 10px 0;
    }

    .navbar-menu li {
        text-align: center;
        padding: 10px 0;
    }

    /* Dropdown mobile jadi inline */
    .dropdown-menu {
        position: relative;
        /* 🔥 ubah dari static */
        left: 50%;
        transform: translateX(-50%);
        /* 🔥 center horizontal */

        width: 90%;
        /* 🔥 tidak full biar ada margin kanan kiri */
        max-width: 400px;
        /* opsional biar gak terlalu lebar */

        box-shadow: none;
        border-radius: 5px;
        opacity: 1;
        display: none;
        background-color: #0b7aa3;

        text-align: center;
        padding: 5px 0;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        color: #fff;
        background: transparent;
    }
}

#main-navbar:focus-within .navbar-menu {
    display: flex;
}