/* Custom styles for A&D Used Golf Cart Sales */

:root {
    --emerald-900: #0a3d2c;
    --emerald-800: #0d4a3a;
    --emerald-700: #14614b;
    --emerald-600: #1a7a5c;
    --cream: #f5f0e8;
    --cream-light: #faf7f2;
    --gold-500: #c9a962;
    --gold-400: #d4b876;
    --gold-300: #e0c98a;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--cream);
    color: var(--emerald-900);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

/* Nav link hover underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Hamburger animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll reveal animations */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .section-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    #mobile-menu.active .mobile-link {
        animation: none;
        opacity: 1;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--emerald-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-600);
}

/* Selection color */
::selection {
    background-color: var(--gold-500);
    color: var(--emerald-900);
}
