:root {
    --bg: #f8fafc;
    --fg: #0f172a;
    --muted: #64748b;
    --accent: #059669;
    --accent-light: #10b981;
    --card: #ffffff;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
}

.font-display {
    font-family: 'Outfit', sans-serif;
}

/* Hero background */
.hero-gradient {
    background:
        radial-gradient(ellipse at 30% 0%, rgba(5, 150, 105, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #022c22 0%, #064e3b 50%, #065f46 100%);
}

/* Animated orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 25s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.3) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -10s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.3) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -5s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 40px) scale(0.95);
    }

    75% {
        transform: translate(30px, 20px) scale(1.05);
    }
}

/* Grid pattern overlay */
.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Text animations */
.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger>* {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger.visible>*:nth-child(1) {
    transition-delay: 0ms;
}

.stagger.visible>*:nth-child(2) {
    transition-delay: 80ms;
}

.stagger.visible>*:nth-child(3) {
    transition-delay: 160ms;
}

.stagger.visible>*:nth-child(4) {
    transition-delay: 240ms;
}

.stagger.visible>*:nth-child(5) {
    transition-delay: 320ms;
}

.stagger.visible>*:nth-child(6) {
    transition-delay: 400ms;
}

.stagger.visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 16px 36px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(5, 150, 105, 0.4);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Cards */
.card-lift {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Navigation */
.nav-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
    color: #334155;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #059669;
}

.nav-link:hover::before {
    width: 100%;
}

/* Tabs */
.tab-item {
    padding: 12px 28px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: #64748b;
    background: transparent;
    border: 2px solid transparent;
}

.tab-item:hover:not(.tab-active) {
    background: rgba(5, 150, 105, 0.05);
    color: #059669;
}

.tab-active {
    background: #059669;
    color: white;
    border-color: #059669;
}

.tab-panel {
    display: none;
    animation: tabFade 0.5s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes tabFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Achievement slider */
.slider-container {
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-item {
    flex-shrink: 0;
    padding: 0 12px;
}

/* Facility card */
.facility-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.facility-card img {
    transition: transform 0.6s ease;
}

.facility-card:hover img {
    transform: scale(1.15);
}

.facility-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 44, 34, 0.9) 100%);
}

.facility-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 1;
    transform: translateY(20px);
    opacity: 0.8;
    transition: all 0.4s ease;
}

.facility-card:hover .facility-content {
    transform: translateY(0);
    opacity: 1;
}

/* Scroll indicator */
.scroll-down {
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(12px) translateX(-50%);
    }

    60% {
        transform: translateY(6px) translateX(-50%);
    }
}

/* Form inputs */
.input-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.input-field:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

/* Mobile menu */
.mobile-nav {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.open {
    transform: translateX(0);
}

/* News image zoom */
.news-img-wrapper {
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.news-img-wrapper img {
    transition: transform 0.6s ease;
}

.news-card:hover .news-img-wrapper img {
    transform: scale(1.08);
}

/* Focus states */
*:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .orb {
        animation: none;
    }

    .scroll-down {
        animation: none;
    }
}

/* Section background */
.section-muted {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.section-dark {
    background: linear-gradient(180deg, #064e3b 0%, #022c22 100%);
}


/* Untuk Slider Prestasi */
.slider-container {
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide-item {
    flex-shrink: 0;
    /* Mencegah item mengecil */
}

/* Untuk Scroll Ekskul (Native smooth scroll) */
.scroll-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* untuk iOS */
    scrollbar-width: none;
    /* Sembunyikan scrollbar Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none;
    /* Sembunyikan scrollbar Chrome */
}

.scroll-item {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   PRESTASI SLIDER — Cards, Dots, Skeleton, Toast
   ═══════════════════════════════════════════════ */

/* Kartu prestasi — responsive width */
.ach-card {
    flex-shrink: 0;
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .ach-card {
        width: 50%;
    }
}

@media (min-width: 1024px) {
    .ach-card {
        width: 33.3333%;
    }
}

/* Inner card styling */
.ach-card-inner {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Garis hijau animasi di atas card saat hover */
.ach-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #059669, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.ach-card-inner:hover {
    border-color: #a7f3d0;
    box-shadow: 0 12px 32px -6px rgba(5, 150, 105, 0.13);
    transform: translateY(-6px);
}

.ach-card-inner:hover::before {
    transform: scaleX(1);
}

/* Badge kategori */
.ach-category {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.875rem;
}

/* Judul prestasi */
.ach-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.45;
    margin-bottom: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Baris peserta */
.ach-participant {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Baris tanggal */
.ach-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ── Slider Dots ── */
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.slider-dot:hover:not(.active) {
    background: #94a3b8;
}

.slider-dot.active {
    width: 28px;
    background: #059669;
}

/* ── Skeleton Loading ── */
.skeleton-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.skeleton-line {
    border-radius: 0.3rem;
}

/* ── Toast Notification ── */
.ach-toast {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.85rem;
    color: #334155;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 340px;
}

.ach-toast.toast-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
}

/* ── Controls disabled state ── */
.slider-control:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Responsive fine-tuning ── */
@media (max-width: 639px) {
    .ach-card-inner {
        padding: 1.25rem;
    }

    .ach-title {
        font-size: 0.95rem;
    }

    .ach-toast {
        max-width: 280px;
        font-size: 0.8rem;
    }
}