/* Custom styles for Southern Cylinder Head & Engine */

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

/* Custom selection color */
::selection {
    background: rgba(200, 164, 90, 0.3);
    color: #0a1f3f;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 31, 63, 0.95);
    backdrop-blur-xl;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile menu animations */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

#mobile-menu.closing {
    animation: slideUp 0.25s ease forwards;
}

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

/* Mobile menu active state */
body.menu-open {
    overflow: hidden;
}

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Floating card animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.hero-card-1 { animation: float 4s ease-in-out infinite; }
.hero-card-2 { animation: float-delayed 3.5s ease-in-out infinite 0.5s; }
.hero-card-3 { animation: float 5s ease-in-out infinite 1s; }
.hero-card-4 { animation: float-delayed 4.5s ease-in-out infinite 0.3s; }

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Service card stagger */
.service-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Input focus styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(200, 164, 90, 0.15);
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal, .service-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-card-1, .hero-card-2, .hero-card-3, .hero-card-4 {
        animation: none;
    }

    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    #hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    h1 {
        font-size: 2.5rem !important;
    }
}

/* Wide screen adjustments */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
