/* ======================================================================
   PROFIL SEKOLAH STYLESHEET
   Refactored & Responsive Optimized
   ====================================================================== */

/* --- 1. VARIABEL & RESET --- */
:root {
    --color-blue: #004d80;
    --color-blue-dark: #00375a;
    --color-orange: #ff7f27;
    --color-yellow: #f3cc0b;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-muted: #555555;
    --color-bg: #f4f4f4;
    --shadow-soft: 0 5px 20px rgba(0, 0, 0, 0.05);
    --shadow-hard: 8px 8px 0px var(--color-yellow);
    --radius-std: 15px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: #333333;
    /* UPDATE: Texture dipindahkan ke sini sebagai background utama */
    background-color: #f4f4f4;
    background-image: url('Asset/texture.png');
    background-repeat: repeat;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title,
.school-name,
.cta-button,
.main-menu {
    font-family: 'Fredoka', sans-serif;
}

a {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-orange);
}

ul {
    list-style: none;
}

/* --- 2. UTILITAS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.section-padding {
    padding: 80px 0;
}


/*page header*/

.page-header {
    background-image: linear-gradient(rgba(0, 77, 128, 0.8), rgba(0, 77, 128, 0.8)), url('Asset/bg4.png');
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    text-align: center;
    color: #ffffff;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.breadcrumb {
    font-size: 1em;
    color: #f3cc0b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb a {
    color: #ffffff;
}

.breadcrumb a:hover {
    color: #f3cc0b;
}

/* Styling Konten Halaman */
.page-content {
    padding-bottom: 80px;
}

.content-wrapper {
    background: #ffffff;
    /* Warna dasar putih untuk kotak konten */
    /* background-image dihapus agar bersih */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.content-wrapper h3 {
    color: #004d80;
    border-bottom: 3px solid #f3cc0b;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

/* --- 3. HEADER & NAVIGASI --- */
#wrapper {
    overflow: hidden;
    position: relative;
}

#main-header {
    background-color: #ffffff;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
}

#main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #f3cc0b;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100px;
    gap: 40px;
}

.logo a {
    display: block;
}

.logo a img {
    height: auto;
    max-height: 130px;
    width: auto;
    display: block;
}

/* Menu Desktop */
#main-nav {
    display: block;
}

.main-menu {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-menu>li {
    position: relative;
    padding: 0 15px;
    /* Jarak antar item menu */
    height: 100px;
    /* Menyamakan tinggi dengan header agar hover full height */
    display: flex;
    align-items: center;
}

.main-menu>li>a {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: #333333;
    gap: 8px;
}

.main-menu>li>a i {
    color: #ff7f27;
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.main-menu>li:hover>a i {
    transform: scale(1.2);
}

.main-menu>li:hover>a,
.main-menu>li.current-menu-item>a {
    color: #007bff;
}

/* Dropdown Desktop */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    z-index: 99;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease-in-out;
    border-top: 3px solid #f3cc0b;
    border-radius: 0 0 8px 8px;
    padding: 0;
    transform: translateY(10px);
}

.main-menu>li:hover>.sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.sub-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.sub-menu li:last-child {
    border-bottom: none;
}

.sub-menu a {
    padding: 12px 20px;
    font-size: 14px;
    display: block;
    color: #555555;
    font-family: 'Nunito', sans-serif;
}

.sub-menu a:hover {
    background-color: #fffcf0;
    color: #ff7f27;
    padding-left: 25px;
    /* Efek geser sedikit saat hover */
}

/* Mobile Toggle Button */
.mobile-menu-toggle {
    display: none;
    /* Styling detail ada di Media Query bawah */
}

/* --- 5. KONTEN HALAMAN --- */
.page-content {
    padding-bottom: 80px;
}

.content-wrapper {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius-std);
    box-shadow: var(--shadow-soft);
}

.content-wrapper h3 {
    color: var(--color-blue);
    border-bottom: 3px solid var(--color-yellow);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
    margin-top: 10px;
    font-size: 1.5em;
}

.content-wrapper p {
    margin-bottom: 15px;
    color: var(--color-text-muted);
    text-align: justify;
}

.sejarah-content p {
    margin-bottom: 20px;
}

/* --- 6. TABEL IDENTITAS --- */
.identity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
}

.identity-table tr {
    border-bottom: 1px solid #eee;
}

.identity-table td {
    padding: 15px 10px;
    vertical-align: top;
}

.identity-table td:first-child {
    font-weight: bold;
    width: 30%;
    color: var(--color-blue);
    white-space: nowrap;
    /* Mencegah label turun baris di desktop */
}

/* --- 7. PROFIL KEPALA SEKOLAH (CARD) --- */
.headmaster-section {
    display: flex;
    gap: 40px;
    align-items: center;
    background-color: #f9fcff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 2px solid #eef9ff;
    margin-top: 15px;
}

.headmaster-img-wrapper {
    flex: 0 0 220px;
    position: relative;
}

.headmaster-img-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    border: 4px solid var(--color-blue);
    box-shadow: var(--shadow-hard);
    transition: transform 0.3s ease;
}

.headmaster-img-wrapper img:hover {
    transform: scale(1.02);
}

.headmaster-content {
    flex: 1;
}

.quote-icon {
    font-size: 2em;
    color: var(--color-yellow);
    margin-bottom: 15px;
    display: block;
}

.quote-text {
    font-size: 1.1em;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.headmaster-name {
    font-weight: 700;
    color: var(--color-blue);
    font-size: 1.2em;
    margin: 0;
    text-transform: uppercase;
}

.headmaster-info {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    width: fit-content;
    margin-top: 10px;
}

.headmaster-title {
    font-size: 0.95em;
    color: #777;
    font-weight: 600;
}

/* --- 8. FOOTER --- */
#main-footer {
    background-color: #2a2a2a;
    color: var(--color-white);
    padding-top: 60px;
    padding-bottom: 20px;
    border-top: 8px solid var(--color-yellow);
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #444;
}

.footer-grid>div {
    flex: 1;
    min-width: 250px;
}

.footer-links-section h3,
.footer-contact-section h3 {
    color: var(--color-yellow);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.footer-links-section ul li {
    margin-bottom: 10px;
}

.footer-links-section ul li a {
    color: #ccc;
}

.footer-links-section ul li a:hover {
    color: var(--color-yellow);
    padding-left: 5px;
}

.footer-contact-section p {
    margin-bottom: 12px;
    color: #ddd;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact-section p i {
    color: var(--color-yellow);
    margin-top: 5px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #444;
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--color-yellow);
    color: #333;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9em;
    color: #888;
}

/* --- 9. FLOAT WA --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}


/* ======================================================================
   MEDIA QUERIES (MOBILE RESPONSIVE)
   ====================================================================== */

@media (max-width: 900px) {

    /* Header Mobile */
    .header-container {
        padding: 10px 20px;
        justify-content: space-between;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-menu-toggle button {
        background: none;
        border: none;
        font-size: 24px;
        color: var(--color-blue);
        cursor: pointer;
    }

    /* Main Menu Mobile Style */
    #main-nav {
        display: none;
        /* JS akan toggle class .active */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-top: 2px solid var(--color-yellow);
        padding-bottom: 20px;
        z-index: 999;
    }

    #main-nav.active {
        display: block;
        animation: slideDown 0.3s forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .main-menu>li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid #eee;
        padding: 0;
    }

    .main-menu>li>a {
        padding: 15px 20px;
        width: 100%;
        justify-content: flex-start;
    }

    /* Submenu Mobile - Tampil saat induk di klik atau hover (opsional: bisa dibuat click only via JS) */
    .sub-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f9f9f9;
        display: none;
        padding-left: 20px;
    }

    .main-menu>li:hover .sub-menu {
        display: block;
    }

    /* Page Header Mobile */
    .page-header h1 {
        font-size: 2em;
    }

    .content-wrapper {
        padding: 25px 20px;
    }

    /* Headmaster Mobile - Susun Vertikal */
    .headmaster-section {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 20px;
    }

    .headmaster-info {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .headmaster-img-wrapper {
        margin-right: 0;
        margin-bottom: 0px;
        flex: 0 0 auto;
        width: 100%;
        max-width: 250px;
        /* Batasi lebar agar tidak raksasa */
    }

    /* Footer Mobile */
    .footer-grid {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-contact-section p {
        justify-content: center;
    }
}

@media (max-width: 600px) {

    /* Responsive Table - Stack Mode */
    .identity-table,
    .identity-table tbody,
    .identity-table tr,
    .identity-table td {
        display: block;
        width: 100%;
    }

    .identity-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
        background: #fdfdfd;
    }

    .identity-table td {
        padding: 5px 0;
        text-align: left;
    }

    .identity-table td:first-child {
        width: 100%;
        color: var(--color-blue);
        margin-bottom: 2px;
        font-size: 0.9em;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px dashed #eee;
        padding-bottom: 5px;
    }

    .identity-table td:last-child {
        font-weight: 600;
        padding-top: 5px;
    }

    /* Floating Button Adjustment */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}