/* Variables CSS para temas */
:root {
    /* Colores modo claro */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-header: linear-gradient(45deg, #2c3e50, #3498db);
    --bg-footer: #2c3e50;
    
    --text-primary: #2c3e50;
    --text-secondary: #555555;
    --text-light: #666666;
    --text-white: #ffffff;
    
    --border-color: #e9ecef;
    --border-light: #dddddd;
    --border-focus: #3498db;
    
    --shadow-light: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-card: 0 20px 40px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    
    --accent-blue: #3498db;
    --accent-blue-hover: #2980b9;
    --accent-green: #27ae60;
    --accent-green-hover: #219a52;
    --accent-purple: #667eea;
    --accent-gradient: linear-gradient(45deg, #667eea, #764ba2);
}

/* Variables modo oscuro */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-secondary: #1e1e2e;
    --bg-card: #2a2a3e;
    --bg-header: linear-gradient(45deg, #1a1a2e, #2c3e50);
    --bg-footer: #1a1a2e;
    
    --text-primary: #e8e8f0;
    --text-secondary: #b8b8c8;
    --text-light: #a0a0b0;
    --text-white: #ffffff;
    
    --border-color: #3a3a4e;
    --border-light: #4a4a5e;
    --border-focus: #667eea;
    
    --shadow-light: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-card: 0 20px 40px rgba(0,0,0,0.25);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.35);
    
    --accent-blue: #667eea;
    --accent-blue-hover: #5a6fd8;
    --accent-green: #2ecc71;
    --accent-green-hover: #27ae60;
    --accent-purple: #764ba2;
    --accent-gradient: linear-gradient(45deg, #667eea, #764ba2);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Header */
.header {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 30px;
    position: relative;
    transition: background 0.3s ease;
}

.logos-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    gap: 30px;
}

.header-content {
    flex: 1;
    text-align: center;
}

.logo {
    flex-shrink: 0;
}

/* Placeholder para logos durante desarrollo */
.logo-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--text-white);
    transition: all 0.3s ease;
}

.logo-placeholder:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.logo-img {
    height: 120px;  /* Aumenté el tamaño */
    width: auto;
    max-width: 200px;  /* Aumenté el ancho máximo */
    object-fit: contain;
    /* filter: brightness(0) invert(1); */  /* Comenté el filtro que los hacía blancos */
    transition: all 0.3s ease;
}

.logo-img:hover {
    /* filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.5)); */  /* Comenté el hover también */
    transform: scale(1.05);  /* Añadí un efecto de escala en hover */
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h2 {
    font-size: 1.4em;
    margin-bottom: 3px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.header h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 400;
    opacity: 0.9;
}

.header p {
    font-size: 1em;
    opacity: 0.8;
}

/* Controles del header */
.header-controls {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--text-white);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.login-icon {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--text-white);
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.login-icon:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.login-symbol {
    font-size: 1.4em;
    transition: transform 0.3s ease;
}

.login-icon:hover .login-symbol {
    transform: scale(1.1);
}

.login-btn {
    background: rgba(255,255,255,0.9);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Filtros */
.filters {
    padding: 30px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.filter-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

select, input {
    padding: 10px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Estados de carga */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 30px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 30px;
    text-align: center;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.retry-btn, .clear-filters-btn {
    background: var(--accent-blue);
    color: var(--text-white);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.retry-btn:hover, .clear-filters-btn:hover {
    background: var(--accent-blue-hover);
}

/* Grid de perfiles */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    padding: 30px;
    align-items: start;
}

.profile-card {
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.profile-header {
    background: var(--accent-gradient);
    color: var(--text-white);
    padding: 20px;
    text-align: center;
}

.profile-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    border: 2px solid rgba(255,255,255,0.5);
}

.profile-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-subtitle {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.profile-area {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-block;
}

.profile-body {
    padding: 20px;
}

.section {
    margin-bottom: 20px;
}

.section-title {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1em;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 5px;
}

.section-content {
    color: var(--text-secondary);
    line-height: 1.4;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.videos-section, .tesis-section {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

.video-item, .tesis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.video-item:last-child, .tesis-item:last-child {
    border-bottom: none;
}

.btn {
    background: var(--accent-blue);
    color: var(--text-white);
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s ease;
}

.btn:hover {
    background: var(--accent-blue-hover);
}

.btn-download {
    background: var(--accent-green);
}

.btn-download:hover {
    background: var(--accent-green-hover);
}

.contact-info {
    background: var(--bg-footer);
    color: var(--text-white);
    padding: 15px;
    text-align: center;
    font-weight: 500;
}

.academic-links {
    margin-top: 8px;
    font-weight: 400;
    font-size: 0.85em;
}

.academic-links a {
    color: var(--text-white);
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 80px 30px;
    color: var(--text-light);
}

.no-results-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ========================
   ESTILOS PARA LOGIN Y SOLICITUDES
   ======================== */

/* Container principal para páginas de login */
.login-container {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

/* Header simplificado del login */
.login-header {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: background 0.3s ease;
}

.back-button {
    flex: 1;
}

.back-link {
    display: flex;
    align-items: center;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.back-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(-3px);
}

.back-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.login-header .header-content {
    flex: 2;
    text-align: center;
}

.login-header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
    font-weight: 600;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.95em;
}

.theme-control {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Contenido principal del login */
.login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s ease;
}

.request-card {
    max-width: 600px;
}

.login-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-form-header h2 {
    color: var(--text-primary);
    font-size: 1.6em;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-form-header p {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* Formularios */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1em;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

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

/* Input de contraseña con toggle */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    flex: 1;
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 5px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* Errores de validación */
.form-error {
    color: #e74c3c;
    font-size: 0.85em;
    display: none;
    margin-top: 4px;
}

/* Mensajes de estado */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Botones */
.login-btn {
    background: var(--accent-gradient);
    color: var(--text-white);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.request-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.request-btn:hover:not(:disabled) {
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

/* Footer del login */
.login-footer {
    margin-top: 30px;
    text-align: center;
}

.divider {
    margin: 20px 0;
    position: relative;
    color: var(--text-light);
    font-size: 0.9em;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
    z-index: 1;
}

.divider span {
    background: var(--bg-card);
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.request-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-blue);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.request-account-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.help-text {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.help-text p {
    color: var(--text-light);
    font-size: 0.85em;
    margin-bottom: 8px;
}

.help-text code {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.help-text a {
    color: var(--accent-blue);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* Caja de información */
.info-box {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.info-box h4 {
    color: var(--text-primary);
    font-size: 1em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Footer de la página */
.login-page-footer {
    background: var(--bg-footer);
    color: var(--text-white);
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.login-page-footer p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Responsive para login */
@media (max-width: 768px) {
    .login-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .back-button,
    .theme-control {
        order: 2;
    }
    
    .login-header .header-content {
        order: 1;
    }
    
    .login-content {
        padding: 20px 15px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .login-header h1 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 15px;
        margin: 0 10px;
    }
    
    .login-form {
        gap: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
    }
}
.footer {
    background: var(--bg-footer);
    color: var(--text-white);
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    border-radius: 15px;
    transition: background 0.3s ease;
}

.footer-content p {
    margin-bottom: 5px;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .logos-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .header h2 {
        font-size: 1.2em;
    }
    
    .header h3 {
        font-size: 1em;
    }
    
    .header-controls {
        position: static;
        justify-content: center;
        margin-top: 20px;
    }
    
    .profiles-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile-card {
        margin: 0 -10px;
    }
    
    .filters {
        padding: 20px;
    }
    
    .header {
        padding: 20px;
    }
}

/* Estilos adicionales para múltiples áreas - Agregar a styles.css */

/* Contenedor de múltiples áreas en el header del perfil */
.profile-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    min-height: 32px;
}

/* Tag individual para cada área */
.area-tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.area-tag:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.05);
}

/* Cuando solo hay una área, mantener el estilo original */
.profile-area:not(:has(.area-tag)) {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-block;
}

/* Responsive: En móviles, centrar mejor las áreas */
@media (max-width: 768px) {
    .profile-area {
        gap: 6px;
    }

    .area-tag {
        font-size: 0.8em;
        padding: 3px 10px;
    }
}

@media (max-width: 480px) {
    .profile-area {
        gap: 4px;
        margin-top: 8px;
    }

    .area-tag {
        font-size: 0.75em;
        padding: 2px 8px;
    }
}

/* ========================
 *  ESTILOS PARA ACORDEÓN DE TESIS
 *  Agregar al final de styles.css
 *  ======================== */

/* Header del acordeón */
.thesis-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.thesis-accordion-header:hover {
    background-color: rgba(102, 126, 234, 0.05);
    padding-left: 8px;
    padding-right: 8px;
}

.thesis-accordion-header.active {
    background-color: rgba(102, 126, 234, 0.1);
    padding-left: 8px;
    padding-right: 8px;
}

.thesis-accordion-header .section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.1em;
    flex: 1;
}

/* Flecha del acordeón */
.accordion-arrow {
    font-size: 0.8em;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
    font-weight: bold;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* Contenido del acordeón */
.thesis-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
    padding: 0;
    margin: 0;
}

.thesis-accordion-content.open {
    max-height: 280px;
    overflow-y: auto;
    padding-top: 8px;
    margin-top: 5px;
}

/* Ajuste de la sección de tesis para el acordeón */
.tesis-section {
    background: var(--bg-secondary);
    padding: 10px 12px;
    border-radius: 10px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Elementos de tesis dentro del acordeón */
.thesis-accordion-content .tesis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    animation: fadeInSlide 0.3s ease forwards;
    opacity: 0;
    transform: translateY(-10px);
}

.thesis-accordion-content.open .tesis-item {
    animation-delay: calc(var(--item-index, 0) * 0.1s);
}

.thesis-accordion-content .tesis-item:nth-child(1) { --item-index: 0; }
.thesis-accordion-content .tesis-item:nth-child(2) { --item-index: 1; }
.thesis-accordion-content .tesis-item:nth-child(3) { --item-index: 2; }
.thesis-accordion-content .tesis-item:nth-child(4) { --item-index: 3; }
.thesis-accordion-content .tesis-item:nth-child(5) { --item-index: 4; }

.thesis-accordion-content .tesis-item:last-child {
    border-bottom: none;
}

/* Animaciones */
@keyframes fadeInSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados hover para mejor UX */
.thesis-accordion-header:hover .accordion-arrow {
    color: var(--accent-blue-hover);
    transform: scale(1.1);
}

.thesis-accordion-header.active:hover .accordion-arrow {
    transform: rotate(90deg) scale(1.1);
}

/* Indicador visual de que es clickeable */
.thesis-accordion-header::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-blue);
    transition: height 0.3s ease;
    border-radius: 2px;
}

.thesis-accordion-header.active::before {
    height: 20px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .thesis-accordion-header {
        padding: 8px 0;
    }

    .thesis-accordion-header:hover,
    .thesis-accordion-header.active {
        padding-left: 6px;
        padding-right: 6px;
    }

    .accordion-arrow {
        font-size: 0.7em;
        width: 18px;
        height: 18px;
    }

    .thesis-accordion-content .tesis-item {
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .thesis-accordion-content .tesis-item .btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .thesis-accordion-header .section-title {
        font-size: 1em;
    }

    .accordion-arrow {
        font-size: 0.6em;
        width: 16px;
        height: 16px;
    }

    .thesis-accordion-content.open {
        max-height: 240px;
    }
}

/* Modo oscuro */
[data-theme="dark"] .thesis-accordion-header:hover {
    background-color: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .thesis-accordion-header.active {
    background-color: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .accordion-arrow {
    color: var(--accent-purple);
}

[data-theme="dark"] .thesis-accordion-header:hover .accordion-arrow {
    color: #a78bfa;
}

[data-theme="dark"] .thesis-accordion-header::before {
    background: var(--accent-purple);
}

/* Accesibilidad */
.thesis-accordion-header:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: 8px;
}

[data-theme="dark"] .thesis-accordion-header:focus {
    outline-color: var(--accent-purple);
}

/* Animación suave para modo de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .thesis-accordion-content {
        transition: none;
    }

    .accordion-arrow {
        transition: none;
    }

    .thesis-accordion-content .tesis-item {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .thesis-accordion-header {
        transition: background-color 0.2s ease;
    }
}
