:root {
    --sicma-dark: #0d2d3e;     
    --sicma-action: #007bff;   
    --sicma-brand: #2596be;    
}

/* Clases de Utilidad */
.sicma-text-dark { color: var(--sicma-dark) !important; }
.bg-sicma-dark { background-color: var(--sicma-dark) !important; }
.bg-brand { background-color: var(--sicma-brand) !important; }
.bg-action { background-color: var(--sicma-action) !important; }
.z-1050 { z-index: 1050; }
.z-1040 { z-index: 1040; position: sticky; top: 0; }

/* Botones */
.btn-brand {
    background-color: var(--sicma-brand);
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}
.btn-brand:hover {
    background-color: var(--sicma-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================
   Ajustes de Navegación (Slim Navbar)
   ========================================= */
.navbar-logo {
    height: auto;
    max-height: 80px; /* Restringe la altura máxima, adelgazando toda la barra */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05); /* Ligera microinteracción visual */
}

/* =========================================
   Ajustes de Navegación (Fondo Claro)
   ========================================= */

.navbar-light .navbar-nav .nav-link {
    color: var(--sicma-dark) !important;
    font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--sicma-brand) !important;
}

.navbar-light .navbar-toggler {
    background-color: var(--sicma-brand);
    filter: invert(1);
}

/* =========================================
   Ajuste Modal Header (Corregir aspas de cierre)
   ========================================= */
.modal-header .btn-close-white {
    filter: none; /* Asegura que la 'X' se vea blanca en fondo oscuro */
}

/* =========================================
   Hero & Separador SVG Inclinado
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, var(--sicma-dark) 0%, #1a4f6e 100%);
    /* 60px arriba (baja el contenido), 0 a los lados, 150px abajo (protege la ola) */
    padding: 60px 0 90px; 
}

.hero-image {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform: translateY(0);
    transition: transform 0.5s ease;
}
.hero-image:hover { transform: translateY(-10px); }

.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}
.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.custom-shape-divider-bottom .shape-fill {
    fill: #f8f9fa; /* Tono gris claro exacto del bg-light de Bootstrap */
}

/* =========================================
   Bento Box Grid (Ecosistema)
   ========================================= */
.bento-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.bento-item {
    border-radius: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.1) !important;
}

@media (min-width: 992px) {
    .bento-large {
        grid-column: span 2;
    }
}

/* =========================================
   WhatsApp Flotante (Latido) y Mobile Bar
   ========================================= */
@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wa-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: pulse-wa 2s infinite;
    transition: background-color 0.3s ease;
}
.wa-float:hover { background-color: #128C7E; color: white; }

/* Ocultar el flotante nativo en móviles si se usa la barra inferior */
@media (max-width: 768px) {
    .wa-float { display: none; }
    body { padding-bottom: 70px; } /* Espacio para la barra inferior */
}

.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1060;
}

/* =========================================
   Animaciones al Scroll (Intersection Observer)
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Línea de Tiempo Interactiva (Timeline)
   ========================================= */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* La línea central vertical */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--sicma-brand);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

/* Círculos indicadores (Nodos) */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--sicma-dark);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }
.timeline-item.right::after { left: -10px; }

.timeline-content {
    padding: 24px;
    background-color: white;
    position: relative;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Microinteracciones al pasar el cursor */
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.timeline-item:hover::after {
    background-color: var(--sicma-action);
    border-color: var(--sicma-brand);
    transform: scale(1.3);
}

.timeline-date {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Destacado sutil para el año límite */
.border-danger-left {
    border-left: 5px solid #dc3545;
}

/* =========================================
   Responsive para Línea de Tiempo (Móviles)
   ========================================= */
@media screen and (max-width: 768px) {
    .timeline-container::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }
    .timeline-item.right {
        left: 0;
    }
    .timeline-item.left::after, .timeline-item.right::after {
        left: 21px;
    }
}

/* =========================================
   Tarjetas de Fundamento Legal
   ========================================= */
.legal-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.75rem;
}

.legal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.12) !important;
}

/* =========================================
   Filas de Riesgos (Flexbox Row-Cards)
   ========================================= */
.risk-row {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.risk-row:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    min-height: 45px;
}

/* =========================================
   Tecnología Válida (Tarjetas Blancas)
   ========================================= */
.tech-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.tech-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.15) !important;
}

.border-action {
    border-color: var(--sicma-action) !important;
}

/* =========================================
   Requisitos de Seguridad (Tarjetas Oscuras)
   ========================================= */
.security-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.security-card:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--sicma-brand);
    box-shadow: 0 0 20px rgba(37, 150, 190, 0.15); /* Resplandor suave del color corporativo */
    transform: translateY(-3px);
}

.text-brand { color: var(--sicma-brand) !important; }
.bg-brand { background-color: var(--sicma-brand) !important; }

/* =========================================
   Tarjetas de Beneficios (Pricing Style)
   ========================================= */
.benefit-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.benefit-card:hover {
    transform: translateY(-8px);
}

.benefit-card.transform-up {
    transform: scale(1.05); /* Destaca la tarjeta central */
    z-index: 2;
}

.benefit-card.transform-up:hover {
    transform: scale(1.05) translateY(-8px);
}

@media (max-width: 991px) {
    .benefit-card.transform-up {
        transform: scale(1);
    }
    .benefit-card.transform-up:hover {
        transform: translateY(-8px);
    }
}

/* =========================================
   Footer y Formulario
   ========================================= */
.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--sicma-action) !important;
}

/* Mejora de accesibilidad en focus de formulario */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(37, 150, 190, 0.25);
    border: 1px solid var(--sicma-brand) !important;
}

/* =========================================
   Composición de Imágenes (El Poder de la Nube)
   ========================================= */
@keyframes levitate {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important; }
    100% { transform: translateY(0px); }
}

.floating-mobile {
    animation: levitate 5s ease-in-out infinite;
    z-index: 2;
    /* Ajuste responsivo para evitar recortes en celulares */
    max-width: 140px; 
}

@media (max-width: 768px) {
    .floating-mobile {
        width: 40% !important;
        right: 0 !important;
        bottom: -20px !important;
    }
}

/* =========================================
   Slider de Casos de Éxito (Split Design)
   ========================================= */
#sliderCasosExito {
    /* Forzar altura mínima para evitar saltos entre textos cortos/largos */
    min-height: 400px;
}

#sliderCasosExito .slider-img {
    height: 450px;
    object-fit: cover;
}

/* Ajustes para la navegación del carrusel */
.carousel-indicators {
    bottom: -15px;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--sicma-brand);
}

/* Responsividad para móviles (Apilar contenido) */
@media (max-width: 768px) {
    #sliderCasosExito .slider-img {
        height: 250px; /* Reducir la imagen en móviles */
    }
    
    #sliderCasosExito .col-md-6.p-5 {
        padding: 2rem !important; /* Reducir padding interno en celular */
    }
}

/* =========================================
   Slider de Casos de Éxito (Homologación de Altura)
   ========================================= */

/* 1. Fijamos una altura estricta para la diapositiva en escritorio */
#sliderCasosExito .carousel-item {
    height: 480px; 
}

/* 2. Aseguramos que la fila interna tome ese 100% de altura */
#sliderCasosExito .carousel-item .row {
    height: 100%;
}

/* 3. La imagen se adapta al contenedor sin deformarse (magia del cover) */
#sliderCasosExito .slider-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center; /* Centra el recorte de la foto */
}

/* Ajustes de navegación del carrusel */
.carousel-indicators {
    bottom: -15px;
}
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--sicma-brand);
}

/* 4. Responsividad para móviles (Evita que el texto se corte) */
@media (max-width: 768px) {
    #sliderCasosExito .carousel-item {
        height: auto; /* Permite que el texto crezca hacia abajo si es muy largo */
    }
    
    #sliderCasosExito .col-md-6.p-5 {
        padding: 2.5rem !important; /* Menos padding interno en celular */
    }

    #sliderCasosExito .slider-img {
        height: 250px; /* Altura fija estricta solo para la imagen en móviles */
    }
}

/* =========================================
   WhatsApp Flotante (Latido)
   ========================================= */
@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wa-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: pulse-wa 2s infinite;
    transition: background-color 0.3s ease;
}

.wa-float:hover { 
    background-color: #128C7E; 
    color: white; 
}