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

/* ========================= */
/* VARIABLES                 */
/* ========================= */
:root {
    --accent: #a855f7; /* violeta drift */
    --main-title-color: #ffffff;
    --overlay-bg: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
}

/* ========================= */
/* BASE                      */
/* ========================= */

body{
    background: #000;
    font-family: "Roboto", sans-serif;
    overflow-x: hidden;
}

/* ========================= */
/* SLIDER                    */
/* ========================= */

.car-slider {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
}

/* ========================= */
/* FONDO PROFUNDO            */
/* ========================= */

.car-slider::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at 50% 120%, rgba(255,255,255,0.06), transparent 60%),
        radial-gradient(circle at 50% -20%, rgba(168,85,247,0.15), transparent 60%),
        linear-gradient(to top, #000 0%, #020202 40%, #000 100%);

    z-index: 0;
}

/* ========================= */
/* ESCENA (SUELO + LUZ REAL) */
/* ========================= */

.car-slider::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        /* horizonte más fino */
        linear-gradient(
            to top,
            transparent 48%,
            rgb(255, 255, 255) 50%,
            transparent 52%
        ),

        /* piso más marcado */
        radial-gradient(
            ellipse at 50% 100%,
            rgba(255,255,255,0.12),
            transparent 65%
        ),

        /* luz lateral realista */
        linear-gradient(
            100deg,
            transparent 0%,
            var(--accent) 40%,
            transparent 70%
        );

    opacity: 0.18;
    filter: blur(30px);

    mix-blend-mode: screen;

    animation: lightDrift 10s ease-in-out infinite alternate;

    pointer-events: none;
    z-index: 1;
}


/* ========================= */
/* TITULO PRINCIPAL          */
/* ========================= */

.main-title {

    position: absolute;

    top: 40px;
    left: 50%;

    transform: translateX(-50%);

    width: 100%;

    display: flex;
    justify-content: center;

    z-index: 999;

    pointer-events: none;
}

.main-title h1 {

    font-family: 'Road Rage', cursive;

    font-size: clamp(3rem, 9vw, 8rem);

    letter-spacing: 8px;

    text-transform: uppercase;

    color: #ffffff;

    line-height: 1;

    text-align: center;

    position: relative;

    text-shadow:
        0 0 10px rgba(18, 104, 184, 0.993),
        0 0 25px rgb(240, 7, 143),
        0 0 50px rgba(0, 0, 0, 0.993);

    animation: titleFloat 4s ease-in-out infinite;
}

/* línea glow */

.main-title h1::after {

    content: "";

    position: absolute;

    left: 50%;
    bottom: -12px;

    transform: translateX(-50%);

    width: 180px;
    height: 3px;

    background: var(--accent);

    border-radius: 999px;

    box-shadow:
        0 0 10px var(--accent),
        0 0 25px var(--accent);
}

/* ========================= */
/* ANIMACION                 */
/* ========================= */

@keyframes titleFloat {

    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(6px);
    }

    100% {
        transform: translateY(0px);
    }
}



/* ========================= */
/* LINEAS PROFESIONALES      */
/* ========================= */

.fx-lines {
    position: absolute;
    inset: 0;

    background:
        repeating-linear-gradient(
            115deg,
            transparent 0px,
            transparent 80px,
            rgba(255,255,255,0.015) 81px,
            transparent 82px
        );

    opacity: 0.15;

    animation: moveLines 40s linear infinite;

    pointer-events: none;
    z-index: 2;
}

/* ========================= */
/* NOISE PRO                 */
/* ========================= */

.fx-noise {
    position: absolute;
    inset: 0;

    background-image: url("https://www.transparenttextures.com/patterns/asfalt-dark.png");
    opacity: 0.10;

    mix-blend-mode: overlay;

    pointer-events: none;
    z-index: 3;
}

/* ========================= */
/* SLIDES                    */
/* ========================= */

.slide {
    position: absolute;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 8%;

    opacity: 0;

    overflow: hidden;

    isolation: isolate; /* 🔥 AGREGAR */

    transition: opacity 0.6s ease;
}

.slide.active {
    opacity: 1;
    z-index: 5;
}




.slide::before {

    content: "";

    position: absolute;
    inset: 0;

    width: 100vw;
    height: 100vh;

    background-image: var(--bg);

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    z-index: -2;

    opacity: 0;

    transform: scale(1.08);

    transition:
        opacity 1s ease,
        transform 6s ease;

    /* 🔥 look cinematográfico */

    filter:
        brightness(0.95)
        saturate(0.52)
        contrast(1.01);

    will-change:
        transform,
        opacity;
}

/* slide visible */

.slide.active::before {

    opacity: 1;

    transform: scale(1);
}

/* ========================= */
/* OVERLAY OSCURO            */
/* ========================= */

.slide::after {

    content: "";

    position: absolute;
    inset: 0;

    background:

        linear-gradient(
            to right,
            rgba(0, 0, 0, 0.658),
            rgba(0, 0, 0, 0.808) 100%,
            rgba(0,0,0,0.15)
        ),

            linear-gradient(
            to top,
            rgba(0,0,0,0.25),
            transparent 5%
        );

    z-index: -1;

    pointer-events: none;
}



/* ========================= */
/* MODELO                    */
/* ========================= */

.model-container {
    width: 60%;
    height: 70%;
    position: relative;
    z-index: 6;
}

/* 🔥 SOMBRA (CLAVE) */

.model-container::after {
    content: "";
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);

    width: 320px;
    height: 90px;

    background: radial-gradient(
        ellipse at center,
        rgba(0,0,0,0.9),
        transparent 70%
    );

    filter: blur(25px);
    opacity: 0.8;
}

/* ========================= */
/* INFO                      */
/* ========================= */

.info {
    width: 320px;

    display: flex;
    flex-direction: column;
    gap: 20px;

    position: relative;

    z-index: 15;

    color: #fff;
}

.info h2 {
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.info h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 10px;
}

.info p {
    opacity: 0.5;
    font-size: 0.9rem;
}

/* ========================= */
/* STATS                     */
/* ========================= */

.info ul {
    padding: 0;
}

.info li {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.stat {
    height: 4px;
    background: rgba(255,255,255,0.1);
    margin-top: 5px;
    position: relative;
}

.stat::after {
    content: "";
    position: absolute;
    height: 100%;
    width: var(--value);
    background: var(--accent);
}

/* ========================= */
/* NAV                       */
/* ========================= */

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 2rem;

    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);

    background: rgba(255,255,255,0.02);

    backdrop-filter: blur(4px);

    color: #fff;

    cursor: pointer;

    z-index: 999; /* 🔥 subir */

    transition: all 0.3s ease;
}

.nav:hover {
    transform: translateY(-50%) scale(1.15);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.prev { left: 20px; }
.next { right: 20px; }

/* ========================= */
/* ANIMACIONES               */
/* ========================= */

@keyframes moveLines {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 600px 600px;
    }
}

@keyframes lightDrift {
    from {
        transform: translateX(-5%);
    }
    to {
        transform: translateX(5%);
    }
}















/* ========================= */
/* TABLET (≤ 1024px)         */
/* ========================= */

@media (max-width: 1024px) {

    .slide {
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        padding: 40px 20px;
    }

    .model-container {
        width: 100%;
        height: 50%;
    }

    .info {
        width: 100%;
        max-width: 500px;
        text-align: center;
        align-items: center;
    }

    .info h2 {
        font-size: 2rem;
    }

    .info h2::after {
        margin: 10px auto 0;
    }

    .info p {
        font-size: 0.85rem;
    }

    .info li {
        text-align: left;
        width: 100%;
    }

    /* sombra más chica */
    .model-container::after {
        width: 200px;
        height: 60px;
    }

    /* flechas más accesibles */
    .nav {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
}

/* ========================= */
/* MOBILE (≤ 768px)          */
/* ========================= */

@media (max-width: 768px) {

    .slide {
        flex-direction: column;
        justify-content: space-between;
        padding: 20px;
    }
        .slide::before {
        background-position: center top;
    }
    .model-container {
        width: 100%;
        height: 45%;
    }

    .info {
        width: 100%;
        gap: 15px;
    }

    .info h2 {
        font-size: 1.6rem;
    }

    .info p {
        font-size: 0.8rem;
    }

    .info li {
        font-size: 0.8rem;
    }

    .stat {
        height: 3px;
    }

    /* UI más limpia */
    .fx-lines {
        opacity: 0.08;
    }

    .fx-noise {
        opacity: 0.06;
    }

    /* sombra más suave */
    .model-container::after {
        width: 160px;
        height: 50px;
        opacity: 0.6;
    }

    /* botones más cómodos */
    .nav {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .prev { left: 10px; }
    .next { right: 10px; }
}

/* ========================= */
/* MOBILE CHICO (≤ 480px)    */
/* ========================= */

@media (max-width: 480px) {
    .main-title h1 {

    font-family: 'Road Rage', cursive;

    font-size: clamp(3rem, 9vw, 8rem);

    letter-spacing: 8px;

    text-transform: uppercase;


    line-height:1;

    text-align: center;

    position: relative;
    padding: 20px 20px;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.993),
        0 0 25px rgb(0, 0, 0),
        0 0 50px rgba(0, 0, 0, 0.993);

    animation: titleFloat 4s ease-in-out infinite;
}


    .model-container {
        height: 40%;
    }

    .info h2 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }

    .info p {
        font-size: 0.75rem;
    }

    .info li {
        font-size: 0.75rem;
    }

    /* menos ruido visual */
    .car-slider::after {
        opacity: 0.12;
        filter: blur(20px);
    }

    .fx-lines {
        display: none; /* 🔥 mejora rendimiento */
    }

    .model-container {
        margin-top: 90px;
}    
    
    /* sombra mínima */
    .model-container::after {
        width: 120px;
        height: 40px;
    }
}


/* ============================================ */
/* 🔥 FIXES DEFINITIVOS: ANCHO 100% REAL (NUCLEAR) */
/* ============================================ */

/* 1. Variable para el margen superior (FÁCIL DE AJUSTAR) */
:root {
    /* 🎛️ CAMBIA ESTE VALOR (ej. 60px, 100px) según la altura de tu header */
    --fk3d-header-offset: 80px;
}

/* 2. TÉCNICA DE RUPTURA NUCLEAR: Obliga al slider a ignorar al padre */
.car-slider {
    width: 100dvw !important; /* Dynamic viewport width (ignora la barra de scroll) */
    width: 100vw !important;  /* Fallback para navegadores antiguos */
    max-width: none !important; /* Anula límites de temas como Astra/GeneratePress */
    
    position: relative !important;
    left: 50% !important;       /* Mueve el borde izquierdo al centro del padre */
    right: 50% !important;      /* Mueve el borde derecho al centro del padre */
    margin-left: -50vw !important;  /* Arrastra el elemento media pantalla a la izquierda */
    margin-right: -50vw !important; /* Arrastra el elemento media pantalla a la derecha */
    
    margin-top: var(--fk3d-header-offset) !important;
    height: calc(100dvh - var(--fk3d-header-offset)) !important;
    height: calc(100vh - var(--fk3d-header-offset)) !important;
    
    overflow: hidden !important;
}

/* 3. DESACTIVAR RESTRICCIONES DE CONTENEDORES PADRE (WordPress/Elementor) */
/* Esto obliga a los contenedores que envuelven al slider a no estorbar */
.entry-content:has(.car-slider),
.site-content:has(.car-slider),
.content-area:has(.car-slider),
.elementor-section:has(.car-slider),
.elementor-column:has(.car-slider),
.wp-block-group:has(.car-slider),
.container:has(.car-slider) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: visible !important; /* CLAVE: permite que el slider "salga" del contenedor */
}

/* Fallback por si el navegador no soporta :has() */
.entry-content, .site-content, .content-area, .elementor-section, .container {
    overflow-x: clip !important; /* Evita scroll horizontal sin cortar el breakout */
}

/* 4. ELIMINAR SCROLL HORIZONTAL A NIVEL GLOBAL */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* 5. FLECHAS DE NAVEGACIÓN: CÍRCULOS PERFECTOS (A prueba de temas) */
.car-slider .nav,
.car-slider button.nav,
.car-slider .nav.prev,
.car-slider .nav.next {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important; /* Impide que el tema lo aplaste */
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    border-radius: 50% !important; /* Garantiza círculo perfecto */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 2rem !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.car-slider .nav:hover {
    transform: translateY(-50%) scale(1.15) !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px var(--accent) !important;
}

.car-slider .nav.prev { left: 20px !important; right: auto !important; }
.car-slider .nav.next { right: 20px !important; left: auto !important; }

/* Ajustes responsivos de flechas */
@media (max-width: 1024px) {
    .car-slider .nav { width: 45px !important; height: 45px !important; min-width: 45px !important; min-height: 45px !important; font-size: 1.6rem !important; }
}
@media (max-width: 768px) {
    .car-slider .nav { width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; font-size: 1.4rem !important; }
    .car-slider .nav.prev { left: 10px !important; }
    .car-slider .nav.next { right: 10px !important; }
    :root { --fk3d-header-offset: 60px; } /* Ajuste automático del margen */
}
@media (max-width: 480px) {
    .car-slider .nav { width: 36px !important; height: 36px !important; min-width: 36px !important; min-height: 36px !important; font-size: 1.2rem !important; }
    :root { --fk3d-header-offset: 50px; }
}

/* 6. SUBTÍTULO (.info h2) COMPLETAMENTE BLANCO */
.info h2 {
    color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
/* ============================================ */
/* 🔥 FIX v3.0.4: Slider Fullscreen Real        */
/* ============================================ */
.car-slider {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 0 !important;
    overflow: hidden !important;
}

.model-container {
    background: transparent !important;
}

/* Forzar tamaño y desactivar el "Font Boosting" en Android */
.info li {
    max-height: 100% !important;
    overflow: visible !important;
}

.info li span,
.info li i {
    font-size: clamp(0.75rem, 3vw, 0.9rem) !important;
    display: inline-block !important;
}
