/*
 * Standalone video layout
 * Keeps the existing centered, 980px presentation.
 */
.video-wrap {
    width: 100%;
    max-width: 980px;
    min-width: 0;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
    container-type: inline-size;
}

/*
 * Shared video player
 * Works in both standalone and side-by-side layouts.
 */
.video-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
}

/*
 * The YouTube IFrame API replaces .youtube-player
 * with an iframe.
 */
.video-wrapper > iframe,
.video-wrapper > .youtube-player {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* The hidden attribute must override display:flex. */
.video-wrapper .video-cta[hidden] {
    display: none !important;
}

/* Shared CTA overlay */
.video-wrapper .video-cta {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    text-align: center;
}

.video-wrapper .video-cta-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 550px;
}

.video-wrapper .video-cta-content h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
}

.video-wrapper .video-cta-content p {
    margin: 0 0 1.5rem;
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
}

.video-wrapper .video-cta-button {
    display: inline-block;
    box-sizing: border-box;
    padding: 0.85rem 1.5rem;
    border: 0;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.video-wrapper .video-cta-button:hover,
.video-wrapper .video-cta-button:focus {
    background: #e8e8e8;
    color: #111;
    text-decoration: none;
}

.video-wrapper .video-cta-button:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 4px;
}

/*
 * Reserved for the optional dismissible pause CTA.
 */
.video-wrapper .video-cta-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.video-wrapper .video-cta-close[hidden] {
    display: none !important;
}

.video-wrapper .video-cta-close:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

/*
 * Responsive CTA adjustments.
 */
@media (max-width: 480px) {
    .video-wrapper .video-cta {
        padding: 1rem;
    }

    .video-wrapper .video-cta-content h2 {
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
    }

    .video-wrapper .video-cta-content p {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }

    .video-wrapper .video-cta-button {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}






@container (max-width: 480px) {
    .video-cta {
        padding: 0.75rem;
    }

    .video-cta-content h2 {
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
    }

    .video-cta-content p {
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }

    .video-cta-button {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
    }
}






/*extra code for when video is paused*/

.video-cta {
    position: relative;
}

.video-cta-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);
    color: #fff;

    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.video-cta-close:hover,
.video-cta-close:focus-visible {
    background: rgba(255, 255, 255, 0.3);
}

.video-cta-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

