:root {
    --primary-color: #1a5f3a;
    --primary-dark: #0f3d22;
    --primary-light: #2d8659;
    --secondary-color: #f39c12;
    --secondary-light: #f5b041;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --text-muted: #95a5a6;
    --border-color: #ecf0f1;
    --light-bg: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: var(--light-bg); color: var(--text-dark); line-height: 1.6; }

/* =========================
   TOP BAR
========================= */
.top-bar {
    font-size: 14px;
    line-height: 1.5;
}

.top-bar .container {
    max-width: 1200px;
    margin: 0 auto;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    gap: 16px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.contact-info i {
    font-size: 13px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 8px 0;
    }

    .contact-info {
        justify-content: center;
        gap: 12px;
    }

    .social-links {
        justify-content: center;
    }
}

/* NAVBAR */
.navbar { 
    background: white !important; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.1); 
    padding: 15px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    backdrop-filter: saturate(1.2) blur(10px);
}

.navbar.scrolled { 
    padding: 10px 0; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand { 
    font-size: 26px; 
    font-weight: 700; 
    color: var(--primary-color) !important; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.nav-link { 
    color: var(--text-dark) !important; 
    font-weight: 500; 
    position: relative; 
    padding: 8px 16px !important; 
    transition: var(--transition);
}

.nav-link::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    width: 0; 
    height: 3px; 
    background: var(--secondary-color); 
    transition: 0.3s; 
    transform: translateX(-50%); 
}

.nav-link:hover::after, .nav-link.active::after { 
    width: 80%; 
}

.nav-link:hover { 
    color: var(--primary-color) !important; 
}

.navbar-toggler {
    border: 1px solid rgba(26,95,58,0.18);
    padding: 8px 10px;
    border-radius: 10px;
    transition: var(--transition);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(243,156,18,0.25);
}

.navbar-toggler-icon {
    filter: saturate(1.2);
}

@media (max-width: 991.98px) {
    .navbar .navbar-collapse {
        margin-top: 12px;
        padding: 12px;
        background: rgba(255,255,255,0.95);
        border: 1px solid rgba(0,0,0,0.06);
        border-radius: 14px;
        box-shadow: var(--shadow-md);
        transform-origin: top;
    }

    .navbar .nav-link {
        padding: 10px 12px !important;
        border-radius: 10px;
    }

    .navbar .nav-link:hover {
        background: rgba(26,95,58,0.06);
    }
}

:where(a, button, input, textarea, select):focus-visible {
    outline: 3px solid rgba(243,156,18,0.35);
    outline-offset: 2px;
}

/* ========================================
   DROPDOWN MENU - FINAL FIX! ✅
   PERUBAHAN:
   - Ukuran lebih kecil (min-width: 200px dari 220px)
   - Padding item dikurangi (8px 16px dari 10px 20px)
   - Font-size lebih kecil (13px dari 14px)
   - Border-radius lebih kecil (8px dari 10px)
   - Margin & spacing dikurangi
   - Animation lebih cepat (0.25s dari 0.3s)
   - Mobile: dropdown lebih compact
======================================== */

.navbar .dropdown-toggle::after {
    display: none;
}

.dropdown-arrow {
    font-size: 10px; /* LEBIH KECIL: dari 11px */
    margin-left: 5px; /* LEBIH RAPAT: dari 6px */
    transition: transform 0.25s ease; /* LEBIH CEPAT: dari 0.3s */
    display: inline-block;
}

.navbar .dropdown.show .dropdown-arrow,
.navbar .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* BASE DROPDOWN MENU STYLE */
.navbar .dropdown-menu {
    border: none;
    border-radius: 8px; /* LEBIH KECIL: dari 10px */
    padding: 6px 0; /* LEBIH KECIL: dari 8px 0 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* SHADOW LEBIH HALUS */
    background: white;
    min-width: 200px; /* LEBIH KECIL: dari 220px */
    margin-top: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar .dropdown-item {
    padding: 8px 16px; /* LEBIH KECIL: dari 10px 20px */
    font-size: 13px; /* LEBIH KECIL: dari 14px */
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s ease;
    border-radius: 4px; /* LEBIH KECIL: dari 6px */
    margin: 2px 6px; /* LEBIH KECIL: dari 2px 8px */
}

.navbar .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(26, 95, 58, 0.08), rgba(243, 156, 18, 0.08));
    color: var(--primary-color);
    padding-left: 20px; /* LEBIH KECIL: dari 24px */
}

.navbar .dropdown-item:active {
    background: linear-gradient(135deg, rgba(26, 95, 58, 0.12), rgba(243, 156, 18, 0.12));
}

/* ==========================================
   DESKTOP: Hover to open
========================================== */
@media (min-width: 992px) {
    .navbar .dropdown {
        position: relative;
    }
    
    .navbar .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s; /* LEBIH CEPAT */
        pointer-events: none;
        position: absolute;
        top: 100%;
        left: 0;
    }
    
    /* Hover trigger - SEDERHANA tanpa ::before trick */
    .navbar .dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .navbar .dropdown:hover > .dropdown-toggle .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* ==========================================
   MOBILE: Click to toggle - SIMPLIFIED! ✅
   PERUBAHAN UTAMA:
   - Tidak ada !important berlebihan
   - Tidak ada pointer-events manipulation
   - Tidak ada user-select manipulation
   - Tidak ada tap-highlight manipulation
   - Logic 100% dari JavaScript, CSS hanya styling
========================================== */
@media (max-width: 991.98px) {
    .navbar .dropdown {
        position: relative;
    }
    
    .navbar .dropdown-menu {
        background: rgba(248, 249, 250, 0.98);
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
        border-radius: 6px; /* LEBIH KECIL: dari 8px */
        margin: 8px 0; /* LEBIH BESAR: dari 6px untuk spacing */
        padding: 6px 0; /* LEBIH KECIL: dari 8px 0 */
        position: static;
        transform: none;
        display: none; /* Default hidden */
        opacity: 1;
        visibility: visible;
        width: 100%;
    }
    
    /* Show class untuk mobile - TANPA !important */
    .navbar .dropdown-menu.show {
        display: block;
        animation: slideDown 0.25s ease; /* LEBIH CEPAT: dari 0.3s */
    }
    
    .navbar .dropdown-item {
        padding: 10px 14px; /* SEDIKIT LEBIH BESAR: untuk touch target */
        font-size: 13px; /* KONSISTEN dengan desktop */
        margin: 2px 8px;
    }
    
    .navbar .dropdown-item:hover {
        padding-left: 18px; /* LEBIH KECIL: dari 20px */
    }
    
    .navbar .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        cursor: pointer;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 400px; /* LEBIH KECIL: dari 500px */
    }
}

/* ============ HERO SECTION ============ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    margin-top: -20px;
    display: flex;
    align-items: center;      
    justify-content: center;  
    text-align: center;  
}
.hero-wrapper {
    width: 100%;
    max-width: 1200px;     /* atau sesuai desain Anda */
    margin: 0 auto;
    padding: 0 20px;       /* agar tidak menempel di pinggir hp */
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 300;
}

.btn-group-hero {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(243,156,18,0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ============ QUICK INFO SECTION ============ */
.quick-info {
    padding: 60px 0;
    background: white;
    position: relative;
    z-index: 10;
    margin-top: -30px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26,95,58,0.15);
}

.info-icon {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: 0.3s;
}

.info-card:hover .info-icon {
    color: var(--accent-color);
    transform: scale(1.2);
}

.info-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.info-card p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
}

/* ============ SECTION STYLING ============ */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideInUp 0.6s ease-out;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-text);
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 25px;
}

/* ============ ABOUT SECTION ============ */
.about-section {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(26,95,58,0.2);
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.3s;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-text h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    margin-bottom: 25px;
}

.about-text ul li {
    padding: 10px 0 10px 30px;
    position: relative;
    color: var(--text-muted);
    font-size: 16px;
}

.about-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 20px;
}

/* ============ NEWS SECTION ============ */
.news-section {
    background: var(--light-bg);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(26,95,58,0.2);
}

.news-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #e9ecef;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.news-badge.pengumuman { background: #e74c3c; }

.news-content {
    padding: 25px;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-text);
    transition: 0.3s;
}

.news-card:hover .news-content h3 {
    color: var(--primary-color);
}

.news-content p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.read-more:hover {
    gap: 12px;
    color: var(--accent-color);
}

/* ============ PPDB SECTION ============ */
.ppdb-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.ppdb-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100px;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.ppdb-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.ppdb-info h2 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.ppdb-info h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.95;
}

.ppdb-info p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.8;
    opacity: 0.9;
}

.ppdb-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    animation: slideInLeft 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.feature-item i {
    font-size: 24px;
    color: var(--accent-color);
}

.ppdb-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

.ppdb-image {
    animation: slideInRight 0.8s ease-out;
}

.ppdb-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
    transition: 0.3s;
}

.ppdb-image:hover img {
    transform: translateY(-10px);
}

/* ============ GALLERY SECTION ============ */
.gallery-section {
    background: white;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.gallery-tab {
    background: #f0f0f0;
    border: 2px solid transparent;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-text);
    transition: all 0.3s;
}

.gallery-tab:hover,
.gallery-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 280px;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,95,58,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    opacity: 0;
    transition: 0.3s;
}

.gallery-item:hover {
    box-shadow: 0 15px 40px rgba(26,95,58,0.3);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* ============ EKSTRAKURIKULER SECTION ============ */
.ekskul-section {
    background: var(--light-bg);
}

.ekskul-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.ekskul-card {
    background: white;
    padding: 40px 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.ekskul-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    opacity: 0;
    transition: 0.3s;
}

.ekskul-card:hover::before {
    opacity: 0.1;
    top: 0;
    left: 0;
}

.ekskul-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(26,95,58,0.2);
}

.ekskul-icon {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: 0.3s;
    position: relative;
    z-index: 2;
}

.ekskul-card:hover .ekskul-icon {
    color: var(--accent-color);
    transform: scale(1.2) rotateY(10deg);
}

.ekskul-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.ekskul-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* ============ SOCIAL MEDIA SECTION ============ */
.social-media-section {
    background: white;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.social-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px 25px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.social-box.facebook { border-color: #1877F2; }
.social-box.instagram { border-color: #E4405F; }
.social-box.youtube { border-color: #FF0000; }
.social-box.twitter { border-color: #1DA1F2; }

.social-box:hover {
    transform: translateY(-15px);
    border-color: transparent;
}

.social-box.facebook:hover { background: linear-gradient(135deg, #1877F2, #0a66c2); }
.social-box.instagram:hover { background: linear-gradient(135deg, #E4405F, #c13584); }
.social-box.youtube:hover { background: linear-gradient(135deg, #FF0000, #cc0000); }
.social-box.twitter:hover { background: linear-gradient(135deg, #1DA1F2, #1a8cd8); }

.social-box:hover {
    color: white;
}

.social-box i {
    font-size: 50px;
    margin-bottom: 15px;
    transition: 0.3s;
}

.social-box:hover i {
    transform: scale(1.2);
}

.social-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.social-box p {
    font-size: 14px;
    opacity: 0.8;
}

/* ============ CONTACT SECTION ============ */
.contact-section {
    background: var(--light-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.contact-info-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    animation: slideInLeft 0.6s ease-out backwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.contact-form-box {
    animation: slideInRight 0.6s ease-out;
}

.contact-form {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--dark-text);
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26,95,58,0.1);
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.map-container iframe {
    display: block;
    border-radius: 12px;
}

/* ============ FOOTER ============ */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3,
.footer-col h4 {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col p {
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.footer-social a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    opacity: 0.85;
}

.footer-bottom i {
    color: #e74c3c;
}

/* ============ SCROLL TO TOP ============ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(26,95,58,0.3);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(26,95,58,0.5);
}

.scroll-top.show {
    display: flex;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 32px;
    }

    .about-content,
    .ppdb-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .top-bar-content {
        flex-direction: column;
        justify-content: center;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .info-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .btn-group-hero {
        flex-direction: column;
    }

    .ppdb-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
        text-align: center;
    }

    section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .gallery-grid,
    .ekskul-grid,
    .social-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
}

/* NAVBAR */
.navbar { 
    background: white !important; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.1); 
    padding: 0 !important;
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    backdrop-filter: saturate(1.2) blur(10px);
}

.navbar.scrolled { 
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar .container-fluid {
    padding: 0 !important;
    max-width: 100%;
}

/* Hide default brand on desktop */
.navbar-brand {
    display: none;
}

/* Logo in center */
.navbar-logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar-logo-center img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-logo-center:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Navigation Menu with Icons - Full Width */
.navbar-nav {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 20px;
    gap: 0;
}

.navbar-nav .nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-link { 
    color: var(--text-dark) !important; 
    font-weight: 500; 
    position: relative; 
    padding: 12px 20px !important; 
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-radius: 12px;
    width: 100%;
    text-align: center;
}

.nav-link i {
    font-size: 24px;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
}

.nav-link span {
    font-size: 13px;
    white-space: nowrap;
}

.nav-link:hover i {
    transform: scale(1.15);
}

.nav-link::after { 
    display: none;
}

.nav-link:hover, .nav-link.active { 
    color: var(--primary-color) !important; 
    background: rgba(26,95,58,0.08);
}

.navbar-toggler {
    border: 1px solid rgba(26,95,58,0.18);
    padding: 8px 10px;
    border-radius: 10px;
    transition: var(--transition);
    margin: 10px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(243,156,18,0.25);
}

.navbar-toggler-icon {
    filter: saturate(1.2);
}

/* Mobile styles */
@media (max-width: 991.98px) {
    .navbar {
        padding: 10px 0 !important;
    }

    /* Show brand on mobile */
    .navbar-brand {
        display: flex !important;
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-color) !important;
        align-items: center;
        gap: 10px;
        margin-left: 15px;
    }

    .navbar-brand img {
        width: 35px;
        height: 35px;
    }

    /* Hide center logo on mobile */
    .navbar-logo-center {
        display: none;
    }

    .navbar .navbar-collapse {
        margin: 12px;
        padding: 12px;
        background: rgba(255,255,255,0.95);
        border: 1px solid rgba(0,0,0,0.06);
        border-radius: 14px;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav {
        flex-direction: column;
        gap: 4px;
        padding: 0;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar .nav-link {
        padding: 12px 16px !important;
        border-radius: 10px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        text-align: left;
    }

    .navbar .nav-link i {
        font-size: 20px;
        margin-bottom: 0;
    }

    .navbar .nav-link span {
        font-size: 15px;
    }

    .navbar .nav-link:hover {
        background: rgba(26,95,58,0.08);
    }
}

:where(a, button, input, textarea, select):focus-visible {
    outline: 3px solid rgba(243,156,18,0.35);
    outline-offset: 2px;
}

.navbar-center-logo {
    height: 50px;           /* ukuran logo di tengah, sesuaikan (50-60px biasanya pas) */
    width: auto;
    max-width: 180px;       /* biar tidak melebar terlalu lebar */
    object-fit: contain;
    filter: brightness(1.2); /* optional: agar logo lebih cerah di navbar terang/gelap */
}

/* Sembunyikan logo di layar kecil (mobile/tablet) agar navbar tidak penuh */
@media (max-width: 991px) {
    .navbar-center-logo {
        display: none;
    }
}

/* Optional: tambah sedikit animasi saat hover */
.navbar-center-logo:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Dropdown link dengan panah di kanan paling ujung */
.navbar .dropdown > .nav-link {
    position: relative;
    padding-right: 30px !important; /* ruang untuk panah */
    justify-content: center;
}

.navbar .nav-link-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Panah chevron di kanan paling ujung */
.navbar .dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    pointer-events: none; /* agar tidak ganggu klik */
}

/* Rotasi panah saat dropdown terbuka */
.navbar .dropdown.show .dropdown-arrow,
.navbar .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Pastikan semua menu tetap sejajar vertikal */
.navbar-nav .nav-item > a {
    display: flex;
    align-items: center;
    justify-content: center;
}