/* Custom styles for Chambersburg Auto Repair Service */

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

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

::-webkit-scrollbar-track {
    background: #1a0f16;
}

::-webkit-scrollbar-thumb {
    background: #704254;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Hover effects for cards */
.group:hover .group-hover\:bg-amber-500 {
    background-color: #d97706;
}

.group:hover .group-hover\:text-white {
    color: #ffffff;
}

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

/* Custom focus styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Navbar scroll effect */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Hero section parallax effect */
header {
    perspective: 1px;
}

header img {
    will-change: transform;
}

/* Button hover animations */
button, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #2d1b24 0%, #4a2c38 50%, #2d1b24 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .font-serif.text-5xl {
        font-size: 2.25rem;
    }
}

/* Print styles */
@media print {
    nav,
    #mobile-menu,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Accessibility: Reduced motion */
@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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-plum-900 {
        background-color: #000000;
    }
    
    .text-plum-200 {
        color: #ffffff;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 3px solid #d97706;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #d97706;
    color: #ffffff;
}
