/* CSS Crítico - Estilos que deben cargarse inmediatamente */
/* Extraído de index.html para mejorar rendimiento */

/* Prevenir overflow horizontal en secciones */
section {
    overflow-x: hidden;
}

/* Ocultar elementos decorativos que causen overflow horizontal */
/* Si hay un elemento con clases -bottom-24 -right-10 y blur-3xl, ocultarlo */
section .absolute[class*="blur-3xl"][class*="-bottom-24"][class*="-right-10"] {
    display: none !important;
}

/* Ajustar elementos decorativos con blur para que no salgan del contenedor */
section .absolute[class*="blur"] {
    max-width: 100%;
    max-height: 100%;
    right: 0 !important;
    bottom: 0 !important;
    transform: translateX(0) translateY(0) !important;
}

/* Utilidades visuales */
.text-shadow-lg { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); }
.sticky-shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }

/* Animaciones scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Protección para elementos del hero */
.hero-title,
.hero-subtitle {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Mejoras visuales */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.btn-hover {
    transition: all 0.3s ease;
}
.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.img-hover {
    overflow: hidden;
}
.img-hover img {
    transition: transform 0.5s ease;
}
.img-hover:hover img {
    transform: scale(1.05);
}

/* Animaciones para modales */
.modal-animation {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-content {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal.active .modal-content {
    transform: scale(1);
}

/* Mejoras en formularios */
.form-input-focus {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input-focus:focus {
    border-color: #040872;
    box-shadow: 0 0 0 3px rgba(13, 43, 79, 0.2);
    outline: none;
}

/* Cambio de color en textos al hacer hover en tarjetas */
#empresas.has-card-hover #badge-servicios {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}
#empresas.has-card-hover #badge-servicios svg {
    color: white !important;
}
#empresas.has-card-hover #section-title {
    color: white !important;
}

/* Ajuste de altura del hero para considerar el navbar */
#inicio {
    min-height: calc(100vh - 80px);
    height: calc(100vh - 80px);
}

@media (min-width: 768px) {
    #inicio {
        min-height: calc(100vh - 88px);
        height: calc(100vh - 88px);
    }
}

/* Efecto Ken Burns para hero slides */
.hero-slide {
    will-change: transform, opacity;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-position: center;
    background-repeat: no-repeat;
    transform-origin: center;
}

.hero-slide.ken-burns-in {
    animation: kenBurnsZoomIn 8s ease-in-out infinite;
}

.hero-slide.ken-burns-out {
    animation: kenBurnsZoomOut 8s ease-in-out infinite;
}

@keyframes kenBurnsZoomIn {
    0% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.1);
    }
    100% { 
        transform: scale(1);
    }
}

@keyframes kenBurnsZoomOut {
    0% { 
        transform: scale(1.1);
    }
    50% { 
        transform: scale(1);
    }
    100% { 
        transform: scale(1.1);
    }
}

/* Estilos para los bullets del hero slider */
.hero-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    position: relative;
}

.hero-dot:hover {
    transform: scale(1.3);
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.hero-dot:active {
    transform: scale(1.1);
}

.hero-dot.bg-white\/70 {
    background-color: rgba(255, 255, 255, 0.7) !important;
}

.hero-dot.bg-white\/40 {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

/* Mejoras responsive para hero slider */
@media (max-width: 640px) {
    .hero-slide.ken-burns-in {
        animation: kenBurnsZoomIn 6s ease-in-out infinite;
    }
    
    .hero-slide.ken-burns-out {
        animation: kenBurnsZoomOut 6s ease-in-out infinite;
    }
    
    @keyframes kenBurnsZoomIn {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }
    
    @keyframes kenBurnsZoomOut {
        0% { transform: scale(1.05); }
        50% { transform: scale(1); }
        100% { transform: scale(1.05); }
    }
}

/* Deshabilitar animación Ken Burns si el usuario prefiere movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .hero-slide.ken-burns-in,
    .hero-slide.ken-burns-out {
        animation: none !important;
        transform: scale(1) !important;
    }
    
    .hero-slide {
        transition: opacity 0.5s ease !important;
    }
}

