/* Custom styles for Rowdy Roads Automotive */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf4f8;
}
::-webkit-scrollbar-thumb {
    background: #f9a8d4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f472b6;
}

/* Selection color */
::selection {
    background: #f9a8d4;
    color: #831443;
}

/* Navbar scroll state */
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(157, 23, 77, 0.08);
}

/* Service card hover glow effect */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Ensure service cards have relative positioning */
.service-card {
    position: relative;
    overflow: hidden;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

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

/* Mobile link transitions */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ec4899, #f472b6);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* Back to top button animation */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeUp 0.3s ease forwards;
}

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

/* Service card entrance animation (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }

    /* Why us cards */
    #why-us > div > div > div {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    #why-us > div > div > div.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    #why-us > div > div > div:nth-child(1) { transition-delay: 0.05s; }
    #why-us > div > div > div:nth-child(2) { transition-delay: 0.15s; }
    #why-us > div > div > div:nth-child(3) { transition-delay: 0.25s; }
}

/* 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='%239d174d' 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;
    padding-right: 40px;
}
