/* ==========================================================================
   Base & Variables (2026 Hyper-Modern Design System)
   ========================================================================== */
:root {
    /* 2026 Color Palette: Deeper, richer contrast */
    --primary-color: #e11d48;
    /* Vibrant Rose-Maroon */
    --primary-dark: #be123c;
    --primary-glow: rgba(225, 29, 72, 0.25);

    --secondary-color: #0f172a;
    /* Deep Slate */
    --text-main: #334155;
    --text-light: #64748b;
    --bg-main: #f8fafc;
    --bg-light: #ffffff;
    --white: #ffffff;

    /* Neo-Glassmorphism Borders */
    --border-color: rgba(226, 232, 240, 0.8);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);

    /* 2026 Shadows: Colored, diffuse, and wide */
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 20px 40px -10px var(--primary-glow);

    /* Typography: Scalable, bold, tight tracking */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Radii: Pill shapes & Organic rounded edges */
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-pill: 999px;

    /* Fluid Transitions */
    --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle background mesh gradient effect */
    background-image:
        radial-gradient(at 0% 0%, rgba(225, 29, 72, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    background: var(--primary-color);
    border-radius: var(--radius-pill);
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -2rem auto 4rem;
    color: var(--text-light);
    font-size: 1.15rem;
    line-height: 1.7;
}

.bg-light {
    background-color: var(--bg-light);
}

/* ==========================================================================
   Buttons (Pill-shaped, Floating, Glowing)
   ========================================================================== */
.btn-primary {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    font-size: 0.95rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    transition: var(--transition-spring);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(225, 29, 72, 0.4);
}

.btn-primary-outline {
    display: inline-block;
    padding: 0.85rem 2rem;
    background-color: rgba(225, 29, 72, 0.05);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition-spring);
    cursor: pointer;
}

.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition-spring);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--secondary-color);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Floating Navbar (Glassmorphism 2026)
   ========================================================================== */
#navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%; /* Mobile default */
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: var(--glass-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-pill);
    z-index: 1000;
    transition: var(--transition-smooth);
}

@media (min-width: 992px) {
    #navbar {
        width: max-content !important;
        min-width: 1000px !important;
        max-width: 98vw !important;
        padding-right: 2.5rem !important; /* Force internal space for the logos */
    }
}

/* When scrolling, make it slightly smaller and more opaque */
#navbar.scrolled {
    top: 10px;
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between; /* Mobile default */
    align-items: center;
}

@media (min-width: 992px) {
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        padding: 0.6rem 2rem !important;
        gap: 5rem !important; /* Massive gap to prevent logo/menu overlap */
    }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo-img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--secondary-color);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .nav-links {
        flex: 1 !important;
        display: flex !important;
        justify-content: flex-end !important;
        gap: 1.25rem !important;
        flex-shrink: 0 !important;
    }
}

.nav-right-start {
    margin-left: 0.5rem;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

.nav-links a:not(.btn-primary-outline)::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background-color: var(--primary-color);
    transition: var(--transition-spring);
}

.nav-links a:not(.btn-primary-outline):hover::after,
.nav-links a:not(.btn-primary-outline).active::after {
    transform: translateX(-50%) scale(1);
}

.nav-links a:not(.btn-primary-outline):hover,
.nav-links a:not(.btn-primary-outline).active {
    color: var(--primary-color);
}

.nav-links .btn-primary-outline {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* 2026 Partner Logos in Navbar */
.nav-logos {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-left: 1.25rem;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

@media (min-width: 992px) {
    .nav-logos {
        display: flex !important;
        align-items: center !important;
        gap: 1.25rem !important;
        border-left: 1px solid rgba(15, 23, 42, 0.1) !important;
        padding-left: 1.5rem !important;
        padding-right: 0.5rem !important;
        margin-left: 1rem !important;
    }
}

.nav-logo-img {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    transition: var(--transition-smooth);
    object-fit: contain;
}

.nav-logo-img:hover {
    transform: translateY(-2px) scale(1.05);
}

/* 2026 Navigation Dropdown Styles */
.nav-links li.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 240px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: var(--glass-border);
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-spring);
    z-index: 1001;
    margin-top: 10px;
}

/* Arrow for dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: white;
    border-top: var(--glass-border);
    border-left: var(--glass-border);
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    width: 100%;
    display: block !important;
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    width: 100%;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    transition: var(--transition-smooth) !important;
    background: transparent !important;
}

.dropdown-menu a:hover {
    background-color: rgba(225, 29, 72, 0.08) !important;
    color: var(--primary-color) !important;
    padding-left: 1.75rem !important;
}

.dropdown-menu a::after {
    display: none !important;
}

.fa-chevron-down {
    font-size: 0.65rem;
    margin-left: 6px;
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.has-dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
    opacity: 1;
}

@media (max-width: 992px) {
    .nav-links {
        align-items: center; /* Center all items in mobile menu */
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0.5rem 0;
        opacity: 1;
        visibility: visible;
        display: none;
        background: rgba(15, 23, 42, 0.05);
        margin-top: 0.5rem;
        width: 100%;
        border-radius: var(--radius-sm);
    }
    
    .has-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu li {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .dropdown-menu a {
        justify-content: center !important;
        padding: 1rem 0 !important;
        width: 100% !important;
        text-align: center !important;
        background: transparent !important;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .fa-chevron-down {
        display: inline-block !important;
        margin-left: 8px !important;
        transition: transform 0.3s ease !important;
    }
    
    .has-dropdown.active .fa-chevron-down {
        transform: rotate(180deg) !important;
    }
    
    .nav-links li.has-dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .nav-links li.has-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* Remove the red dot for the Internal link in mobile */
    .nav-links li.has-dropdown > a::after {
        display: none !important;
    }

    .nav-logos {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        padding-top: 1.5rem;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
        gap: 2rem;
    }

    .nav-logo-img {
        height: 45px; /* Slightly larger on mobile for better visibility */
    }
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero,
.page-hero {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height to prevent gaps on mobile */
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding-top: 80px;
    overflow: hidden;
}

.hero {
    background-image: url('https://wwpbghdepykfqgzhyvmh.supabase.co/storage/v1/object/public/photos/hero-bg.jpg');
}

.hero-overlay,
.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
    z-index: 1;
}

.hero-content,
.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-title,
.page-hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.1;
}

.hero-title span {
    color: #f43f5e;
    /* Brighter accent */
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    color: #f43f5e;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.highlight-text {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--white);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.hero-btn-row-top {
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-btn-row-top .btn-primary {
    min-width: 240px;
}

.hero-btn-row-bottom {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.hero-btn-row-bottom .btn-secondary {
    min-width: 200px;
}

@media (max-width: 768px) {
    .hero-btn-row-bottom {
        flex-direction: column;
        align-items: center;
    }
    .hero-btn-row-bottom .btn-secondary,
    .hero-btn-row-top .btn-primary {
        width: 100%;
        max-width: 320px;
        min-width: unset;
    }
}

/* ==========================================================================
   Sliders
   ========================================================================== */
.slider-wrapper {
    position: relative;
    padding: 0 50px;
    margin: 0 -10px;
}

.slider-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2.5rem;
    padding: 10px;
    padding-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-padding: 20px;
}

@media (min-width: 992px) {
    #indexNewsContainer {
        justify-content: center !important;
    }
    #newsSliderWrapper {
        width: fit-content;
        margin: 0 auto;
        max-width: 100%;
    }
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-container>* {
    scroll-snap-align: start;
    flex: 0 0 calc(33.333% - 1.67rem);
    min-width: 280px;
    flex-shrink: 0 !important;
}

.slider-btn {
    position: absolute;
    top: calc(50% - 1rem);
    transform: translateY(-50%);
    background: var(--white);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    z-index: 10;
    transition: var(--transition-spring);
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.left {
    left: 0;
}

.slider-btn.right {
    right: 0;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 992px) {
    .slider-container>* {
        flex: 0 0 calc(50% - 1.25rem);
    }
}

@media (max-width: 768px) {
    .slider-wrapper {
        padding: 0;
        margin: 0;
    }

    .slider-btn {
        display: none;
    }

    .slider-container {
        padding: 10px 7.5%;
        gap: 1.5rem;
    }

    .slider-container>* {
        flex: 0 0 70% !important;
        min-width: 0;
        scroll-snap-align: center;
        flex-shrink: 0 !important;
    }
}

/* ==========================================================================
   Bento Grid Layouts & Cards
   ========================================================================== */
.profil-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    position: relative;
    border: 1px solid var(--border-color);
}

.stats-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    position: relative;
    border: 1px solid var(--border-color);
    text-align: center;
}

@media (max-width: 992px) {
    .stats-card {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .stats-card {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 1.5rem;
    }
}

.stat-item h4 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* News Cards (Universal) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    justify-content: center;
    justify-items: center;
}

.news-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-spring);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 340px;
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(225, 29, 72, 0.2);
}

.news-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.5s ease;
    flex-shrink: 0;
}

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

.news-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: block;
}

.news-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-title-link:hover .news-title {
    color: var(--primary-color);
}

.read-more {
    margin-top: auto;
    font-weight: 700;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Staff / Guru Cards — see consolidated rules below (after Ekstrakurikuler) */


/* Ekstrakurikuler Cards (Bento Style) */
.ekskul-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
    justify-items: center;
}

.ekskul-card {
    background: var(--bg-light);
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-spring);
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
    max-width: 350px;
}



.ekskul-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(225, 29, 72, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    opacity: 0;
    transition: var(--transition-smooth);
}

.ekskul-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(225, 29, 72, 0.2);
}

.ekskul-card:hover::before {
    opacity: 1;
}

.ekskul-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-main);
    border-radius: 24px;
    /* Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: var(--transition-spring);
    transform: rotate(-5deg);
}

.ekskul-card:hover .ekskul-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(0) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.ekskul-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.ekskul-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Staff Cards (Large Square Photos) */
.staff-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

.staff-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-spring);
    width: 100%;
    flex: 0 1 300px;
    max-width: 350px;
}

.staff-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(225, 29, 72, 0.2);
}

.principal-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 2rem 2.5rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(225, 29, 72, 0.15);
}

/* Force layout for leadership section: Principal on top, VPs below */
#kepsekContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

#kepsekContainer > .staff-card:first-child {
    flex: 0 0 100%;
}

.staff-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.staff-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), #f43f5e);
    border-radius: 0 0 4px 4px;
}

.principal-card .staff-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.staff-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.staff-card:hover .staff-img {
    transform: scale(1.05);
}

.staff-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1.2rem 0 0.3rem;
    letter-spacing: -0.02em;
}

.staff-role {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.staff-nip {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ==========================================================================
   Kontak Section (Glass & Asymmetric)
   ========================================================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contact-info {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.contact-item i {
    font-size: 1.5rem;
    color: #f43f5e;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 16px;
}

.contact-item h4 {
    color: var(--white);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.contact-item p {
    opacity: 0.9;
    font-size: 0.95rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.contact-form {
    padding: 4rem 3rem;
    background: var(--bg-light);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg-main);
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-light);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #0f172a;
    color: var(--white);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.footer-bottom p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-spring);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* Hero animations should be visible on load */
.hero .animate-up,
.page-hero .animate-up {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeIn 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .delay-1,
.page-hero .delay-1 {
    animation-delay: 0.2s;
}

.hero .delay-2,
.page-hero .delay-2 {
    animation-delay: 0.4s;
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.45s;
}

/* ==========================================================================
   Profil Section Layout & Image Defaults
   ========================================================================== */

.profil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.profil-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.profil-text p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.misi-list li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
}

.misi-list i {
    color: var(--primary-color);
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

.profil-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), #f43f5e);
    border-radius: 4px;
}

.stat-item {
    text-align: center;
}

.stat-item p {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.5rem;
    }

    .hero-title,
    .page-hero-title {
        font-size: 3.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .profil-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profil-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-light);
        flex-direction: column;
        align-items: center; /* Center items horizontally */
        justify-content: center;
        padding: 2rem 0; /* Vertical padding only */
        gap: 1.5rem;
        border-radius: 0 0 24px 24px; /* Only round bottom corners */
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition-smooth);
        text-align: center;
    }

    .nav-links li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-links a {
        width: auto;
        display: inline-block;
    }

    .nav-right-start {
        margin-left: 0;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(10px);
    }

    /* Mobile Dropdown Specifics */
    .has-dropdown {
        flex-direction: column;
    }

    .has-dropdown > a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Remove red dot for Internal on mobile */
    .has-dropdown > a::after {
        display: none !important;
    }

    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        background: rgba(15, 23, 42, 0.05) !important;
        margin-top: 10px !important;
        padding: 0.5rem 0 !important;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        transform: none !important;
    }

    .has-dropdown.active .dropdown-menu {
        display: block !important;
    }

    .dropdown-menu li {
        width: 100% !important;
        justify-content: center !important;
    }

    .dropdown-menu a {
        width: 100% !important;
        padding: 0.8rem 0 !important;
        font-size: 0.9rem !important;
    }

    .has-dropdown .fa-chevron-down {
        display: inline-block !important;
        transition: transform 0.3s ease;
    }

    .has-dropdown.active .fa-chevron-down {
        transform: rotate(180deg);
    }

    .menu-toggle {
        display: block;
    }

    .hero-title,
    .page-hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-buttons a {
        width: 100%;
        text-align: center;
    }

    .profil-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profil-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .stat-item h4 {
        font-size: 2.5rem;
    }

    .contact-info,
    .contact-form {
        padding: 2.5rem 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* ==========================================================================
   Guru & Staf Section Background
   ========================================================================== */* ==========================================================================
   Guru & Staf Section Background
   ========================================================================== */
.staff-bg-section {
    position: relative;
    background-image: url('https://wwpbghdepykfqgzhyvmh.supabase.co/storage/v1/object/public/photos/guru-staff-bg.jpeg');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    padding: 12rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Mobile Overrides for Staff Section */
@media (max-width: 768px) {
    .staff-bg-section {
        padding: 5rem 0; /* Reduced padding for mobile */
        min-height: auto; /* Allow content to define height */
        display: block; /* Remove flex to avoid slider alignment issues */
        background-attachment: scroll; /* Fixed bg can be buggy on mobile */
    }
}

.staff-bg-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
}

.staff-bg-section .container {
    position: relative;
    z-index: 2;
}

.staff-bg-section .section-title,
.staff-bg-section .section-subtitle {
    color: var(--secondary-color) !important;
}

.staff-bg-section .section-title::after,
.ekskul-section .section-title::after,
.galeri-section .section-title::after {
    bottom: -30px !important; /* Fixed pixel value to avoid overlapping subtitle */
    background: var(--primary-color) !important;
}

/* Mobile adjustments to prevent overlapping */
@media (max-width: 768px) {
    .staff-bg-section .section-title::after,
    .ekskul-section .section-title::after,
    .galeri-section .section-title::after {
        bottom: -20px !important; /* Slightly higher on mobile but still clear */
    }
    
    .section-title {
        margin-bottom: 3.5rem !important; /* Ensure enough space for the underline */
    }
}

.staff-bg-section .section-subtitle {
    opacity: 0.9;
}

/* Ensure staff cards still look good on the new background */
.staff-bg-section .staff-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   Galeri Native Grid
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-spring);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
    text-align: center;
}

.gallery-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-overlay span {
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

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

.gallery-item:hover .gallery-overlay i,
.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Instagram Button */
.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
}

.btn-instagram:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 39, 67, 0.5);
    color: var(--white);
}
/* Gallery Pagination */
.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.6rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: var(--white);
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.gp-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff1f2;
}

.gp-btn.gp-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(218, 37, 28, 0.3);
}

.gp-btn.gp-disabled,
.gp-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.gp-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    font-size: 0.82rem;
    color: #94a3b8;
    user-select: none;
}

/* Gallery Lightbox Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform-origin: center;
    animation: zoomIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#modalCaption {
    margin: 20px auto;
    display: block;
    width: 80%;
    text-align: center;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .close-modal {
        top: 15px;
        right: 25px;
    }
}