/* =========================================================================
   YOUTUBE VIDEOS  (homepage block + Videos page + modal player)
   ========================================================================= */
.tv-section {
    --tv-border: #c9c9c9;
    --tv-ink: #2b2e33;
    --tv-muted: #6c7075;
    --tv-accent: #d9482c;
    max-width: 1600px;
    margin: 60px auto;
    padding: 0 clamp(16px, 4vw, 40px);
}
.tv-section__header { border: 1px solid var(--tv-border); padding: 22px 28px; margin-bottom: 24px; }
.tv-section__title {
    margin: 0; font-family: 'Montserrat', 'Inter', Arial, Helvetica, sans-serif;
    font-size: 24px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--tv-ink);
}
.tv-section__intro { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--tv-muted); }
.tv-section__intro p { margin: 0 0 8px; }

.tv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (min-width: 1700px) { .tv-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px)  { .tv-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 575px)  { .tv-grid { grid-template-columns: 1fr; gap: 18px; } .tv-section__header { padding: 18px 20px; } .tv-section__title { font-size: 20px; } }

/* Card */
.tv-card {
    display: flex; flex-direction: column; text-decoration: none; color: var(--tv-ink);
    background: #fff; border: 1px solid var(--tv-border); border-radius: 14px; overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.tv-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,.14); color: var(--tv-ink); }
.tv-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.tv-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.tv-card:hover .tv-card__media img { transform: scale(1.06); }
.tv-card__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0) 55%); }
.tv-card__play {
    position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    color: #fff; background: rgba(217,72,44,.92); box-shadow: 0 6px 20px rgba(0,0,0,.35);
    transition: transform .25s ease, background .25s ease;
}
.tv-card__play svg { margin-left: 3px; }
.tv-card:hover .tv-card__play { transform: scale(1.12); background: #d9482c; }
.tv-card__time {
    position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px;
    background: rgba(0,0,0,.78); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.tv-card__body { display: block; padding: 16px 18px 20px; }
.tv-card__title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-family: 'Montserrat', 'Inter', Arial, Helvetica, sans-serif; font-size: 17px; font-weight: 700; line-height: 1.35;
}
.tv-card__desc {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--tv-muted);
}

/* Buttons / footer */
.tv-section__footer { text-align: center; margin-top: 32px; }
.tv-btn {
    display: inline-block; padding: 13px 34px; border: 1px solid var(--tv-ink); color: var(--tv-ink);
    font-family: 'Montserrat', 'Inter', Arial, sans-serif; font-size: 14px; font-weight: 700;
    letter-spacing: .6px; text-transform: uppercase; text-decoration: none; transition: all .2s ease;
}
.tv-btn:hover { background: var(--tv-ink); color: #fff; }
.tv-btn--yt { background: #d9482c; border-color: #d9482c; color: #fff; }
.tv-btn--yt:hover { background: #b93a21; border-color: #b93a21; }
.tv-empty { text-align: center; color: var(--tv-muted); padding: 40px 0; }

/* Pagination */
.tv-pagination ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 34px 0 0; padding: 0; }
.tv-pagination a, .tv-pagination span {
    display: block; min-width: 40px; padding: 8px 12px; text-align: center; border: 1px solid var(--tv-border);
    color: var(--tv-ink); text-decoration: none; font-weight: 600;
}
.tv-pagination .current, .tv-pagination a:hover { background: var(--tv-ink); border-color: var(--tv-ink); color: #fff; }

/* Modal player */
.tv-modal {
    position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center;
    padding: 24px; background: rgba(8,10,14,.88); backdrop-filter: blur(4px);
}
.tv-modal.is-open { display: flex; animation: tvFade .2s ease; }
@keyframes tvFade { from { opacity: 0; } to { opacity: 1; } }
.tv-modal__box { position: relative; width: min(1100px, 100%); }
.tv-modal__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.tv-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv-modal__title { margin: 14px 2px 0; color: #fff; font-size: 16px; font-weight: 600; }
.tv-modal__close {
    position: absolute; top: -46px; right: 0; width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.15); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s;
}
.tv-modal__close:hover { background: #d9482c; }
body.tv-modal-open { overflow: hidden; }
@media (max-width: 575px) { .tv-modal { padding: 12px; } .tv-modal__close { top: -44px; } }

/* =========================================================================
   ADAPTIVE LAYOUTS
   1 video  -> .tv-layout--single  (feature card)
   2 videos -> .tv-grid--few       (two large centred cards)
   3+       -> .tv-layout--mosaic  (hero + playlist rows, rest in grid)
   ========================================================================= */
.tv-card__eyebrow {
    display: inline-block; font-family: 'Montserrat', 'Inter', Arial, sans-serif; font-size: 11px; font-weight: 700;
    letter-spacing: 1.4px; text-transform: uppercase; color: #fff; background: var(--tv-accent); padding: 4px 10px; border-radius: 4px;
}

/* few items: centred, capped width */
.tv-grid--few { grid-template-columns: repeat(var(--tv-cols, 2), minmax(0, var(--tv-max, 480px))); justify-content: center; }
@media (max-width: 767px) { .tv-grid--few { grid-template-columns: minmax(0, 1fr); } }

/* rest-grid that follows the mosaic */
.tv-layout--mosaic .tv-grid { margin-top: 28px; }

/* ---------- single: feature card ---------- */
.tv-layout--single { max-width: 1240px; margin: 0 auto; }
.tv-card--feature {
    flex-direction: row; align-items: stretch; background: #14171c; color: #fff; border: 0; border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.tv-card--feature:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.tv-card--feature .tv-card__media { flex: 1 1 62%; aspect-ratio: 16 / 9; }
.tv-card--feature .tv-card__play { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.tv-card--feature .tv-card__play svg { width: 34px; height: 34px; }
.tv-card--feature .tv-card__body {
    flex: 1 1 38%; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(22px, 3vw, 44px);
}
.tv-card--feature .tv-card__title { font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2; -webkit-line-clamp: 4; }
.tv-card--feature .tv-card__desc { color: rgba(255,255,255,.72); font-size: 15px; -webkit-line-clamp: 5; margin: 0; }
.tv-card__cta {
    align-self: flex-start; margin-top: 6px; padding: 12px 26px; border-radius: 999px; background: var(--tv-accent); color: #fff;
    font-family: 'Montserrat', 'Inter', Arial, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    transition: background .2s, transform .2s;
}
.tv-card--feature:hover .tv-card__cta { background: #b93a21; transform: translateX(4px); }
@media (max-width: 900px) {
    .tv-card--feature { flex-direction: column; }
    .tv-card--feature .tv-card__media { flex: none; width: 100%; }
    .tv-card--feature .tv-card__play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
}

/* ---------- mosaic: hero + side playlist ---------- */
.tv-mosaic { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.tv-mosaic__hero { display: flex; }
.tv-mosaic__hero .tv-card { flex: 1; }
.tv-mosaic__side { display: flex; flex-direction: column; gap: 16px; }
.tv-mosaic__side .tv-card { flex: 1; }

/* hero card: full-bleed thumbnail with title overlay */
.tv-card--hero { border: 0; border-radius: 18px; background: #000; box-shadow: 0 16px 44px rgba(0,0,0,.2); }
.tv-card--hero .tv-card__media { flex: 1; aspect-ratio: 16 / 9; height: 100%; }
.tv-card--hero .tv-card__shade { background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0) 62%); }
.tv-card--hero .tv-card__play { width: 78px; height: 78px; margin: -39px 0 0 -39px; }
.tv-card--hero .tv-card__play svg { width: 32px; height: 32px; }
.tv-card__overlay { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: clamp(16px, 2.4vw, 32px); }
.tv-card--hero .tv-card__title { color: #fff; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.2; -webkit-line-clamp: 3; }
.tv-card--hero .tv-card__time { bottom: auto; top: 14px; right: 14px; }

/* row card: compact horizontal "up next" item */
.tv-card--row { flex-direction: row; align-items: stretch; border-radius: 14px; }
.tv-card--row .tv-card__media { flex: 0 0 44%; aspect-ratio: auto; min-height: 96px; }
.tv-card--row .tv-card__media img { position: absolute; inset: 0; }
.tv-card--row .tv-card__play { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.tv-card--row .tv-card__play svg { width: 18px; height: 18px; }
.tv-card--row .tv-card__shade { background: linear-gradient(to top, rgba(0,0,0,.25), rgba(0,0,0,0) 60%); }
.tv-card--row .tv-card__time { right: 6px; bottom: 6px; font-size: 11px; padding: 1px 6px; }
.tv-card--row .tv-card__body { flex: 1; display: flex; align-items: center; padding: 12px 16px; min-width: 0; }
.tv-card--row .tv-card__title { font-size: 15px; -webkit-line-clamp: 3; }

@media (max-width: 991px) {
    .tv-mosaic { grid-template-columns: 1fr; gap: 16px; }
    .tv-mosaic__side { flex-direction: row; flex-wrap: wrap; }
    .tv-mosaic__side .tv-card { flex: 1 1 calc(50% - 8px); min-width: 260px; }
    .tv-card--row .tv-card__media { min-height: 84px; }
}
@media (max-width: 575px) {
    .tv-mosaic__side { flex-direction: column; }
    .tv-mosaic__side .tv-card { flex: none; width: 100%; }
    .tv-card--row .tv-card__media { flex-basis: 42%; min-height: 92px; }
}
.tv-card--feature .tv-card__eyebrow { align-self: flex-start; }
@media (max-width: 575px) {
    .tv-card--hero .tv-card__play { top: 36%; width: 56px; height: 56px; margin: -28px 0 0 -28px; }
    .tv-card--hero .tv-card__play svg { width: 24px; height: 24px; }
}
