/* Custom styles for Mark's Trailer Rentals */

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

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

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.1);
}

nav.scrolled .nav-logo-text {
    color: #14532d;
}

/* Hero floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-12px) rotate(var(--rotate, 0deg)); }
}

.floating-card-1 { animation: float 6s ease-in-out infinite; --rotate: 2deg; }
.floating-card-2 { animation: float 7s ease-in-out infinite 0.5s; --rotate: -1deg; }
.floating-card-3 { animation: float 5.5s ease-in-out infinite 1s; --rotate: 1deg; }
.floating-card-4 { animation: float 6.5s ease-in-out infinite 1.5s; --rotate: -2deg; }

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* FAQ accordion transitions */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

.faq-content.open {
    max-height: 200px;
}

.faq-icon.rotated {
    transform: rotate(45deg);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile links */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(22, 101, 52, 0.1);
}

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

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .floating-card-1 { animation: float 6s ease-in-out infinite; --rotate: 2deg; }
    .floating-card-2 { animation: float 7s ease-in-out infinite 0.5s; --rotate: -1deg; }
    .floating-card-3 { animation: float 5.5s ease-in-out infinite 1s; --rotate: 1deg; }
    .floating-card-4 { animation: float 6.5s ease-in-out infinite 1.5s; --rotate: -2deg; }
}
