/* ==========================================================================
   SECCIÓN DE LICITACIONES - UNIFICADA
   ========================================================================== */

/* --- Estructura General --- */
.procesos-licitacion {
    padding: 3rem 10%;
    min-height: 90dvh;
    background-color: #ffffff;
}

.header-licitaciones h1 {
    font-size: clamp(32px, 4vw, 48px);
    color: #1E3A8A;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* --- Selector de Años (Tabs) --- */
.selector-anios {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}

.year-tab {
    padding: 12px 28px;
    background-color: #f8f9fa;
    color: #333;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 90px;
    border: 1px solid #ddd;
    text-decoration: none;
    text-align: center;
}

.year-tab:hover {
    background-color: #1E3A8A;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    border-color: #1E3A8A;
}

.year-tab.active {
    background-color: #1E3A8A;
    color: white;
    border-color: #1E3A8A;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3);
}

/* --- Documentos Superiores --- */
.docs-institucionales {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border-left: 6px solid #6A1B9A; /* Acento Guinda */
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.doc-inst-item {
    margin-bottom: 20px;
}

.doc-inst-item:last-child {
    margin-bottom: 0;
}

.doc-inst-titulo {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.link-pdf-inst {
    color: #6A1B9A;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.link-pdf-inst:hover {
    text-decoration: underline;
    color: #1E3A8A;
}

/* --- Divisor --- */
.divisor-lic {
    width: 80%;
    border: 0;
    border-top: 1px solid #eee;
    margin: 3rem auto;
}

/* --- Estilo de Tabla "Cuadrado" e Institucional --- */
.tabla-contenedor {
    margin-top: 2rem;
    overflow-x: auto;
}

.subtitulo-tabla {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #1E3A8A;
    font-weight: 700;
}

.tabla-transparencia {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* MANTIENE EL CONTROL DE LOS ANCHOS */
    border: 1px solid #ddd;
    background-color: white;
}

/* --- CONTROL DE ANCHOS DE COLUMNAS --- */
.col-folio    { width: 15%; }
.col-desc     { width: 45%; }
.col-vigencia { width: 20%; }
.col-docs     { width: 20%; }

.tabla-transparencia th {
    background-color: #1E3A8A;
    color: white;
    padding: 18px 15px;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border: 1px solid #1E3A8A;
}

.tabla-transparencia td {
    padding: 18px 15px;
    vertical-align: top;
    border: 1px solid #eee;
    font-size: 0.95rem;
    color: #444;
    word-wrap: break-word; /* Evita que folios o links largos rompan el layout */
    line-height: 1.4;
}

.tabla-transparencia tr:hover {
    background-color: #f9f9f9;
}

/* Estilo de los links de PDF dentro de la tabla */
.link-pdf-tabla {
    display: inline-block;
    background: #f1f1f1;
    color: #621132;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.link-pdf-tabla:hover {
    background: #6A1B9A;
    color: white;
    border-color: #6A1B9A;
}

.sin-archivos {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

.tabla-vacia {
    text-align: center;
    padding: 4rem !important;
    color: #888;
    font-size: 1.1rem;
}

/* --- Ajustes Móvil --- */
@media (max-width: 900px) {
    .procesos-licitacion {
        padding: 2rem 5%;
    }

    .tabla-transparencia {
        table-layout: auto; /* Permite scroll horizontal natural en móvil */
        min-width: 800px;    /* Asegura que la tabla no se colapse */
    }

    .selector-anios {
        gap: 8px;
    }

    .year-tab {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 70px;
    }
}