/* --- NEXUS MASTER STYLESHEET: ULTIMATE DARK EDITION (FIXED) --- */
/* Designed for: MoreInfo, Documentation Pages & Legal Sections */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* --- PALETA DE IDENTIDAD --- */
    --nexus-blue: #A8C7FA;
    --nexus-purple: #C6A7FC;
    --nexus-pink: #F48FB1;
    
    /* --- SUPERFICIES --- */
    --bg-deep: #020202;         /* Fondo base */
    --bg-subtle: #080808;       /* Fondo secundario */
    --bg-card: rgba(255, 255, 255, 0.03); 
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: #0F0F0F;
    
    /* --- BORDES --- */
    --border-dim: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.15);

    /* --- TEXTO --- */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0; 
    --text-tertiary: #666666;
    
    /* --- VARIABLES --- */
    --container-width: 900px;
    --radius-sm: 8px;
    --radius-md: 16px;
}

/* 1. RESET Y BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ocupa toda la altura */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    
    /* Fondo ambiental sutil */
    background-image: radial-gradient(circle at 50% 0%, #111111 0%, var(--bg-deep) 80%);
    background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); border-left: 1px solid var(--border-dim); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Cursores */
body, input, textarea { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23A8C7FA" stroke-width="1.5"><circle cx="12" cy="12" r="6" stroke-opacity="0.8"/></svg>') 12 12, auto; }
a, button, input[type="submit"], .menu-button { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23A8C7FA" stroke="none"><circle cx="12" cy="12" r="4"/></svg>') 12 12, pointer !important; }


/* 2. LAYOUT PRINCIPAL */
main {
    flex: 1; /* Empuja el footer al final */
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}
@media (max-width: 768px) { main { padding: 2rem 1.5rem; } }


/* 3. TIPOGRAFÍA */
h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-top: 1rem; margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FFF 30%, var(--nexus-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-dim);
    color: var(--text-primary);
}
h3 { font-size: 1.4rem; margin-top: 2rem; color: var(--nexus-blue); }
.menu-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 3rem; }
.project-meta { font-family: monospace; font-size: 0.9rem; color: var(--text-tertiary); }
hr { border: 0; height: 1px; background: var(--border-dim); margin: 4rem 0; }


/* 4. COMPONENTES UI */
.back-button {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 20px; margin-bottom: 2rem;
    border-radius: 50px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-dim); color: var(--text-secondary);
    text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.3s;
}
.back-button:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: var(--border-light); }

/* Menú Grid */
.menu-options { display: grid; grid-template-columns: 1fr; gap: 1.5rem; width: 100%; }
@media (min-width: 768px) { 
    .menu-options { grid-template-columns: 1fr 1fr; } 
    .menu-button-full-width { grid-column: 1 / -1; }
}

.menu-button {
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius-md); padding: 2rem;
    text-decoration: none; transition: all 0.3s;
    display: flex; flex-direction: column; justify-content: center; position: relative;
}
.menu-button:hover { transform: translateY(-4px); background: var(--bg-card-hover); border-color: var(--border-light); }
.menu-button h2 { font-size: 1.4rem; margin: 0 0 0.8rem 0; padding: 0; border: none; background: none; -webkit-text-fill-color: initial; color: var(--text-primary); }
.menu-button:hover h2 { color: var(--nexus-blue); }
.menu-button p { font-size: 1rem; color: var(--text-secondary); margin: 0; }

.menu-button-highlighted { background: linear-gradient(145deg, rgba(255,255,255,0.02), rgba(168, 199, 250, 0.04)); border-color: rgba(168, 199, 250, 0.15); }
.menu-button-highlighted:hover { border-color: var(--nexus-blue); box-shadow: 0 0 25px rgba(168, 199, 250, 0.1); }
.highlight-tag { position: absolute; top: 1.2rem; right: 1.2rem; background: rgba(168, 199, 250, 0.1); color: var(--nexus-blue); font-size: 0.75rem; font-weight: 700; padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(168, 199, 250, 0.2); text-transform: uppercase; }

.nexus-description-banner { background: rgba(198, 167, 252, 0.05); border-left: 4px solid var(--nexus-purple); padding: 1.5rem 2rem; margin-bottom: 3rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.nexus-description-banner h2 { font-size: 1.4rem; color: var(--nexus-purple); margin: 0; border: none; padding: 0; }
.nexus-description-banner p { color: var(--text-secondary); margin: 0; }

/* Documentación */
.content-wrapper p { margin-bottom: 1.5rem; color: #B0B0B0; }
.content-wrapper ul { padding-left: 1.5rem; color: #B0B0B0; margin-bottom: 1.5rem; }
.content-wrapper li { margin-bottom: 0.8rem; }
.content-wrapper a { color: var(--nexus-blue); text-decoration: none; }
.content-wrapper a:hover { text-decoration: underline; }
.toc { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: var(--radius-md); padding: 2rem; margin: 2.5rem 0; }
.toc-title { font-size: 1rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-tertiary); margin: 0 0 1rem 0; border: none; }
.toc-link { color: var(--nexus-blue); text-decoration: none; display: block; padding: 4px 0; }
.toc-link:hover { opacity: 0.8; }
.toc-subitem { margin-left: 1.5rem; font-size: 0.95rem; border-left: 1px solid var(--border-dim); padding-left: 1rem; }

/* Tablas */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 2.5rem 0; background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: var(--radius-sm); overflow: hidden; }
th, td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-dim); }
th { background: rgba(255,255,255,0.03); color: var(--nexus-blue); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
tr:last-child td { border-bottom: none; }


/* 5. FORMULARIO DE CONTACTO (FIXED) */
.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.6rem; }
.form-group label { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-left: 4px; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

/* FIX: EVITAR QUE EL TEXTAREA SE ROMPA */
.contact-form textarea {
    resize: vertical; /* Solo permite cambiar altura, no anchura */
    min-height: 120px; /* Altura mínima segura */
    max-height: 400px; /* Altura máxima para no romper layout */
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--nexus-blue);
    box-shadow: 0 0 0 3px rgba(168, 199, 250, 0.1);
    background: #151515;
}

.send-message-button {
    align-self: flex-start;
    background: var(--nexus-blue);
    color: #000;
    font-weight: 700;
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    display: flex; align-items: center; gap: 10px;
    transition: all 0.3s;
}
.send-message-button:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(168, 199, 250, 0.4); background: #FFF; }


/* 6. FOOTER (FIXED & LEGAL INCLUDED) */
.advanced-footer {
    width: 100%;
    border-top: 1px solid var(--border-dim);
    background: #000; /* Fondo negro sólido para separar visualmente */
    padding: 4rem 2rem 2rem;
    margin-top: auto; /* Sticky footer */
    flex-shrink: 0;
}

.footer-grid-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-grid-container {
        grid-template-columns: 2fr 1fr 1fr; /* Estructura 2-1-1 */
        text-align: left;
    }
}

.footer-brand h3 {
    font-size: 1.8rem; margin: 0 0 0.5rem 0; border: none;
    background: linear-gradient(90deg, #FFF, var(--nexus-purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-brand p { font-size: 0.95rem; color: var(--text-tertiary); margin: 0; }

.footer-links h3, .footer-social h3 {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-secondary); margin: 0 0 1.5rem 0; border: none;
}

.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a {
    color: var(--text-tertiary); text-decoration: none; transition: color 0.2s; font-size: 0.95rem; display: block;
}
.footer-links a:hover { color: var(--nexus-blue); }

.social-icons { display: flex; gap: 1.2rem; justify-content: center; }
@media (min-width: 768px) { .social-icons { justify-content: flex-start; } }

.social-icons a { color: var(--text-tertiary); font-size: 1.4rem; transition: all 0.3s; }
.social-icons a:hover { color: var(--text-primary); transform: translateY(-3px); }

.footer-bottom {
    max-width: var(--container-width);
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-dim);
    text-align: center;
    font-size: 0.85rem;
    color: #444;
}

/* Toast */
#notification-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.nexus-toast { background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--border-light); color: #FFF; padding: 16px 24px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); font-size: 0.95rem; font-weight: 500; transform: translateX(120%); transition: transform 0.4s; }
.nexus-toast.show { transform: translateX(0); }
.nexus-toast.error { border-color: #ff6b6b; color: #ffcccc; }