/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary-blue: #0a2540;
    --secondary-blue: #0055a5;
    --light-blue: #4dabf7;
    --accent-blue: #0077b6;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --bg-light: #f0f2f5;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --orange: #FF8C00;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --gradient-primary: linear-gradient(135deg, #084079 0%, #0055a5 100%);
    --gradient-spmb: linear-gradient(135deg, #2777c7 0%, #1486f0 100%);
    --navbar-primary: linear-gradient(135deg, #0055a5 0%, #0084ff 100%);
    --gradient-secondary: linear-gradient(135deg, #0055a5 0%, #4dabf7 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: var(--navbar-primary);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--white);
}

.top-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.top-info span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.top-info i {
    color: var(--light-blue);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.social-links a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
}

/* ============================================
   NAVBAR - FIXED & ALIGNED
   ============================================ */
.navbar {
    padding: 0.75rem 0;
    transition: var(--transition);
    background: var(--gradient-primary) !important;
}

.navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.2rem;
    color: var(--white) !important;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: var(--light-blue) !important;
}

.navbar-brand i {
    color: var(--light-blue);
    font-size: 1.6rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.navbar-nav .nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.navbar-nav .nav-link span {
    display: inline-block;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--orange) !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active i {
    color: var(--orange);
}

/* ===== Global Dropdown Fix (Di luar media query) ===== */
.dropdown-menu {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 200px;
    
    /* ✅ Fix: Mencegah dropdown keluar viewport */
    max-width: 95vw;
}

/* ✅ Fix posisi dropdown "Lainnya" rata kanan */
#lainnyaDropdown + .dropdown-menu,
.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--orange) !important;
    padding-left: 1.75rem;
}

.btn-cta {
    background: var(--orange);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-cta i {
    font-size: 0.9rem;
}

.btn-cta:hover {
    background: #e67e00;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
}

/* ============================================
   HERO CAROUSEL
   ============================================ */
.carousel-img {
    height: 90vh;
    min-height: 500px;
    object-fit: cover;
    filter: brightness(1);
}

.carousel-caption-custom {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, 0.95) 0%, rgba(10, 37, 64, 0.4) 50%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-caption-custom h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption-custom p {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    opacity: 0.5;
    transition: var(--transition);
}

.carousel-indicators .active {
    background: var(--orange);
    opacity: 1;
    width: 14px;
    height: 14px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-size: 60%;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 5rem 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* ============================================
   RUNNING GALLERY - OPTIMIZED SEAMLESS
   ============================================ */
.running-gallery-section {
    background: var(--white);
    padding: 3rem 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden; /* Pastikan tidak ada scroll horizontal liar */
}

.running-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Gradient effect di pinggir agar transisi smooth */
.running-wrapper::before,
.running-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px; /* Diperlebar sedikit agar fade lebih cantik */
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.running-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--white), transparent);
}

.running-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--white), transparent);
}

.running-track {
    display: flex;
    /* PENTING: Lebar track harus cukup menampung semua item (Grup 1 + Grup 2) */
    width: max-content; 
    gap: 1.5rem; /* Jarak antar gambar */
    animation: scrollLeft 30s linear infinite;
    padding: 1rem 0;
}

.running-item {
    flex-shrink: 0; /* Mencegah gambar menyusut */
}

.running-item img {
    height: 220px;
    width: 350px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.running-item img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* Animasi Loop */
@keyframes scrollLeft {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        /* Menggeser setengah dari total panjang track (Grup 1) */
        /* Kita gunakan calc untuk menghitung gap agar presisi */
        transform: translateX(calc(-50% - 0.75rem)); 
    }
}

.running-wrapper:hover .running-track {
    animation-play-state: paused;
}

/* ============================================
   HEADMASTER SECTION
   ============================================ */
.headmaster-section {
    background: var(--white);
}

.headmaster-img-container {
    position: relative;
    display: inline-block;
}

.headmaster-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.headmaster-name {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.headmaster-quote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--secondary-blue);
    border-left: 4px solid var(--light-blue);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

/* ============================================
   PRESTASI SECTION
   ============================================ */
.prestasi-section {
    background: linear-gradient(135deg, #f0f2f5 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.prestasi-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230a2540' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.prestasi-wrapper {
    position: relative;
    z-index: 1;
}

.prestasi-track {
    display: flex;
    gap: 1.5rem;
    animation: scrollPrestasi 35s linear infinite;
}

.prestasi-card {
    min-width: 300px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.prestasi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: var(--transition);
}

.prestasi-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.prestasi-card:hover::before {
    transform: scaleX(1);
}

.prestasi-card.gold {
    background: linear-gradient(145deg, #FFFBF0 0%, #FFF5D6 100%);
    border-color: rgba(255, 215, 0, 0.3);
}

.prestasi-card.silver {
    background: linear-gradient(145deg, #F8F9FA 0%, #E9ECEF 100%);
    border-color: rgba(192, 192, 192, 0.3);
}

.prestasi-card.bronze {
    background: linear-gradient(145deg, #FFF8F0 0%, #FFE8D1 100%);
    border-color: rgba(205, 127, 50, 0.3);
}

.prestasi-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.prestasi-card.gold .prestasi-icon {
    color: var(--gold);
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.prestasi-card.silver .prestasi-icon {
    color: var(--silver);
    filter: drop-shadow(0 2px 4px rgba(192, 192, 192, 0.4));
}

.prestasi-card.bronze .prestasi-icon {
    color: var(--bronze);
    filter: drop-shadow(0 2px 4px rgba(205, 127, 50, 0.4));
}

.prestasi-card:hover .prestasi-icon {
    transform: scale(1.2) rotate(10deg);
}

.prestasi-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.prestasi-category {
    font-size: 0.9rem;
    color: var(--secondary-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.prestasi-year {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(10, 37, 64, 0.08);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes scrollPrestasi {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.prestasi-wrapper:hover .prestasi-track {
    animation-play-state: paused;
}

/* ============================================
   GALLERY SECTION - ELEGANT & ZOOMABLE
   ============================================ */
.gallery-section {
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, 0.9) 0%, rgba(10, 37, 64, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-category {
    color: var(--light-blue);
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-title,
.gallery-item:hover .gallery-category {
    transform: translateY(0);
}

.gallery-zoom-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.2rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

/* GLightbox Customization */
.glightbox-clean .gclose {
    color: var(--white);
    font-size: 2rem;
    opacity: 0.8;
}

.glightbox-clean .gclose:hover {
    opacity: 1;
    color: var(--orange);
}

/* .gslide-description {
    background: rgba(10, 37, 64, 0.9);
    color: var(--white);
} */

/* Menghilangkan kolom deskripsi di samping dan memaksa gambar di tengah */
.ginner-container.description-right, 
.ginner-container.description-left {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.gslide-description {
    width: 100% !important;
    max-width: 100% !important;
    order: 2 !important; /* Taruh deskripsi di bawah gambar */
}

.gslide-image {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.gslide-image img {
    width: auto !important;
    height: auto !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain !important;
}




/* ============================================
   NEWS SECTION
   ============================================ */
.news-section {
    background: linear-gradient(135deg, #f0f2f5 0%, #e9ecef 100%);
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.news-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .card-img-top {
    transform: scale(1.1);
}

.news-card .card-body {
    padding: 1.5rem;
}

.news-card .badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.news-card .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-card .card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.news-meta i {
    color: var(--light-blue);
}



/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--gradient-spmb);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.btn-cta-light {
    background: var(--white);
    color: var(--primary-blue);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cta-light:hover {
    background: var(--light-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--gradient-primary) !important;
}

.footer-about .navbar-brand {
    font-size: 1.5rem;
    color: var(--white) !important;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;

}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--light-blue);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--orange);
    transform: translateX(5px);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: var(--light-blue);
    margin-top: 0.25rem;
    width: 20px;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 180px;
    border: none;
}

footer .social-links {
    justify-content: flex-start;
}


/* Jarak antar kolom footer */
.footer .row {
    gap: 3rem; /* Jarak horizontal antar kolom */
}

/* Jarak antar item kontak */
.footer-contact li {
    margin-bottom: 1rem;
}

/* Untuk responsive - jarak lebih kecil di mobile */
@media (max-width: 991px) {
    .footer .row > div {
        margin-bottom: 2rem;
    }
}

/* Berikan margin kiri yang sama untuk judul Kontak dan Lokasi */
.footer-title {
    margin-left: 2rem; /* Sesuaikan nilai ini (32px) */
}

/* Atau jika ingin yang pertama (SMPN 20) tidak ada margin */
.footer-about .navbar-brand {
    margin-left: 0;
}

.col-lg-4:nth-child(2) .footer-title,
.col-lg-4:nth-child(3) .footer-title {
    margin-left: 2rem; /* Jarak yang sama */
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--orange);
    transform: translateY(-5px);
    color: var(--white);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary-custom {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(10, 37, 64, 0.3);
}

.btn-primary-custom:hover {
    background: var(--gradient-secondary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.4);
}

.btn-outline-primary-custom {
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 0.65rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    transition: var(--transition);
}

.btn-outline-primary-custom:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
}

/* ============================================
   CARDS
   ============================================ */
.card-custom {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    background: var(--white);
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-custom .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.card-custom:hover .card-img-top {
    transform: scale(1.1);
}

.card-custom .card-body {
    padding: 1.5rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-light-blue {
    color: var(--light-blue) !important;
}

.text-primary-custom {
    color: var(--primary-blue) !important;
}

.bg-primary-custom {
    background: var(--gradient-primary) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md) !important;
}

.rounded-custom {
    border-radius: var(--border-radius-lg) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* ===== Responsive Styles ===== */
@media (max-width: 991px) {
    .carousel-img {
        height: 60vh;
        min-height: 400px;
    }
    
    .carousel-caption-custom h1 {
        font-size: 2.5rem;
    }
    
    .top-bar {
        text-align: center;
    }
    
    .top-info {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .navbar-collapse {
        background: var(--gradient-primary);
        padding: 1rem;
        border-radius: var(--border-radius);
        margin-top: 1rem;
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .btn-cta {
        margin-top: 1rem;
        justify-content: center;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .section-heading h2 {
        font-size: 2rem;
    }
    
    .headmaster-img {
        width: 220px;
        height: 220px;
    }
    
    .prestasi-card {
        min-width: 260px;
    }
    
    .running-item img {
        height: 180px;
        width: 280px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /* ✅ TAMBAHAN: Fix dropdown di mobile (posisi static agar tidak overflow) */
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none;
        width: auto;
        max-width: 100%;
        margin-top: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        border-left: 3px solid var(--accent-color);
        margin-left: 1rem;
        padding-left: 0.5rem;
    }
    
    /* Animasi halus untuk dropdown mobile */
    .navbar-nav .dropdown-menu.show {
        animation: slideDown 0.2s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
} /* ✅ Closing brace untuk @media (max-width: 991px) */

@media (max-width: 767px) {
    .carousel-img {
        height: 50vh;
        min-height: 350px;
    }
    
    .carousel-caption-custom h1 {
        font-size: 1.75rem;
    }
    
    .carousel-caption-custom p {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.4rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem !important;
    }
    
    .navbar-nav .nav-link i {
        font-size: 0.9rem;
    }
    
    .btn-cta {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }
    
    .cta-section {
        text-align: center;
    }
    
    .cta-section .text-lg-end {
        text-align: center !important;
        margin-top: 1.5rem;
    }
    
    footer {
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .footer-links a:hover {
        transform: none;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* ✅ Pastikan dropdown item tetap rapi di layar kecil */
    .dropdown-item {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loaded {
    opacity: 1;
}



/* ============================================
   HELPDESK
   ============================================ */
/* =========================================
       CSS GREEN EMERALD - COMPACT & MINI
       Ukuran lebih kecil, tetap kedap-kedip
       =========================================
    */
    
    .helpdesk-float {
        position: fixed;
        bottom: 90px;
        right: 25px;
        display: flex;
        align-items: center;
        z-index: 9999;
        text-decoration: none !important;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .helpdesk-icon-box {
        width: 48px; /* Ukuran diperkecil agar lebih elegant */
        height: 48px; /* Ukuran diperkecil agar lebih elegant */
        border-radius: 50%;
        background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border: 2px solid white;
        box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
        
        /* EFEK KEDAP-KEDIP */
        animation: emerald-pulse-mini 2s infinite;
    }

    /* Ikon Modern Ukuran Kecil */
    .helpdesk-icon-box i.main-icon {
        color: white;
        font-size: 20px; /* Ukuran ikon disesuaikan */
        filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
    }

    /* Badge WA Mini */
    .wa-badge-mini {
        position: absolute;
        top: -1px;
        right: -1px;
        background: #ffffff;
        color: #25d366;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        border: 1px solid #25d366;
    }

    /* Label Teks Minimalis */
    .helpdesk-label-pill {
        background: #111827;
        color: #ffffff;
        padding: 6px 15px;
        border-radius: 50px;
        margin-right: 12px;
        font-size: 12px; /* Teks lebih kecil */
        font-weight: 500;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        opacity: 0;
        transform: translateX(15px);
        transition: all 0.4s ease;
        white-space: nowrap;
    }

    /* Keyframes Kedap-Kedip Khusus Ukuran Kecil */
    @keyframes emerald-pulse-mini {
        0% {
            transform: scale(0.95);
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
        }
        70% {
            transform: scale(1);
            box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
        }
        100% {
            transform: scale(0.95);
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        }
    }

    /* Hover Interaction */
    .helpdesk-float:hover .helpdesk-label-pill {
        opacity: 1;
        transform: translateX(0);
    }

    .helpdesk-float:hover .helpdesk-icon-box {
        animation: none;
        transform: scale(1.1);
        background: #25d366;
    }


    /* ========== SAMBUTAN ========== */

    /* Keadaan Normal */
    .hover-card {
        transition: all 0.3s ease;
        background-color: #ffffff; /* Putih bersih */
        border: 1px solid #e2e8f0; /* Garis tepi tipis abu-abu kebiruan */
    }

    /* Keadaan Hover: Background Biru, Teks Putih */
    .hover-card:hover {
        transform: translateY(-5px);
        background-color: #0d6efd; /* Biru Primary (Bisa ganti sesuai selera) */
        box-shadow: 0 10px 20px rgba(13, 110, 253, 0.3) !important;
    }

    /* Mengubah semua teks di dalam kartu menjadi putih saat hover */
    .hover-card:hover h4, 
    .hover-card:hover p, 
    .hover-card:hover i {
        color: #ffffff !important;
    }

    /* Kotak Ikon saat normal */
    .icon-box-custom {
        background: #f1f5f9; /* Abu-abu kebiruan sangat muda */
        padding: 15px;
        border-radius: 15px;
        transition: all 0.3s ease;
    }

    /* Kotak Ikon saat hover (sedikit lebih terang agar tetap terlihat) */
    .hover-card:hover .icon-box-custom {
        background: rgba(255, 255, 255, 0.2); 
    }


     /* ========== PRESTASI ========== */
    .ls-2 { letter-spacing: 2px; }
    .btn-white { background: #fff; color: #333; }
    
    /* --- STYLE AWAL ANDA (TETAP DIJAGA) --- */
    .card-prestasi {
        border: none;
        border-radius: 1.25rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        transition: all 0.4s ease;
        overflow: hidden;
        
        /* TAMBAHAN BARU: Agar footer bisa sejajar di bawah */
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .card-prestasi:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }

    .image-wrapper {
        position: relative;
        overflow: hidden;
        aspect-ratio: 16/11;
    }

    .image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

    .card-prestasi:hover .image-wrapper img {
        transform: scale(1.1);
    }

    .overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(13, 110, 253, 0.6);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: all 0.4s ease;
    }

    .overlay i {
        color: white;
        font-size: 2rem;
        transform: scale(0.5);
        transition: all 0.4s ease;
    }

    .image-wrapper:hover .overlay {
        opacity: 1;
    }

    .image-wrapper:hover .overlay i {
        transform: scale(1);
    }

    .category-badge {
        position: absolute;
        top: 15px;
        left: 15px;
        background: rgba(255, 255, 255, 0.9);
        color: #0d6efd;
        padding: 5px 15px;
        border-radius: 50px;
        font-size: 0.75rem;
        font-weight: 700;
        z-index: 1;
        backdrop-filter: blur(5px);
    }

    .rounded-bottom-4 {
        border-bottom-left-radius: 1.25rem;
        border-bottom-right-radius: 1.25rem;
        
        /* TAMBAHAN BARU: Agar konten di dalamnya fleksibel */
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        padding: 1.5rem; /* Padding standar agar rapi */
        background: white;
    }

    .link-prestasi {
        transition: color 0.3s ease;
        text-decoration: none;
        color: #212529;
    }
    .link-prestasi:hover {
        color: #0d6efd !important;
    }

    /* --- STYLE BARU UNTUK SEJAJARKAN FOOTER --- */
    .footer-card {
        margin-top: auto; /* Ini yang mendorong Mar 2026 & Detail ke bawah */
    }

    .prestasi-item {
        transition: opacity 0.4s ease-in-out;
    }

    

/* video */
/* Layout & Section */
.video-section {
    background-color: #f8f9fa; /* Off-white background */
}

.heading-line {
    width: 60px;
    height: 3px;
    background: #0d6efd;
    border-radius: 3px;
}

/* Video Card Main Style */
.video-card {
    cursor: pointer;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border: none;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12) !important;
}

/* Thumbnail Area */
.video-thumbnail-wrapper {
    position: relative;
    height: 200px; /* Tinggi thumbnail konsisten */
    overflow: hidden;
    background: #000;
}

.video-preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: all 0.5s ease;
}

.video-card:hover .video-preview-thumb {
    transform: scale(1.05);
    opacity: 1;
}

/* Play Button with Animation */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: rgba(13, 110, 253, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-card:hover .video-play-btn {
    background: #fff;
    color: #0d6efd;
    animation: pulse-blue 1.5s infinite;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

/* Badge & Text */
.video-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3436;
}

.video-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Fullscreen Overlay Style */
.video-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-content-wrapper {
    width: 100%;
    max-width: 900px;
    position: relative;
}

.close-video-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 45px;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s;
}

.close-video-btn:hover {
    color: #ff4757;
    transform: rotate(90deg);
}


/* slider */
/* Indikator Aktif: Lebih terang dan sedikit lebih lebar */
    .carousel-indicators-custom button.active {
        background-color: #ff9857 !important;
        width: 35px !important;
        box-shadow: 0px 0px 5px rgba(255, 217, 1, 0.8);
    }
    
    /* Memastikan caption tidak terlalu ke bawah */
    .carousel-caption-custom {
        bottom: 20%; 
    }


/* like video */
/* Style dasar tombol like */
    .btn-like {
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #fff;
        padding: 5px 12px;
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* Efek ketika sudah di-LIKE (Aktif) */
    /* CSS agar warna aktif tetap terlihat meski ukuran kecil */
    .btn-like.active {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #ffc107 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    }
    
    /* Efek hover halus */
    .btn-like:hover {
        background: rgba(0,0,0,0.6);
        transform: scale(1.05);
    }

