/* ==========================================================================
   1. GLOBAL & UTILITIES
   ========================================================================== */
.section-divider {
    width: 80px;
    height: 6px;
    background: hsl(224, 100%, 50%);
    margin-bottom: 25px;
    border-radius: 10px;
}

.text-justify { text-align: justify; }

.text-xs {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==========================================================================
   2. NAVIGATION (HEADER)
   ========================================================================== */
.nav-link {
    font-weight: 500;
    color: #444 !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1rem;
    width: 0;
    height: 2px;
    background-color: var(--bs-primary);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.nav-link:hover, .nav-link.active {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

.nav-link:hover::after, .nav-link.active::after {
    width: calc(100% - 2rem);
}

/* Login Button */
.nav-login {
    background-color: var(--bs-primary);
    color: white !important;
    border-radius: 50px;
    padding: 0.5rem 1.5rem !important;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.15);
}

.nav-login:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.25);
}
.nav-login::after { display: none; }

/* Dropdown Styling */
.dropdown-menu {
    border-radius: 15px !important;
    padding: 0.75rem !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1) !important;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    transition: all 0.25s ease;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: var(--bs-primary);
    padding-left: 1.5rem;
}

.dropdown-toggle::after {
    transition: transform 0.3s ease;
    vertical-align: middle;
}

/* Desktop Hover & Animations */
@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: navDropdownFade 0.3s ease forwards;
    }
    .nav-item.dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg); 
    }
}

@keyframes navDropdownFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3. HOME SECTIONS (LANDING PAGE)
   ========================================================================== */

/* --- Marquee Hero --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    display: flex;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    will-change: transform;
}

.marquee-track img {
    width: auto;
    height: 80px;
    object-fit: cover;
    margin-right: 20px;
}

/* --- Tentang Kami --- */
.about-img-wrapper {
    position: relative;
    padding: 10px;
}

.about-img-wrapper::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--bs-primary);
    border-radius: 1.5rem;
    opacity: 0.3;
}

.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    background-color: #fff;
}

.stats-card i {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* --- Visi Misi Tujuan --- */
.vm-card {
    padding: 3rem 2rem;
    border-radius: 2rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
}

.vm-card:hover { transform: translateY(-10px); }

.vm-card-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
    color: white;
}

.vm-card-primary .section-divider { background: rgba(255, 255, 255, 0.8); }

.custom-list {
    list-style: none;
    padding-left: 0;
}

.custom-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.custom-list li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--bs-primary);
}

.vm-card-primary .custom-list li::before { color: rgba(255, 255, 255, 0.9); }

.custom-list-scroll {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 15px;
}

.custom-list-scroll::-webkit-scrollbar { width: 5px; }
.custom-list-scroll::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.custom-list-scroll::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }

.custom-list-scroll-white::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); }
.custom-list-scroll-white::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); }

.vm-accordion-white .accordion-item {
    border: none;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.vm-accordion-white .accordion-button:not(.collapsed) {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    box-shadow: none;
}

.vm-accordion-white .accordion-button::after { filter: brightness(0) invert(1); }

/* --- Berita Terbaru --- */
.news-card {
    border: none;
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

.news-img-container {
    overflow: hidden;
    height: 220px;
}

.news-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.1);
}

.news-date {
    color: var(--bs-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- Sarana & Prasarana --- */
.facility-card {
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.facility-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

.facility-img-container {
    height: 220px;
    overflow: hidden;
}

.facility-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.facility-card:hover .facility-img-container img { transform: scale(1.1); }

/* --- Testimoni --- */
.testimonial-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--bs-primary);
}

.quote-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--bs-primary);
    opacity: 0.1;
}

.testimonial-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--bs-primary);
    padding: 2px;
}

/* ==========================================================================
   4. MOBILE NAVIGATION ADJUSTMENTS
   ========================================================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1.5rem;
        border-radius: 20px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        text-align: left;
    }

    .navbar-nav {
        padding-bottom: 1rem;
        align-items: flex-start !important;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f8f9fa;
    }
    .nav-item:last-child { border-bottom: none; }
    .nav-link::after { display: none; }
    .nav-link.active {
        font-weight: 700;
        background-color: rgba(13, 110, 253, 0.05);
        border-left: 4px solid var(--bs-primary);
        padding-left: 1.5rem !important;
        border-radius: 0 10px 10px 0;
    }
    .dropdown-menu {
        text-align: left;
        background-color: #f8f9fa !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 1rem !important;
    }
    .nav-login {
        display: inline-block;
        margin-top: 1rem;
    }
}

/* ==========================================================================
   5. STRUKTUR ORGANISASI
   ========================================================================== */
#struktur-organisasi {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f8f9fa 0%, #eef2f7 100%) !important;
}

.leader-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04), 0 1px 8px rgba(0,0,0,0.02);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    z-index: 1;
}

.leader-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

.leader-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

@media (min-width: 992px) {
    .org-hierarchy-container {
        position: relative;
    }
    .org-hierarchy-container::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 80px;
        background: linear-gradient(to bottom, var(--bs-primary), transparent);
        opacity: 0.3;
        z-index: 0;
    }
}

.leader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.principal-card {
    padding: 3.5rem 2rem;
    box-shadow: 0 20px 40px rgba(13, 110, 253, 0.1) !important;
}

.wakasek-card {
    padding: 2rem 1rem;
    border-bottom: none !important;
}

.wakasek-card .leader-avatar {
    width: 100px;
    height: 100px;
    margin-bottom: 1.25rem;
}

.staff-card {
    padding: 1.25rem 1rem;
}

.staff-card .leader-avatar {
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
}

.role-badge {
    font-size: 0.7rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
}

/* Staff Tabs Customization */
#staffTab .nav-link {
    margin: 0 5px;
    color: #6c757d !important;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #e9ecef;
    padding: 0.8rem 1.8rem !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#staffTab .nav-link:hover:not(.active) {
    background-color: #f8f9fa;
    color: var(--bs-primary) !important;
    transform: translateY(-3px);
    border-color: var(--bs-primary);
}

#staffTab .nav-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.3);
    transform: scale(1.08);
}

/* Mobile Optimization for Staff Tabs */
@media (max-width: 767.98px) {
    #staffTab {
        background: #f1f3f7;
        display: flex;
        flex-wrap: nowrap !important;
        gap: 4px;
        margin: 0 10px 1.5rem 10px;
        padding: 5px;
        border-radius: 16px;
        border: 1px solid rgba(0,0,0,0.05);
    }
    #staffTab .nav-item {
        flex: 1;
        min-width: 0;
    }
    #staffTab .nav-link {
        margin: 0 !important;
        background: transparent !important;
        border-radius: 12px !important;
        border: none !important;
        padding: 10px 2px !important;
        font-size: 1rem !important;
        line-height: 1.1;
        color: #6c757d !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        box-shadow: none !important;
        transform: none !important;
        height: 100%;
        justify-content: center;
        min-height: 55px;
    }
    #staffTab .nav-link i {
        margin-right: 0 !important;
        margin-bottom: 5px;
        font-size: 1.1rem;
        opacity: 0.7;
    }
    #staffTab .nav-link.active {
        font-weight: 700;
        background: #ffffff !important;
        color: var(--bs-primary) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    }
    #staffTab .nav-link.active i { opacity: 1; }
}

/* ==========================================================================
   6. LOGIN & CONTACT SECTIONS
   ========================================================================== */
.login-section {
    background-color: #f8f9fa;
    background-image: radial-gradient(circle at 2% 52%, rgba(13, 110, 253, 0.03) 0%, rgba(13, 110, 253, 0.03) 50%,transparent 50%, transparent 100%), radial-gradient(circle at 94% 6%, rgba(13, 110, 253, 0.03) 0%, rgba(13, 110, 253, 0.03) 50%,transparent 50%, transparent 100%);
}

.login-card { border-radius: 20px; overflow: hidden; border: none; }

/* --- Kontak Page --- */
.contact-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
.social-links a:hover { transform: translateY(-3px); }
 
/* Custom Map Marker & Locate Button */
.custom-pin {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--bs-primary);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.custom-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 1.2rem;
}

.leaflet-popup-content-wrapper { border-radius: 12px; }

.locate-me-btn {
    position: absolute;
    top: 80px;
    left: 10px;
    z-index: 1000;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

.locate-me-btn:hover { background: #f4f4f4; }

/**
 * Berita Detail Styling
 */
.news-detail-img {
    max-height: 500px;
    overflow: hidden;
}

.news-detail-img img {
    object-fit: cover;
    height: 100%;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/**
 * Modern Newspaper Editorial Style
 */
.editorial-header {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

.editorial-title {
    font-family: 'Playfair Display', serif; /* Jika Anda ingin menambahkan font editorial */
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.1;
    color: #1a1a1a;
    letter-spacing: -1px;
}
.editorial-dropcap > p:first-of-type::first-letter {
    float: left;
    font-size: 4.5rem;
    line-height: 0.8;
    padding: 0.5rem 0.8rem 0 0;
    font-weight: 700;
    color: var(--bs-primary);
}
.motivation-box {
    position: relative;
    margin: 3rem 0;
    padding: 2.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0;
}
.motivation-box::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -20px;
    left: 20px;
    background: var(--bs-primary);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.editorial-quote {
    border-top: 2px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
    padding: 2rem 0;
    margin: 3rem 0;
    font-style: italic;
}

/* ==========================================================================
   8. KEYFRAMES
   ========================================================================== */
@keyframes scroll-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}