/* Custom styles for Central City Automotive Detailing */

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

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

::-webkit-scrollbar-track {
    background: #0a1520;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #203a56;
}

/* Selection color */
::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #e8eef5;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(6, 14, 22, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(32, 58, 86, 0.5) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Scroll reveal base - content is VISIBLE by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS adds the class and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-revealed="false"] {
        opacity: 0;
        transform: translateY(24px);
    }
}

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

#mobile-menu.open {
    max-height: 500px;
}

/* Navbar glass effect for hero */
.navbar-glass {
    background: rgba(6, 14, 22, 0.6) !important;
    backdrop-filter: blur(12px);
}

/* Custom 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='%239fb8d8' 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;
}

select:focus {
    border-color: #4ade80;
    outline: none;
    box-shadow: 0 0 0 1px #4ade80;
}

/* Hero gradient animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(-50%) translateY(-50%); }
    50% { transform: translateY(-20px) translateX(-50%) translateY(-50%); }
}

/* Button ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Pulse animation for status dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Back to top visibility */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Gallery image hover overlay */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 1px #4ade80;
    outline: none;
}

/* Subtle hover lift for cards */
.group:hover {
    transform: translateY(-4px);
}

/* Ensure all text is readable */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
