/* ==========================================================================
   PREMIUM ACADEMIC NAVBAR (TIMES NEW ROMAN EDITION) - OPTIMIZED
   Sistem Informasi Profil Sekolah - SMP Yos Sudarso Kawunganten
   ========================================================================== */

/* 1. Base Structure & Background */
.navbar {
    background-color: #0D1B2A !important; /* Warna Navy Deep */
    border-bottom: 3px solid #D4AF37;    /* Aksen Garis Emas bawah navbar */
    transition: all 0.3s ease;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    z-index: 1030;
}

/* 2. Brand & Logo Area */
.navbar-brand {
    color: #FFFFFF !important;
    font-family: 'Times New Roman', Times, serif !important; /* Font akademik */
    letter-spacing: 0.5px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #D4AF37 !important; /* Berubah emas saat logo di-hover */
}

.navbar-brand img {
    border: 2px solid #D4AF37; /* Lingkaran emas tipis di sekeliling logo */
    padding: 1px;
    background-color: #FFFFFF;
    object-fit: cover;
}

/* 3. Navigation Links Style */
.navbar-nav {
    gap: 0.15rem; /* Menjaga jarak antar menu tetap presisi & seragam */
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 0.9rem; /* Ukuran yang pas untuk memuat seluruh menu (termasuk Unduhan & SPMB/PPDB) */
    font-weight: 600;
    padding: 0.5rem 0.65rem !important;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap; /* Mencegah teks menu patah menjadi 2 baris */
}

/* Efek Hover Link Navigasi */
.navbar-nav .nav-link:hover {
    color: #D4AF37 !important;
}

/* Trik Garis Bawah (Underline Effect) saat Hover & Aktif */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0.2rem;
    left: 0.65rem;
    background-color: #D4AF37;
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-item.active .nav-link::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 1.3rem);
}

/* Efek Penanda jika Menu sedang Aktif (Halaman saat ini) */
.navbar-nav .nav-item.active .nav-link, 
.navbar-nav .nav-link.active {
    color: #D4AF37 !important;
    font-weight: 700;
}

/* 4. Hamburger Button Mobile (Toggle) */
.navbar-toggler {
    border-color: rgba(212, 175, 55, 0.5) !important;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25) !important;
}

/* Mengubah warna icon hamburger bawaan Bootstrap menjadi putih/emas */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* 5. Optimization for Medium Screens (Laptop / Tablet Landscape) */
@media (min-width: 992px) and (max-width: 1200px) {
    .navbar-brand {
        font-size: 0.95rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.82rem;
        padding: 0.5rem 0.45rem !important;
    }

    .navbar-nav .nav-link::after {
        left: 0.45rem;
    }

    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-item.active .nav-link::after,
    .navbar-nav .nav-link.active::after {
        width: calc(100% - 0.9rem);
    }
}

/* 6. Responsive Layer (Mobile Tweak) */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #1B263B; /* Warna biru royal untuk dropdown mobile */
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 8px;
        margin-top: 0.75rem;
        padding: 0.75rem 1rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-brand .school-name {
        font-size: 0.9rem; /* Mengecilkan teks sekolah di HP agar tidak meluap */
    }

    .navbar-nav {
        gap: 0;
        align-items: flex-start !important; /* Menyelaraskan teks menu ke kiri saat tampilan mobile */
    }

    .navbar-nav .nav-link {
        padding: 0.65rem 0.5rem !important;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 0.95rem;
        width: 100%;
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link::after {
        display: none; /* Matikan efek garis bawah hover di layar mobile */
    }
}