/* Custom styles for Campbells Automotive Repair */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #10B981;
}

/* Selection color */
::selection {
    background: #10B981;
    color: white;
}

/* Animation for fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(10, 22, 40, 0.05);
}

/* Service card hover effect */
.group:hover .group-hover\:bg-mint-500 {
    background-color: #10B981;
}

/* Button hover effect */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
}

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

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

/* Image hover zoom effect */
img {
    transition: transform 0.3s ease;
}

/* Subtle line separators */
.line-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(10, 22, 40, 0.1), transparent);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #0A1628 0%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading animation for form submission */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Responsive typography */
@media (max-width: 768px) {
    .font-serif {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .font-serif {
        font-size: 3.75rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
