/* Custom styles for Frontier RV Park Timpson */

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

/* Base transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(61, 7, 18, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#navbar:not(.scrolled) {
    background: transparent;
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Scroll reveal for below-fold content - only apply when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero content is always visible (above fold) */
.hero-content {
    opacity: 1 !important;
    transform: none !important;
}

/* Gallery scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-288px * 6 - 32px));
    }
}

.animate-scroll {
    display: flex;
    gap: 16px;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll {
        animation: none;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Mobile menu link styles */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background-color: #c22d4d;
    color: #fff8f0;
}
