/*
 * File: style.css
 * Lokasi: /assets/css/style.css
 * Deskripsi: Stylesheet utama - FINAL CLEAN VERSION
 */

/* === 1. Global Reset & Body === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: #0056b3; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* === 2. Tombol === */
.btn-primary {
    display: inline-block; background-color: #007bff; color: #fff;
    padding: 10px 20px; border-radius: 5px; font-weight: bold; text-align: center;
}
.btn-primary:hover { background-color: #0056b3; color: #fff; text-decoration: none; }
.btn-secondary {
    display: inline-block; background-color: #6c757d; color: #fff;
    padding: 8px 15px; border-radius: 5px; font-size: 0.9em;
}
.btn-secondary:hover { background-color: #5a6268; color: #fff; text-decoration: none; }

/* === 3. Header & Navbar === */
.navbar {
    background-color: #ffffff; padding: 15px 0; border-bottom: 2px solid #e9ecef;
    position: sticky; top: 0; z-index: 1000;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.navbar-brand {
    font-size: 1.5em; color: #333; display: flex; align-items: center;
    gap: 10px; font-weight: bold;
}
.navbar-brand span { white-space: nowrap; }
.navbar-logo { height: 40px; width: auto; }
.navbar-brand:hover { text-decoration: none; }
.navbar-nav ul { list-style: none; display: flex; }
.navbar-nav li { margin-left: 20px; }
.navbar-nav a { color: #555; font-weight: 500; font-size: 1em; }
.navbar-nav a:hover { color: #007bff; text-decoration: none; }

/* === 4. Main Content & Footer === */
.main-content { min-height: 70vh; }
.site-footer {
    background-color: #343a40; color: #f8f9fa; padding: 30px 0;
    margin-top: 40px; text-align: center; font-size: 0.9em;
}
.site-footer p { margin-bottom: 10px; }

/* === 5. Halaman Utama (index.php) === */
.hero-section {
    background-color: #0056b3; background-image: url('../images/bangunan.jpg');
    background-size: cover; background-position: center; background-repeat: no-repeat;
    color: #ffffff; padding: 80px 0; text-align: center; position: relative; z-index: 1;
}
.hero-section::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: -1;
}
.hero-section h1 { font-size: 2.8em; margin-bottom: 20px; }
.hero-section p { font-size: 1.2em; margin-bottom: 30px; }
.hero-section .btn-primary { background-color: #ffffff; color: #2e2e2e; font-size: 1.1em; }
.hero-section .btn-primary:hover { background-color: #f0f0f0; }

.welcome-section { padding: 60px 0; background-color: #ffffff; }
.welcome-section h2 { text-align: center; margin-bottom: 40px; font-size: 2em; }
.welcome-content { display: flex; align-items: flex-start; gap: 30px; }
.welcome-image { width: 250px; height: auto; border-radius: 8px; border: 1px solid #ddd; }
.welcome-content p{ text-align: justify; }

/* Latest Posts */
.latest-posts-section { padding: 60px 0; }
.latest-posts-section h2 { text-align: center; margin-bottom: 40px; font-size: 2em; }
.posts-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.post-card {
    background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px;
    overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0; width: 350px;
    display: flex; flex-direction: column;
}
.post-card-image { width: 100%; height: 200px; object-fit: cover; }
.post-card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.post-card-content h3 { margin-bottom: 10px; font-size: 1.3em; }
.post-card-content p { margin-bottom: 20px; color: #555; }
.post-card-content .btn-secondary { margin-top: auto; }
.post-card-date { display: block; font-size: 0.85em; color: #6c757d; margin-bottom: 5px; }

/* === 6. Halaman Profil & Umum === */
.page-content {
    padding: 40px 0; background-color: #ffffff; border-radius: 8px;
    margin-top: 30px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.pendiri {
    display: block; margin-right: auto; margin-left: 25px; margin-bottom: 25px;
    max-width: 500px; width: 100%; height: auto; border-radius: 8px; border: 1px solid #ddd;
}
.page-header { text-align: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid #e9ecef; }
.page-header h1 { font-size: 2.5em; color: #333; }
.profile-section { margin-bottom: 40px; }
.profile-section h2 { font-size: 2em; color: #0056b3; margin-bottom: 20px; padding-left: 25px; }
.profile-section h3 { font-size: 1.5em; color: #333; margin-top: 20px; margin-bottom: 15px; padding-left: 25px; }
.profile-section p {
    margin-bottom: 15px; color: #555; text-align: justify; padding-left: 25px; padding-right: 25px;
}
.vision-mission {
    font-size: 1.2em; font-style: italic; color: #333; padding-left: 20px;
    border-left: 4px solid #007bff; margin: 20px 0;
}
.mission-list, .tujuan, .facilities-list { padding-left: 20px; margin-left: 20px; }
.mission-list li, .tujuan li, .facilities-list li { margin-bottom: 10px; color: #555; }

/* === 7. Struktur Organisasi === */
.struktur-organisasi {
    display: block; width: 80%; max-width: 900px; margin-left: auto;
    margin-right: auto; margin-bottom: 40px; border-radius: 8px; border: 1px solid #ddd;
}
.Jajaran { text-align: center; margin-bottom: 20px; }
.staff-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px;
}
.staff-card {
    background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); text-align: center; padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; height: 100%;
}
.staff-card:hover { transform: translateY(-5px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.staff-photo {
    width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
    border: 3px solid #e9ecef; margin-bottom: 20px; margin-left: auto; margin-right: auto;
}
.staff-name { font-size: 1.4em; color: #333; margin-bottom: 5px; }
.staff-title { font-size: 1em; color: #007bff; font-weight: bold; margin-top: auto; }

/* === 8. Alumni === */
.search-form-section {
    background-color: #f8f9fa; padding: 25px; border-radius: 8px;
    margin-bottom: 40px; border: 1px solid #e9ecef;
}
.search-form-section h3 { margin-bottom: 20px; font-size: 1.5em; }
.alumni-search-form { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: 5px; font-weight: 500; }
.form-group input[type="text"], .form-group input[type="number"] {
    padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em;
}
.form-group .btn-secondary { background-color: #6c757d; }
.alumni-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; }
.alumni-card {
    background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); padding: 20px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.alumni-photo {
    width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
    border: 3px solid #e9ecef; margin-bottom: 15px;
}
.alumni-name { font-size: 1.3em; color: #333; margin-bottom: 5px; }
.alumni-year { font-size: 1em; color: #007bff; margin-bottom: 15px; }
.alumni-info { font-size: 0.9em; color: #555; margin-bottom: 5px; }

/* === 9. Kontak === */
.contact-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.contact-info h2 { font-size: 2em; color: #0056b3; margin-bottom: 20px; padding-left: 25px; }
.contact-info h3 { font-size: 1.5em; color: #333; margin-top: 30px; margin-bottom: 15px; padding-left: 25px; }
.contact-info p { line-height: 1.7; color: #555; padding-left: 25px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: 10px; font-size: 1.1em; padding-left: 25px; }
.contact-map h2 { font-size: 2em; color: #0056b3; margin-bottom: 20px; }
.map-placeholder iframe { border-radius: 8px; width: 100%; }

/* === 10. Berita Detail === */
.news-detail-content { padding-left: 25px; padding-right: 25px; }
.news-detail-image { padding-left: 25px; padding-right: 25px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

/* === 11. Pengumuman & Modal === */
.announcements-section {
    padding: 60px 0; background-color: #f8f9fa;
    border-top: 1px solid #e9ecef; border-bottom: 1px solid #e9ecef;
}
.announcements-section h2 { text-align: center; margin-bottom: 40px; font-size: 2em; }
.announcements-list { display: flex; flex-direction: column; gap: 20px; }
.announcement-item {
    background-color: #ffffff; border: 1px solid #ddd; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); overflow: hidden;
}
.announcement-header {
    background-color: #007bff; color: #ffffff; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.announcement-header h3 { font-size: 1.3em; margin: 0; }
.announcement-date { font-size: 0.9em; font-style: italic; flex-shrink: 0; margin-left: 20px; }
.announcement-body { padding: 20px; font-size: 1.05em; line-height: 1.7; color: #333; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); z-index: 2000; justify-content: center; align-items: center;
}
.modal-content {
    position: relative; background-color: #fff; padding: 10px;
    border-radius: 5px; max-width: 90%; max-height: 90%;
}
.popup-image { width: 100%; max-width: 600px; max-height: 80vh; object-fit: contain; }
.modal-close-button {
    position: absolute; top: -15px; right: -15px; background-color: #007bff; color: #fff;
    border: 2px solid #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 28px;
    font-weight: bold; text-align: center; line-height: 38px; cursor: pointer; z-index: 2001;
}
.modal-close-button:hover { background-color: #0056b3; }

/* ========================================= */
/* RESPONSIVE DESIGN & HAMBURGER MENU        */
/* ========================================= */

.menu-toggle { display: none; } /* Default hidden di PC */

/* === TAMPILAN HP (Layar <= 768px) === */
@media (max-width: 768px) {

    /* Navbar */
    .navbar .container { flex-wrap: wrap; justify-content: space-between; }
    .menu-toggle { display: block; background: none; border: none; cursor: pointer; padding: 10px; }
    .menu-toggle .bar {
        display: block; width: 25px; height: 3px; margin: 5px auto;
        background-color: #333; transition: all 0.3s ease-in-out;
    }
    .navbar-nav { width: 100%; display: none; margin-top: 15px; border-top: 1px solid #eee; }
    .navbar-nav.active { display: block; animation: slideDown 0.3s ease forwards; }
    .navbar-nav ul { flex-direction: column; width: 100%; padding: 0; }
    .navbar-nav li { margin-left: 0; text-align: center; width: 100%; border-bottom: 1px solid #f0f0f0; }
    .navbar-nav a { display: block; padding: 15px; background-color: #ffffff; }
    .navbar-nav a:hover { background-color: #f8f9fa; }

    /* Berita Vertikal */
    .posts-grid {
        display: grid; grid-template-columns: 1fr; /* 1 Kolom */
        overflow-x: visible; padding-bottom: 0; gap: 25px;
    }
    .post-card { width: 100% !important; flex-shrink: 1; margin-right: 0; }

    /* KONTAK (Fixed) */
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    
    /* Judul Peta Kecil & Rapi */
    .contact-map h2 {
        font-size: 1.6em; /* Font lebih kecil untuk HP */
        margin-bottom: 15px; 
        margin-top: 0;
    }
    .contact-map iframe {
        height: 300px; width: 100%; border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    /* Memberi jarak kiri-kanan yang cukup (20px) agar tidak nempel layar */
    .contact-info h2, 
    .contact-info h3, 
    .contact-info p, 
    .contact-list li {
        padding-left: 20px; 
        padding-right: 20px;
    }

    /* Lain-lain */
    .hero-section { padding: 50px 20px; }
    .hero-section h1 { font-size: 1.8em; }
    .welcome-content { flex-direction: column; }
    .welcome-image { width: 100%; margin-bottom: 20px; height: auto; }
    .staff-grid, .alumni-grid, .news-grid { grid-template-columns: 1fr; }
    .profile-section p, .mission-list, .tujuan, .facilities-list, .eskul-list, .prestasi-list {
        padding-left: 10px; padding-right: 10px;
    }
    .chart-image { width: 100%; }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}