/**
 * EXPMU - Sistema de diseño unificado
 * Centraliza todos los estilos base, colores y componentes globales
 */

/* ============================================
   VARIABLES GLOBALES - Tema Unificado
   ============================================ */

   @import url('lenguaje.css');

:root {
    /* Colores principales - Tema oscuro profesional */
    --primary: #0f172a;
    --primary-dark: #0a0f1f;
    --primary-light: #1e293b;
    --primary-soft: rgba(15, 23, 42, 0.08);
    
    /* Colores secundarios */
    --secondary: #475569;
    --secondary-light: #64748b;
    
    /* Acentos */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.15);
    
    /* Fondos */
    --bg-dark: #0a0c10;
    --bg-header-footer: #0a0c10;
    --bg-main: #eef0f2;
    --bg-card: #ffffff;
    --bg-light: #f8fafc;
    --bg-surface: #f1f5f9;
    
    /* Bordes */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #334155;
    
    /* Textos */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --text-light-muted: #94a3b8;
    
    /* Estados */
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --error: #ef4444;
    --error-soft: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.12);
    
    /* Sombras - Sistema unificado */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    
    /* Bordes redondeados */
    --radius-xs: 0.25rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Tipografía */
    --font-base: 'Montserrat', 'Trebuchet MS', 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 3rem;
    
    /* Z-index */
    --z-header: 100;
    --z-modal: 200;
    --z-tooltip: 300;
    
    /* Imágenes */
    --img-hero: url('../img/bg_full.jpg');
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 3rem 0;
}

main {
    padding-top: 80px;
    min-height: calc(100vh - 200px);
}

@media (max-width: 768px) {
    main {
        padding-top: 64px;
    }
}

/* ============================================
   HEADER - Mejorado
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-header-footer);
    z-index: var(--z-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

@media (max-width: 768px) {
    .header-container {
        height: 64px;
        padding: 0 1rem;
    }
}

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

.header-logo-img {
    height: 50px;
    width: auto;
    transition: transform var(--transition-fast);
    object-fit: contain;
}

@media (max-width: 768px) {
    .header-logo-img {
        height: 40px;
    }
}

.header-logo-img:hover {
    transform: scale(1.02);
}

.header-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .header-logo-text {
        font-size: 1.25rem;
    }
}

.header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
    margin-right: 2rem;
}

@media (max-width: 768px) {
    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        bottom: 0;
        width: 280px;
        background: var(--bg-header-footer);
        flex-direction: column;
        padding: 80px 1.5rem 1.5rem;
        gap: 0.5rem;
        margin: 0;
        transition: right var(--transition);
        z-index: calc(var(--z-header) + 1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .header-nav.open {
        right: 0;
    }
}

.header-nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #d1d5db;
    transition: all var(--transition-fast);
    padding: 0.5rem 0;
    position: relative;
}

.header-nav-link:hover,
.header-nav-link.active {
    color: #ffffff;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.header-nav-link.active::after,
.header-nav-link:hover::after {
    transform: scaleX(1);
}

@media (max-width: 768px) {
    .header-nav-link {
        width: 100%;
        padding: 0.75rem 0;
        font-size: 1rem;
    }
    
    .header-nav-link::after {
        display: none;
    }
    
    .header-nav-link:hover {
        transform: translateX(8px);
    }
}

.header-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .header-toggle {
        display: flex;
    }
}

.header-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-header-footer);
    padding: 1.25rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .footer-left {
        justify-content: center;
    }
}

.footer-icon {
    font-size: 1rem;
    color: var(--primary);
}

.footer-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

.footer-divider {
    font-size: 0.7rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-divider {
        display: none;
    }
}

.footer-description {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   BOTONES - Sistema unificado
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-primary);
    font-weight: 800;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-small {
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
}

/* ============================================
   TARJETAS - Sistema unificado
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-light);
}

.card-header h3, .card-header h4 {
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    animation: slideDown 0.25s ease;
}

.alert-success {
    background: var(--success-soft);
    border-left: 3px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: var(--error-soft);
    border-left: 3px solid var(--error);
    color: var(--error);
}

.alert-warning {
    background: var(--warning-soft);
    border-left: 3px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    color: var(--primary);
}

/* ============================================
   FORMULARIOS - Sistema unificado
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.form-input,
.form-control,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: var(--font-base);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-control:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-input.error,
.form-control.error {
    border-color: var(--error);
}

.form-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.25rem;
    display: none;
}

/* Input con icono */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.input-wrapper .form-input {
    padding-left: 2.25rem;
}

/* ============================================
   TABLAS
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-light);
}

.table tr:hover {
    background: var(--bg-surface);
}

/* ============================================
   MODAL - Sistema unificado
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.2s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   GRIDS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-muted); }

.bg-card { background: var(--bg-card); }
.bg-light { background: var(--bg-light); }
.bg-primary { background: var(--primary); color: white; }
.bg-accent { background: var(--accent); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.5rem; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-error { background: var(--error-soft); color: var(--error); }

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}