/* YouTube Videos module — small additions Tailwind's utility classes
   don't cleanly cover on their own. Everything else on these pages is
   plain Tailwind (already loaded via CDN in templates/header.php), kept
   consistent with the rest of the site rather than introducing a second
   CSS framework. */

.yt-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.yt-card:hover {
    transform: translateY(-4px);
}

.yt-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.yt-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.yt-card:hover .yt-thumb-wrap img {
    transform: scale(1.05);
}

.yt-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-play-btn span {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, background 0.18s ease;
}

.yt-card:hover .yt-play-btn span {
    transform: scale(1.08);
    background: rgba(220, 38, 38, 1);
}

/* Multi-line clamp for descriptions — with a plain-text fallback for
   browsers that don't support -webkit-line-clamp (text just runs longer,
   nothing breaks). */
.yt-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Video player modal */
#ytModal {
    display: none;
}

#ytModal.yt-modal-open {
    display: flex;
}

#ytModal .yt-modal-panel {
    animation: yt-modal-in 0.15s ease-out;
}

@keyframes yt-modal-in {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.yt-category-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
