/*
Theme Name: SMAN 1 Gamping Modern
Theme URI: https://www.sman1gamping.sch.id
Author: Web Dev Tim IT
Description: Tema modern, elegan, dan responsif khusus untuk Wijayakusuma.
Version: 1.1 (Responsive Fix)
*/

:root {
    --primary-color: #006633; /* Hijau Wijayakusuma */
    --accent-color: #f1c40f;  /* Kuning Emas */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden; /* Mencegah geser kanan-kiri yang tidak perlu */
}

/* =========================================
   1. HEADER & TOP BAR
   ========================================= */

/* Top Bar (Info Kontak di atas) */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-bar a { color: var(--white); text-decoration: none; margin-left: 15px; }

/* Navbar Utama */
.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    background: var(--white);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}
.navbar-brand img { height: 50px; margin-right: 10px; }

/* =========================================
   2. MENU NAVIGASI (RESPONSIF)
   ========================================= */

.main-navigation {
    margin-left: auto;
    display: block;
    width: 100%;
}

/* --- Style Dasar Menu (Berlaku di HP & Laptop) --- */
#primary-menu {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

#primary-menu > li > a {
    color: #333;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    display: block; /* Agar tombol penuh di HP */
    transition: all 0.3s ease;
}

/* Efek Hover (Warna Hijau & Teks Putih) */
#primary-menu > li > a:hover {
    background-color: #006633;
    color: #ffffff !important;
    transform: translateY(-2px); /* Efek naik dikit */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Halaman yang sedang aktif */
#primary-menu > li.current-menu-item > a {
    color: #006633;
    background-color: #e8f5e9;
}

/* --- TAMPILAN KHUSUS HP (Mobile) --- */
@media (max-width: 991px) {
    #primary-menu {
        display: flex;
        flex-direction: column; /* Susun ke bawah */
        gap: 5px;
        margin-top: 15px;
    }
    
    #primary-menu > li > a {
        border: 1px solid #eee; /* Garis tipis pemisah di HP */
    }

    /* Submenu di HP: Tampil statis (tanpa hover) atau diatur script bootstrap */
    #primary-menu .sub-menu {
        display: none; /* Sembunyikan default, muncul jika diklik (butuh JS tambahan) */
        position: relative;
        width: 100%;
        box-shadow: none;
        border-top: none;
        padding-left: 20px; /* Menjorok ke dalam */
    }
}

/* --- TAMPILAN KHUSUS LAPTOP/PC (Desktop) --- */
@media (min-width: 992px) {
    #primary-menu {
        display: flex !important; /* Paksa berjejer ke samping */
        flex-wrap: nowrap;
        align-items: center;
        gap: 15px; /* Jarak antar tombol */
        justify-content: flex-end;
    }

    #primary-menu > li {
        position: relative; /* Jangkar untuk dropdown */
    }

    /* Sub-Menu (Dropdown) */
    #primary-menu .sub-menu {
        display: none;
        position: absolute; /* Melayang */
        top: 100%;
        left: 0;
        background: #fff;
        min-width: 220px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-top: 3px solid #198754;
        list-style: none;
        padding: 0;
        margin: 0;
        z-index: 999;
        border-radius: 0 0 5px 5px;
    }

    /* Isi Dropdown */
    #primary-menu .sub-menu li { border-bottom: 1px solid #f0f0f0; }
    
    #primary-menu .sub-menu li a {
        padding: 12px 20px;
        display: block;
        color: #555;
        font-size: 14px;
        font-weight: 400; /* Lebih tipis dari menu utama */
        border-radius: 0; /* Kotak biasa */
    }

    #primary-menu .sub-menu li a:hover {
        background-color: #f8f9fa;
        color: #198754 !important;
        transform: none; /* Matikan efek naik untuk submenu */
        box-shadow: none;
    }

    /* Animasi Hover Dropdown */
    #primary-menu li:hover > .sub-menu {
        display: block;
        animation: fadeIn 0.3s;
    }
}

/* Animasi Muncul */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. HERO SECTION (GAMBAR UTAMA)
   ========================================= */
.hero-section {
    background: linear-gradient(rgba(0, 50, 20, 0.7), rgba(0, 50, 20, 0.7)), url(https://www.sman1gamping.sch.id/wp-content/uploads/2024/04/cropped-header_gp.png);
    background-size: cover;
    background-position: center;
    min-height: 80vh; /* Gunakan min-height agar fleksibel */
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 15px; /* Padding agar teks tidak mentok pinggir di HP */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Responsif Hero Text untuk HP */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; } /* Kecilkan font judul di HP */
    .hero-subtitle { font-size: 1rem; }
    .hero-section { min-height: 60vh; } /* Kurangi tinggi hero di HP */
}

.search-box {
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    display: inline-block;
    width: 100%;
    max-width: 600px;
}
.search-input {
    border: none;
    background: transparent;
    color: white;
    width: 75%;
    padding: 10px;
    outline: none;
}
.search-input::placeholder { color: #eee; }
.btn-hero {
    background-color: var(--accent-color);
    color: #000;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    border: none;
}

/* =========================================
   4. KONTEN (FITUR, BERITA, FOOTER)
   ========================================= */

/* Feature Cards */
.feature-box {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
    height: 100%;
    margin-bottom: 20px; /* Jarak antar kartu di HP */
}
.feature-box:hover { transform: translateY(-10px); }
.feature-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }

/* News Section */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 {
    font-weight: 700;
    color: var(--primary-color);
    display: inline-block;
}

.news-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    margin-bottom: 20px; /* Jarak di HP */
}
.news-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.news-img { height: 200px; width: 100%; object-fit: cover; }
.news-body { padding: 20px; }
.news-title { font-size: 1.1rem; font-weight: 700; margin: 10px 0; }
.news-title a { text-decoration: none; color: var(--text-dark); }

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #bbb;
    padding: 60px 0 20px;
    font-size: 0.9rem;
}
footer h5 { color: var(--white); margin-bottom: 20px; font-weight: 600; }
footer ul { list-style: none; padding: 0; }
footer ul li { margin-bottom: 10px; }
footer a { color: #bbb; text-decoration: none; transition: 0.3s; }
footer a:hover { color: var(--accent-color); padding-left: 5px; }
.copyright { border-top: 1px solid #333; margin-top: 40px; padding-top: 20px; text-align: center; }

/* Styling Halaman Sambutan/Profil */
.principal-card {
    background: #fff;
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    padding: 30px 20px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
    margin-bottom: 30px; /* Jarak bawah di HP */
}
.principal-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #eee;
}
.page-header-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}
.entry-content { font-size: 1.05rem; line-height: 1.8; color: #444; }
.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    background: #fdfdfd;
    padding: 15px 20px;
    font-style: italic;
    color: #555;
    margin: 20px 0;
}

<footer class="site-footer bg-dark text-white pt-5" style="border-top: 5px solid #f1c40f; position: relative;">
    <div class="container">
        
        <div class="row g-4 mb-5">

            <div class="col-lg-4 col-md-6">
                <div class="mb-4">
                    <h5 class="fw-bold text-warning mb-3">SMAN 1 Gamping</h5>
                    <p class="small text-white-50">
                        "Wijayakusuma" - Unggul, Terpercaya, dan Berbudaya. 
                        Sekolah Adiwiyata Mandiri yang berkomitmen mencetak generasi emas.
                    </p>
                </div>
                
                <h6 class="fw-bold text-white mb-3">Kontak Resmi</h6>
                <ul class="list-unstyled kontak-list small">
                    <li class="d-flex align-items-start mb-3">
                        <i class="fas fa-map-marker-alt text-warning me-3 mt-1 fs-6"></i>
                        <span>Jl. Tegalyoso, Banyuraden, Gamping, Sleman, DIY 55293</span>
                    </li>
                    <li class="d-flex align-items-center mb-3">
                        <i class="fas fa-phone-alt text-warning me-3 fs-6"></i>
                        <span>(0274) 626345</span>
                    </li>
                    <li class="d-flex align-items-center mb-3">
                        <i class="fas fa-envelope text-warning me-3 fs-6"></i>
                        <span>smangamping@gmail.com</span>
                    </li>
                </ul>

                <div class="mt-4">
                    <a href="#" class="sosmed-btn me-2"><i class="fab fa-instagram"></i></a>
                    <a href="#" class="sosmed-btn me-2"><i class="fab fa-youtube"></i></a>
                    <a href="#" class="sosmed-btn me-2"><i class="fab fa-facebook-f"></i></a>
                </div>
            </div>

            <div class="col-lg-4 col-md-6">
                <h5 class="fw-bold text-warning mb-4">Visi & Misi Utama</h5>
                <div class="p-3 rounded border border-secondary bg-black bg-opacity-25 mb-4">
                    <p class="small fst-italic text-white mb-0">"Terwujudnya Sekolah Unggul dan Terpercaya."</p>
                </div>
                
                <ul class="list-unstyled misi-list small text-white-50">
                    <li class="mb-2"><i class="fas fa-check-circle text-success me-2"></i> Ketaqwaan & Budi Pekerti</li>
                    <li class="mb-2"><i class="fas fa-check-circle text-success me-2"></i> Prestasi Akademik & Non-Akademik</li>
                    <li class="mb-2"><i class="fas fa-check-circle text-success me-2"></i> Layanan Berbasis TIK</li>
                </ul>

                <h5 class="fw-bold text-warning mt-4 mb-3">Akses Cepat</h5>
                <ul class="list-unstyled d-flex flex-wrap gap-3 small fw-bold">
                    <li><a href="#" class="footer-link-item">PPDB 2026</a></li>
                    <li><a href="#" class="footer-link-item">E-Rapor</a></li>
                    <li><a href="#" class="footer-link-item">Perpustakaan</a></li>
                    <li><a href="#" class="footer-link-item">Alumni</a></li>
                </ul>
            </div>

            <div class="col-lg-4 col-md-12">
                <h5 class="fw-bold text-warning mb-3">
                    <i class="fas fa-map-marked-alt me-2"></i>Titik Zonasi PPDB
                </h5>
                <div class="map-wrapper rounded shadow-lg overflow-hidden border border-secondary position-relative">
                    <iframe 
                        width="100%" 
                        height="250" 
                        frameborder="0" 
                        scrolling="no" 
                        marginheight="0" 
                        marginwidth="0" 
                        src="https://maps.google.com/maps?q=-7.7880786245603515,110.33486021020559&hl=id&z=17&ie=UTF8&iwloc=&output=embed"
                        style="filter: grayscale(20%) contrast(1.1);">
                    </iframe>
                    
                    <div class="position-absolute bottom-0 start-0 bg-warning text-dark px-3 py-1 fw-bold small rounded-top-end">
                        Radius 0 KM
                    </div>
                </div>
                <small class="d-block mt-2 text-white-50 fst-italic" style="font-size: 0.8rem;">
                    *Titik koordinat (-7.788, 110.334) sesuai Juknis PPDB 2026.
                </small>
            </div>

        </div>
    </div>

    <div class="copyright py-3" style="background-color: #000; border-top: 1px solid #333;">
        <div class="container text-center">
            <p class="mb-0 small text-secondary">
                © 2026 <strong>SMAN 1 Gamping</strong>. All Rights Reserved. 
                <span class="d-none d-md-inline">| Developed by <span class="text-warning">Tim IT Sekolah</span></span>
            </p>
        </div>
    </div>
</footer>

<a href="#" id="backToTop" class="btn btn-warning rounded-circle shadow-lg d-flex align-items-center justify-content-center" 
   style="position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; z-index: 999; display: none;">
    <i class="fas fa-arrow-up text-dark fw-bold"></i>
</a>

<?php wp_footer(); ?>

<script>
// Script Tombol Back to Top
jQuery(document).ready(function($) {
    $(window).scroll(function() {
        if ($(this).scrollTop() > 300) $('#backToTop').fadeIn();
        else $('#backToTop').fadeOut();
    });
    $('#backToTop').click(function() {
        $('html, body').animate({scrollTop: 0}, 800);
        return false;
    });
});
</script>

</body>
</html>

/* =========================================
   STYLE UNTUK HALAMAN BERITA (SINGLE POST)
   ========================================= */

/* Membuat teks artikel lebih enak dibaca */
.entry-content {
    font-size: 1.1rem;      /* Ukuran font sedikit lebih besar */
    line-height: 1.8;       /* Jarak antar baris renggang */
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5rem;  /* Jarak antar paragraf */
}

/* Style Judul (Heading) di dalam artikel */
.entry-content h2, 
.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #006633;         /* Warna hijau sekolah */
    font-weight: 700;
}

/* Quote/Kutipan */
.entry-content blockquote {
    border-left: 5px solid #f1c40f; /* Garis kuning emas */
    background: #fdfdfd;
    padding: 15px 20px;
    font-style: italic;
    color: #555;
    margin: 20px 0;
}

/* Gambar di dalam artikel */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
}

/* Hover effect untuk link di sidebar */
.hover-green:hover {
    color: #006633 !important;
}

.object-fit-cover {
    object-fit: cover; /* Agar gambar thumbnail kotak sempurna */
}

/* Style tombol tag */
.article-footer a {
    text-decoration: none;
    color: #006633;
}
.article-footer a:hover {
    text-decoration: underline;
}

/* =========================================
   PERBAIKAN MENU TERTUTUP (Z-INDEX FIX)
   ========================================= */

/* 1. Paksa Header/Navbar selalu di lapisan paling atas */
header, .navbar, .site-header {
    position: relative; /* Atau sticky/fixed tergantung setup */
    z-index: 9999 !important; /* Angka keramat biar menang lawan elemen lain */
}

/* 2. Pastikan Sidebar 'mengalah' */
.sidebar-wrapper {
    z-index: 1; /* Angka kecil, jadi dia di belakang header */
}

/* 3. PERMANIS TAMPILAN DROPDOWN (Bonus) */
/* Biar menu dropdown terlihat lebih tajam dan tidak transparan */
.dropdown-menu {
    border: none; /* Hilangkan garis pinggir bawaan yang kaku */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Bayangan lembut biar 'melayang' */
    border-radius: 8px; /* Sudut melengkung */
    padding: 10px 0; /* Jarak napas atas bawah */
    margin-top: 10px; /* Jarak sedikit dari menu utama */
    z-index: 10000; /* Pastikan dropdown juga punya power tinggi */
}

/* Efek Panah Kecil di atas Dropdown (Opsional - Biar manis) */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0; 
    height: 0; 
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

/* =========================================
   FIX MENU TERTUTUP GAMBAR HERO
   ========================================= */

/* 1. Pastikan Header & Navigasi adalah RAJA (Layer Tertinggi) */
header, .navbar {
    position: relative; 
    z-index: 9999 !important; /* Angka 'dewa' biar selalu di atas */
}

/* 2. Pastikan Submenu (Dropdown) punya kekuatan lebih tinggi lagi */
.dropdown-menu {
    z-index: 10000 !important; 
}

/* 3. Paksa Hero / Slider untuk 'mengalah' di layer bawah */
.hero-section, 
#hero, 
.carousel,
.main-banner {
    position: relative;
    z-index: 1 !important; /* Angka kecil, biar dia di belakang menu */
}