/* ===== CONTENEDOR PRINCIPAL ===== */
.video-home-container {
    width: 90%;
    max-width: 1200px;
    margin: 60px auto;
    padding-top: 20px;
    text-align: center;
}

/* ===== CABECERA ===== */
.premium-header .badge-institutional {
    display: inline-block;
    background: rgba(0, 56, 118, 0.08);
    color: var(--color-primary, #003876);
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    border: 1px solid rgba(0, 56, 118, 0.15);
}

.premium-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.premium-header .description {
    max-width: 700px;
    margin: 0 auto;
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== FILTROS ===== */
.video-filters {
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary, #003876);
    color: #fff;
    border-color: var(--color-primary, #003876);
    box-shadow: 0 10px 15px -3px rgba(0, 56, 118, 0.25);
}

/* ===== GALERÍA – NUEVO DISEÑO ===== */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: left;
}

/* ===== TARJETA ===== */
.video-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 56, 118, 0.15);
}

.video-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
    flex: 1;
}

.video-link:hover,
.video-link:focus,
.video-link:active {
    text-decoration: none !important;
    outline: none;
}

/* ===== MINIATURA – NUEVO ENFOQUE ===== */
.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;          /* Mantiene la proporción */
    background: linear-gradient(145deg, #1e293b, #0f172a); /* Fondo degradado oscuro */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* La imagen se muestra COMPLETA, sin recortes */
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;           /* <--- CLAVE: muestra la imagen entera */
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.2, 0, 0, 1);
    display: block;
    background-color: #0f172a;     /* Fondo de respaldo mientras carga */
}

/* Efecto hover: zoom sutil pero sin recortar */
.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

/* Badge de fecha (se mantiene) */
.video-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Overlay y botón de reproducción – más estilizado */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 56, 118, 0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
    z-index: 2;
}

.video-thumb:hover .overlay {
    opacity: 1;
}

.play-icon {
    color: #fff;
    font-size: 4.5rem;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-thumb:hover .play-icon {
    transform: scale(1.1);
}

/* ===== INFORMACIÓN DEL VIDEO ===== */
.video-info {
    padding: 1.5rem 1.5rem 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-info h3 {
    color: var(--color-primary, #003876);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.video-info p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ===== BOTÓN "VER MÁS" ===== */
.load-more-container {
    text-align: center;
    margin: 60px 0 80px;
}

.btn-load-more {
    padding: 14px 45px;
    background: #fff;
    border: 2px solid #e2e880;
    color: #1e293b;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-load-more:hover {
    background: var(--color-primary, #003876);
    border-color: var(--color-primary, #003876);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 56, 118, 0.2);
}

/* ===== MODAL ===== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.video-modal-content {
    position: relative;
    max-width: 1100px;
    width: 92%;
    animation: modalZoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalZoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.video-modal video {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: -60px;
    right: 0;
    font-size: 3.5rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .video-home-container {
        width: 92%;
        margin: 40px auto;
    }
    .premium-header h2 {
        font-size: 1.8rem;
    }
    .close-modal {
        top: -50px;
        font-size: 2.5rem;
    }
}

/* Utilidad para ocultar vídeos */
.hidden-video {
    display: none !important;
}