/**
 * Hoja de Estilos Principal - Logistica M&J
 * 
 * Contiene:
 * 1. Variables Globales (:root)
 * 2. Estilos Base y Reset
 * 3. Utilidades y Helpers
 * 4. Componentes y Modulos
 * 5. Animaciones y Keyframes
 * 6. Media Queries
 */

/* =========================================
   1. Variables Globales
   ========================================= */
:root {
    --primary: #ff6a00;
    --dark-bg: #15181e; 
    --dark-card: #1f232b;
    --transition-standard: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================
   2. Estilos Base y Reset
   ========================================= */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevenir scroll horizontal accidental */
}

/* Fallback for text color on dark backgrounds if Tailwind fails */
.bg-corporate-dark, .bg-slate-900, .bg-black {
    color: white;
}

/* =========================================
   3. Utilidades y Helpers
   ========================================= */
/* Critical Tailwind Polyfill / Overrides */
.text-white { color: white !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

.bg-corporate-dark { background-color: var(--dark-bg); }

/* Ensure visibility if JS fails */
.no-js .reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* =========================================
   4. Componentes y Modulos
   ========================================= */

/* Service Card Micro-interactions */
.service-card {
    transition: var(--transition-standard);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Logo Track Container */
.logo-track {
    display: flex;
    width: max-content;
    animation: scroll 35s linear infinite;
}

/* 
 * Correccion de Color en Logos
 * Sobrescribe las clases de utilidad de Tailwind (grayscale opacity-60)
 * para restaurar los colores originales de las marcas.
 * Mantiene la transicion de escala al hacer hover.
 */
.logo-track img {
    filter: grayscale(0) !important;
    opacity: 1 !important;
}

/* =========================================
   5. Animaciones y Keyframes
   ========================================= */

/* Animaciones Ultra-Smooth (Optimizado 144Hz) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Infinite Scroll Animation */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Animacion suave para boton de WhatsApp */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce-slow {
    animation: bounce-slow 3s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* =========================================
   6. Mision y Vision Section (Custom)
   ========================================= */

.mv-section-wrapper {
    padding: 6rem 1.5rem;
    background-color: #f8fafc;
}

.mv-container {
    max-width: 80rem; /* 7xl equivalent roughly */
    margin: 0 auto;
}

.mv-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    overflow: hidden;
    /* transition? Not specified for container, but good practice */
}

@media (min-width: 768px) {
    .mv-card {
        flex-direction: row;
    }
}

.mv-column {
    flex: 1;
    padding: 4rem 2.5rem; /* Mobile */
    background-color: #ffffff; /* Tema Blanco Inicial */
    color: #111111; /* Texto Negro Alto Contraste */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-bottom: 1px solid #e2e8f0; /* Separador movil */
    outline: none; /* Focus managed via active state/styles */
}

@media (min-width: 768px) {
    .mv-column {
        padding: 5rem 4rem; /* Desktop */
        border-bottom: none;
        border-right: 1px solid #e2e8f0; /* Separador desktop */
    }
    
    /* Remove border for last child to avoid double borders or edge border */
    .mv-column:last-child {
        border-right: none;
    }
}

.mv-column:last-child {
    border-bottom: none;
}

/* Header & Icon */
.mv-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* =========================================
   7. Hero Slider Styles (Custom)
   ========================================= */
.slide-img, .slide-text {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none; /* No bloquear clicks en area no activa */
}

.slide-img.active {
    opacity: 1;
    z-index: 1; /* Asegurar que la imagen activa esté encima */
}

.slide-text.active {
    opacity: 1;
    pointer-events: auto; /* Permitir interacción con texto activo */
    z-index: 2;
}

/* Fix for initial load flash and layout */
.slide-img.active {
    display: block;
}

.slide-text.active {
    display: flex; /* Mantener flex para alineacion del texto */
}

.mv-icon-box {
    width: 5rem;
    height: 5rem;
    background-color: #f1f5f9; /* Fondo Icono Inicial */
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111111; /* Icono Inicial (Dark) or inherit from text? User says: "Fondo Icono (#f1f5f9)" implied icon color black/dark */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mv-icon-box i, 
.mv-icon-box svg {
    width: 2.5rem;
    height: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mv-title {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin: 0;
    /* Color inherits from .mv-column */
}

.mv-text {
    font-size: 1.125rem;
    line-height: 1.75;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

/* Hover Effects (Desktop) & Active Mobile */
.mv-column:hover,
.mv-column.active-mobile,
.group:hover .mv-column {
    background-color: #15181e; /* Oscuro Corporativo */
    color: #ffffff; /* Texto Blanco Puro */
    z-index: 2;
    border-color: transparent; /* El borde separador se vuelve transparente */
}

/* Fix sibling border when first item hovered */
.mv-column:hover + .mv-column,
.mv-column.active-mobile + .mv-column {
    border-left-color: transparent; 
}

.mv-column:hover .mv-icon-box,
.mv-column.active-mobile .mv-icon-box,
.group:hover .mv-column .mv-icon-box {
    background-color: #ff6a00; /* Fondo Icono cambia a Naranja */
    transform: scale(1.1); /* Escala del contenedor de icono */
    box-shadow: 0 10px 15px -3px rgba(255, 106, 0, 0.3); /* Sombra naranja suave */
}

.mv-column:hover .mv-icon-box i,
.mv-column:hover .mv-icon-box svg,
.group:hover .mv-column .mv-icon-box i,
.group:hover .mv-column .mv-icon-box svg,
.mv-column.active-mobile .mv-icon-box i,
.mv-column.active-mobile .mv-icon-box svg {
    color: #ffffff; /* Icono se vuelve blanco */
    transform: rotate(5deg);
}

/* Active / Focus State */
.mv-column:active,
.mv-column:focus-visible {
    transform: scale(0.98);
}

/* Focus indicator for accessibility */
.mv-column:focus-visible {
    outline: 2px solid #ff6a00;
    outline-offset: -2px;
}

/* =========================================
   7. Media Queries
   ========================================= */
/* Ajustes para dispositivos moviles */
@media (max-width: 768px) {
    .reveal {
        transition-duration: 0.4s; /* Transiciones mas rapidas en movil */
    }
    
    .logo-track {
        animation-duration: 25s; /* Ajuste de velocidad en pantallas pequeñas */
    }

    /* Mejora de legibilidad en Hero Movil */
    .slide-text h1,
    .slide-text .h1-style {
        font-size: 2.5rem !important; /* Reducir tamaño de titulo */
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
}

/* Ajustes para pantallas grandes */
@media (min-width: 1280px) {
    /* Espaciado extra si es necesario */
}
