/* ==========================================================================
   ÍNDICE
   1. VARIABLES Y TEMA (CLARO / OSCURO)
   2. RESET Y ESTILOS BASE
   3. LAYOUT GENERAL
   4. HEADER Y NAVEGACIÓN SUPERIOR
   5. BARRA DE HERRAMIENTAS Y MEGA MENÚ
   6. MENÚ LATERAL
   7. COMPONENTES: TARJETAS, GRID Y PANELES
   8. REPOSITORIO: BUSCADOR, FILTROS Y LISTA
   9. PAGINACIÓN
   10. UTILIDADES Y ANIMACIONES
   11. RESPONSIVE
   ========================================================================== */

/* =========================================
   1. VARIABLES Y TEMA (CLARO / OSCURO)
   ========================================= */
   
:root {
    --ssasur-blue: #0f69b4;
    --ssasur-red: #eb3c46;
    
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --page-bg: #f0f2f5;
    
    --header-gradient: linear-gradient(135deg, var(--ssasur-blue) 0%, var(--ssasur-red) 100%);
    
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-muted: #7f8c8d;
    
    --border-color: rgba(15, 105, 180, 0.2);
    --item-bg: rgba(15, 105, 180, 0.05);
    --item-hover: rgba(15, 105, 180, 0.1);
    --shadow: rgba(15, 105, 180, 0.15);
    --overlay: rgba(0,0,0,0.4);
    
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
  
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #1a1f2e;
        --secondary-bg: #252a3a;
        --page-bg: #121212;
        
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --text-muted: #a0a0a0;
        
        --border-color: rgba(255,255,255,0.1);
        --item-bg: rgba(255,255,255,0.05);
        --item-hover: rgba(255,255,255,0.1);
        --shadow: rgba(0,0,0,0.4);
        --overlay: rgba(0,0,0,0.6);
    }
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--page-bg);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

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

ul { 
    list-style: none; 
}

button, select { 
    font-family: inherit; 
}

.details-list {
    padding-left: 20px;
    margin-top: 8px;
    font-size: 0.9em;
    list-style-type: disc; 
}

/* =========================================
   3. LAYOUT GENERAL
   ========================================= */
.main-layout-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    padding: 20px;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto;
}

.placeholder-container,
.additional-resources-area {
    background-color: var(--primary-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border-color);
}

.placeholder-container { 
    flex: 1; 
}

.primary-content-area { 
    min-height: 300px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.additional-resources-area {
    flex: none;
    height: auto;
    min-height: 200px;
    overflow: visible;
}

.adapted-footer {
    width: 100%;
    max-width: 100%;
    position: relative;
    left: auto;
    bottom: auto;
    border-right: none;
    
    background-color: var(--primary-bg);
    border-top: 1px solid var(--border-color);
    padding: 25px 20px;
    margin-top: auto;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.adapted-footer .credits-text-hhha {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1;
    text-align: center;
}

.adapted-footer .mt-small {
    margin-top: 8px;
}

.adapted-footer .ufro-small-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
    display: block;
    margin: 0;
}

@media (max-width: 600px) {
    .adapted-footer .credits-text-hhha {
        flex-direction: column;
        gap: 4px;
    }
    
    .adapted-footer .mt-small {
        margin-top: 10px;
    }
}

/* =========================================
   4. HEADER Y NAVEGACIÓN SUPERIOR
   ========================================= */
.main-header-container {
    background-color: var(--primary-bg);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 100;
    position: relative;
}

.header-top-area {
    background: 
        linear-gradient(135deg, rgba(15, 105, 180, 0.85) 0%, rgba(235, 60, 70, 0.85) 100%),
        url('images/fondo.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;  
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
}

.header-gradient-section {
    width: 100%;
    background: transparent;
    padding: 15px 30px;
    display: flex;               
    align-items: center;         
    justify-content: flex-start; 
}

.header-text-content h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.header-text-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================
   5. BARRA DE HERRAMIENTAS Y MEGA MENÚ
   ========================================= */
.toolbar-area {
    height: 50px;
    background-color: var(--secondary-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
}

.toolbar-tabs-container {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
}

.megamenu-tab {
    padding: 8px 20px;
    height: auto;
    background: var(--item-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.megamenu-tab:hover {
    background: white;
    color: var(--ssasur-blue);
    border-color: var(--ssasur-blue);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.megamenu-tab.active {
    background: var(--ssasur-blue);
    color: white;
    border-color: var(--ssasur-blue);
    box-shadow: 0 4px 15px rgba(15, 105, 180, 0.3);
    transform: translateY(0);
}

.megamenu-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 20px;
    right: 20px;
    width: auto;
    background: var(--primary-bg);
    border-radius: 16px;
    z-index: 100;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease, transform 0.3s ease;
}

.megamenu-panel.active { 
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

.megamenu-content {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.megamenu-section-header {
    font-size: 14px;
    font-weight: 800;
    color: var(--ssasur-blue);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--item-bg);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.megamenu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    gap: 15px;
}

.megamenu-item:hover {
    background: var(--item-hover);
    border-color: var(--border-color);
    transform: translateX(6px);
    box-shadow: 0 2px 8px var(--shadow);
}

.megamenu-item-icon {
    font-size: 18px;
    background: rgba(15, 105, 180, 0.08);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--ssasur-blue);
}

.megamenu-item:hover .megamenu-item-icon { 
    transform: scale(1.1) rotate(5deg);
    background: white;
}

.megamenu-item > div:not(.megamenu-item-icon) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.megamenu-item-title { 
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 3px;
    display: block;
}

.megamenu-item:hover .megamenu-item-title { 
    color: var(--ssasur-blue);
}

.megamenu-item-desc { 
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    display: block;
}

.mega-custom-icon { 
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.megamenu-item-icon .mega-custom-icon { 
    width: 24px;
    height: 24px;
}

.megamenu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
    z-index: 90;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.megamenu-overlay.active { 
    display: block;
    opacity: 1;
}

.btn-tool {
    padding: 6px 12px;
    margin-left: 10px;
    border: 1px solid var(--border-color);
    background: var(--primary-bg);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
}

/* =========================================
   6. MENÚ LATERAL
   ========================================= */
.quick-access-column {
    background-color: var(--primary-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.section-title {
    padding: 20px;
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--secondary-bg);
}

.ssasur-logo-hhha { 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    gap: 4px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.logo-blue-hhha {
    width: 30px;
    height: 40px;
    background: var(--ssasur-blue);
    border-radius: 2px;
    border-color: white;
}

.logo-red-hhha {
    width: 40px;
    height: 40px;
    background: var(--ssasur-red);
    border-radius: 2px;
    border-color: white;
}

.sidebar-header-hhha h3 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sidebar-header-hhha p {
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 12px;
    font-weight: 500;
}

.sidebar-content-hhha.adapted-content { 
    padding: 20px 15px;
}

.sidebar-item-hhha {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    margin: 6px 0;
    background: var(--item-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-left: 4px solid transparent;
    border: 1px solid var(--border-color);
    position: relative;
}

.sidebar-item-hhha:hover {
    background: var(--item-hover);
    border-left: 4px solid var(--ssasur-blue);
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow);
}

.sidebar-item-hhha.has-submenu::after { 
    content: '▸';
    position: absolute;
    right: 18px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-weight: bold;
}

.sidebar-item-hhha.has-submenu.open::after { 
    transform: rotate(90deg);
    color: var(--ssasur-blue);
}

.sidebar-item-icon-hhha {
    width: 36px;
    height: 36px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 105, 180, 0.1);
    border-radius: 8px;
    font-size: 16px;
    color: var(--ssasur-blue);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.sidebar-item-icon-hhha img { 
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sidebar-item-text-hhha {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.submenu-hhha {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(15, 105, 180, 0.03);
    border-radius: 8px;
    margin: 4px 0;
    border: 1px solid var(--border-color);
}

.submenu-hhha.open { 
    max-height: 800px;
}

.submenu-item-hhha {
    display: flex;
    align-items: center;
    padding: 12px 18px 12px 65px;
    margin: 2px 0;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.submenu-item-hhha:hover { 
    background: rgba(15, 105, 180, 0.08);
    border-left: 3px solid var(--ssasur-red);
}

.submenu-item-icon-hhha {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 105, 180, 0.08);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
}

.submenu-item-text-hhha {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.sidebar-footer-hhha {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--item-bg);
}

.credits-text-hhha {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ufro-small-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* =========================================
   7. COMPONENTES: TARJETAS, GRID Y PANELES
   ========================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    align-content: start;
}

.info-card {
    background: var(--item-bg);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    text-align: left;
    position: relative;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.info-card:hover {
    background: var(--item-hover);
    border-left-color: var(--ssasur-blue);
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow);
    color: var(--ssasur-blue);
}

.info-card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 105, 180, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.3s ease;
}

.info-card-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.info-card:hover .info-card-icon { 
    transform: scale(1.1) rotate(5deg);
    background: white;
}

.links-panel-section {
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow);
    width: 95%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 0;
    color: var(--text-secondary);
    overflow: hidden;
}

.links-panel-container {
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.link-col {
    padding-right: 15px;
    border-right: 1px solid var(--border-color);
}

.link-col:last-child {
    border-right: none;
}

.link-col h4 {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 10px;
}

.link-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--ssasur-blue);
    opacity: 0.4;
}

.link-col ul li {
    margin-bottom: 9px;
}

.link-col ul li a {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.link-col ul li a:hover {
    color: var(--ssasur-blue);
    transform: translateX(4px);
}

.link-col ul li a::before {
    content: "›";
    color: var(--ssasur-red);
    font-weight: bold;
    margin-right: 6px;
    opacity: 0;
    transform: translateX(-5px);
    transition: var(--transition-fast);
}

.link-col ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.legal-block {
    background-color: var(--item-bg);
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border-left: 4px solid var(--ssasur-blue);
    font-size: 0.95em;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.legal-block:hover {
    transform: translateX(5px);
    background-color: var(--item-hover);
    box-shadow: 0 4px 12px var(--shadow);
}

.legal-block p {
    margin-bottom: 12px;
    text-align: justify;
}

.legal-block ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 25px;
    margin-top: 10px;
}

.legal-block ol {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 25px;
    margin-top: 10px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.legal-block li {
    display: list-item;
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.legal-block ol li {
    font-size: 0.95em;
    margin-bottom: 5px;
}

/* =========================================
   8. REPOSITORIO: BUSCADOR, FILTROS Y LISTA
   ========================================= */
.repo-card {
    background: var(--primary-bg);
    border-radius: 16px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.repo-header {
    background: var(--ssasur-blue);
    padding: 15px 20px 10px 20px;
    border-radius: 16px 16px 0 0;
}

.repo-tabs::-webkit-scrollbar {
    display: none;
}

.repo-tab {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 20px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    flex-shrink: 0;
}

.repo-tab:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.repo-tab.active {
    background: var(--primary-bg);
    color: var(--ssasur-blue);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: transparent;
    transform: scale(1.02);
}

.repo-filters-container {
    background: var(--secondary-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-top: none;
}

.repo-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#repo-search {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    background: var(--primary-bg);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}

#repo-search:focus {
    border-color: var(--ssasur-blue);
}

.repo-search-btn {
    background: var(--ssasur-blue);
    color: white;
    border: none;
    border-radius: 8px;
    width: 48px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.repo-search-btn:hover {
    background: var(--ssasur-red);
}

.repo-dropdowns-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.repo-dropdowns-row select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}

.repo-results-list,
#repo-list {
    background: var(--primary-bg);
    min-height: 250px;
    border-radius: 0;
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom: none;
}

.repo-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.repo-item:hover {
    background: var(--item-hover);
}

.repo-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: white;
    margin-right: 15px;
    flex-shrink: 0;
}

.repo-icon.pdf {
    background: #e74c3c;
}

.repo-icon.doc {
    background: #3498db;
}

.repo-icon.link {
    background: #27ae60;
}

.repo-icon.guia {
    background: #8e44ad;
}

.repo-info {
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.repo-title {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.repo-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.repo-btn {
    padding: 8px 16px;
    background: var(--item-bg);
    color: var(--ssasur-blue);
    font-weight: 600;
    font-size: 13px;
    border-radius: 6px;
    transition: var(--transition-fast);
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.repo-btn:hover {
    background: var(--ssasur-blue);
    color: white;
}

.repo-empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    background: var(--secondary-bg);
    border-radius: 12px;
    margin: 20px;
}

@media (prefers-color-scheme: dark) {
    .repo-tab.active {
        background: var(--primary-bg);
        color: #64b5f6;
    }
    
    .repo-filters-container {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .repo-dropdowns-row select option {
        background: #1a1f2e;
        color: white;
    }
    
    .repo-btn {
        background: rgba(255, 255, 255, 0.1);
        color: #90caf9;
    }
    
    .repo-btn:hover {
        background: var(--ssasur-blue);
        color: white;
    }
}

/* =========================================
   9. PAGINACIÓN
   ========================================= */
#repo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: 0;
}

#repo-pagination button {
    appearance: none;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

#repo-pagination button:hover:not(:disabled) {
    background-color: var(--ssasur-blue);
    color: white;
    border-color: var(--ssasur-blue);
    transform: translateY(-1px);
}

#repo-pagination button.active {
    background-color: var(--ssasur-blue);
    color: white;
    border-color: var(--ssasur-blue);
    font-weight: 700;
    cursor: default;
    box-shadow: 0 2px 5px rgba(15, 105, 180, 0.3);
}

#repo-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(0,0,0,0.05);
    color: var(--text-muted);
}

/* =========================================
   10. UTILIDADES Y ANIMACIONES
   ========================================= */
.icon-loading {
    background: #f0f0f0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}

.quick-access-column img,
.quick-access-column .info-card-icon {
    transition: var(--transition-smooth);
}

.quick-access-column a:hover img,
.quick-access-column a:hover .info-card-icon {
    transform: scale(1.1) rotate(5deg);
}

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

.mobile-menu-toggle {
    display: none;
}

.mobile-repo-select-container {
    display: none;
}

/* =========================================
   11. RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .main-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .links-panel-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
    
    .link-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .link-col:nth-last-child(-n+2) {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    .main-layout-grid {
        display: flex;
        flex-direction: column;
        padding: 10px;
        gap: 20px;
        width: 100%;
    }

    .header-top-area {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .header-gradient-section {
        padding: 20px;
    }
    
    .header-text-content h3 {
        font-size: 1.1rem;
    }
    
    .header-text-content p {
        font-size: 0.85rem;
    }
    
    .ssasur-logo-hhha {
        transform: scale(0.8);
    }

    .toolbar-area {
        display: block;
        position: relative;
        width: 100%;
        padding: 0;
        margin: 0;
        border-bottom: 2px solid var(--ssasur-red);
        background-color: var(--secondary-bg);
        z-index: 100;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 100%;
        height: 55px;
        justify-content: center;
        align-items: center;
        gap: 12px;
        background-color: var(--secondary-bg);
        color: var(--ssasur-blue);
        border: none;
        font-size: 16px;
        font-weight: 800;
        text-transform: uppercase;
        cursor: pointer;
        padding: 0;
        margin: 0;
    }
    
    .mobile-menu-toggle span {
        font-size: 24px;
        line-height: 1;
    }

    .toolbar-tabs-container {
        display: none;
        width: 100%;
        background-color: var(--secondary-bg);
        flex-direction: column;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-top: 1px solid #ddd;
    }

    .toolbar-tabs-container.show-mobile {
        display: flex;
        animation: expandMenu 0.3s ease-in-out;
    }

    .megamenu-tab {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-radius: 20px;
        justify-content: flex-start;
        font-size: 15px;
    }

    .repo-tabs.desktop-tabs {
        display: none;
    }

    .mobile-repo-select-container {
        display: block;
        width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
        margin-bottom: 15px;
    }

    .mobile-repo-select {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        color: var(--ssasur-blue);
        background-color: var(--secondary-bg);
        border: 2px solid var(--ssasur-blue);
        border-radius: 12px;
        font-weight: 700;
        outline: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230f69b4%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 12px;
    }

    .megamenu-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        z-index: 2000;
        overflow-y: auto;
    }
    
    .megamenu-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .repo-dropdowns-row {
        grid-template-columns: 1fr;
    }
    
    .repo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .repo-btn {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }
    
    .repo-info {
        width: 100%;
        margin-right: 0;
    }
    
    .links-panel-container {
        grid-template-columns: 1fr;
    }
    
    .link-col:nth-last-child(2) {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}
