@import url('./variables.css');

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-base);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-base); }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* Autofill: evita el fondo azul/amarillo del navegador */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 40px #FFFFFF inset !important;
    -webkit-text-fill-color: var(--color-text-primary) !important;
}

/* Tipografía */
h1, h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-primary);
}

h1 { font-size: 2rem;   margin-bottom: 24px; }
h2 { font-size: 1.75rem; margin-bottom: 20px; }
h3 { font-size: 1.35rem; margin-bottom: 16px; }
h4 { font-size: 1.15rem; margin-bottom: 12px; }

p { margin-bottom: 16px; color: var(--color-text-secondary); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-light); }

/* ─── CORE LAYOUT (header/nav/footer para landing + auth) ─── */

.container {
    width: 92%;
    max-width: 1120px;
    margin: 0 auto;
}

/* Header oscuro para todas las páginas de core/base.html */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 300;
    background: rgba(8,15,30,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    gap: 24px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: #FFFFFF;
    flex-shrink: 0;
    line-height: 1;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    color: rgba(255,255,255,0.60);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 7px 14px;
    border-radius: 8px;
    transition: all 0.18s;
}
.nav a:hover { color: #FFF; background: rgba(255,255,255,0.08); }
.nav .nav-cta {
    color: #FFF !important;
    border: 1.5px solid rgba(255,255,255,0.22);
    border-radius: 100px;
    padding: 7px 20px;
    margin-left: 6px;
    font-weight: 700;
}
.nav .nav-cta:hover { background: #FFF !important; color: #0A1628 !important; border-color: #FFF; }

.boton-menu {
    display: none;
    background: none;
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #FFF;
    border-radius: 8px;
    padding: 8px 11px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.18s;
    align-items: center;
    justify-content: center;
}
.boton-menu:hover { background: rgba(255,255,255,0.07); }

.nav.nav-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 70px 0 auto;
    background: #080F1E;
    padding: 20px 24px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 299;
    gap: 2px;
}
.nav.nav-open a { width: 100%; padding: 12px 16px; font-size: 1rem; border-radius: 10px; }
.nav.nav-open .nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }

.footer {
    background: #040A13;
    padding: 28px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer p { color: rgba(255,255,255,0.30); font-size: 0.82rem; margin: 0; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: rgba(255,255,255,0.30); font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: color 0.18s; }
.footer-links a:hover { color: #FBBF24; }

/* Estructura legacy (algunas vistas internas) */
.cabecera {
    max-width: 100%;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
}

/* Contenedores */
.contenedor { flex: 1; display: flex; flex-direction: column; width: 100%; }
.contenedor-sm { max-width: 600px; margin: 0 auto; padding: 32px 24px; }
.contenedor-md { max-width: 900px; margin: 0 auto; padding: 32px 24px; }

img, svg { max-width: 100%; height: auto; }
.nav-cta { margin-left: 16px; }

.cta-content h3 { color: #FFFFFF; }

@media (max-width: 900px) { .cabecera { padding: 12px 20px; } }
@media (max-width: 768px) {
    .cabecera { padding: 10px 16px; flex-direction: column; gap: 10px; text-align: center; }
    h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
    .logo { justify-content: center; width: 100%; }
    nav ul { justify-content: center; flex-wrap: wrap; }
    .contenedor-sm, .contenedor-md { padding: 20px 16px; }
    .nav-cta { margin-left: 0; }
}
