#ytcd-container {
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#ytcd-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(var(--ytcd-columns-max, 4), 1fr) !important;
    gap: 20px !important;
}

#ytcd-videos {
    width: 100% !important;
    display: contents !important;
}

.ytcd-video {
    background: #fff;
    padding: 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    text-align: center;
    min-height: 350px !important;
    box-sizing: border-box !important;
    transition: transform 0.2s !important;
}

.ytcd-video:hover {
    transform: scale(1.05) !important;
}

.ytcd-video img {
    border-radius: 5px !important;
}

.ytcd-video h3 {
    font-size: 1.2em !important;
    margin: 15px 0 10px !important;
    color: #333;
    font-weight: bold;
    line-height: 1.4;
}

.ytcd-video p {
    font-size: 0.95em !important;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ytcd-video .meta {
    font-size: 0.9em !important;
    color: #888;
    margin-top: 10px !important;
}

#ytcd-pagination {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

#ytcd-pagination button {
    padding: 12px 25px !important;
    margin: 0 15px;
    cursor: pointer;
    background: #434343;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em !important;
}

#ytcd-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Estilos para Magnific Popup */
.mfp-iframe-holder .mfp-content {
    max-width: 900px !important;
    margin-top: 50px !important; /* Added to push the popup content down */
}

/* Ajustes para pantallas más pequeñas (responsividad) */
@media (max-width: 768px) {
    #ytcd-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columnas en tablets */
    }
}

@media (max-width: 480px) {
    #ytcd-grid {
        grid-template-columns: 1fr !important; /* 1 columna en teléfonos */
    }

    .ytcd-video {
        padding: 10px !important; /* Reducir el padding en móviles */
        min-height: 300px !important; /* Ajustar la altura mínima */
    }

    .ytcd-video img {
        height: 150px !important; /* Reducir la altura de la imagen */
    }

    .ytcd-video h3 {
        font-size: 1em !important; /* Reducir el tamaño del título */
    }

    .ytcd-video p {
        font-size: 0.85em !important; /* Reducir el tamaño de la descripción */
    }
}

.ytcd-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 5px;
}

.ytcd-thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
@media (max-width: 480px) {
    #ytcd-pagination {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    #ytcd-pagination button {
        flex: 1 1 45%;
        padding: 10px !important;
        font-size: 0.95em !important;
        margin: 5px 0;
    }
}


