/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: #d1fae5;
    color: #064e3b;
}

/* Map Settings */
#map { 
    height: 550px; 
    z-index: 10; 
    border-radius: 1rem; 
}

/* IUCN Badge Styles */
.iucn-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    margin-top: 5px;
    letter-spacing: 0.5px;
}
.iucn-cr { background-color: #dc2626; }
.iucn-en { background-color: #ea580c; }
.iucn-vu { background-color: #ca8a04; }

/* Hero Pattern */
.hero-pattern {
    background-color: #047857;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(4, 120, 87, 0.45)), url('../photo_kukang4.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
@media (max-width: 768px) {
    .hero-pattern {
        background-attachment: scroll;
    }
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.leaflet-popup-content {
    margin: 16px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

/* Instagram Embed Cropping */
.instagram-media {
    border-radius: 1rem !important;
    margin-bottom: -110px !important;
}

/* Scroll-triggered Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for children */
.stagger-children > .fade-up:nth-child(1) { transition-delay: 0ms; }
.stagger-children > .fade-up:nth-child(2) { transition-delay: 120ms; }
.stagger-children > .fade-up:nth-child(3) { transition-delay: 240ms; }

/* Card hover lift effect */
.card-hover {
    transition: opacity 0.7s ease-out, transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #059669, #047857);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Decorative blob shapes */
.blob-shape {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

/* Glowing button effect */
.btn-glow {
    position: relative;
    overflow: hidden;
}
.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn-glow:hover::after {
    opacity: 1;
}

/* Section divider wave */
.section-divider {
    position: relative;
}
.section-divider::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #059669, transparent);
}
