/* ========================================
   Los Primos Auto Repair — Custom Styles
   Classic & Elegant Auto Repair Website
   ======================================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF8F2;
}
::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5230;
}

/* Selection */
::selection {
    background: #1B4332;
    color: #FDFCF8;
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(253, 252, 248, 0.97);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(27, 67, 50, 0.08);
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #D4A574;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.menu-line:last-child {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}
.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Testimonial cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease;
}
.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}
@keyframes float-alt {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}
@keyframes float-alt2 {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.floating-card-1 {
    animation: float 5s ease-in-out infinite;
}
.floating-card-2 {
    animation: float-alt 4.5s ease-in-out infinite;
}
.floating-card-3 {
    animation: float-alt2 5.5s ease-in-out infinite;
}

/* Hero text reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    animation: fadeInUp 0.8s ease forwards;
}
.hero-text-delay-1 { animation-delay: 0.2s; opacity: 0; }
.hero-text-delay-2 { animation-delay: 0.4s; opacity: 0; }
.hero-text-delay-3 { animation-delay: 0.6s; opacity: 0; }
.hero-text-delay-4 { animation-delay: 0.8s; opacity: 0; }

/* Mobile links */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

/* Image hover zoom */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s ease;
}
.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        animation: none;
        transform: none;
    }
}

/* Print styles */
@media print {
    #navbar, #mobileMenu, .floating-card-1, .floating-card-2, .floating-card-3 {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
