/* Explain: Styles for the video player and modal. */
.video-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.video-thumb:hover {
    transform: translateY(-4px);
}

.video-thumb-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(51, 57, 58, 0.05), rgba(51, 57, 58, 0.42));
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    padding-left: 0.28rem;
    box-shadow: 0 14px 32px -12px rgba(51, 57, 58, 0.55);
    transition: transform 0.3s ease, background 0.3s ease;
}

.video-thumb:hover .video-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #fff;
}

.video-thumb:focus-visible,
.video-modal-close:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal.is-open {
    display: flex;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 34, 34, 0.82);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.video-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 60rem;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

.video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.video-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.video-modal-close:hover {
    background: #fff;
    transform: scale(1.05);
}

body.has-video-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .video-play {
        width: 3.75rem;
        height: 3.75rem;
        font-size: 1.15rem;
    }
}