/* TurboCar - Clean & Professional Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

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

/* Navbar Scroll Effect */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 4px 20px rgba(220, 0, 0, 0.3);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Nav Links Underline Effect */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #DC0000;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.text-primary::after {
    width: 100%;
}

/* Mobile Menu Button Animation */
#menuToggle.active #bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
    background: #DC0000;
}

#menuToggle.active #bar2 {
    opacity: 0;
}

#menuToggle.active #bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
    background: #DC0000;
}

/* Mobile Menu Slide Animation */
#mobileMenu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-link {
    transform: translateX(-10px);
    opacity: 0;
    animation: slideInLeft 0.3s ease forwards;
}

.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-link:nth-child(5) { animation-delay: 0.3s; }
.mobile-link:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Logo Hover Effect */
nav a img {
    filter: drop-shadow(0 0 10px rgba(220, 0, 0, 0));
    transition: all 0.3s ease;
}

nav a:hover img {
    filter: drop-shadow(0 0 15px rgba(220, 0, 0, 0.5));
}

/* Contact Button Glow Effect */
nav a[href="#contacto"] {
    position: relative;
    overflow: hidden;
}

nav a[href="#contacto"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

nav a[href="#contacto"]:hover::before {
    width: 300px;
    height: 300px;
}

/* ===================================
   HERO SECTION - CLEAN & PROFESSIONAL
   =================================== */

/* Hero Title - TURBOCAR Always One Line */
.hero-title-wrapper {
    display: inline-block;
    white-space: nowrap;
}

.hero-title-turbo {
    color: white;
    transition: all 0.3s ease;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1);
}

.hero-title-car {
    background: linear-gradient(135deg, #DC0000 0%, #FF3333 50%, #DC0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
    text-shadow: 
        0 0 20px rgba(220, 0, 0, 0.5),
        0 0 40px rgba(220, 0, 0, 0.3);
    filter: drop-shadow(0 0 10px rgba(220, 0, 0, 0.8));
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-title-wrapper:hover .hero-title-turbo {
    color: #f5f5f5;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(255, 255, 255, 0.4),
        0 0 60px rgba(255, 255, 255, 0.2);
}

.hero-title-wrapper:hover .hero-title-car {
    filter: drop-shadow(0 0 20px rgba(220, 0, 0, 1));
}

/* Responsive Title Sizes - Always One Line */
.hero-title-wrapper {
    font-size: 4rem; /* 64px */
}

@media (max-width: 380px) {
    .hero-title-wrapper {
        font-size: 2.5rem; /* 40px */
    }
}

@media (min-width: 381px) and (max-width: 480px) {
    .hero-title-wrapper {
        font-size: 3rem; /* 48px */
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .hero-title-wrapper {
        font-size: 3.5rem; /* 56px */
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-title-wrapper {
        font-size: 5rem; /* 80px */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title-wrapper {
        font-size: 6rem; /* 96px */
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .hero-title-wrapper {
        font-size: 7rem; /* 112px */
    }
}

@media (min-width: 1281px) {
    .hero-title-wrapper {
        font-size: 8rem; /* 128px */
    }
}

/* Fade In Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-800 {
    animation-delay: 0.8s;
}

/* WhatsApp Button Pulse Animation */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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

::-webkit-scrollbar-track {
    background: #ffffff;
}

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

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

/* Button Animations */
button, a {
    transition: all 0.3s ease;
}

/* Form Focus Effect */
input:focus, textarea:focus {
    outline: none;
    border-color: #DC0000;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    p {
        font-size: 0.95rem;
    }
    
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

/* ===================================
   NOSOTROS SECTION - SPECTACULAR
   =================================== */

/* Floating animation for stats card */
@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(calc(-50% - 10px));
    }
}

#nosotros .absolute.-right-6 {
    animation: floatUpDown 3s ease-in-out infinite;
}

/* Image hover effects */
#nosotros img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Feature cards hover effect */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===================================
   MARCAS SECTION - INFINITE CAROUSEL
   =================================== */

/* Infinite Scroll - Controlled by JavaScript */
.brands-carousel {
    transition: none; /* Remove CSS animation, use JS instead */
    will-change: transform; /* Optimize for smooth animation */
}

/* Brand Cards */
.brand-card {
    min-width: 180px;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brand-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(220, 0, 0, 0.5);
}

.brand-item {
    transition: transform 0.3s ease;
}

.brand-item:hover {
    transform: scale(1.1);
}

/* Brand Logos */
.brand-logo {
    width: 100px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo {
    filter: brightness(1) invert(0);
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .brand-card {
        min-width: 140px;
        min-height: 100px;
        padding: 1rem;
    }
    
    .brand-logo {
        width: 80px;
        height: 50px;
    }
}

/* Fix for colored brand logos */
img[alt="BMW"],
img[alt="Ford"],
img[alt="Volkswagen"] {
    filter: grayscale(1) brightness(5) !important;
    opacity: 0.8 !important;
}

.brand-card:hover img[alt="BMW"],
.brand-card:hover img[alt="Ford"],
.brand-card:hover img[alt="Volkswagen"] {
    filter: grayscale(0) brightness(1) !important;
    opacity: 1 !important;
}
