/* ==========================================================
   1. CONTENEDOR PRINCIPAL BBDD
   EXPLICACION: ESTO ES EL CONTENEDOR QUE USAN LAS TARJETAS
   PARA LOS VIDEO DE YOUTUBE.
   ========================================================== */

.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 {
    /* Layout y contenido propios; el aspecto exterior lo hereda de .tux-card. */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #000000;
}


/* 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; 
}

/* Indicador de novedad: no modifica el borde ni la sombra de .tux-card. */
.card-nuevo {
    position: relative;
}

/* 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);
}