/* =========================================================
   VRI CONVOCATORIAS - Vista lista
   Aislado bajo .vri-conv-wrapper
   ========================================================= */

.vri-conv-wrapper,
.vri-conv-wrapper *,
.vri-conv-wrapper *::before,
.vri-conv-wrapper *::after {
    box-sizing: border-box;
}

.vri-conv-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
    font-family: 'Open Sans', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    color: #000066;
    font-size: 14px;
    text-align: left;
    contain: none !important;
    content-visibility: visible !important;
    overflow: visible !important;
}

/* =========================================================
   BARRA DE FILTROS
   ========================================================= */
.vri-conv-wrapper .vri-conv-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 0 20px 0;
}

.vri-conv-wrapper .vri-conv-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
    flex: 1;
}

.vri-conv-wrapper .vri-conv-filter-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #000066;
    letter-spacing: 0;
}

.vri-conv-wrapper .vri-conv-select,
.vri-conv-wrapper .vri-conv-input {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #b0c4d9;
    border-radius: 6px;
    padding: 9px 14px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    line-height: 1.4;
    min-height: 40px;
}

.vri-conv-wrapper .vri-conv-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 34px;
}

.vri-conv-wrapper .vri-conv-input::placeholder {
    color: #8a9cb0;
}

.vri-conv-wrapper .vri-conv-select:focus,
.vri-conv-wrapper .vri-conv-input:focus {
    outline: none;
    border-color: #1a2f6b;
    box-shadow: 0 0 0 3px rgba(26, 47, 107, 0.1);
}

/* Botón limpiar */
.vri-conv-wrapper .vri-conv-clear-btn {
    background: #1a2f6b;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    min-height: 40px;
    white-space: nowrap;
}

.vri-conv-wrapper .vri-conv-clear-btn:hover {
    background: #101f4a;
    transform: translateY(-1px);
}

.vri-conv-wrapper .vri-conv-clear-btn:active {
    transform: translateY(0);
}

/* =========================================================
   LISTA
   ========================================================= */
.vri-conv-wrapper .vri-conv-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

/* =========================================================
   FILA
   ========================================================= */
.vri-conv-wrapper .vri-conv-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 8px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
}

.vri-conv-wrapper .vri-conv-row:first-child {
    border-top: 1px solid #e5e7eb;
}

.vri-conv-wrapper .vri-conv-row.vri-conv-row-clickable:hover {
    background: #f5f8fc;
}

.vri-conv-wrapper .vri-conv-row.vri-conv-row-clickable:focus {
    outline: 2px solid #1a2f6b;
    outline-offset: -2px;
}

/* Ícono */
.vri-conv-wrapper .vri-conv-row-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vri-conv-wrapper .vri-conv-row-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Info */
.vri-conv-wrapper .vri-conv-row-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
    padding-top: 2px;
}

.vri-conv-wrapper .vri-conv-row-titulo {
    font-family: 'Titillium Web', 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1a2f6b;
    line-height: 1.35;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.vri-conv-wrapper .vri-conv-row-clickable:hover .vri-conv-row-titulo {
    text-decoration: underline;
}

.vri-conv-wrapper .vri-conv-row-nombre {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vri-conv-wrapper .vri-conv-row-anio {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    color: #8a9cb0;
    font-weight: 500;
    margin-top: 2px;
}

/* =========================================================
   SIN RESULTADOS
   ========================================================= */
.vri-conv-wrapper .vri-conv-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 1rem;
    color: #6a7a8a;
    background: #F8FAFC;
    border-radius: 10px;
    border: 1px dashed #D6DEEB;
}

/* =========================================================
   PAGINADOR
   ========================================================= */
.vri-conv-wrapper .vri-conv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
}

.vri-conv-wrapper .vri-conv-page-nav,
.vri-conv-wrapper .vri-conv-page-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #1a2f6b;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    padding: 7px 14px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: none;
}

.vri-conv-wrapper .vri-conv-page-nav {
    font-size: 1.1rem;
    padding: 6px 12px;
}

.vri-conv-wrapper .vri-conv-page-nav:hover:not(:disabled),
.vri-conv-wrapper .vri-conv-page-btn:hover {
    background: #f0f4f8;
    border-color: #1a2f6b;
}

.vri-conv-wrapper .vri-conv-page-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vri-conv-wrapper .vri-conv-page-btn.active {
    background: #ffffff;
    border: 2px solid #1a2f6b;
    color: #1a2f6b;
    font-weight: 700;
    padding: 6px 13px;
}

.vri-conv-wrapper .vri-conv-page-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
}

.vri-conv-wrapper .vri-conv-page-dots {
    color: #8a9cb0;
    font-weight: 600;
    padding: 0 4px;
    user-select: none;
}

/* =========================================================
   FIX PARA ELEMENTOR
   ========================================================= */
.vri-conv-wrapper,
.vri-conv-wrapper * {
    contain: none !important;
    content-visibility: visible !important;
}

.elementor-shortcode .vri-conv-wrapper,
.elementor-widget-container .vri-conv-wrapper {
    contain: none !important;
    content-visibility: visible !important;
    overflow: visible !important;
    height: auto !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .vri-conv-wrapper .vri-conv-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .vri-conv-wrapper .vri-conv-filter-group {
        min-width: 0;
        flex: none;
        width: 100%;
    }

    .vri-conv-wrapper .vri-conv-clear-btn {
        width: 100%;
    }

    .vri-conv-wrapper .vri-conv-row {
        gap: 14px;
        padding: 14px 6px;
    }

    .vri-conv-wrapper .vri-conv-row-icon {
        width: 42px;
        height: 42px;
    }

    .vri-conv-wrapper .vri-conv-row-titulo {
        font-size: 0.92rem;
    }

    .vri-conv-wrapper .vri-conv-row-nombre {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .vri-conv-wrapper .vri-conv-row-icon {
        width: 38px;
        height: 38px;
    }

    .vri-conv-wrapper .vri-conv-row-titulo {
        font-size: 0.88rem;
    }
}

/* =========================================================
   CONTADOR DE CONVOCATORIAS
   ========================================================= */
.vri-conv-wrapper .vri-conv-count {
    font-family: 'Titillium Web', 'Segoe UI', Roboto, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2f6b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.vri-conv-wrapper .vri-conv-count span {
    color: #1a2f6b;
    font-weight: 700;
}

@media (max-width: 480px) {
    .vri-conv-wrapper .vri-conv-count {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }
}

/* =========================================================
   META (Año + Enlace) EN LA MISMA LÍNEA
   ========================================================= */
.vri-conv-wrapper .vri-conv-row-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* Botón "Ver enlace" */
.vri-conv-wrapper .vri-conv-row-enlace {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a2f6b;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #c8d3e8;
    border-radius: 4px;
    background: #f5f8fc;
    transition: all 0.15s;
    line-height: 1.3;
}

.vri-conv-wrapper .vri-conv-row-enlace:hover {
    background: #1a2f6b;
    color: #ffffff;
    border-color: #1a2f6b;
}

.vri-conv-wrapper .vri-conv-row-enlace-icon {
    font-size: 0.75rem;
    line-height: 1;
}

/* Ajuste: el año ya no está solo, ahora dentro de meta */
.vri-conv-wrapper .vri-conv-row-meta .vri-conv-row-anio {
    margin-top: 0;
}

@media (max-width: 480px) {
    .vri-conv-wrapper .vri-conv-row-enlace {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}