/* =========================================================
   EDS-SISTEMAS | INICIO
   ETAPA 1: NAVEGACIÓN Y REDES SOCIALES

   Identidad visual:
   - Azul marino
   - Blanco
   - Verde esmeralda
   - Azul tecnológico
========================================================= */

/* =========================================================
   1. VARIABLES GENERALES
========================================================= */

:root {
    color-scheme: dark;

    --bg-dark: #07111f;
    --bg-header: rgba(5, 14, 27, 0.92);

    --text-main: #f8fafc;
    --text-muted: #b0bdce;

    --accent-green: #10b981;
    --accent-green-light: #34d399;

    --primary-blue: #3b82f6;
    --primary-blue-light: #60a5fa;

    --border-color: rgba(148, 180, 211, 0.18);

    --container-width: 1200px;

    --transition: 0.25s ease;
}


/* =========================================================
   2. REINICIO Y CONFIGURACIÓN GENERAL
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;

    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;

    background-color: var(--bg-dark);

    background-image:
        linear-gradient(
            rgba(5, 13, 25, 0.88),
            rgba(5, 13, 25, 0.94)
        ),
        url("../img/fondo-tecnologico.jpg");

    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;

    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
    outline: 3px solid var(--accent-green-light);
    outline-offset: 4px;
}


/* =========================================================
   3. ACCESIBILIDAD
========================================================= */

.saltear-contenido {
    position: fixed;
    z-index: 3000;

    top: 10px;
    left: 10px;

    padding: 12px 16px;

    color: #031a13;
    background: var(--accent-green-light);

    border: none;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 700;

    transform: translateY(-160%);
    transition: transform var(--transition);
}

.saltear-contenido:focus {
    transform: translateY(0);
}


/* =========================================================
   4. ENCABEZADO PRINCIPAL
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: var(--bg-header);

    border-bottom: 1px solid var(--border-color);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.20);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* Contenedor interior */

.header-container {
    width: min(92%, var(--container-width));
    min-height: 84px;

    margin: 0 auto;
    padding: 12px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 32px;
}


/* =========================================================
   5. LOGO
========================================================= */

.logo {
    flex: 0 1 auto;

    display: inline-flex;
    align-items: center;

    min-width: 0;
    max-width: 200px;
    padding: 0;

    background: transparent;
    border: none;

    transition:
        opacity var(--transition),
        transform var(--transition);
}

.logo img {
    width: 175px;
    max-height: 58px;

    object-fit: contain;
    object-position: left center;
}

.logo:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


/* =========================================================
   6. NAVEGACIÓN
========================================================= */

.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;
}


/* Enlaces principales (ahora botones) */

.btn-nav {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-height: 44px;
    padding: 10px 15px;

    color: #dce8f6;
    background: transparent;

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;

    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}


/* Línea decorativa inferior */

.btn-nav::after {
    content: "";

    position: absolute;
    right: 14px;
    bottom: 5px;
    left: 14px;

    height: 2px;

    background: var(--accent-green-light);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform var(--transition);
}


/* Efecto al pasar el cursor */

.btn-nav:not(.btn-nav-cta):hover {
    color: #ffffff;

    background: rgba(59, 130, 246, 0.10);

    border-color: rgba(96, 165, 250, 0.18);

    transform: translateY(-1px);
}

.btn-nav:not(.btn-nav-cta):hover::after {
    transform: scaleX(1);
}


/* Botón destacado de contacto */

.btn-nav-cta {
    margin-left: 5px;
    padding-inline: 17px;

    color: #031a13;

    background: var(--accent-green);

    border-color: var(--accent-green);

    font-weight: 800;
}

.btn-nav-cta span {
    display: inline-block;

    font-size: 16px;
    line-height: 1;

    transition: transform var(--transition);
}

.btn-nav-cta:hover {
    color: #031a13;

    background: var(--accent-green-light);

    border-color: var(--accent-green-light);

    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.20);
}

.btn-nav-cta:hover span {
    transform: translate(2px, -2px);
}


/* =========================================================
   7. REDES SOCIALES FLOTANTES
========================================================= */

.redes-flotantes {
    position: fixed;
    z-index: 900;

    top: 50%;
    left: 18px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 10px;

    transform: translateY(-50%);
}


/* Botón individual */

.red-social {
    position: relative;

    display: grid;
    place-items: center;

    width: 46px;
    height: 46px;

    padding: 11px;

    overflow: hidden;

    color: #ffffff;

    background: rgba(8, 22, 38, 0.90);

    border: 1px solid rgba(148, 180, 211, 0.24);
    border-radius: 14px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.24);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}


/* Iconos */

.red-social img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    transition: transform var(--transition);
}


/* Efecto general */

.red-social:hover {
    transform: translateX(5px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.32);
}

.red-social:hover img {
    transform: scale(1.08);
}


/* Facebook */

.red-social.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}


/* Instagram */

.red-social.instagram:hover {
    background: linear-gradient(
        135deg,
        #f09433,
        #dc2743,
        #bc1888
    );

    border-color: #dc2743;
}


/* WhatsApp */

.red-social.whatsapp:hover {
    background: #168c4a;
    border-color: #25d366;
}


/* LinkedIn */

.red-social.linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
}


/* =========================================================
   8. CONTENIDO TEMPORAL
========================================================= */

main#contenido {
    width: 100%;
    min-height: 0;
}


/* =========================================================
   9. TABLETS Y PANTALLAS MEDIANAS
========================================================= */

@media (max-width: 950px) {

    .header-container {
        width: 94%;
        gap: 18px;
    }

    .logo {
        max-width: 160px;
    }

    .logo img {
        width: 150px;
    }

    .header-nav {
        gap: 4px;
    }

    .btn-nav {
        min-height: 40px;
        padding: 9px 10px;
        font-size: 12px;
    }

    .btn-nav-cta {
        margin-left: 2px;
        padding-inline: 12px;
    }

    .redes-flotantes {
        left: 10px;
    }

    .red-social {
        width: 42px;
        height: 42px;
        padding: 10px;
    }
}


/* =========================================================
   10. CELULARES
========================================================= */

@media (max-width: 650px) {

    html {
        scroll-padding-top: 125px;
    }

    body {
        background-attachment: scroll;
    }

    /* Encabezado en dos niveles */

    .header-container {
        width: 100%;

        min-height: auto;

        flex-direction: column;
        justify-content: center;

        gap: 12px;

        padding: 12px 12px 13px;
    }


    /* Logo centrado */

    .logo {
        justify-content: center;
        max-width: 180px;
    }

    .logo img {
        width: 155px;
        max-height: 48px;

        object-position: center;
    }


    /* Navegación adaptable */

    .header-nav {
        width: 100%;

        display: flex;
        align-items: center;
        justify-content: center;

        flex-wrap: wrap;

        gap: 5px;
    }

    .btn-nav {
        min-height: 37px;

        padding: 8px 10px;

        border-radius: 9px;

        font-size: 11px;
    }

    .btn-nav::after {
        display: none;
    }

    .btn-nav-cta {
        margin-left: 0;
        padding-inline: 11px;
    }


    /* Redes en una barra inferior */

    .redes-flotantes {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;

        flex-direction: row;
        justify-content: center;

        gap: 16px;

        padding: 10px 12px
            calc(10px + env(safe-area-inset-bottom));

        transform: none;

        background: rgba(5, 14, 27, 0.94);

        border-top: 1px solid var(--border-color);

        box-shadow:
            0 -8px 25px rgba(0, 0, 0, 0.18);

        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .red-social {
        width: 42px;
        height: 42px;

        padding: 10px;

        border-radius: 13px;
    }

    .red-social:hover {
        transform: translateY(-3px);
    }

}


/* =========================================================
   11. CELULARES PEQUEÑOS
========================================================= */

@media (max-width: 380px) {

    .header-container {
        padding-inline: 8px;
    }

    .header-nav {
        gap: 3px;
    }

    .btn-nav {
        padding-inline: 7px;
        font-size: 10px;
    }

    .btn-nav-cta {
        padding-inline: 8px;
    }

    .redes-flotantes {
        gap: 13px;
    }

    .red-social {
        width: 39px;
        height: 39px;
        padding: 9px;
    }

}


/* =========================================================
   12. ACCESIBILIDAD: MOVIMIENTO REDUCIDO
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}