@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --color-primary: #043873;
    --color-primary-dark: #021f40;
    --color-accent: #4e9bff;
    --color-secondary: #ffffff;
    --color-background: #f0f4fa;
    --color-text: #ffffff;
    --color-text-secondary: #1a1a2e;
    --color-card-bg: #ffffff;
    --color-button-hover: #2165b3;
    --color-primary-light: #0550a0;
    --color-accent: #2e87f5;
    --color-accent-glow: rgba(46, 135, 245, 0.25);
    --color-secondary: #ffffff;
    --color-bg-section: #f0f5ff;
    --color-text: #ffffff;
    --color-text-secondary: #1a1a2e;
    --color-text-muted: #5a6a85;
    --color-border: rgba(4, 56, 115, 0.15);
    --color-success: #10b981;
    --color-error: #ef4444;
    --radius-card: 24px;
    --radius-input: 12px;
    --shadow-card: 0 20px 60px rgba(4, 56, 115, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Header tokens */
    --header-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--color-background);
    color: var(--color-text-secondary);
    overflow-x: hidden;
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */

body > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 36px;
    background: rgba(4, 56, 115, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(78, 155, 255, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;

    /* Línea de acento inferior animada */
    box-shadow:
        0 1px 0 rgba(78, 155, 255, 0.18),
        0 4px 24px rgba(2, 31, 64, 0.35);
}

/* Barra de progreso de scroll (decorativa, eje X) */
body > header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent) 0%, rgba(78,155,255,0) 100%);
    opacity: 0.35;
    pointer-events: none;
}

/* ── Logo ── */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.logo {
    width: 34px;
    height: 34px;
    display: block;
    border-radius: 8px;
    /* Sutil halo */
    filter: drop-shadow(0 0 6px rgba(78,155,255,0.4));
    transition: filter 0.3s;
}
.logo-container:hover .logo {
    filter: drop-shadow(0 0 10px rgba(78,155,255,0.7));
}

.logo-container .home {
    color: var(--color-secondary);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
    /* Degradado de texto */
    background: linear-gradient(90deg, #fff 40%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.2s;
}
.logo-container .home:hover { opacity: 0.85; }

/* ── Navegación ── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    letter-spacing: 0.15px;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(78, 155, 255, 0.12);
}

/* Indicador activo — añade class="active" en la página actual */
.nav-links a.active {
    color: #fff;
    background: rgba(78, 155, 255, 0.15);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */

footer {
    background: var(--color-primary-dark);
    color: var(--color-secondary);
    padding: 0;
    border-top: 1px solid rgba(78, 155, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Línea de acento superior */
footer::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-accent) 30%,
        rgba(78,155,255,0.4) 60%,
        transparent 100%);
}

/* Patrón de puntos de fondo */
footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(78,155,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Cuerpo del footer */
.footer-info {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: start;
    gap: 60px;
    padding: 52px 60px 44px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Logo en el footer */
.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    line-height: 0;
}

.footer-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    filter: drop-shadow(0 0 10px rgba(78,155,255,0.3));
}

.footer-brand-name {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff 40%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.footer-tagline {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
    line-height: 1.5;
    max-width: 160px;
}

/* Columnas de links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4 {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.7;
    margin-bottom: 6px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 6px;
}

/* Contacto */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-info h3 {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.7;
    margin-bottom: 6px;
}

.contact-info p {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
}

/* Separador + copyright */
footer > p {
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 860px) {
    body > header {
        padding: 0 20px;
        gap: 12px;
    }

    .nav-links { gap: 2px; }
    .nav-links a { font-size: 13px; padding: 6px 10px; }

    .footer-info {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
        padding: 44px 28px 36px;
    }

    .footer-logo { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 16px; }
    .footer-tagline { display: none; }
}

@media (max-width: 540px) {
    body > header {
        padding: 0 12px;
        gap: 8px;
        overflow: hidden;
    }

    .logo-container {
        min-width: 34px;
    }

    .logo-link,
    .logo {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .logo-container .home { display: none; }

    .nav-links {
        min-width: 0;
        flex: 1;
        justify-content: flex-end;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .footer-info { grid-template-columns: 1fr; padding: 36px 24px 28px; }
    .footer-logo { grid-column: auto; }
}
