/* Reset básico y box-sizing consistente */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuración base de documento */
html, body {
    width: 100%;
    height: 100%;
    font-family: "Lato", Arial, sans-serif;
}

/* Estilo base del body */
body {
    color: #ffffff;
    overflow-x: hidden;
}

/* ===================================================== */
/*                 FONDO GLOBAL SODI                     */
/* ===================================================== */

/* Contenedor de fondo (degradado + SVG + burbujas) */
.sodi-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Degradado azul animado de fondo */
.sodi-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #005579 0%, #001f4d 80%);
    background-size: 200% 200%;
    animation: sodiGradientMove 18s ease-in-out infinite alternate;
    z-index: 1;
}

/* Capa SVG corporativa sobre el degradado */
.sodi-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../sources/bg_sodi.svg") center/cover no-repeat;
    opacity: 0.5;
    z-index: 2;
}

/* Capa de burbujas oscuras animadas */
.sodi-bubbles {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

/* Burbuja base difuminada */
.bubble {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0) 75%
    );
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(3px);
    mix-blend-mode: multiply;
}

/* Posiciones y animaciones de burbujas */
.bubble-1 {
    top: 5%;
    left: 10%;
    animation: floatBubble1 20s ease-in-out infinite;
}

.bubble-2 {
    top: 60%;
    left: 70%;
    width: 300px;
    height: 300px;
    animation: floatBubble2 24s ease-in-out infinite;
}

.bubble-3 {
    top: 30%;
    left: 75%;
    width: 220px;
    height: 220px;
    animation: floatBubble3 19s ease-in-out infinite;
}

.bubble-4 {
    top: 75%;
    left: 20%;
    width: 280px;
    height: 280px;
    animation: floatBubble4 23s ease-in-out infinite;
}

.bubble-5 {
    top: 40%;
    left: 40%;
    width: 320px;
    height: 320px;
    animation: floatBubble5 27s ease-in-out infinite;
}

/* Animaciones de flotado de burbujas */
@keyframes floatBubble1 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(35px, -45px) scale(1.05); }
    100% { transform: translate(-20px, 20px) scale(0.98); }
}

@keyframes floatBubble2 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(-40px, -35px) scale(1.08); }
    100% { transform: translate(25px, 30px) scale(0.96); }
}

@keyframes floatBubble3 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(30px, 40px) scale(1.07); }
    100% { transform: translate(-25px, -15px) scale(0.97); }
}

@keyframes floatBubble4 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(25px, -35px) scale(1.04); }
    100% { transform: translate(-30px, 15px) scale(0.95); }
}

@keyframes floatBubble5 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(-35px, 30px) scale(1.06); }
    100% { transform: translate(20px, -20px) scale(0.96); }
}

/* Animación del degradado de fondo */
@keyframes sodiGradientMove {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===================================================== */
/*                     NAVBAR GLOBAL                     */
/* ===================================================== */

/* Barra superior fija */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px 0;
    z-index: 1000;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
}

/* Contenedor interno de la navbar */
.nav-container {
    width: 90%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo del nav */
.logo img {
    width: 70px;
    cursor: pointer;
}

/* Enlaces del nav */
.nav-links {
    display: flex;
    gap: 40px;
}

/* Estilo de enlaces */
.nav-links a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 1px;
    transition: 0.3s;
}

/* Hover de enlaces */
.nav-links a:hover {
    color: #FBA600;
}

/* Enlace activo */
.nav-links a.active {
    color: #FBA600;
}

/* Redes sociales en el nav */
.nav-social {
    display: flex;
    gap: 14px;
}

/* Iconos de redes sociales */
.nav-social img {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Hover iconos sociales */
.nav-social img:hover {
    transform: scale(1.1);
}

/* ===================================================== */
/*                      FOOTER SODI                      */
/* ===================================================== */

/* Pie de página global */
.footer {
    background: #050505;
    color: #ffffff;
    padding: 45px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 10;
}

/* Contenedor interno del footer */
.footer-container {
    width: 90%;
    max-width: 1150px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

/* Columna genérica del footer */
.footer-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Columna del logo */
.footer-logo {
    align-items: center;
}

/* Logo en el footer */
.footer-logo img {
    width: 260px;
    margin-bottom: 12px;
}

/* Slogan bajo el logo */
.footer-slogan {
    font-size: 0.9rem;
    text-align: center;
    color: #dddddd;
    max-width: 250px;
}

/* Títulos de cada bloque del footer */
.footer-col h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #FBA600;
    letter-spacing: 0.04em;
}

/* Texto del footer */
.footer-col p {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 5px;
}

/* Línea inferior de derechos de autor */
.footer-bottom {
    text-align: center;
    margin-top: 25px;
    font-size: 0.8rem;
    color: #bbbbbb;
    opacity: 0.85;
}

/* ===================================================== */
/*            BOTÓN FLOTANTE WHATSAPP (CHATBOT)          */
/* ===================================================== */

/* Contenedor del botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 100px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Lato", Arial, sans-serif;
}

/* Globito de texto del botón */
.whatsapp-tooltip {
    background: #ffffff;
    color: #001f4d;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    transform: translateY(0);
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Estado oculto (controlado por JS) */
.whatsapp-tooltip--hide {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

/* Botón redondo de WhatsApp */
.whatsapp-float a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Icono de WhatsApp dentro del botón */
.whatsapp-float a img {
    width: 34px;
    height: 34px;
    display: block;
}

/* Hover del botón flotante */
.whatsapp-float a:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}

/* Al pasar el mouse, se vuelve a mostrar el globito */
.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Ajustes del botón flotante en móvil pequeño */
@media (max-width: 480px) {
    .whatsapp-float {
        right: 16px;
        bottom: 90px;
        gap: 6px;
    }

    .whatsapp-tooltip {
        font-size: 13px;
        padding: 6px 10px;
    }

    .whatsapp-float a {
        width: 56px;
        height: 56px;
    }

    .whatsapp-float a img {
        width: 30px;
        height: 30px;
    }
}

/* =============================================== */
/*        TIPOGRAFÍAS CORPORATIVAS SODI (LATO)     */
/* =============================================== */

p, .footer-col p {
    font-weight: 300;
}

h3 {
    font-weight: 600;
}

h1, h2 {
    font-weight: 700;
}

button {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* =============================================== */
/*  AJUSTE FINO: FOOTER UNIFICADO EN TODO EL SITIO */
/* =============================================== */

.footer-slogan,
.footer-col p {
    line-height: 1.3;
    margin-bottom: 3px;
}

.footer-col h3 {
    line-height: 1.2;
    margin-bottom: 6px;
}

/* ===================================================== */
/*                  SISTEMAS (PORTAL)                    */
/* ===================================================== */

/* Wrapper con overlay oscuro igual a Nosotros */
.systems-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding-top: 150px;
    padding-bottom: 60px;
}

.systems-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

.systems-hero {
    width: 100%;
    padding: 30px 20px 10px;
    display: flex;
    justify-content: center;
    text-align: center;
}

.systems-hero__content {
    width: 90%;
    max-width: 980px;
}

.systems-title {
    font-size: 2.4rem;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.systems-subtitle {
    font-size: 1.05rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.5;
}

.systems-section {
    width: 100%;
    padding: 25px 0 80px;
    display: flex;
    justify-content: center;
}

.systems-container {
    width: 90%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Cards más oscuras y sin radial amarillo */
.system-card {
    position: relative;
    z-index: 10;
    padding: 22px 22px 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 210px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.system-card::before {
    content: none;
}

.system-card:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 166, 0, 0.32);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.system-card__top {
    position: relative;
    z-index: 2;
}

.system-name {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 8px;
}


.system-btn {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #0b1020;
    background: #FBA600;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.system-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

/* ===================================================== */
/*                        RESPONSIVE                     */
/* ===================================================== */

/* Tablet */
@media (max-width: 992px) {
    .navbar {
        padding: 16px 0;
    }

    .nav-container {
        width: 92%;
    }

    .nav-links {
        gap: 28px;
    }
}

/* Móvil medio */
@media (max-width: 768px) {

    .navbar {
        padding: 14px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        text-align: center;
    }

    .logo img {
        width: 60px;
    }

    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 14px;
    }

    .nav-social {
        justify-content: center;
    }

    .nav-social img {
        width: 24px;
        height: 24px;
    }

    .systems-wrapper {
        padding-top: 190px;
    }
}

/* Móvil */
@media (max-width: 1100px) {
    .systems-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móvil pequeño / una columna */
@media (max-width: 640px) {
    .systems-title {
        font-size: 1.85rem;
    }

    .systems-subtitle {
        font-size: 0.98rem;
    }

    .systems-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .system-card {
        min-height: 200px;
        padding: 20px 18px 16px;
    }

    .system-name {
        font-size: 1.4rem;
    }
}

/* Móvil pequeño extra */
@media (max-width: 480px) {
    .navbar {
        padding: 12px 0;
    }

    .logo img {
        width: 54px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .systems-wrapper {
        padding-top: 210px;
    }
}

/* Footer responsive: columnas apiladas */
@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        align-items: center;
    }

    .footer-col {
        align-items: center;
    }

    .footer-logo img {
        margin: 0 auto 10px;
    }

    .footer-slogan {
        max-width: none;
    }
}

/* Footer en móvil muy pequeño */
@media (max-width: 600px) {
    .footer {
        padding-top: 40px;
    }

    .footer-col p {
        font-size: 0.85rem;
    }

    .footer-bottom {
        margin-top: 20px;
        font-size: 0.75rem;
    }
}


/* ===================================================== */
/*               LOGO CENTRADO EN TARJETAS               */
/* ===================================================== */

.system-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
}

.system-logo img {
    width: min(240px, 100%);
    max-height: 110px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
    opacity: 0.95;
}

/* Ajustes en pantallas pequeñas para que no se vea gigante */
@media (max-width: 640px) {
    .system-logo img {
        width: min(200px, 100%);
        max-height: 95px;
    }
}

@media (max-width: 480px) {
    .system-logo img {
        width: min(180px, 100%);
        max-height: 85px;
    }
}
