/* Custom styles for Desert Hot Springs Locksmith */

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 249, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #B85C38, #EAD5B8);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Hero stat cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Only animate cards below the fold if preferred */
@media (prefers-reduced-motion: no-preference) {
    .hero-stat-card {
        animation: float 6s ease-in-out infinite;
    }
    .hero-stat-card:nth-child(2) {
        animation-delay: -1.5s;
    }
    .hero-stat-card:nth-child(3) {
        animation-delay: -3s;
    }
    .hero-stat-card:nth-child(4) {
        animation-delay: -4.5s;
    }
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Custom 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='%239ca3af' 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;
    padding-right: 2.5rem;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

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

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

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