/* ==========================================================
   1. CONTENEDOR PRINCIPAL BBDD
   ========================================================== */

.contenedor-principal {
    display: grid;
    /* Ajustado: minmax de 350px asegura que en 1280px solo quepan 3 y se estiren (1fr) */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1280px;
    margin: 40px auto;
    align-items: stretch; 
}

/* 2. LA TARJETA - SE MANTIENE TU DISEÑO */
.contenedor-vertical {
    width: 100%;
    height: 100%; 
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: #000000; 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)) !important;
    backdrop-filter: blur(25px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(160%) !important;
    border: 2px solid transparent !important;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(to bottom right, rgba(255,255,255,0.8), rgba(255,255,255,0.1), rgba(255,255,255,0.4)) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 10px 30px rgba(0, 0, 0, 0.15);
}

.contenedor-vertical:hover { transform: none !important; }

/* 3. IMAGEN Y EFECTO PLAY */
.img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    display: block;
    flex-shrink: 0;
}

.img-wrapper.tiene-video::after {
    content: '▶';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-wrapper.tiene-video:hover::after { opacity: 1; }
.img-wrapper.tiene-video { cursor: pointer; }

.contenedor-vertical .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.img-wrapper.tiene-video:hover img { transform: scale(1.1); }

/* 4. TEXTOS */
.contenedor-vertical h3 {
    font-size: 17px; 
    font-weight: 600; 
    padding: 20px 20px 10px 20px; 
    color: #333; 
}

.contenedor-vertical h3, 
.contenedor-vertical p {
    background: transparent !important;
    width: 100%;
    box-sizing: border-box;
    text-align: left; 
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

.contenedor-vertical p {
    font-size: 15px; 
    padding: 0 20px 20px 20px; 
    color: #333; 
    line-height: 1.5;
    flex-grow: 1; 
}

/* EFECTO NEÓN NARANJA PARA VÍDEOS NUEVOS */
.card-nuevo {
    /* Usamos el HSL que pediste para el borde */
    border: 2px solid hsl(19, 100%, 47%) !important; 
    box-shadow: 0 0 15px hsla(19, 100%, 47%, 0.4), 
                inset 0 0 10px hsla(19, 100%, 47%, 0.2) !important;
    position: relative;
    animation: neon-pulse-orange 2s infinite alternate ease-in-out;
}

/* Etiqueta "NUEVO" en la esquina con el mismo tono */
.card-nuevo::before {
    content: "NUEVO";
    position: absolute;
    top: 10px;
    right: 10px;
    background: hsl(19, 100%, 47%);
    color: #fff; /* Blanco para mejor contraste sobre naranja */
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 5px;
    z-index: 10;
    box-shadow: 0 0 10px hsla(19, 100%, 47%, 0.6);
}

/* Animación de pulso adaptada al naranja */
@keyframes neon-pulse-orange {
    from {
        box-shadow: 0 0 10px hsla(19, 100%, 47%, 0.4), 
                    inset 0 0 5px hsla(19, 100%, 47%, 0.2);
    }
    to {
        box-shadow: 0 0 20px hsla(19, 100%, 47%, 0.8), 
                    inset 0 0 12px hsla(19, 100%, 47%, 0.4);
    }
}