/* ===== CUSTOM STYLES ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #2d9e66;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1f7d50;
}

/* Navigation scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(10, 37, 64, 0.08);
}

.nav-scrolled .nav-link {
    color: #0a2540 !important;
}

.nav-scrolled .group:hover {
    color: #1f7d50 !important;
}

/* Mobile menu active state */
.mobile-menu-active {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-active .mobile-link {
    animation: fadeUp 0.4s ease forwards;
}

.mobile-menu-active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu-active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu-active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu-active .mobile-link:nth-child(4) { animation-delay: 0.2s; }

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}
.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal.delay-1 { transition-delay: 0.1s; }
    .reveal.delay-2 { transition-delay: 0.2s; }
    .reveal.delay-3 { transition-delay: 0.3s; }
}

/* Keyframes */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2d9e66;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #b3e2cc;
    color: #0a2540;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
