/* TVC Vovinam Dance 2027 — dùng chung trang /dance/ và trang chủ (đi cùng dance/tvc.js). */

/* --- Mục TVC trên trang /dance/ (dưới hero, trên Đối tượng & đội hình) --- */
/* Khoảng dưới ngắn hơn section thường; dải 3 màu ở đầu #the-le làm đường phân cách. */
.page-dance .dz-tvc {
    padding-bottom: clamp(40px, 6vw, 72px);
}

/* Trang /dance/ canh trái: video rộng bằng khung nội dung, thẳng hàng với tiêu đề và dải số liệu ở hero. */
.dz-tvc .tvc-card,
.dz-tvc .tvc-player {
    width: 100%;
}

/* Ảnh bìa có nút phát. */
.tvc-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg, 22px);
    background: #000;
    box-shadow: 0 18px 48px rgba(4, 16, 31, 0.28);
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

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

/* Lớp tối nhẹ phía dưới để chữ "Xem TVC" luôn đọc được. */
.tvc-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 16, 31, 0) 55%, rgba(4, 16, 31, 0.78));
    pointer-events: none;
}

.tvc-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--color-primary, #d71920);
    box-shadow: 0 0 0 0 rgba(215, 25, 32, 0.55), 0 10px 28px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease;
    animation: tvc-pulse 2.2s ease-out infinite;
}

.tvc-card__play svg {
    width: 42px;
    height: 42px;
    margin-left: 6px;
    fill: #fff;
}

.tvc-card__label {
    position: absolute;
    left: 20px;
    bottom: 16px;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.tvc-card__label strong {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tvc-card:hover img {
    transform: scale(1.03);
}

.tvc-card:hover .tvc-card__play {
    transform: translate(-50%, -50%) scale(1.08);
}

.tvc-card:focus-visible {
    outline: 3px solid var(--ring, #f5c542);
    outline-offset: 4px;
}

@keyframes tvc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(215, 25, 32, 0.55), 0 10px 28px rgba(0, 0, 0, 0.45); }
    70% { box-shadow: 0 0 0 24px rgba(215, 25, 32, 0), 0 10px 28px rgba(0, 0, 0, 0.45); }
    100% { box-shadow: 0 0 0 0 rgba(215, 25, 32, 0), 0 10px 28px rgba(0, 0, 0, 0.45); }
}

@media (max-width: 560px) {
    .tvc-card__play {
        width: 64px;
        height: 64px;
    }

    .tvc-card__play svg {
        width: 30px;
        height: 30px;
        margin-left: 4px;
    }

    .tvc-card__label {
        left: 14px;
        bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tvc-card img,
    .tvc-card__play {
        transition: none;
        animation: none;
    }
}

/* --- Trình phát (thay chỗ ảnh bìa, hoặc trong cửa sổ nổi) --- */
.tvc-player {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg, 22px);
    background: #000;
}

.tvc-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Cửa sổ nổi (trang chủ). Video vừa cả bề ngang lẫn bề cao màn hình; nút đóng nằm trên video. --- */
.tvc-dialog {
    width: min(1100px, calc(100vw - 32px), calc((100vh - 120px) * 16 / 9)); /* trình duyệt chưa có dvh */
    width: min(1100px, calc(100vw - 32px), calc((100dvh - 120px) * 16 / 9));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 56px 0 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.tvc-dialog::backdrop {
    background: rgba(4, 16, 31, 0.86);
    backdrop-filter: blur(4px);
}

.tvc-dialog__close {
    position: absolute;
    right: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.tvc-dialog__close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.tvc-dialog__close:hover {
    background: var(--color-primary, #d71920);
}

.tvc-dialog__close:focus-visible {
    outline: 3px solid var(--ring, #f5c542);
    outline-offset: 2px;
}
