/* ==========================================================================
   TEESIS PUBLICADAS
   ========================================================================== */


:root {
 
    --primary-blue: #1565c0;    
    --secondary-gray: #546e7a;   
    --bg-light: #f4f6f8;         
    
    
    --color-pregrado: #2e7d32;    
    --color-maestria: #f57f17;   
    --color-doctorado: #c62828;   
}

body {
    background-color: var(--bg-light);
    font-family: 'Montserrat', sans-serif;
    color: #333;
}

/* ==========================================================================
   2. HERO SECTION (PORTADA )
   ========================================================================== */
.thesis-hero {
    background-image: url('hero_tesis.png'); 
    background-size: cover;
    background-position: center;
    
    
    height: 260px; 
    
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
    
    margin-top: 0px; 
}

.hero-overlay {
   
    background: rgba(21, 101, 192, 0.85); 
    width: 100%; 
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.hero-content {
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-content h1 {
    font-family: 'Merriweather', serif;
    font-size: 3.5rem;
    margin: 5px 0;
    font-weight: 900;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
    
   
    white-space: nowrap; 
}

.hero-content h5 {
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    color: #e3f2fd; 
    margin: 0;
    font-size: 0.9rem;
}

.hero-content p {
    color: #bbdefb;
    font-size: 1.1rem;
    margin: 0;
}

/* ==========================================================================
   3. CONTENEDOR PRINCIPAL 
   ========================================================================== */
.main-container {
    
    max-width: 1300px; 
    margin: 40px auto; 
    padding: 0 20px;
    box-sizing: border-box;
}

.main-container {
    max-width: 1300px;  
    margin: 0 auto;     
    padding: 40px 20px; 
    box-sizing: border-box;
}

/* 4. BARRA DE FILTROS Y BÚSQUEDA
   ================================ */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #cfd8dc;
}


.degree-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 700;
    color: var(--secondary-gray);
    margin-right: 5px;
    font-size: 0.9rem;
}

.filter-btn {
    background: white;
    border: 1px solid #b0bec5;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--secondary-gray);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.filter-btn:hover {
    background: #eceff1;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 8px rgba(21, 101, 192, 0.3);
}


.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-grow: 1;
    justify-content: flex-end;
}

.select-wrapper, .search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}


.select-wrapper i, .search-wrapper i {
    position: absolute;
    left: 12px;
    color: #90a4ae;
    font-size: 0.9rem;
    pointer-events: none;
}

#filtroAnio, #buscadorInput {
    padding: 10px 15px 10px 35px; 
    border-radius: 20px;
    border: 1px solid #b0bec5;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    font-size: 0.9rem;
    color: #455a64;
    height: 40px;
}

#buscadorInput {
    width: 250px;
    transition: border 0.3s, width 0.3s;
}

#buscadorInput:focus, #filtroAnio:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

/* 5. GRILLA Y TARJETAS 
   ====================== */
.thesis-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 15px;
    min-height: 100px;
}

.thesis-card {
    background: white;
    border: 1px solid #e0e0e0;
    
    border-left-width: 5px;
    border-left-style: solid;
    border-radius: 4px;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.thesis-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px);
    border-color: #cfd8dc;
}


.card-title {
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    line-height: 1.5;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.card-title a {
    text-decoration: none;
    color: #263238;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}


.meta-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px; 
    font-size: 0.9rem;
    color: #546e7a;
    font-family: 'Montserrat', sans-serif;
    margin-top: auto; 
}

.meta-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #90a4ae; 
}

.meta-val {
    color: #37474f; 
    font-weight: 600;
}


.meta-separator {
    color: #cfd8dc;
    font-size: 1.1rem;
    margin: 0 5px;
    font-weight: 300;
}

/* 6. PAGINACIÓN )
   ================ */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-btn {
    background: white;
    border: 1px solid #cfd8dc;
    color: #546e7a;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.page-btn:hover:not(:disabled) {
    background: #eceff1;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.page-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* 7. MODAL 
   =================== */
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(3px);   
    z-index: 2000;
    justify-content: center; 
    align-items: center;
}

.academic-paper-modal {
    background: white;
    width: 90%; 
    max-width: 800px; 
    max-height: 90vh; 
    border-radius: 5px;
    overflow-y: auto; 
    position: relative; 
    display: flex; 
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}


.close-modal {
    position: absolute; 
    top: 15px; right: 20px; 
    font-size: 2rem; 
    cursor: pointer; 
    color: #aaa; 
    z-index: 10;
    transition: 0.2s;
}
.close-modal:hover { color: var(--color-doctorado); }


.paper-header {
    padding: 30px; 
    background: #fafafa; 
    border-bottom: 1px solid #eee;
}

.degree-badge {
    display: inline-block; 
    padding: 5px 12px; 
    border-radius: 4px; 
    color: white; 
    font-weight: 700; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    margin-bottom: 15px;
}

.paper-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.6rem; 
    color: var(--primary-blue); 
    margin-bottom: 20px;
    line-height: 1.3;
}


.paper-meta {
    display: flex; 
    gap: 30px; 
    flex-wrap: wrap;
}

.meta-item {
    display: flex; 
    align-items: center;
}

.meta-item i {
    font-size: 1.4rem; 
    color: #90a4ae; 
    margin-right: 12px;
}

.meta-item span {
    display: block; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #90a4ae;
}

.meta-item strong {
    font-size: 1rem; 
    color: #333;
}


.paper-body {
    padding: 30px; 
    flex-grow: 1; 
    text-align: justify; 
    line-height: 1.8; 
    color: #455a64; 
    font-family: 'Merriweather', serif;
}
.paper-body h4 {
    font-size: 0.9rem; text-transform: uppercase; color: #90a4ae; margin-bottom: 10px;
}


.paper-footer {
    padding: 20px 30px; 
    border-top: 1px solid #eee; 
    text-align: right; 
    background: #fafafa;
}

.repo-btn {
    display: inline-block; 
    background: var(--primary-blue); 
    color: white; 
    padding: 10px 20px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-weight: 700;
    transition: 0.3s;
}
.repo-btn:hover { background: #0d47a1; }

/* =========================================
   ESTILO PARA EL RESALTADO DE TEXTO
   ========================================= */
mark.resaltado {
    background-color: #fff59d; 
    color: #000;
    font-weight: 700;
    text-decoration: underline; 
    text-decoration-color: #fbc02d; 
    padding: 0 2px;
    border-radius: 2px;
}


@keyframes slideUp { 
    from { transform: translateY(30px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}


.card-title a {
    text-decoration: none;
    color: #263238;
    transition: color 0.2s;

   
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 8. RESPONSIVE 
   =============== */
@media (max-width: 900px) {
    .main-container { padding: 20px; } 
    
    .filter-container { flex-direction: column; align-items: stretch; }
    .search-filters { justify-content: space-between; margin-top: 10px; }
    .degree-filters { justify-content: center; }
    
    #buscadorInput { width: 100%; } 

 
    .meta-separator { display: none; } 
    .meta-inline { flex-direction: column; align-items: flex-start; gap: 5px; }
    
    .hero-content h1 { font-size: 2.2rem; }
}