/* =========================================================
   VRI PROYECTOS - Vista cards sin flip (todo al frente)
   Aislado bajo .vri-proy-wrapper
   ========================================================= */

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

.vri-proy-wrapper {
    max-width: 1490px;
    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;
}

/* =========================================================
   HEADER
   ========================================================= */
.vri-proy-wrapper .vri-proy-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E0E0FF;
}

.vri-proy-wrapper .vri-proy-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vri-proy-wrapper .vri-proy-breadcrumb {
    font-size: 0.78rem;
    color: #1a2f6b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vri-proy-wrapper .vri-proy-titulo {
    font-family: 'Titillium Web', 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
    margin: 0;
    color: #000066;
}

.vri-proy-wrapper .vri-proy-titulo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 24px;
    background: #1a2f6b;
    border-radius: 3px;
}

.vri-proy-wrapper .vri-proy-contador {
    font-size: 0.85rem;
    color: #1a2f6b;
    background: #E0E0FF;
    padding: 5px 14px;
    border-radius: 30px;
    font-weight: 600;
    align-self: flex-start;
}

/* =========================================================
   FILTROS (se mantienen)
   ========================================================= */
.vri-proy-wrapper .vri-proy-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 20px;
    border: 1px solid rgba(80, 86, 172, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 102, 0.04);
}

.vri-proy-wrapper .vri-proy-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vri-proy-wrapper .vri-proy-filter-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a2f6b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vri-proy-wrapper .vri-proy-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vri-proy-wrapper .vri-proy-filter-buttons button {
    font-family: 'Open Sans', sans-serif;
    background: #eef3f9;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 12px;
    color: #000066;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.vri-proy-wrapper .vri-proy-filter-buttons button:hover {
    background: #1a2f6b;
    color: #ffffff;
    transform: translateY(-1px);
}

.vri-proy-wrapper .vri-proy-filter-buttons button.active {
    background: #1a2f6b;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26, 47, 107, 0.3);
}

.vri-proy-wrapper .vri-proy-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 4px 12px 4px 16px;
    border-radius: 30px;
    border: 1px solid #1a2f6b;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-left: auto;
}

.vri-proy-wrapper .vri-proy-search-box:focus-within {
    border-color: #000066;
    box-shadow: 0 0 0 3px rgba(26, 47, 107, 0.15);
}

.vri-proy-wrapper .vri-proy-search-box input {
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 0.9rem;
    outline: none;
    width: 220px;
    color: #000066;
}

.vri-proy-wrapper .vri-proy-search-box input::placeholder {
    color: #8a9cb0;
}

.vri-proy-wrapper .vri-proy-search-box button {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    color: #1a2f6b;
    transition: transform 0.2s;
}

.vri-proy-wrapper .vri-proy-search-box button:hover {
    transform: scale(1.1);
}

/* =========================================================
   GRID
   ========================================================= */
.vri-proy-wrapper .vri-proy-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 40px;
    overflow: visible !important;
    contain: none !important;
    min-height: 380px;
}

/* =========================================================
   CARD SIN FLIP
   ========================================================= */
.vri-proy-wrapper .vri-proy-card-simple {
    background: #f1f2f4;
    border: 1px solid #e0e3e8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    height: 100%;
}

.vri-proy-wrapper .vri-proy-card-simple:hover {
    box-shadow: 0 8px 24px rgba(26, 47, 107, 0.15);
    transform: translateY(-2px);
}

/* Franja azul superior */
.vri-proy-wrapper .vri-proy-stripe {
    height: 6px;
    width: 100%;
    background: #1a2f6b;
    flex-shrink: 0;
}

/* Cuerpo de la card */
.vri-proy-wrapper .vri-proy-card-body-simple {
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Título */
.vri-proy-wrapper .vri-proy-titulo-simple {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1a2f6b;
    margin: 0 0 18px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-decoration: none;
    display: block;
}

/* Título con enlace */
.vri-proy-wrapper .vri-proy-titulo-link {
    color: #1a2f6b;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.vri-proy-wrapper .vri-proy-titulo-link:hover {
    color: #1a2f6b;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Línea decorativa */
.vri-proy-wrapper .vri-proy-divider {
    width: 40px;
    height: 2px;
    background: #1a2f6b;
    margin-bottom: 18px;
    flex-shrink: 0;
}

/* Filas de datos */
.vri-proy-wrapper .vri-proy-meta-row {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #4a5568;
    margin: 0 0 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.vri-proy-wrapper .vri-proy-meta-row:last-child {
    margin-bottom: 0;
}

.vri-proy-wrapper .vri-proy-meta-row strong {
    color: #4a5568;
    font-weight: 700;
}

/* Fila de convocatoria */
.vri-proy-wrapper .vri-proy-conv-row {
    margin-top: 0;
    margin-bottom: 10px;
    padding-top: 0;
    border-top: none;
}

.vri-proy-wrapper .vri-proy-conv-link {
    color: #1a2f6b;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}

.vri-proy-wrapper .vri-proy-conv-link:hover {
    color: #101f4a;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.vri-proy-wrapper .vri-proy-conv-text {
    color: #1a2f6b;
    font-weight: 600;
}

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

.vri-proy-wrapper .vri-proy-no-results i {
    font-size: 2.5rem;
    color: #b0c4d9;
    display: block;
    margin-bottom: 12px;
}

/* =========================================================
   PAGINACIÓN
   ========================================================= */
.vri-proy-wrapper .vri-proy-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.vri-proy-wrapper .vri-proy-pagination button {
    background: #ffffff;
    border: 1px solid #b0c4d9;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: #000066;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.vri-proy-wrapper .vri-proy-pagination button:hover:not(:disabled) {
    background: #1a2f6b;
    color: #ffffff;
    border-color: #1a2f6b;
}

.vri-proy-wrapper .vri-proy-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vri-proy-wrapper .vri-proy-page-numbers {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.vri-proy-wrapper .vri-proy-page-numbers button {
    padding: 8px 14px;
    min-width: 40px;
}

.vri-proy-wrapper .vri-proy-page-numbers button.active {
    background: #1a2f6b;
    color: #ffffff;
    border-color: #1a2f6b;
}

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

.elementor-shortcode .vri-proy-wrapper,
.elementor-widget-container .vri-proy-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: 1100px) {
    .vri-proy-wrapper .vri-proy-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .vri-proy-wrapper .vri-proy-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .vri-proy-wrapper .vri-proy-search-box {
        margin-left: 0;
        width: 100%;
    }

    .vri-proy-wrapper .vri-proy-search-box input {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .vri-proy-wrapper .vri-proy-filter-bar {
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
        padding: 14px;
    }

    .vri-proy-wrapper .vri-proy-titulo {
        font-size: 1.3rem;
    }
}

@media (max-width: 600px) {
    .vri-proy-wrapper .vri-proy-grid {
        grid-template-columns: 1fr !important;
    }

    .vri-proy-wrapper .vri-proy-card-body-simple {
        padding: 18px 16px;
    }

    .vri-proy-wrapper .vri-proy-titulo-simple {
        font-size: 0.9rem;
    }

    .vri-proy-wrapper .vri-proy-meta-row {
        font-size: 0.78rem;
    }
}