/* =============================================
   Animations & Transitions
   ============================================= */

/* ---- Fade-up animation (scroll reveal) ---- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.fade-up:nth-child(1) { transition-delay: 0s; }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }
.fade-up:nth-child(7) { transition-delay: 0.6s; }
.fade-up:nth-child(8) { transition-delay: 0.7s; }

/* ---- Hero entrance ---- */
.hero-content {
    animation: heroFadeIn 1s ease-out 0.3s both;
}

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

/* ---- Nav link underline ---- */
@media (min-width: 1024px) {
    .nav-link {
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 2px;
        right: 16px;
        left: 16px;
        height: 2px;
        background-color: var(--green-secondary);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 0.3s ease-in-out;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        transform: scaleX(1);
    }
}

/* ---- Card hover ---- */
.card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ---- Activity item pulse icon ---- */
.activity-item:hover .activity-icon {
    animation: gentlePulse 0.6s ease-in-out;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ---- Marquee hover ---- */
.marquee-item {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* ---- Button press effect ---- */
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* ---- Footer link hover ---- */
.footer-col ul li a {
    transition: color 0.3s ease, padding-right 0.3s ease;
}

/* ---- Header scroll transition ---- */
.header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ---- Scroll indicator bounce ---- */
.hero-scroll-indicator {
    animation: fadeInUp 1s ease-out 1.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ---- Lightbox transitions ---- */
.lightbox {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-img {
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    animation: lightboxZoomIn 0.3s ease-out;
}

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

/* ---- Reduce motion for accessibility ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-up {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
