/* Estilos personalizados - app.css */

/* 1. ESTILOS PARA EL MEGA MENÚ */
.mega-menu {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-top: 3px solid #3b82f6; /* Azul Tailwind */
}

.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* Transiciones suaves */
.transition-all {
    transition-property: all;
}

/* 2. MÓVIL FIRST - Responsive */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Header móvil */
    header.sticky {
        position: fixed;
        width: 100%;
        z-index: 1000;
    }
    
    /* Ocultar barra de desplazamiento horizontal */
    body {
        overflow-x: hidden;
    }
    
    /* Animación para menú móvil */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
            max-height: 0;
        }
        to {
            opacity: 1;
            transform: translateY(0);
            max-height: 500px;
        }
    }
    
    .mobile-submenu {
        animation: slideDown 0.4s ease-out;
        overflow: hidden;
    }
}

/* 3. TABLET (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .mega-menu {
        width: 95vw;
        max-width: 95vw;
        left: 2.5vw !important;
        transform: translateX(-50%) !important;
    }
    
    /* Ajustar grid del megamenú para tablet */
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
}

/* 4. DESKTOP (1024px+) */
@media (min-width: 1024px) {
    .mega-menu {
        width: 80vw;
        max-width: 1200px;
    }
    
    /* Mejorar legibilidad en pantallas grandes */
    .container {
        max-width: 1280px;
    }
}

/* 5. UTILIDADES PERSONALIZADAS */

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Mejorar contraste de texto */
.text-gray-700 {
    color: #374151;
}

/* Sombras personalizadas */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Animación de aparición en scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* 6. CORRECCIONES ESPECÍFICAS */

/* Evitar que el megamenú cause scroll horizontal */
.w-screen {
    max-width: calc(100vw - 2rem);
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* Asegurar que las imágenes sean responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Mejorar el foco para accesibilidad */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 7. ANIMACIONES PERSONALIZADAS (adicionales a Animate.css) */

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* 8. LOADING STATES */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 9. ESTILOS PARA FORMULARIOS */
.input-focus:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

/* 10. ESTILOS ESPECÍFICOS PARA TU SITIO CORPORATIVO */

/* Hero section si la tienes */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Tarjetas de servicios */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* 11. IMPORTANTE: Limpiar floats */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* 12. PRINT STYLES */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
}