/* ===== Custom Styles for The Car Connection ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf6f0;
}
::-webkit-scrollbar-thumb {
    background: #cc6666;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8b1a2b;
}

/* Selection color */
::selection {
    background: #f0c4c4;
    color: #470e15;
}

/* ===== Hero Animations ===== */
.hero-headline {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-tagline {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-ctas {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-tagline,
.hero-subtitle,
.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Section Labels ===== */
.section-label {
    display: inline-block;
}

/* ===== Vehicle Cards ===== */
.vehicle-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== Feature Items ===== */
.feature-item {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-item:hover {
    transform: translateY(-4px);
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        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; }
}

/* Fallback: always show content if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Navbar Scroll State ===== */
.nav-scrolled {
    background: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(139, 26, 43, 0.1);
}

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

/* ===== Decorative Line Animation ===== */
.divider-line {
    position: relative;
    overflow: hidden;
}

.divider-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cc6666, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.divider-line:hover::after {
    transform: translateX(0);
}

/* ===== Image Hover Effects ===== */
img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Button Focus States ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #8b1a2b;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem !important;
    }

    .hero-headline span.block {
        font-size: 1.5rem !important;
    }
}

/* ===== Print Styles ===== */
@media print {
    nav, .hero-ctas, #contact iframe {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
