/**
 * Blog UAS - Estilos Principales v3.0
 * Diseno profesional con identidad UAS
 */

/* ==========================================
   VARIABLES Y RESET
   ========================================== */
:root {
    /* Colores UAS */
    --primary: #1a3a8f;
    --primary-dark: #0f2460;
    --primary-light: #2a4a9f;
    --gold: #c4a44a;
    --gold-light: #d4b85a;
    --yellow: #f0e547;
    
    /* Colores neutrales */
    --text: #2d2d2d;
    --text-light: #666666;
    --text-muted: #999999;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-dark: #1a1a2e;
    --border: #e5e7eb;
    
    /* Estados */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.15);
    
    /* Tipografia */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    
    /* Tamanos */
    --max-width: 1200px;
    --content-width: 720px;
    --radius: 8px;
    --radius-lg: 12px;
    
    /* Transiciones */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ==========================================
   TIPOGRAFIA
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

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

p {
    margin-bottom: 1rem;
}

.text-primary { color: var(--primary); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ==========================================
   LAYOUT
   ========================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--bg-alt);
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    box-shadow: var(--shadow);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

/* Dropdown de categorías */
.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 12px 0;
    margin-top: 8px;
    z-index: 1000;
    border: 1px solid rgba(26, 58, 143, 0.1);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(26, 58, 143, 0.08) 0%, transparent 100%);
    color: var(--primary);
    padding-left: 24px;
}

/* Ocultar elementos móviles en desktop */
.nav-mobile-only {
    display: none;
}

/* Ocultar elementos desktop en móvil */
.nav-desktop-only {
    display: block;
}

/* Tarjetas de categorías para móvil - Ocultas por defecto */
.mobile-categories-label,
.mobile-categories-grid {
    display: none;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Menu movil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: var(--transition);
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

.btn-secondary {
    background: var(--primary);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--gold);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(0,0,0,0.05);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ==========================================
   HERO
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    line-height: 1.7;
    font-style: italic;
}

/* Logos antiguos - OCULTOS (usar background-glass-container en su lugar) */
.hero-logo {
    display: none;
}

/* Responsive para logos */
@media (max-width: 1200px) {
    .glass-panel img {
        width: 100px;
    }
    .glass-panel {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .hero-logo {
        display: none; /* Ocultar en tablets y móviles para no saturar */
    }
}

/* ==========================================
   CARDS DE ARTICULOS
   ========================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.article-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.article-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: var(--gold);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.article-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: var(--transition);
}

.article-card:hover .article-card-title {
    color: var(--primary);
}

.article-card-excerpt {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.article-card-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
}

.author-title {
    font-size: 12px;
    color: var(--text-muted);
}

.article-card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.article-card-link:hover {
    color: var(--gold);
}

/* ==========================================
   PAGINA DE ARTICULO
   ========================================== */
.article-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
    color: white;
}

.article-category {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gold);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 20px;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    margin-bottom: 24px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.article-cover {
    margin: -60px 0 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.article-cover img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-content {
    padding: 40px 0;
}

.article-body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: #374151;
    text-align: left !important;
    text-justify: auto !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

.article-body * {
    text-align: left !important;
    text-justify: auto !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

.article-body h2 {
    margin-top: 32px;
    margin-bottom: 14px;
}

.article-body h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.article-body p {
    margin-bottom: 16px;
    text-align: left !important;
}

.article-body blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--bg-alt);
    border-left: 4px solid var(--gold);
    font-style: italic;
    color: var(--text-light);
}

/* ==========================================
   INVESTIGADORES
   ========================================== */
.researchers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.researcher-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
}

.researcher-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.researcher-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    overflow: hidden;
}

.researcher-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.researcher-initials {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.researcher-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.researcher-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.researcher-specialization {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gold);
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 16px;
}

.researcher-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ==========================================
   FORMULARIOS
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 164, 74, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.form-checkbox input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--gold);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-error {
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
}

/* Grid responsive de categorías */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.category-checkbox {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-checkbox:hover {
    border-color: var(--primary);
    background: var(--bg-alt);
}

.category-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.category-checkbox input:checked + span {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   SUBSCRIBE BOX
   ========================================== */
.subscribe-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    color: white;
}

.subscribe-box h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.subscribe-box p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
}

.subscribe-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
}

.subscribe-form button {
    white-space: nowrap;
}

/* ==========================================
   FILTROS
   ========================================== */
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-about {
    font-size: 14px;
    line-height: 1.7;
}

.footer-title {
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* ==========================================
   ALERTAS
   ========================================== */
.alert {
    padding: 0;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    overflow: hidden;
    animation: slideIn 0.4s ease;
}

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

.alert-success {
    background: #10b981;
    color: white;
}

.alert-success::before {
    content: '';
    display: inline-block;
    width: 48px;
    height: 100%;
    background: rgba(0,0,0,0.1);
    vertical-align: middle;
    margin-right: 16px;
}

.alert-error {
    background: #ef4444;
    color: white;
}

.alert-warning {
    background: #f59e0b;
    color: white;
}

.alert-info {
    background: #3b82f6;
    color: white;
}

.alert > div {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert svg {
    flex-shrink: 0;
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ==========================================
   UTILIDADES
   ========================================== */
.hidden { display: none !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }

/* ==========================================
   ADMIN LAYOUT
   ========================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-alt);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    font-size: 1rem;
    font-weight: 700;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-link-icon {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.sidebar-section {
    padding: 20px 24px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
}

.admin-header {
    background: white;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-family: var(--font-sans);
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 20px;
}

.admin-main {
    padding: 32px;
}

.admin-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.admin-card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    margin: 0;
}

.admin-card-body {
    padding: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-alt);
}

.admin-table td {
    font-size: 14px;
}

.admin-table tbody tr:hover {
    background: var(--bg-alt);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 4px;
    color: var(--primary);
    font-family: var(--font-sans);
}

.stat-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Editor Grid */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.editor-main {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.editor-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.editor-card h3 {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch input[type="checkbox"] {
    width: 48px;
    height: 26px;
    appearance: none;
    background: var(--border);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch input[type="checkbox"]:checked {
    background: var(--success);
}

.toggle-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle-switch input[type="checkbox"]:checked::before {
    left: 24px;
}

/* Image Preview */
.image-preview {
    width: 100%;
    height: 150px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Photo Preview */
.photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

/* Researcher Row */
.researcher-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.researcher-row-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.researcher-row-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stat Inline */
.stat-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-alt);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
}

.stat-inline strong {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Admin Sidebar Overlay */
.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Navbar movil */
    .navbar-nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
        border-top: 2px solid var(--primary);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }
    
    .navbar-nav.active {
        display: flex;
    }
    
    .navbar-nav li {
        border-bottom: 1px solid var(--border);
        width: 100%;
    }
    
    /* Remover borde y estilos del contenedor de tarjetas */
    .navbar-nav li.mobile-categories-container {
        border-bottom: none;
        list-style: none;
        padding: 0;
    }
    
    .nav-link {
        display: block;
        padding: 14px 0;
        width: 100%;
    }
    
    /* Mostrar elementos móviles */
    .nav-mobile-only {
        display: block;
    }
    
    /* Ocultar elementos desktop */
    .nav-desktop-only {
        display: none;
    }
    
    /* Ocultar dropdown en móvil - ahora usamos tarjetas */
    .nav-dropdown {
        display: none;
    }
    
    /* Botón toggle de categorías en móvil */
    .mobile-categories-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        user-select: none;
    }
    
    .mobile-categories-toggle .toggle-icon {
        font-size: 12px;
        transition: transform 0.3s ease;
    }
    
    .mobile-categories-container.active .mobile-categories-toggle .toggle-icon {
        transform: rotate(180deg);
    }
    
    /* Ocultar tarjetas de categorías por defecto en móvil */
    .mobile-categories-grid {
        display: none;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 8px 20px 16px 20px;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    
    /* Mostrar tarjetas cuando el contenedor está activo */
    .mobile-categories-container.active .mobile-categories-grid {
        display: grid;
        max-height: 1000px;
        opacity: 1;
    }
    
    .category-card-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 16px 12px;
        background: linear-gradient(135deg, var(--cat-color) 0%, var(--cat-color) 100%);
        border-radius: 12px;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        min-height: 80px;
        position: relative;
        overflow: hidden;
    }
    
    .category-card-mobile::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .category-card-mobile:active::before {
        opacity: 1;
    }
    
    .category-card-mobile .category-name {
        font-size: 13px;
        font-weight: 600;
        color: white;
        text-shadow: 0 1px 3px rgba(0,0,0,0.3);
        line-height: 1.3;
        z-index: 1;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .navbar-actions {
        display: none;
    }
    
    /* Admin sidebar movil */
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-overlay.active {
        display: block;
    }
    
    .sidebar-close {
        display: block;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-menu-toggle {
        display: block;
    }
    
    .admin-header {
        padding: 16px 20px;
    }
    
    .admin-header h1 {
        font-size: 1.25rem;
    }
    
    .admin-main {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    /* Hero */
    .hero {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    /* Grids */
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .researchers-grid {
        grid-template-columns: 1fr;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Reducir tamaño de fuente en tablets */
    .article-body {
        font-size: 15px;
        line-height: 1.72;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    /* Reducir más para móviles pequeños */
    .article-body {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .admin-card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .subscribe-box {
        padding: 32px 20px;
    }
}
/* ============================================
   CORRECCIONES Y MEJORAS v3.2
   Agregar al final del style.css principal
   ============================================ */

/* ============================================
   CORRECCIÓN: Espaciado de párrafos en PC
   ============================================ */
.article-body p {
    margin-bottom: 16px; /* Reducido de 24px */
}

.article-body h2 {
    margin-top: 32px; /* Reducido de 48px */
    margin-bottom: 16px;
}

.article-body h3 {
    margin-top: 24px; /* Reducido de 36px */
    margin-bottom: 12px;
}

/* ============================================
   CORRECCIÓN: Títulos de artículos clickeables
   ============================================ */
.article-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: var(--primary);
}

.article-card-image-link {
    display: block;
    text-decoration: none;
}

/* ============================================
   CORRECCIÓN: Nombres de investigadores clickeables
   ============================================ */
.researcher-link,
.author-name-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.researcher-link:hover,
.author-name-link:hover {
    color: var(--primary);
}

.author-name-link {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

/* Header del artículo - nombre clickeable */
.author-name-header {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.author-name-header:hover {
    opacity: 0.8;
}

.author-avatar-link {
    text-decoration: none;
}

/* ============================================
   PDF BOX - Con botón de vista previa
   ============================================ */
.pdf-box {
    background: linear-gradient(135deg, #1a3a8f 0%, #2d5aa8 100%);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pdf-icon {
    flex-shrink: 0;
}

.pdf-info {
    flex: 1;
    min-width: 200px;
}

.pdf-title {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.pdf-filename {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-top: 4px;
}

.pdf-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-pdf-preview {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-pdf-preview:hover {
    background: rgba(255,255,255,0.25);
}

.btn-pdf-download {
    background: white;
    color: #1a3a8f;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-pdf-download:hover {
    background: #f0f0f0;
}

/* ============================================
   ARTÍCULO - Secciones estilizadas
   ============================================ */
.article-abstract {
    background: var(--bg-alt);
    padding: 24px;
    border-left: 4px solid var(--gold);
    margin-bottom: 32px;
    border-radius: 0 8px 8px 0;
}

.article-abstract .abstract-label {
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.article-abstract p {
    margin: 0;
    color: var(--text-light);
    font-style: italic;
}

.article-video-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-video-section h3 {
    margin-bottom: 16px;
}

.video-timestamps {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

.article-references {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-references h3 {
    margin-bottom: 16px;
}

.references-content {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

.article-doi {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-alt);
    border-radius: 8px;
    font-size: 14px;
}

.article-doi a {
    color: var(--primary);
}

.article-keywords {
    margin-top: 16px;
}

.article-keywords strong {
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: var(--bg-alt);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
    margin-top: 40px;
    padding: 32px;
    background: var(--bg-alt);
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.author-box-avatar {
    flex-shrink: 0;
    text-decoration: none;
}

.author-box-content {
    flex: 1;
    min-width: 200px;
}

.author-box-content h4 {
    margin-bottom: 4px;
}

.author-box-content h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-box-content h4 a:hover {
    color: var(--primary);
}

.author-bio {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 12px;
    line-height: 1.6;
}

.author-links {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.share-buttons {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-buttons span {
    font-weight: 600;
}

/* ============================================
   BOTONES DEL HERO - RESPONSIVE
   ============================================ */
.hero-buttons {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary);
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */
@media (max-width: 768px) {
    /* Botones del hero */
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* PDF box en móvil */
    .pdf-box {
        flex-direction: column;
        text-align: center;
    }
    
    .pdf-actions {
        width: 100%;
        justify-content: center;
    }
    
    .pdf-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Author box en móvil */
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-links {
        justify-content: center;
    }
    
    /* Espaciado de contenido en móvil */
    .article-body {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .article-body p {
        margin-bottom: 14px;
    }
    
    /* Formulario de suscripción */
    .subscribe-form {
        flex-direction: column;
    }
    
    .subscribe-form input,
    .subscribe-form button {
        width: 100%;
    }
}

/* ============================================
   NAVBAR - Botón suscribirse en móvil
   ============================================ */
@media (max-width: 768px) {
    .navbar-actions {
        display: none;
    }
    
    /* Agregar suscribirse al menú móvil */
    .navbar-nav.active .nav-subscribe-mobile {
        display: block;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(0,0,0,0.1);
    }
}

/* ============================================
   INVESTIGADORES - Cards clickeables
   ============================================ */
.researcher-card {
    cursor: default;
}

.researcher-name a {
    color: inherit;
    text-decoration: none;
}

.researcher-name a:hover {
    color: var(--primary);
}

/* ============================================
   UTILITY: Botón block
   ============================================ */
.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   PARCHE CSS - TABLAS RESPONSIVAS v5.0
   ============================================


/* ============================================
   WRAPPER PARA TABLAS RESPONSIVAS
   ============================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Indicador visual de scroll */
.table-responsive::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.table-responsive.has-scroll::after {
    opacity: 1;
}

/* ============================================
   TABLA ADMIN - ANCHO MÍNIMO FIJO
   ============================================ */
.admin-table {
    width: 100%;
    min-width: 800px; /* ESTO EVITA QUE SE CORTE */
    border-collapse: collapse;
    table-layout: fixed; /* Columnas de ancho fijo */
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap; /* Evita saltos de línea */
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-alt);
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table td {
    font-size: 14px;
}

.admin-table tbody tr:hover {
    background: var(--bg-alt);
}

/* ============================================
   COLUMNA ACCIONES - SIEMPRE VISIBLE
   ============================================ */
.admin-table th:last-child,
.admin-table td:last-child {
    position: sticky;
    right: 0;
    background: white;
    min-width: 150px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}

.admin-table th:last-child {
    background: var(--bg-alt);
}

.admin-table tbody tr:hover td:last-child {
    background: var(--bg-alt);
}

/* Clase específica para columna de acciones */
.actions-col {
    min-width: 150px;
    text-align: right;
}

.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

/* ============================================
   ANCHOS DE COLUMNAS ESPECÍFICOS
   ============================================ */
/* Primera columna (título/nombre) más ancha */
.admin-table th:first-child,
.admin-table td:first-child {
    min-width: 200px;
    max-width: 300px;
}

/* Columnas de estado/badges */
.admin-table td .badge {
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE MÓVIL
   ============================================ */
@media (max-width: 992px) {
    .admin-table {
        min-width: 700px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .admin-table th:first-child,
    .admin-table td:first-child {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .admin-table {
        min-width: 600px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .actions .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ============================================
   STATS GRID RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ADMIN GRID RESPONSIVE
   ============================================ */
.admin-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   EDITOR GRID RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar {
        order: -1;
    }
}
