/* =======================================================
   VARIABLES Y CONFIGURACIÓN GENERAL
   ======================================================= */
:root {
    --amarillo: #FFD700;
    --azul: #000080;
    --blanco: #ffffff;
    --gris: #f4f4f4;
    --texto-oscuro: #333333;
    --sombra: 0 10px 25px rgba(0,0,0,0.1);
}

/* Enlace para saltar al contenido (accesibilidad) */
.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    background: var(--amarillo);
    color: var(--azul);
    padding: 8px 12px;
    z-index: 999;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
    border-radius: 6px;
}

/* Mejora de foco para accesibilidad */
:focus-visible {
    outline: 3px solid var(--amarillo);
    outline-offset: 3px;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--gris);
    color: var(--texto-oscuro);
    scroll-behavior: smooth;
}

.container { 
    width: 90%; 
    max-width: 1100px; 
    margin: 0 auto; 
}

/* --- ANIMACIÓN DE ENTRADA --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================================
   HEADER Y NAVEGACIÓN (INDEX)
   ======================================================= */
header {
    background: var(--azul);
    color: var(--blanco);
    padding: 12px 0;
    border-bottom: 4px solid var(--amarillo);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo-wrapper { 
    display: block;
}

/* Brand row: ABRAHAM [logo] LINCOLN */
.brand-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.brand-left, .brand-right {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--amarillo);
    font-size: 0.95rem;
}
.brand-left { text-align: right; }
.brand-right { text-align: left; }
.center-logo { display: block; margin: 0 auto; height: 56px; }

/* Auth brand variant */
.auth-brand .brand-left, .auth-brand .brand-right { color: rgba(255,255,255,0.9); font-size: 1rem; }
.auth-brand .center-logo { height: 72px; }

@media (max-width: 768px) {
    .brand-row { grid-template-columns: auto; justify-items: center; }
    .brand-left, .brand-right { display: none; }
    .center-logo { height: 56px; }
}

.nav-logo { 
    height: 40px; 
    width: auto; 
}

header h1 { 
    color: var(--amarillo); 
    font-size: 1.2rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.nav-menu { 
    list-style: none; 
    display: flex; 
    align-items: center; 
}

.nav-menu li { 
    margin-left: 20px; 
}

.nav-menu a { 
    color: white; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 0.85rem; 
    transition: 0.3s; 
}

.nav-menu a:hover { 
    color: var(--amarillo); 
}

.menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    color: var(--amarillo); 
    font-size: 1.8rem; 
    cursor: pointer; 
}

/* BOTONES DE NAV ESPECIALES */
.btn-nav-auth {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--amarillo);
}

.btn-nav-auth.highlight {
    background-color: var(--amarillo);
    color: var(--azul) !important;
}

/* =======================================================
   SECCIÓN HERO Y CONTENIDO
   ======================================================= */
.hero {
    background: linear-gradient(rgba(0,0,128,0.8), rgba(0,0,128,0.8)), 
                url('https://images.unsplash.com/photo-1523050853063-bd8012fec059?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h2 { color: var(--amarillo); font-size: 2.5rem; margin-bottom: 10px; }

.btn-principal {
    display: inline-block;
    background: var(--amarillo);
    color: var(--azul);
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 25px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-principal:hover {
    transform: scale(1.05);
}

.info-section { padding: 60px 0; text-align: center; }
.info-section h3 { margin-bottom: 30px; font-size: 2rem; color: var(--azul); }

.oferta-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
}

.card { 
    background: white; 
    padding: 30px; 
    border-radius: 8px; 
    border-top: 6px solid var(--amarillo); 
    box-shadow: var(--sombra); 
}

.alternate-bg { background: var(--azul); color: white; }
.alternate-bg h3 { color: var(--amarillo); }

footer { 
    background: #111; 
    color: white; 
    text-align: center; 
    padding: 25px 0; 
    border-top: 3px solid var(--amarillo); 
    font-size: 0.9rem; 
}

/* =======================================================
   PÁGINAS DE INICIAR SESIÓN Y REGISTRO
   ======================================================= */
.auth-page {
    background: linear-gradient(135deg, var(--azul) 0%, #000040 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: var(--blanco);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out; /* Animación de entrada */
}

/* CABECERA DEL LOGO EN AUTH */
.auth-header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 30px;
}

.auth-logo-img {
    height: 45px;
    width: auto;
    margin-right: 12px;
}

.logo-text-split {
    font-weight: 800;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.text-yellow { color: var(--amarillo); }
.text-blue { color: var(--azul); }

/* FORMULARIOS LIMPIOS */
.auth-container input {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.auth-container input:focus {
    outline: none;
    border-color: var(--amarillo);
    background-color: #fffdf0;
}

.btn-auth {
    width: 100%;
    background: var(--azul);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
}

.btn-auth:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.auth-container hr {
    margin: 25px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* =======================================================
   RESPONSIVO (CELULARES)
   ======================================================= */
@media (max-width: 768px) {
    .nav-menu { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--azul); 
        padding: 20px; 
        border-bottom: 4px solid var(--amarillo);
    }
    
    .nav-menu.active { display: flex; }
    .nav-menu li { margin: 10px 0; text-align: center; }
    .menu-toggle { display: block; }
    
    header h1 { font-size: 1rem; }
    .hero h2 { font-size: 1.8rem; }
    
    .auth-container {
        padding: 40px 25px;
    }
}

/* =======================================================
   MEJORAS VISUALES GENERALES Y MODAL DE BIENVENIDA
   ======================================================= */

body {
    color: var(--texto-oscuro);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Botones más modernos */
.btn-principal, .btn-auth, .btn-nav-auth {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-principal:hover, .btn-auth:hover, .btn-nav-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Greeting in nav */
.nav-user .greeting {
    margin-right: 10px;
    color: var(--blanco);
    font-weight: 700;
}

/* Mejor apariencia de auth container */
.auth-container {
    border: 1px solid rgba(0,0,0,0.06);
}

.auth-container input {
    background: #fafafa;
}

/* Nuevo diseño para auth pages */
.auth-page {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, rgba(0,0,128,0.05), rgba(0,0,0,0.02));
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 360px 420px;
    gap: 28px;
    align-items: stretch;
    width: 100%;
    max-width: 920px;
}

.auth-hero {
    background: linear-gradient(135deg, rgba(0,0,128,0.95), rgba(0,0,200,0.85));
    color: white;
    padding: 28px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.auth-hero-logo { height: 80px; margin-bottom: 12px; }
.auth-hero h3 { margin: 6px 0 4px; font-size: 1.25rem; }
.auth-hero p { opacity: 0.95; font-size: 0.95rem; }

.auth-form {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.auth-form h2 { margin: 0 0 6px; }
.muted { color: #666; font-size: 0.95rem; margin-bottom: 12px; }
.back-link { color: #999; font-size: 0.9rem; margin-top: 12px; display: inline-block; }
.form-note { margin-top: 12px; color: red; min-height: 1.2em; }

.form-group { position: relative; margin-bottom: 12px; }
.form-group input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #eee; font-size: 0.98rem; }
.form-group input:focus { border-color: var(--amarillo); background: #fffdf6; }

.password-group .pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; cursor: pointer; font-size: 0.95rem; }

.btn-auth { padding: 12px 14px; border-radius: 10px; font-weight: 700; }

@media (max-width: 900px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-hero { order: -1; }
}

/* Tarjetas y secciones */
.card h4 { color: var(--azul); }

/* Bienvenida modal */
.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.welcome-modal {
    background: rgba(255,255,255,0.9);
    color: var(--texto-oscuro);
    padding: 28px 26px;
    border-radius: 12px;
    max-width: 520px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
    backdrop-filter: blur(4px);
    position: relative;
    opacity: 0.98;
}
.welcome-modal p { font-size: 1rem; line-height: 1.4; }
.welcome-modal .close-welcome {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #333;
}
.welcome-modal .close-welcome:focus { outline: none; }

@media (max-width: 480px) {
    .welcome-modal { padding: 20px; }
}

