/* Variables */
:root {
    --primary-color: #f9d100;
    --dark-bg: #f2f2f2;
    --dark-secondary: #ffffff;
    --dark-tertiary: #ffffff;
    --text-primary: #404040;
    --text-secondary: #323232;
    --text-tertiary: #636363;
    --border-color: #b9aeae;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--dark-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Logo Intro Animation - POSITION ABSOLUTE SIMPLE */
.logo-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--dark-bg);
    z-index: 10000;
    pointer-events: none;
    /* No animation here - will be controlled by JS */
    /* Variables por defecto para pantallas grandes */
    --logo-size: 800px;
    --logo-left: calc(50% - 600px + 20px - 40px);
}

.logo-intro-img {
    position: absolute;
    /* Empieza en el centro */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--logo-size, 800px);
    /* Usa variable CSS con fallback */
    height: var(--logo-size, 800px);
    /* Usa variable CSS con fallback */
    object-fit: contain;
    opacity: 0;
    /* Filtro para convertir el logo negro a #2f2f2f */
    filter: brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(99%) contrast(92%);
    /* Fade in rápido (1s) + espera (0.7s) + animación (2.5s) = 4.2s total */
    animation: logoFadeInSlow 1s ease-out forwards,
        logoMoveSimple 2.5s cubic-bezier(0.77, 0, 0.18, 1) 1.7s forwards;
    /* 1.7s delay (1s fade + 0.7s espera) */
}

/* Fade in rápido y fluido - 1 segundo */
@keyframes logoFadeInSlow {
    to {
        opacity: 1;
    }
}

/* Contenedor del texto de cargando */
.loading-container {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    width: min(700px, 90vw);
    /* Responsive: máximo 700px o 90% del viewport */
    height: 60px;
    opacity: 1;
}

/* Contenedor de la animación */
.loading-animation {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Furgoneta animada */
.loading-truck {
    position: absolute;
    left: -120px;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    /* Más grande */
    height: auto;
    z-index: 2;
    animation: truckMove 2.5s linear forwards;
    /* Más lento y movimiento lineal */
}

@keyframes truckMove {
    0% {
        left: -120px;
    }

    100% {
        left: calc(100% + 120px);
        /* Se sale completamente del contenedor */
    }
}


/* Texto que se va revelando */
.loading-text-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0px;
    /* Reducido de 3px a 0px para menos espacio entre letras */
    white-space: nowrap;
}

/* Letras individuales con reveal */
.letter-reveal {
    opacity: 0;
    display: inline-block;
    animation: letterAppear 0.3s ease-out forwards;
}

/* Timing para cada letra - sincronizado con la posición de la furgoneta */
/* La furgoneta recorre el contenedor en 2.5s */
/* Las letras aparecen progresivamente mientras pasa la furgoneta */
.letter-reveal:nth-child(1) {
    animation-delay: 0.4s;
}

/* T */
.letter-reveal:nth-child(2) {
    animation-delay: 0.45s;
}

/* u */
.letter-reveal:nth-child(3) {
    animation-delay: 0.5s;
}

/* s */
.letter-reveal:nth-child(4) {
    animation-delay: 0.55s;
}

/*   */
.letter-reveal:nth-child(5) {
    animation-delay: 0.6s;
}

/* R */
.letter-reveal:nth-child(6) {
    animation-delay: 0.65s;
}

/* e */
.letter-reveal:nth-child(7) {
    animation-delay: 0.7s;
}

/* p */
.letter-reveal:nth-child(8) {
    animation-delay: 0.75s;
}

/* a */
.letter-reveal:nth-child(9) {
    animation-delay: 0.8s;
}

/* r */
.letter-reveal:nth-child(10) {
    animation-delay: 0.85s;
}

/* t */
.letter-reveal:nth-child(11) {
    animation-delay: 0.9s;
}

/* i */
.letter-reveal:nth-child(12) {
    animation-delay: 0.95s;
}

/* d */
.letter-reveal:nth-child(13) {
    animation-delay: 1.0s;
}

/* o */
.letter-reveal:nth-child(14) {
    animation-delay: 1.05s;
}

/* r */
.letter-reveal:nth-child(15) {
    animation-delay: 1.1s;
}

/* e */
.letter-reveal:nth-child(16) {
    animation-delay: 1.15s;
}

/* s */
.letter-reveal:nth-child(17) {
    animation-delay: 1.2s;
}

/*   */
.letter-reveal:nth-child(18) {
    animation-delay: 1.25s;
}

/* d */
.letter-reveal:nth-child(19) {
    animation-delay: 1.3s;
}

/* e */
.letter-reveal:nth-child(20) {
    animation-delay: 1.35s;
}

/*   */
.letter-reveal:nth-child(21) {
    animation-delay: 1.4s;
}

/* C */
.letter-reveal:nth-child(22) {
    animation-delay: 1.45s;
}

/* o */
.letter-reveal:nth-child(23) {
    animation-delay: 1.5s;
}

/* n */
.letter-reveal:nth-child(24) {
    animation-delay: 1.55s;
}

/* f */
.letter-reveal:nth-child(25) {
    animation-delay: 1.6s;
}

/* i */
.letter-reveal:nth-child(26) {
    animation-delay: 1.65s;
}

/* a */
.letter-reveal:nth-child(27) {
    animation-delay: 1.7s;
}

/* n */
.letter-reveal:nth-child(28) {
    animation-delay: 1.75s;
}

/* z */
.letter-reveal:nth-child(29) {
    animation-delay: 1.8s;
}

/* a */
.letter-reveal:nth-child(30) {
    animation-delay: 1.9s;
}

/* . */
.letter-reveal:nth-child(31) {
    animation-delay: 1.95s;
}

/* . */
.letter-reveal:nth-child(32) {
    animation-delay: 2.0s;
}

/* . */

@keyframes letterAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes responsive para la animación de intro */
@media (max-width: 1200px) {
    .loading-text-reveal {
        font-size: 24px;
    }

    /* Ajustar timing de letras para pantallas medianas */
    .letter-reveal:nth-child(1) {
        animation-delay: 0.45s;
    }

    .letter-reveal:nth-child(2) {
        animation-delay: 0.5s;
    }

    .letter-reveal:nth-child(3) {
        animation-delay: 0.55s;
    }

    .letter-reveal:nth-child(4) {
        animation-delay: 0.6s;
    }

    .letter-reveal:nth-child(5) {
        animation-delay: 0.65s;
    }

    .letter-reveal:nth-child(6) {
        animation-delay: 0.7s;
    }

    .letter-reveal:nth-child(7) {
        animation-delay: 0.75s;
    }

    .letter-reveal:nth-child(8) {
        animation-delay: 0.8s;
    }

    .letter-reveal:nth-child(9) {
        animation-delay: 0.85s;
    }

    .letter-reveal:nth-child(10) {
        animation-delay: 0.9s;
    }

    .letter-reveal:nth-child(11) {
        animation-delay: 0.95s;
    }

    .letter-reveal:nth-child(12) {
        animation-delay: 1.0s;
    }

    .letter-reveal:nth-child(13) {
        animation-delay: 1.05s;
    }

    .letter-reveal:nth-child(14) {
        animation-delay: 1.1s;
    }

    .letter-reveal:nth-child(15) {
        animation-delay: 1.15s;
    }

    .letter-reveal:nth-child(16) {
        animation-delay: 1.2s;
    }

    .letter-reveal:nth-child(17) {
        animation-delay: 1.25s;
    }

    .letter-reveal:nth-child(18) {
        animation-delay: 1.3s;
    }

    .letter-reveal:nth-child(19) {
        animation-delay: 1.35s;
    }

    .letter-reveal:nth-child(20) {
        animation-delay: 1.4s;
    }

    .letter-reveal:nth-child(21) {
        animation-delay: 1.45s;
    }

    .letter-reveal:nth-child(22) {
        animation-delay: 1.5s;
    }

    .letter-reveal:nth-child(23) {
        animation-delay: 1.55s;
    }

    .letter-reveal:nth-child(24) {
        animation-delay: 1.6s;
    }

    .letter-reveal:nth-child(25) {
        animation-delay: 1.65s;
    }

    .letter-reveal:nth-child(26) {
        animation-delay: 1.7s;
    }

    .letter-reveal:nth-child(27) {
        animation-delay: 1.75s;
    }

    .letter-reveal:nth-child(28) {
        animation-delay: 1.8s;
    }

    .letter-reveal:nth-child(29) {
        animation-delay: 1.85s;
    }

    .letter-reveal:nth-child(30) {
        animation-delay: 1.9s;
    }

    .letter-reveal:nth-child(31) {
        animation-delay: 1.95s;
    }

    .letter-reveal:nth-child(32) {
        animation-delay: 2.0s;
    }
}

@media (max-width: 768px) {
    .logo-intro-img {
        --logo-size: 500px;
        /* Define el tamaño para tablets */
        --logo-left: -20px;
        /* Posición final izquierda */
    }

    .loading-truck {
        width: 80px;
    }

    .loading-text-reveal {
        font-size: 20px;
    }

    /* Ajustar timing para móviles */
    .letter-reveal:nth-child(1) {
        animation-delay: 0.5s;
    }

    .letter-reveal:nth-child(2) {
        animation-delay: 0.55s;
    }

    .letter-reveal:nth-child(3) {
        animation-delay: 0.6s;
    }

    .letter-reveal:nth-child(4) {
        animation-delay: 0.65s;
    }

    .letter-reveal:nth-child(5) {
        animation-delay: 0.7s;
    }

    .letter-reveal:nth-child(6) {
        animation-delay: 0.75s;
    }

    .letter-reveal:nth-child(7) {
        animation-delay: 0.8s;
    }

    .letter-reveal:nth-child(8) {
        animation-delay: 0.85s;
    }

    .letter-reveal:nth-child(9) {
        animation-delay: 0.9s;
    }

    .letter-reveal:nth-child(10) {
        animation-delay: 0.95s;
    }

    .letter-reveal:nth-child(11) {
        animation-delay: 1.0s;
    }

    .letter-reveal:nth-child(12) {
        animation-delay: 1.05s;
    }

    .letter-reveal:nth-child(13) {
        animation-delay: 1.1s;
    }

    .letter-reveal:nth-child(14) {
        animation-delay: 1.15s;
    }

    .letter-reveal:nth-child(15) {
        animation-delay: 1.2s;
    }

    .letter-reveal:nth-child(16) {
        animation-delay: 1.25s;
    }

    .letter-reveal:nth-child(17) {
        animation-delay: 1.3s;
    }

    .letter-reveal:nth-child(18) {
        animation-delay: 1.35s;
    }

    .letter-reveal:nth-child(19) {
        animation-delay: 1.4s;
    }

    .letter-reveal:nth-child(20) {
        animation-delay: 1.45s;
    }

    .letter-reveal:nth-child(21) {
        animation-delay: 1.5s;
    }

    .letter-reveal:nth-child(22) {
        animation-delay: 1.55s;
    }

    .letter-reveal:nth-child(23) {
        animation-delay: 1.6s;
    }

    .letter-reveal:nth-child(24) {
        animation-delay: 1.65s;
    }

    .letter-reveal:nth-child(25) {
        animation-delay: 1.7s;
    }

    .letter-reveal:nth-child(26) {
        animation-delay: 1.75s;
    }

    .letter-reveal:nth-child(27) {
        animation-delay: 1.8s;
    }

    .letter-reveal:nth-child(28) {
        animation-delay: 1.85s;
    }

    .letter-reveal:nth-child(29) {
        animation-delay: 1.9s;
    }

    .letter-reveal:nth-child(30) {
        animation-delay: 1.95s;
    }

    .letter-reveal:nth-child(31) {
        animation-delay: 2.0s;
    }

    .letter-reveal:nth-child(32) {
        animation-delay: 2.05s;
    }
}

@media (max-width: 480px) {
    .logo-intro-img {
        --logo-size: 350px;
        /* Define el tamaño para móviles */
        --logo-left: -20px;
        /* Posición final izquierda */
    }

    .loading-truck {
        width: 60px;
        left: -80px;
    }

    .loading-text-reveal {
        font-size: 16px;
    }
}

/* Media query más específico para pantallas muy pequeñas - debe ir DESPUÉS del de 480px */
@media (max-width: 433px) {
    .logo-intro-img {
        --logo-size: 250px !important;
        /* 100px más pequeño - con !important para asegurar prioridad */
        --logo-left: -20px;
        /* Posición final izquierda */
    }
}

/* Fade out de todo el contenedor cuando el logo se mueve - ahora 0.7s más tarde */
.loading-container {
    animation: containerFadeOut 0.5s ease-out 3.2s forwards;
    /* Era 2.5s, ahora 3.2s (+0.7s) */
}

@keyframes containerFadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Background fade out - ahora no se usa porque se controla desde JS */
/* @keyframes logoIntroBg {
    0%, 80% {
        background: var(--dark-bg);
    }
    100% {
        background: transparent;
    }
} */

/* Logo se mueve del centro a la posición final - usa el tamaño de la variable CSS */
@keyframes logoMoveSimple {
    0% {
        /* Ya visible por el fade in anterior */
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: var(--logo-size, 800px);
        height: var(--logo-size, 800px);
    }

    40% {
        /* Se mantiene en el centro */
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: var(--logo-size, 800px);
        height: var(--logo-size, 800px);
    }

    100% {
        opacity: 1;
        /* MISMAS coordenadas EXACTAS que el logo del header */
        top: -23px;
        /* 2px más abajo para coincidir */
        left: var(--logo-left, calc(50% - 600px + 20px - 40px));
        /* Posición adaptable */
        transform: translate(0, 0);
        width: 150px;
        height: 150px;
    }
}

/* En pantallas medianas */
@media (max-width: 1240px) {
    .logo-intro-img {
        --logo-size: 800px;
        /* Mantiene el tamaño grande */
        --logo-left: -20px;
        /* Ajusta posición para pantallas más pequeñas */
    }

    /* Ajustar el contenedor de cargando para móviles */
    .loading-container {
        width: 90%;
        /* Usa el 90% del ancho de la pantalla */
        max-width: 700px;
    }

    /* Texto más pequeño en móviles */
    .loading-text-reveal {
        font-size: 20px;
        /* Reducido de 28px */
    }
}

/* En pantallas muy pequeñas */
@media (max-width: 600px) {
    .loading-text-reveal {
        font-size: 16px;
        /* Aún más pequeño */
        letter-spacing: -0.5px;
        /* Reduce espacio entre letras */
    }

    .loading-truck {
        width: 80px;
        /* Furgoneta más pequeña */
    }
}

/* Animación del logo para móviles - En pantallas de 1240px */
@keyframes logoMoveMobile {
    0% {
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 800px;
        height: 800px;
    }

    40% {
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 800px;
        height: 800px;
    }

    100% {
        opacity: 1;
        top: -23px;
        left: -20px;
        transform: translate(0, 0);
        width: 150px;
        height: 150px;
    }
}

/* Simple fade in para el logo */
@keyframes logoFadeIn {
    to {
        opacity: 1;
    }
}

/* Animación del logo para tablets */
@keyframes logoMoveTablet {
    0% {
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 500px;
        height: 500px;
    }

    40% {
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 500px;
        height: 500px;
    }

    100% {
        opacity: 1;
        top: -23px;
        left: -20px;
        transform: translate(0, 0);
        width: 150px;
        height: 150px;
    }
}

/* Animación del logo para móviles pequeños */
@keyframes logoMoveMobile480 {
    0% {
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 350px;
        height: 350px;
    }

    40% {
        opacity: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 350px;
        height: 350px;
    }

    100% {
        opacity: 1;
        top: -23px;
        left: -20px;
        transform: translate(0, 0);
        width: 150px;
        height: 150px;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 18px 0;
    /* Reducido 2px (de 20px a 18px) */
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    /* Oculto inicialmente */
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    /* Sombra más visible */
}

.header.show {
    opacity: 1;
    visibility: visible;
}

/* Header fade in controlado por clase .show en lugar de animación */

.header.scrolled {
    padding: 18px 0;
    /* Mantiene el mismo padding reducido */
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    position: absolute !important;
    top: -23px !important;
    /* 2px más abajo */
    /* Calcular posición dentro del contenedor centrado - 40px más a la izquierda */
    left: calc(50% - 600px + 20px - 40px) !important;
    /* 40px más a la izquierda de donde estaba */
    height: 150px !important;
    /* Más grande */
    width: 150px !important;
    /* Mismo tamaño que la animación final */
    object-fit: contain;
    z-index: 1001;
    opacity: 1 !important;
    /* Siempre visible, sin fade in */
    /* Filtro para convertir el logo a #2f2f2f */
    filter: brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(99%) contrast(92%);
    pointer-events: none;
    /* El logo grande no es clickeable */
}

/* En pantallas pequeñas */
@media (max-width: 1240px) {
    .logo-img {
        left: -20px !important;
        /* 20px original - 40px = -20px */
    }
}

.logo-text {
    margin-left: 80px;
    /* Ajustado a 80px */
    font-size: 28px;
    /* Aumentado de 24px a 28px */
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    display: inline-flex;
    align-items: center;
}

.logo-my {
    font-size: 26px;
    /* 2px más pequeño que el resto (28px - 2px) */
    color: var(--text-primary);
    letter-spacing: -0.5px;
    /* Hace las letras más estrechas */
    display: inline-block;
    margin-left: -1px;
    /* Movido 1px a la izquierda */
}

.logo-r-svg {
    height: 28px;
    /* Aumentado de 24px a 28px */
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0 0 0;
    /* Separado 1px más de MY */
    position: relative;
    top: -1px;
    /* Subida 1px */
    z-index: 3;
    /* Por encima del brochazo para mantener su color */
    /* Ya es amarilla, no necesita filtro */
}

.logo-accent {
    color: var(--primary-color);
    letter-spacing: 0.5px;
    /* Añade 0.5px de espacio entre las letras de IDER */
    position: relative;
    /* Para posicionar el brochazo */
    z-index: 2;
    /* Para que el texto esté sobre el brochazo */
}

/* Imagen de brochazo detrás de RIDER */
.brush-stroke-img {
    position: absolute;
    left: -30px;
    /* Movido 1px a la derecha */
    top: calc(50% - 3px);
    /* Subido 1px más arriba */
    transform: translateY(-50%) rotate(-2deg) skewX(-1deg) scaleY(1.06);
    /* Girado 2 grados a la izquierda y 6% más alto */
    width: 107px;
    /* 4px más ancho */
    height: auto;
    z-index: -1;
    /* Detrás del texto RIDER */
    opacity: 0;
    /* Inicialmente invisible */
}

/* Cuando se muestra el header, aparece la imagen del brochazo */
.header.show .brush-stroke-img {
    opacity: 0;
    /* Inicialmente invisible */
    animation: brushPaint 0.3s ease-out 1s forwards;
    /* 0.3s de duración, 1s de delay */
}

/* Animación de pintado del brochazo de izquierda a derecha */
@keyframes brushPaint {
    0% {
        opacity: 0;
        /* Empieza invisible */
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
        /* Oculto desde la izquierda */
    }

    1% {
        opacity: 0.8;
        /* Aparece rápidamente */
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }

    100% {
        opacity: 0.8;
        /* Mantiene opacidad 80% */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        /* Completamente visible */
    }
}

.logo-express-svg {
    height: 18px;
    /* Aumentado de 16px a 18px */
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-left: 1px;
    /* Más pegado a IDER */
    position: relative;
    top: 1px;
    /* Bajado 1px */
    /* Ya es gris, no necesita filtro */
}

.nav-menu {
    margin-left: 100px;
    /* Aumentado para mover el menú más a la derecha */
    margin-right: auto;
    /* Empujar el resto de elementos a la derecha */
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    /* Sin cambio de font-weight para evitar saltos en el menú */
}

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

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


.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* =================================
   HERO SECTION - NUEVO DISEÑO
   ================================= */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.4) 0%, rgba(233, 236, 239, 0.4) 100%);
    /* Fondo transparente al 40% */
}

/* Imagen de fondo difuminada taller1.jpg */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    /* Un poco a la izquierda del borde derecho */
    width: 60%;
    height: 100%;
    background-image: url('../imagenes/taller1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    /* 30% de opacidad */
    filter: blur(3px);
    /* Difuminado suave */
    z-index: 0;
    /* Detrás de todo */
}

.hero-geometric-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.geometric-shape {
    position: absolute;
    background: var(--primary-color);
    opacity: 0.1;
}

.shape-1 {
    width: 800px;
    height: 400px;
    top: -100px;
    right: -200px;
    transform: rotate(25deg) skewX(-15deg);
    border-radius: 50px;
}

.shape-2 {
    width: 600px;
    height: 300px;
    bottom: -50px;
    right: 100px;
    transform: rotate(-20deg) skewY(10deg);
    border-radius: 30px;
}

.shape-3 {
    width: 400px;
    height: 200px;
    top: 40%;
    right: 0;
    transform: rotate(45deg);
    border-radius: 20px;
    opacity: 0.15;
}

.hero-layout {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    min-height: 80vh;
}

.hero-content {
    max-width: 600px;
    opacity: 0;
    transform: translateX(-50px);
}

/* Animación del contenido cuando hero está visible */
.hero.show .hero-content {
    opacity: 1;
    transform: translateX(0);
    transition: all 1s ease-out;
}

.hero-main-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.highlight-word {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.btn-modern {
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary-modern {
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 18px 35px;
    font-size: 16px;
    box-shadow: 0 8px 25px rgba(249, 164, 0, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(249, 164, 0, 0.4);
}

.btn-call {
    background: rgba(255, 255, 255, 0.7);
    /* Fondo blanco al 70% de opacidad */
    border: 2px solid var(--border-color);
    padding: 15px 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    /* Efecto de desenfoque del fondo */
}

.btn-call:hover {
    border-color: var(--primary-color);
    background: rgba(249, 164, 0, 0.1);
}

.call-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.call-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.call-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    /* Permite que la animación se vea desde fuera */
}

.hero-truck-image {
    width: 1000px;
    /* Tamaño fijo de 1000px */
    max-width: none;
    height: auto;
    object-fit: contain;
    position: relative;
    /* Inicialmente COMPLETAMENTE fuera de la pantalla a la derecha */
    transform: translateX(150%);
    opacity: 0;
}

/* Animación cuando la sección hero está visible */
.hero.show .hero-truck-image {
    animation: slideInFromRight 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    animation-delay: 0.6s;
    /* Retrasado 0.6 segundos */
}

/* Contenedor de la imagen necesita position relative */
.hero-image-container {
    position: relative;
}

/* Sombra simple elíptica */
.hero-image-container::after {
    content: '';
    position: absolute;
    bottom: 20px;
    /* Subido 10px */
    left: calc(35% - 20px);
    /* 20px más a la izquierda */
    width: 200px;
    /* Más circular */
    height: 150px;
    /* Más circular */
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 50%, transparent 100%);
    border-radius: 50%;
    transform: rotate(-9deg);
    /* Girado 9 grados a la izquierda (3 grados a la derecha desde -12deg) */
    filter: blur(8px);
    z-index: -1;
}

/* Segunda sombra a la izquierda */
.hero-image-container::before {
    content: '';
    position: absolute;
    bottom: 20px;
    /* Subido 10px */
    left: calc(15% - 10px);
    /* 10px más a la izquierda */
    width: 270px;
    height: 190px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
    border-radius: 50%;
    transform: rotate(-25deg);
    /* Girado 25 grados a la izquierda (3 grados más) */
    filter: blur(8px);
    z-index: -1;
}

/* Tercera sombra - igual que la primera pero más a la derecha */
.shadow-3 {
    position: absolute;
    bottom: 35px;
    /* 15px más arriba que sombra 1 (subido 9px) */
    left: calc(35% + 90px);
    /* 90px más a la derecha que sombra 1 (100px - 10px) */
    width: 280px;
    /* Más ovalada horizontalmente */
    height: 120px;
    /* Menos altura para hacer óvalo horizontal */
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
    border-radius: 50%;
    transform: rotate(-9deg);
    /* Igual que sombra 1 */
    filter: blur(8px);
    z-index: -1;
}





/* Animación de entrada fluida desde la derecha */
@keyframes slideInFromRight {
    0% {
        transform: translateX(150%);
        /* Completamente fuera a la DERECHA */
        opacity: 0;
    }

    5% {
        opacity: 1;
        /* Se vuelve visible al empezar a moverse */
    }

    100% {
        transform: translateX(0);
        /* Posición final con movimiento fluido */
        opacity: 1;
    }
}

/* Animación fadeIn simple para móviles */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Responsive para Hero */
@media (max-width: 768px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-actions {
        align-items: center;
        width: 100%;
    }

    .btn-primary-modern,
    .btn-call {
        width: 100%;
        justify-content: center;
    }

    .shape-1 {
        width: 600px;
        height: 300px;
        top: -50px;
        right: -300px;
    }

    .shape-2 {
        width: 400px;
        height: 200px;
        bottom: -100px;
        right: -100px;
    }

    .hero-main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        gap: 15px;
    }

    .btn-call {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .call-content {
        align-items: center;
    }
}

/* Buttons */
.btn {
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(249, 164, 0, 0.3);
}

.btn-outline {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}



/* Sections */
section {
    padding: 100px 0;
    position: relative;
    opacity: 0;
    visibility: hidden;
    /* Oculto inicialmente */
}

/* Fix crítico para móviles - mostrar secciones siempre */
@media (max-width: 900px) {
    section {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Asegurar que el hero sea visible */
    .hero {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

section.show {
    opacity: 1;
    visibility: visible;
    animation: sectionFadeIn 0.8s ease-out forwards;
}

/* Animación de entrada para las secciones - ahora controlado por JS */
/* Las secciones ahora se muestran con la clase .show */

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--dark-secondary);
    position: relative;
    overflow: hidden;
    padding-top: 50px;
    padding-bottom: 80px;
}

/* Diseño especial para el header de About */
.about .section-header {
    position: relative;
    padding: 40px 80px;
    margin: 0 auto 50px auto;
    max-width: 700px;
    text-align: center;
}

.about .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    right: -30px;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px 5px 30px 5px;
    transform: rotate(-1deg);
    z-index: -1;
}

.about .section-header::after {
    content: '';
    position: absolute;
    top: 5px;
    left: -40px;
    right: -40px;
    bottom: -5px;
    background: var(--primary-color);
    border-radius: 5px 30px 5px 30px;
    transform: rotate(1deg);
    z-index: -2;
    opacity: 0.8;
}

.about .section-title {
    color: #1a1a1a;
}

.about .section-subtitle {
    color: #444;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../imagenes/taller2.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.30;
    filter: blur(4px);
    z-index: 0;
}

.about>.container {
    position: relative;
    z-index: 1;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.philosophy-card {
    position: relative;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
    height: 280px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Hover desactivado - se usa efecto 3D JavaScript */

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Gradiente oscuro para legibilidad del texto */
.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    pointer-events: none;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    z-index: 2;
}

.philosophy-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.philosophy-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Services Section */
.services {
    background: var(--dark-bg);
    padding-top: 50px;
    padding-bottom: 80px;
}

/* Diseño especial para el header de Services */
.services .section-header {
    position: relative;
    padding: 40px 80px;
    margin: 0 auto 50px auto;
    max-width: 700px;
    text-align: center;
}

.services .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    right: -30px;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px 5px 30px 5px;
    transform: rotate(-1deg);
    z-index: -1;
}

.services .section-header::after {
    content: '';
    position: absolute;
    top: 5px;
    left: -40px;
    right: -40px;
    bottom: -5px;
    background: var(--primary-color);
    border-radius: 5px 30px 5px 30px;
    transform: rotate(1deg);
    z-index: -2;
    opacity: 0.8;
}

.services .section-title {
    color: #1a1a1a;
}

.services .section-subtitle {
    color: #444;
}

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

.service-item {
    background: var(--dark-secondary);
    padding: 40px;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Hover desactivado - se usa efecto 3D JavaScript */

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon img {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
}

.service-item h3 {
    font-size: 1.375rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Sección Estadísticas */
.stats {
    background: linear-gradient(135deg, #f9d100 0%, #d4a500 100%);
    padding: 40px 0 !important;
    /* Reducido de 80px a 40px - important para sobrescribir section */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    position: relative;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 10px;
    display: inline-block;
}

.stat-suffix {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
}

.stat-label {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Blog Section */
.blog {
    background: var(--dark-secondary);
    padding-top: 50px;
    padding-bottom: 80px;
}

/* Diseño especial para el header de Blog */
.blog .section-header {
    position: relative;
    padding: 40px 80px;
    margin: 0 auto 50px auto;
    max-width: 700px;
    text-align: center;
}

.blog .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    right: -30px;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px 5px 30px 5px;
    transform: rotate(-1deg);
    z-index: -1;
}

.blog .section-header::after {
    content: '';
    position: absolute;
    top: 5px;
    left: -40px;
    right: -40px;
    bottom: -5px;
    background: var(--primary-color);
    border-radius: 5px 30px 5px 30px;
    transform: rotate(1deg);
    z-index: -2;
    opacity: 0.8;
}

.blog .section-title {
    color: #1a1a1a;
}

.blog .section-subtitle {
    color: #444;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.blog-card {
    background: var(--dark-tertiary);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Hover desactivado - se usa efecto 3D JavaScript */

.blog-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 30px;
}

.blog-category {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.blog-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.blog-link:hover {
    color: var(--text-primary);
}

/* Contact Section */
.contact {
    background: var(--dark-bg);
    padding-top: 50px;
    padding-bottom: 80px;
}

/* Diseño especial para el header de Contact */
.contact .section-header {
    position: relative;
    padding: 40px 80px;
    margin: 0 auto 50px auto;
    max-width: 700px;
    text-align: center;
}

.contact .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    right: -30px;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px 5px 30px 5px;
    transform: rotate(-1deg);
    z-index: -1;
}

.contact .section-header::after {
    content: '';
    position: absolute;
    top: 5px;
    left: -40px;
    right: -40px;
    bottom: -5px;
    background: var(--primary-color);
    border-radius: 5px 30px 5px 30px;
    transform: rotate(1deg);
    z-index: -2;
    opacity: 0.8;
}

.contact .section-title {
    color: #1a1a1a;
}

.contact .section-subtitle {
    color: #444;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 10px;
}

.contact-form {
    background: var(--dark-secondary);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--dark-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--dark-bg);
}

.form-group textarea {
    resize: vertical;
}

.contact-info {
    padding: 40px 0;
}

.info-item {
    margin-bottom: 40px;
}

.info-item h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
}

.footer.show {
    opacity: 1;
    visibility: visible;
    animation: sectionFadeIn 0.8s ease-out forwards;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    gap: 0;
    /* Logo y texto más pegados */
}

.footer-logo-img {
    height: 130px;
    width: auto;
    object-fit: contain;
    margin-right: 0px;
}

.footer-logo .logo-text {
    font-size: 36px;
    margin-left: 0;
    transform: translateY(-15px);
    /* Mueve las letras hacia arriba */
}

.footer-logo .logo-my {
    font-size: 34px;
}

.footer-logo .logo-r-svg {
    height: 36px;
}

.footer-logo .logo-express-svg {
    height: 24px;
}

.footer-logo .brush-stroke-img {
    opacity: 0.9 !important;
    width: 130px;
    /* Brochazo más pequeño */
    left: -37px;
    /* Movido a -37px */
    filter: brightness(0);
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer ul a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-layout {
        gap: 40px;
    }

    .hero-truck-image {
        width: 700px;
    }
}

/* Fix para móviles reales - forzar visibilidad del contenido */
@media (max-width: 900px) and (pointer: coarse),
(max-width: 900px) and (-webkit-touch-callout: default) {
    .hero-content {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }

    .hero-truck-image {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
}

@media (max-width: 900px) {

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--dark-bg);
        transition: right 0.3s;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hero responsive */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 0;
        min-height: auto;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
        padding: 0 20px;
        opacity: 1 !important;
        /* Forzar visibilidad en móvil */
        transform: translateX(0) !important;
    }

    .hero-main-title {
        font-size: 2.5rem;
    }

    .hero-description {
        margin: 0 auto 30px;
    }

    .hero-actions {
        align-items: center;
        width: 100%;
    }

    .btn-primary-modern,
    .btn-call {
        width: 100%;
        max-width: 350px;
    }

    .hero-image-container {
        padding: 0 20px;
        margin-top: 30px;
    }

    .hero-truck-image {
        width: 100%;
        max-width: 500px;
        transform: translateX(0) !important;
        opacity: 1 !important;
        /* Visible por defecto en móvil */
    }

    .hero.show .hero-truck-image {
        /* Animación deshabilitada en móvil para evitar problemas */
        opacity: 1 !important;
    }

    /* Ajustar sombras en móvil */
    .hero-image-container::after,
    .hero-image-container::before,
    .shadow-3 {
        display: none;
    }

    .contact-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-layout {
        padding: 30px 0;
    }

    .hero-main-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .hero-actions {
        gap: 15px;
    }

    .btn-primary-modern {
        padding: 15px 30px;
        font-size: 15px;
    }

    .btn-call {
        padding: 12px 20px;
    }

    .call-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .call-label {
        font-size: 13px;
    }

    .call-number {
        font-size: 15px;
    }

    .hero-truck-image {
        max-width: 400px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 100px 0 40px;
        /* Más espacio arriba para que no quede pegado */
    }

    .hero-main-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 10px;
    }

    .btn-primary-modern {
        padding: 14px 25px;
        font-size: 14px;
    }

    .hero-truck-image {
        max-width: 350px;
    }
}

/* Media query para pantallas muy pequeñas */
@media (max-width: 370px) {

    /* Hacer que EXPRESS se ponga debajo de RIDER */
    .logo-text {
        display: inline-block;
        line-height: 1.2;
    }

    .logo-express-svg {
        display: block !important;
        margin-left: 52px !important;
        /* Alineado con el inicio de RIDER */
        margin-top: -3px !important;
        /* 2px más abajo */
        position: relative;
        top: 0 !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Sincronizar el padding del header con el body */
    .header .container {
        padding: 0 15px;
    }

    .hero {
        padding: 90px 0 30px;
        /* Aumentado de 50px a 90px para más espacio arriba */
    }

    .hero-main-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .hero-actions {
        gap: 12px;
    }

    .btn-primary-modern,
    .btn-call {
        width: 100%;
        max-width: 300px;
    }

    .btn-primary-modern {
        padding: 12px 20px;
        font-size: 14px;
    }

    .btn-call {
        padding: 10px 15px;
        gap: 10px;
    }

    .call-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .call-content {
        gap: 2px;
    }

    .call-label {
        font-size: 12px;
    }

    .call-number {
        font-size: 14px;
    }

    .hero-truck-image {
        max-width: 280px;
        margin-top: 20px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }
}

/* Modales Legales */
.legal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.legal-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.legal-modal-content {
    background: #fffdf8;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: sticky;
    top: 10px;
    float: right;
    z-index: 20;
    margin-right: -15px;
    margin-top: -25px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: var(--primary-color);
}

.legal-modal-content h2 {
    position: sticky;
    top: -40px;
    /* Sube para cubrir el padding del modal */
    background: #fffdf8;
    z-index: 10;
    padding: 40px 0 20px 0;
    /* Añade padding arriba para rellenar el hueco */
    margin: -40px 0 20px 0;
    /* Margen negativo para compensar la posición inicial */
    border-bottom: 2px solid var(--primary-color);
    color: #333;
}

.modal-body {
    color: #555;
}

.modal-body h3 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 25px;
}

.modal-body li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-date {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-style: italic;
    color: #777;
}

@media (max-width: 768px) {
    .legal-modal-content {
        padding: 30px 20px;
        max-height: 85vh;
    }

    .legal-modal-content h2 {
        font-size: 1.5rem;
        top: -30px;
        padding-top: 30px;
        margin-top: -30px;
    }
}

.service-icon-emoji {
    font-size: 48px;
}