/* Custom styles for CNY Auto Sales */

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(38, 11, 44, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(155, 77, 171, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hero shape animations */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.05); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 20px) scale(1.08); }
}

@keyframes float3 {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(25px, -15px); }
}

.hero-shape.shape-1 {
    animation: float1 8s ease-in-out infinite;
}

.hero-shape.shape-2 {
    animation: float2 10s ease-in-out infinite;
}

.hero-shape.shape-3 {
    animation: float3 12s ease-in-out infinite;
}

/* Service card hover effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Part card hover effects */
.part-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.part-card:hover {
    transform: translateY(-6px);
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Menu lines animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 6rem !important;
    margin-right: 0 !important;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

/* Selection color */
::selection {
    background: rgba(245, 166, 35, 0.3);
    color: #f9f5fb;
}

/* 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;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }

    .part-card {
        aspect-ratio: 4/3;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .service-card {
        padding: 2rem;
    }
}

/* Print styles */
@media print {
    nav, #backToTop, .hero-shape {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .bg-plum-950, .bg-plum-900 {
        background: white !important;
    }
}
