/* Custom styles for Red Feather Lakes Village Gallery */

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

/* Base text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Navigation transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(42, 42, 42, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #E8604A;
    transition: width 0.3s ease;
}

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

#navbar.scrolled .nav-link {
    color: #4a4a4a;
}

#navbar.scrolled .nav-link:hover {
    color: #E8604A;
}

#navbar:not(.scrolled) .nav-link {
    color: #a0a0a0;
}

/* Mobile menu animations */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #E8604A;
    transition: width 0.3s ease;
}

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

/* Scroll reveal base state - always visible */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Scroll reveal animated state - only applied when JS runs and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Initial state for JS-enhanced reveals */
    .scroll-reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal[data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* Input focus transitions */
input:focus,
textarea:focus,
select:focus {
    border-color: #E8604A !important;
}

/* Image hover smoothness */
img {
    display: block;
    max-width: 100%;
}

/* Selection color */
::selection {
    background-color: #E8604A;
    color: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #E8604A;
    outline-offset: 2px;
}

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

/* Print styles */
@media print {
    #navbar,
    #mobile-menu-btn,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
