/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --primary: #D32F2F;       /* Rojo Automotriz */
    --primary-dark: #B71C1C;
    --accent: #212121;        /* Negro Asfalto */
    --text-dark: #111111;
    --text-light: #F5F5F5;
    --gray-light: #E0E0E0;
    --white: #FFFFFF;
    --whatsapp: #25D366;
    --shadow: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   COMPONENTES UI
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 10px;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 8px 16px rgba(183, 28, 28, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--gray-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #FAFAFA;
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: var(--white);
    font-weight: 700;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

/* SVG Icons Inline */
.icon { width: 24px; height: 24px; fill: currentColor; }
.icon-lg { width: 48px; height: 48px; fill: currentColor; }

/* =========================================
   HEADER & NAV
   ========================================= */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: var(--transition);
}

/* ✅ Logo: ahora es flex + logo visible */
.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -1px;

    display: inline-flex;
    align-items: center;
    gap: 12px;
    line-height: 1;
}

.logo-img{
    height: 100px;     /* ⬅️ más visible en desktop */
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo span { color: var(--primary); }

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

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

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* =========================================
   HERO SECTION
   ========================================= */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color: var(--text-dark);
    overflow: hidden;
    color: var(--white);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.2), rgba(0,0,0,0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s ease-out forwards 0.5s;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    color: var(--gray-light);
    font-weight: 400;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   SECTIONS & LAYOUT
   ========================================= */
section { padding: 80px 5%; }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.section-subtitle {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* =========================================
   SERVICES
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--primary);
}

.service-icon {
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.service-desc {
    font-size: 0.95rem;
    color: #666;
}

/* =========================================
   PROCESS (TIMELINE)
   ========================================= */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #FAFAFA;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =========================================
   GALLERY (BEFORE & AFTER)
   ========================================= */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--gray-light);
    padding: 10px 24px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    color: #666;
}

.tab-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.gallery-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-grid.active { display: grid; }

/* Before/After Custom Slider */
.ba-slider {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    cursor: ew-resize;
    box-shadow: var(--shadow);
}

.ba-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.ba-after { z-index: 1; }

.ba-before {
    z-index: 2;
    width: 50%;
    border-right: 3px solid var(--white);
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 3;
    pointer-events: none;
    color: var(--primary);
}

.ba-slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 4;
    cursor: col-resize;
    margin: 0;
}

.ba-labels {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 3;
    pointer-events: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    color: white;
}

/* =========================================
   VIDEO SECTION
   ========================================= */
#videos {
    background-color: var(--accent);
    color: var(--white);
}

#videos .section-title { color: var(--white); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.video-item {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-item iframe, .video-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   AUDIO PLAYER & TESTIMONIALS
   ========================================= */
.audio-player-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--gray-light);
}

.audio-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
    display: none;
}

/* =========================================
   CONTACT & FOOTER
   ========================================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    background: #FAFAFA;
    padding: 30px;
    border-radius: 8px;
}

.form-group { margin-bottom: 20px; }

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

footer {
    background-color: var(--accent);
    color: #888;
    padding: 60px 5% 20px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s;
        border-top: 1px solid #eee;
    }

    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .contact-layout { grid-template-columns: 1fr; }
    .process-steps { flex-direction: column; }
    .audio-label { display: none; }

    /* ✅ Logo responsive: que no se coma el header en móvil */
    .logo { font-size: 1.2rem; gap: 10px; }
    .logo-img { height: 42px; }
}

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

