/* =============================================
   Palm Beach Brake and Auto Center — Custom Styles
   ============================================= */

/* Base Reset & Smooth Scroll */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: #FDF6E3;
}

/* =============================================
   Floating Animation for Hero Cards
   ============================================= */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* =============================================
   Scroll Reveal Animations
   Progressive enhancement — only active with JS
   ============================================= */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply hidden state when JS is available and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Fallback: ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal:not(.revealed) {
        opacity: 1;
        transform: none;
    }
}

/* =============================================
   Navbar Scroll State
   ============================================= */
.nav-scrolled {
    background: rgba(6, 14, 11, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(253, 246, 227, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-scrolled #navbar {
    padding-top: 0;
    padding-bottom: 0;
}

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

::-webkit-scrollbar-track {
    background: #060E0B;
}

::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

/* =============================================
   Select Dropdown Styling
   ============================================= */
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='%23FDF6E3' 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 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

/* =============================================
   Focus Visible for Accessibility
   ============================================= */
:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.6);
    outline-offset: 2px;
}

/* =============================================
   Mobile Menu Transition
   ============================================= */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobileMenu.open {
    max-height: 500px;
    padding-top: 0;
    padding-bottom: 0;
}

/* =============================================
   Link Hover Underline Animation
   ============================================= */
a {
    text-decoration: none;
}

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

/* =============================================
   Print Styles
   ============================================= */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
