body { font-family: 'Manrope', sans-serif; background: #F8F6F0; }
.font-playfair { font-family: 'Playfair Display', serif; }

/* === ANIMATIONS === */
@keyframes clipIn {
    0% { opacity: 0; clip-path: inset(0 0 100% 0); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes leafDrift {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-20px) rotate(15deg); opacity: 1; }
    100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.anim-clip { animation: clipIn 1.2s cubic-bezier(0.25,1,0.5,1) both; }
.anim-fade-up { animation: fadeUp 0.8s ease-out both; }
.anim-scale { animation: scaleIn 0.8s ease-out both; }
.anim-float { animation: float 4s ease-in-out infinite; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* === HERO === */
.hero-bg {
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 40%, #40916C 70%, #52B788 100%);
}

/* === GLASS === */
.glass-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* === SCROLL REVEAL === */
.section-reveal {
    opacity: 0; transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25,1,0.5,1);
}
.section-reveal.visible { opacity: 1; transform: translateY(0); }

/* === COUNTER === */
.counter { font-variant-numeric: tabular-nums; }

/* === NAV === */
.nav-blur {
    background: rgba(27, 67, 50, 0.85);
    backdrop-filter: blur(16px);
}

/* === LEAF DECORATION === */
.leaf-icon { animation: leafDrift 3s ease-in-out infinite; }
.leaf-icon:nth-child(2) { animation-delay: 1s; }
.leaf-icon:nth-child(3) { animation-delay: 2s; }

/* === CARD HOVER === */
.card-hover { transition: all 0.3s ease; }
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(45,106,79,0.2);
}

.gold-border { border: 2px solid #D4A843; }

/* === MARQUEE === */
.marquee-track {
    display: flex;
    animation: marquee 30s linear infinite;
    width: max-content;
}

/* === TOAST === */
.toast {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2D6A4F; color: #fff;
    padding: 14px 28px; border-radius: 12px;
    font-size: 14px; font-weight: 600; z-index: 9999;
    transition: transform 0.4s ease, opacity 0.4s ease; opacity: 0;
    box-shadow: 0 10px 40px rgba(45,106,79,0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* === MODAL === */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 100; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
    background: #fff; border-radius: 24px; max-width: 560px; width: 100%;
    max-height: 85vh; overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

/* === POKJA CARD === */
.pokja-card { position: relative; overflow: hidden; }
.pokja-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--accent, #2D6A4F); border-radius: 20px 20px 0 0;
}
.pokja-grid-item { transition: all 0.3s ease; }
.pokja-grid-item:hover { transform: translateY(-5px); }
.pokja-grid-item:hover .pokja-icon-wrap { transform: scale(1.1); }
.pokja-icon-wrap { transition: transform 0.3s ease; }

/* ==========================================
   SLIDER
   ========================================== */

.slider-track {
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.slider-card {
    width: 100%;
}
@media (min-width: 640px) {
    .slider-card {
        width: calc((100% - 20px) / 2);
    }
}
@media (min-width: 1024px) {
    .slider-card {
        width: calc((100% - 40px) / 3);
    }
}

/* Slider arrows */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1B4332;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
    border: none;
    cursor: pointer;
}
.slider-btn:hover {
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(-50%) scale(1.08);
}
.slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.slider-btn-prev {
    left: -22px;
}
.slider-btn-next {
    right: -22px;
}
@media (max-width: 768px) {
    .slider-btn {
        width: 36px;
        height: 36px;
    }
    .slider-btn-prev { left: 6px; }
    .slider-btn-next { right: 6px; }
    .slider-btn iconify-icon { width: 22px !important; }
}

/* Side fade gradients */
.slider-fade-left,
.slider-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 5;
    pointer-events: none;
}
.slider-fade-left {
    left: 0;
    background: linear-gradient(to right, #F8F6F0, transparent);
    border-radius: 2rem 0 0 2rem;
}
.slider-fade-right {
    right: 0;
    background: linear-gradient(to left, #F8F6F0, transparent);
    border-radius: 0 2rem 2rem 0;
}
@media (max-width: 768px) {
    .slider-fade-left,
    .slider-fade-right { width: 20px; }
}

/* Slider dots */
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #B7E4C7;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.slider-dot:hover {
    background: #40916C;
    transform: scale(1.2);
}
.slider-dot.active {
    background: #2D6A4F;
    width: 24px;
    border-radius: 4px;
}

/* Auto-play pause indicator */
#sliderWrapper:hover .slider-btn {
    opacity: 1;
}
#sliderWrapper .slider-btn {
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}

/* Filter Buttons */
.filter-btn {
    background: #fff;
    color: #2D6A4F;
    border: 2px solid #B7E4C7;
}
.filter-btn:hover {
    background: #D8F3DC;
    border-color: #40916C;
}
.filter-btn.active {
    background: #2D6A4F;
    color: #fff;
    border-color: #2D6A4F;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
}

/* Social card hover glow */
.social-card {
    min-width: 170px;
}
.social-card:hover .w-10 {
    filter: brightness(1.15);
}

/* Responsive: Stack on small screens */
@media (max-width: 640px) {
    .social-card {
        min-width: 0;
        width: 100%;
        max-width: 280px;
    }
}

/* Footer social */
footer a[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

/* ==========================================
   POKJA MODAL — Toggle Kegiatan
   ========================================== */

.pokja-kegiatan-hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.3s ease,
                padding 0.3s ease;
}

.pokja-kegiatan-visible {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.4s ease 0.1s;
}

/* ==========================================
   HERO SLIDER
   ========================================== */
.hero-slide {
    transition: opacity 0.7s ease-in-out;
}

.hero-slide img {
    background: #1B4332;
}

/* ==========================================
   POKJA CARD — Foto Auto-Height
   ========================================== */
.pokja-card .object-contain {
    background: #f0fdf4;
}

/* ==========================================
   HERO SLIDER — Auto Crossfade (No Arrows)
   ========================================== */
.hero-dot {
    display: block;
}

/* ==========================================
   FIX: Mencegah descender terpotong pada heading hero
   ========================================== */
#hero h1,
#hero h2 {
    overflow: visible;
    clip-path: none;
}

/* Pastikan anim-clip hanya digunakan pada h1, bukan h2 */
#hero h2.anim-fade-up {
    clip-path: unset;
}

/* ==========================================
   TENTANG — JS-Driven Slideshow
   ========================================== */

.tentang-slideshow {
    min-height: 400px;
}

.tentang-slide-container {
    aspect-ratio: 4 / 5;
    position: relative;
}

.tentang-slide {
    position: absolute;
    inset: 0;
    transition: opacity 1s ease-in-out;
}

.tentang-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tentang-dot {
    display: block;
}

@media (max-width: 640px) {
    .tentang-slideshow {
        min-height: 320px;
    }
    .tentang-slide-container {
        aspect-ratio: 3 / 4;
    }
}

/* Durasi total: 10 detik
   Slide 1 tampil: 0% - 45% (10 detik)
   Crossfade:       45% - 55% (2 detik)
   Slide 2 tampil: 55% - 95% (10 detik)
   Crossfade:       95% - 100% (2 detik) */

.tentang-slide-1 {
    animation: tentangFade1 10s ease-in-out infinite;
    z-index: 2;
}

.tentang-slide-2 {
    animation: tentangFade2 10s ease-in-out infinite;
    z-index: 1;
}

@keyframes tentangFade1 {
    0%, 45%   { opacity: 1; }
    50%, 95%  { opacity: 0; }
    100%      { opacity: 1; }
}

@keyframes tentangFade2 {
    0%, 45%   { opacity: 0; }
    50%, 95%  { opacity: 1; }
    100%      { opacity: 0; }
}

/* Badge crossfade (sinkron dengan slide) */
.tentang-badge {
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.tentang-badge-1 {
    animation: tentangBadgeFade1 10s ease-in-out infinite;
}

.tentang-badge-2 {
    animation: tentangBadgeFade2 10s ease-in-out infinite;
}

@keyframes tentangBadgeFade1 {
    0%, 43%   { opacity: 1; transform: translateY(0); }
    48%, 97%  { opacity: 0; transform: translateY(8px); pointer-events: none; }
    100%      { opacity: 1; transform: translateY(0); }
}

@keyframes tentangBadgeFade2 {
    0%, 43%   { opacity: 0; transform: translateY(8px); pointer-events: none; }
    48%, 97%  { opacity: 1; transform: translateY(0); }
    100%      { opacity: 0; transform: translateY(8px); }
}

/* Dot indicator (sinkron) */
.tentang-dot-1 {
    animation: tentangDot1 10s ease-in-out infinite;
}

.tentang-dot-2 {
    animation: tentangDot2 10s ease-in-out infinite;
}

@keyframes tentangDot1 {
    0%, 45%   { background: #fff; width: 16px; border-radius: 4px; }
    50%, 95%  { background: rgba(255,255,255,0.4); width: 8px; border-radius: 50%; }
    100%      { background: #fff; width: 16px; border-radius: 4px; }
}

@keyframes tentangDot2 {
    0%, 45%   { background: rgba(255,255,255,0.4); width: 8px; border-radius: 50%; }
    50%, 95%  { background: #fff; width: 16px; border-radius: 4px; }
    100%      { background: rgba(255,255,255,0.4); width: 8px; border-radius: 50%; }
}

/* Responsive */
@media (max-width: 640px) {
    .tentang-slideshow {
        min-height: 320px;
    }
    .tentang-slide-container {
        aspect-ratio: 3 / 4;
    }
}

/* ==========================================
   LIGHTBOX — Smooth transitions
   ========================================== */
#lightboxImg {
    transition: transform 0.3s ease, opacity 0.15s ease;
}