/* Hero Slideshow - Posicionamiento absoluto estricto */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que cubra todo el espacio */
    object-position: center center;
    /* Centrado para no cortar el camión */
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform: scale(1.05);
    z-index: -1;
    /* Asegura que esté detrás del contenido */
    will-change: opacity, transform;
    /* Optimización de rendimiento */
}

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

/* Navbar */
.navbar-solid {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(2rem);
    transition: all 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Waves */
.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 150px;
    z-index: 20;
}

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Stats Hover Fix */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.glass:hover {
    background: #E21E37 !important;
    border-color: #E21E37;
}

/* Aurora Background Animation */
.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #fff;
    /* Asegurar fondo base */
}

.aurora-blob {
    position: absolute;
    filter: blur(60px);
    /* Menos blur para más definición */
    opacity: 0.7;
    /* Aumentado de 0.4 para visibilidad */
    animation: aurora-move 20s infinite alternate;
}

.aurora-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: #FFD1D1;
    /* Rojo más intenso */
    animation-delay: 0s;
}

.aurora-2 {
    bottom: -10%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: #E0E7FF;
    /* Azul índigo suave */
    animation-delay: -5s;
}

.aurora-3 {
    top: 30%;
    left: 40%;
    width: 50vw;
    height: 50vw;
    background: #FFE4E6;
    /* Rosa rojizo */
    animation-delay: -10s;
}

@keyframes aurora-move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Animación de Flechas Flotantes hacia el Oeste */
.floating-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-line {
    position: absolute;
    width: 60px;
    height: 2px;
    background: linear-gradient(to left, rgba(226, 30, 55, 0.4), transparent);
    animation: fly-west 6s linear infinite;
}

/* Punta de flecha */
.floating-line::before {
    content: '';
    position: absolute;
    left: -8px;
    top: -4px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 10px solid rgba(226, 30, 55, 0.4);
}

.floating-line:nth-child(1) {
    top: 10%;
    animation-delay: 0s;
    width: 50px;
}

.floating-line:nth-child(2) {
    top: 20%;
    animation-delay: 0.8s;
    width: 70px;
}

.floating-line:nth-child(3) {
    top: 30%;
    animation-delay: 1.6s;
    width: 45px;
}

.floating-line:nth-child(4) {
    top: 40%;
    animation-delay: 0.4s;
    width: 80px;
}

.floating-line:nth-child(5) {
    top: 50%;
    animation-delay: 1.2s;
    width: 55px;
}

.floating-line:nth-child(6) {
    top: 60%;
    animation-delay: 2s;
    width: 65px;
}

.floating-line:nth-child(7) {
    top: 70%;
    animation-delay: 0.6s;
    width: 40px;
}

.floating-line:nth-child(8) {
    top: 80%;
    animation-delay: 1.4s;
    width: 75px;
}

.floating-line:nth-child(9) {
    top: 85%;
    animation-delay: 1.8s;
    width: 50px;
}

.floating-line:nth-child(10) {
    top: 95%;
    animation-delay: 2.2s;
    width: 60px;
}

@keyframes fly-west {
    0% {
        right: -100px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        right: 110%;
        opacity: 0;
    }
}

/* Círculos flotantes */
.floating-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(226, 30, 55, 0.15);
    animation: pulse-float 6s ease-in-out infinite;
}

.floating-circle:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.floating-circle:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.floating-circle:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 15%;
    left: 25%;
    animation-delay: 4s;
}

@keyframes pulse-float {

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

    50% {
        transform: scale(1.15) translateY(-15px);
        opacity: 0.5;
    }
}

/* Hero Blur Box */
.hero-text-box {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Divisor Curvo */
.custom-shape-divider-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 10;
}

.custom-shape-divider-top svg {
    position: relative;
    display: block;
    width: calc(130% + 1.3px);
    /* Un poco más ancho para evitar bordes */
    height: 120px;
    /* Altura fija suficiente para la curva */
}

.custom-shape-divider-top .shape-fill {
    fill: #ffffff;
    /* Color de la sección ANTERIOR (Servicios - bg-white) */
}

/* Efecto Mapa de Cobertura */
.map-coverage {
    opacity: 0.9;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: crosshair;
    filter: grayscale(100%) opacity(0.8);
}

.map-coverage:hover {
    opacity: 1;
    transform: scale(1.02);
    /* Filtro optimizado para obtener exactamente rgb(238, 32, 61) */
    /* Primero convertimos a negro para neutralizar el gris original y luego aplicamos el color */
    filter: brightness(0) saturate(100%) invert(20%) sepia(91%) saturate(5435%) hue-rotate(342deg) brightness(95%) contrast(97%);
}