:root {
    --color-azul: #007BFF;
    --color-naranja: #F39C12;
    --color-texto-principal: #000000;
    --color-fondo-primario: #FFFFFF;
    --color-fondo-secundario: #F8F9FA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Compensa la altura del menú al navegar por anclas */
}

body {
    background-color: var(--color-fondo-secundario);
    color: var(--color-texto-principal);
    line-height: 1.6;
    width: 100%;
    max-width: 100vw;
}

a {
    text-decoration: none;
}

/* --- MENÚ DE NAVEGACIÓN (NAVBAR) --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: var(--color-fondo-primario);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-texto-principal);
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 65px;
    width: auto;
}

.navbar-links {
    display: flex;
    gap: 2rem;
}

.navbar-links a {
    color: var(--color-texto-principal);
    font-weight: 600;
    transition: color 0.3s;
}

.navbar-links a:hover {
    color: var(--color-azul);
}

/* --- HERO SLIDER (SWIPER) --- */
.hero-slider {
    width: 100%;
    height: 100vh;
    position: relative;
}
.hero-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35); /* Overlay semitransparente más claro */
    z-index: 2;
}
.slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #FFFFFF;
    max-width: 1000px;
    padding: 70px 20px 0; /* Compensa la cabecera fija */
}
/* Animaciones CSS Nativas Sequenciales */
.slide-content h1, .slide-content p, .slide-content .btn {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.swiper-slide-active .slide-content h1 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}
.swiper-slide-active .slide-content p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}
.swiper-slide-active .slide-content .btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}
.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
/* Branding: Controles del Swiper con Color Corporativo */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: var(--color-azul);
}
.hero-slider .swiper-pagination-bullet-active {
    background-color: var(--color-azul);
}

/* --- SECCIÓN HERO (SPLIT SCREEN) --- */
.hero {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--color-fondo-secundario);
}

.hero-split {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
}

.hero-software {
    background: linear-gradient(135deg, #FFFFFF 0%, #E6F2FF 100%);
}

.hero-tecnologia {
    background-color: transparent;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
    max-width: 450px;
    text-align: justify;
}

.btn {
    display: inline-block;
    background-color: var(--color-azul);
    color: var(--color-fondo-primario);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- SECCIÓN TARJETAS (SISTEMAS) --- */
.sistemas-section {
    padding: 5rem 5%;
    background-color: var(--color-fondo-secundario);
}

.sistemas-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.grid-sistemas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--color-fondo-primario);
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card i {
    font-size: 2.5rem;
    color: var(--color-naranja);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    min-height: 65px;
}

.card-link {
    color: var(--color-azul);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.card-link:hover {
    color: #0056b3;
}

/* --- SECCIÓN NOSOTROS --- */
.nosotros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}
.nosotros-img {
    flex: 1 1 45%;
    margin: 0;
    padding: 0;
}
.nosotros-img img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.nosotros-content {
    flex: 1 1 45%;
}
.nosotros-content h2 {
    text-align: left;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}
.nosotros-content p {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: justify;
}
.valores-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.valores-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.valores-list li i {
    color: var(--color-naranja);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}
.valores-list li span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- SECCIÓN COUNTING STATS --- */
.counting-section {
    background-color: var(--color-azul);
    color: var(--color-fondo-primario);
    padding: 4rem 2rem;
    text-align: center;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 2rem;
}

.stat-box {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-icon {
    font-size: 3.5rem;
    color: var(--color-naranja);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SECCIÓN NUESTROS CLIENTES --- */
.clientes-section {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
    text-align: center;
}

.clientes-section h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    position: relative;
    z-index: 2;
}

.clientes-section p {
    color: #666;
    margin-bottom: 3rem; /* Restauramos el margen original */
    position: relative;
    z-index: 2;
}

/* Espaciado adicional para que el Tooltip no se corte al flotar */
.clients-slider {
    padding: 2rem 0;
    /* overflow: visible !important; REMOVIDO: Esto rompe el layout y causa zoom-out en móviles */
}

/* Asegura que el contenedor del slide entero se eleve sobre los demás al pasar el mouse */
.clients-slider .swiper-slide:hover {
    z-index: 10;
    position: relative;
}

.client-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 250px; /* Regresamos al ancho adecuado para 4 tarjetas */
    min-height: 260px; /* Altura dinámica para evitar el colapso de las etiquetas */
    margin: 0 auto;
    box-sizing: border-box;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #0078D4; /* Color de acento al pasar el mouse */
}

.client-card:hover .client-logo {
    transform: scale(0.9);
}

/* --- BADGE (DISTINTIVO) EN LA TARJETA --- */
.client-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--color-naranja) 0%, #e67e22 100%);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4);
    z-index: 5;
    text-transform: uppercase;
}

/* --- TOOLTIP FLOTANTE LATERAL CSS PURO --- */
.client-tooltip {
    position: absolute;
    top: 50%;
    left: 105%; /* Aparece al costado derecho */
    transform: translateY(-50%) translateX(10px); /* Distancia más corta para un Fade-In elegante */
    background-color: var(--color-texto-principal);
    color: var(--color-fondo-primario);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 280px; /* Ancho para que el texto respire */
    text-align: justify; /* Texto ordenado en bloque sólido */
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    /* Animación Fade-In suave y profesional */
    transition: all 0.4s ease-out;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    pointer-events: none;
}

/* Triángulo (Flecha) del Tooltip */
.client-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%; /* Enganchado a la izquierda de la caja negra */
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent var(--color-texto-principal) transparent transparent; /* Flecha apunta a la izquierda */
}

.client-card:hover .client-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0); /* Termina de animar su posición lateral */
}

.client-logo {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem; /* Ajustado para balancear el nuevo layout space-between */
    transition: transform 0.3s ease; /* Transición para reducir el logo */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08)); /* Sombra sutil y moderna que respeta transparencias */
}

.client-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--color-texto-principal);
}

/* --- TAGS / BADGES BAJO EL NOMBRE --- */
.client-tags {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0.8rem;
    align-items: center;
    width: 100%;
}

.tag-blue, .tag-orange {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-blue {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--color-azul);
}

.tag-orange {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--color-naranja);
}

.client-project {
    font-size: 0.85rem;
    color: #888888; /* Un gris más sutil y elegante */
    font-weight: 500;
}

/* --- RESPONSIVIDAD (MÓVILES) --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        height: auto;
        padding: 1rem 0;
    }
    .hero-slider .swiper-button-next,
    .hero-slider .swiper-button-prev {
        display: none; /* Ocultar flechas de navegación en móvil */
    }
    .slide-content {
        padding-top: 130px;
    }
    .slide-content h1 {
        font-size: 2.2rem;
    }
    .slide-content p {
        font-size: 1.1rem;
    }
    .hero {
        padding-top: 0;
    }
    .hero-split {
        flex: 1 1 100%;
        padding: 3rem 2rem;
        align-items: center;
        text-align: center;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .nosotros-container {
        gap: 2rem;
        text-align: center;
    }
    .nosotros-content h2 {
        text-align: center;
        font-size: 1.8rem;
    }
    .valores-list li {
        justify-content: center;
    }

    /* Reposicionar el tooltip en móviles para que no salga de la pantalla */
    .client-tooltip {
        top: 105%; /* Aparecerá por debajo de la tarjeta en celulares */
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 240px;
        text-align: justify;
    }
    .client-tooltip::after {
        top: auto;
        bottom: 100%;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        border-color: transparent transparent var(--color-texto-principal) transparent; /* Flecha apunta hacia arriba */
    }
    .client-card:hover .client-tooltip {
        transform: translateX(-50%) translateY(0);
    }
}

/* --- FOOTER GLOBAL --- */
.footer-dark {
    background-color: #1A1A1A;
    color: #CCCCCC;
    font-family: 'Montserrat', sans-serif;
    margin-top: 4rem;
    line-height: 1.6;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fuerza 4 columnas iguales en monitores */
    gap: 3rem;
    max-width: 1200px;
    margin: auto;
    padding: 4rem 2rem;
}

/* --- RESPONSIVIDAD DEL FOOTER --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr; /* 1 sola columna en teléfonos móviles */
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-col ul li a {
        justify-content: center;
    }
    .social-links, .contact-item {
        justify-content: center;
    }
}
.footer-col h3 {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-naranja, #F39C12); /* Naranja Corporativo */
    border-radius: 2px;
}
.footer-col p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
/* Ajustamos el logo en caso sea muy oscuro, agregando un fondo sutil si es necesario */
.footer-col img.footer-logo {
    max-width: 260px;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05); 
    padding: 8px;
    border-radius: 8px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 0.8rem;
}
.footer-col ul li a {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.footer-col ul li a:hover {
    color: var(--color-naranja, #F39C12);
    padding-left: 5px;
}
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}
.social-links a {
    color: var(--color-naranja, #F39C12);
    font-size: 1.5rem;
    transition: transform 0.3s, color 0.3s;
}
.social-links a:hover {
    transform: translateY(-4px);
    color: #FFFFFF;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}
.contact-item i {
    color: var(--color-naranja, #F39C12);
    font-size: 1.2rem;
    margin-top: 3px;
}
.contact-item a {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s;
}
.contact-item a:hover {
    color: var(--color-naranja, #F39C12);
}
.sub-footer {
    background-color: #000000;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #888888;
}
/* Botón Flotante Volver Arriba */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-naranja, #F39C12);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}
.btn-back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}
.btn-back-to-top:hover {
    background-color: #d35400; /* Naranja un poco más oscuro al pasar el ratón */
    transform: translateY(-5px);
    color: #fff;
}