/* ========== YOUTUBE EMBED ========== */
.yt-wrapper {
    margin: 48px 0;
}

.yt-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5; /* proporção panorâmica como na imagem */
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.yt-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    display: block;
}

.yt-player:hover .yt-thumb {
    transform: scale(1.03);
}

.yt-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to right,
            rgba(0,0,0,0.45) 0%,
            rgba(0,0,0,0.10) 50%,
            rgba(0,0,0,0.35) 100%
    );
    transition: background 0.3s ease;
}

.yt-player:hover .yt-overlay {
    background: rgba(0,0,0,0.35);
}

/* Botão play estilo YouTube */
.yt-btn-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, opacity 0.2s;
    z-index: 10;
}

.yt-btn-play svg {
    width: 80px;
    height: 56px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.yt-btn-bg {
    fill: #ff0000;
    opacity: 0.92;
    transition: opacity 0.2s;
}

.yt-btn-icon {
    fill: white;
}

.yt-player:hover .yt-btn-play {
    transform: translate(-50%, -50%) scale(1.1);
}

.yt-player:hover .yt-btn-bg {
    opacity: 1;
}

/* "Assista no YouTube" canto inferior direito */
.yt-assista {
    position: absolute;
    bottom: 14px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    z-index: 10;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.yt-player:hover .yt-assista { opacity: 1; }

.yt-assista-svg { width: 80px; }
.yt-logo-svg    { width: 100px; }

/* ========== MODAL ========== */
.yt-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.yt-modal.ativo {
    display: flex;
}

.yt-modal-inner {
    position: relative;
    width: 90vw;
    max-width: 960px;
}

.yt-modal-fechar {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.yt-modal-fechar:hover { opacity: 1; }

.yt-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.yt-iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .yt-player {
        aspect-ratio: 16 / 7;
    }

    .yt-btn-play svg {
        width: 56px;
        height: 40px;
    }

    .yt-modal-inner {
        width: 95vw;
    }
}

@media (max-width: 480px) {
    .yt-player {
        aspect-ratio: 16 / 9; /* full no mobile */
    }

    .yt-assista { display: none; }
}