/* Custom styles for Texas Star RV Ranch */

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

/* Reduced motion */
@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;
    }
}

/* Selection color */
::selection {
    background-color: #166534;
    color: white;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #166534;
    transition: width 0.2s ease;
    border-radius: 1px;
}

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

/* Mobile link hover */
.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background-color: #166534;
    transition: width 0.2s ease;
}

.mobile-link:hover::before {
    width: 16px;
}

/* Fade-in animation for hero badge */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease forwards;
}

/* Scroll reveal base state — always visible by default */
.reveal {
    opacity: 1;
    transform: none;
}

/* Scroll reveal enhanced with JS (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal.animate {
        animation: reveal-up 0.6s ease forwards;
    }
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header scroll state */
header.scrolled {
    background-color: rgba(253, 252, 248, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #166534;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #aed4ad;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7dbf7d;
}
