/* =========================================================
   MÓDULO GENERAL DE VIDEOS YOUTUBE
========================================================= */

.VideoYoutube[hidden],
.VideoYoutubeModal[hidden] {
    display: none !important;
}

/* =========================================================
   SECCIÓN PRINCIPAL
========================================================= */

.VideoYoutube {
    width: 100%;
    margin-top: 42px;
}

.VideoYoutubeEncabezado {
    margin-bottom: 24px;
}

.VideoYoutubeEtiqueta {
    display: inline-block;

    margin-bottom: 8px;

    color: #7d0d2f;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.VideoYoutubeTitulo {
    margin: 0;

    color: #222222;

    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.VideoYoutubeDescripcion {
    max-width: 760px;

    margin: 12px 0 0;

    color: #666666;

    font-size: 16px;
    line-height: 1.7;
}

/* =========================================================
   LISTA DE VIDEOS
========================================================= */

.VideoYoutubeLista {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 22px;
}

.VideoYoutubeTarjeta {
    position: relative;

    width: 100%;
    padding: 0;

    overflow: hidden;

    border: 0;
    border-radius: 18px;

    background: #111111;

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.14);

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.VideoYoutubeTarjeta:hover {
    transform: translateY(-5px);

    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.2);
}

.VideoYoutubeTarjetaHorizontal {
    grid-column: 1 / -1;

    aspect-ratio: 16 / 9;
}

.VideoYoutubeTarjetaVertical {
    aspect-ratio: 9 / 16;
}

.VideoYoutubeMiniatura {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.VideoYoutubeCapa {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;

    padding: 22px;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.82),
            rgba(0, 0, 0, 0.04) 58%
        );
}

.VideoYoutubeTarjetaTitulo {
    margin: 0;
    padding-right: 68px;

    color: #ffffff;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;

    text-align: left;
}

.VideoYoutubeBotonReproducir {
    position: absolute;
    top: 50%;
    left: 50%;

    display: grid;
    place-items: center;

    width: 64px;
    height: 64px;

    border-radius: 50%;

    color: #ffffff;
    background: #7d0d2f;

    font-size: 24px;

    transform: translate(-50%, -50%);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   MODAL
========================================================= */

.VideoYoutubeModal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.VideoYoutubeFondo {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    padding: 0;

    border: 0;

    background: rgba(0, 0, 0, 0.84);

    cursor: pointer;
}

.VideoYoutubeModalContenido {
    position: relative;
    z-index: 1;

    width: min(1050px, calc(100vw - 48px));

    border-radius: 18px;
    background: #000000;

    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.48);
}

.VideoYoutubeModalContenido.es-horizontal {
    max-width: 1050px;
}

.VideoYoutubeModalContenido.es-vertical {
    width: min(430px, calc(100vw - 48px));
}

.VideoYoutubeReproductor {
    position: relative;

    width: 100%;

    overflow: hidden;

    border-radius: 18px;
}

.VideoYoutubeModalContenido.es-horizontal
.VideoYoutubeReproductor {
    aspect-ratio: 16 / 9;
}

.VideoYoutubeModalContenido.es-vertical
.VideoYoutubeReproductor {
    aspect-ratio: 9 / 16;
}

.VideoYoutubeReproductor iframe {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

.VideoYoutubeCerrar {
    position: absolute;
    top: -15px;
    right: -15px;
    z-index: 2;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    color: #ffffff;
    background: #7d0d2f;

    font-size: 20px;

    cursor: pointer;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.28);
}

body.VideoYoutubeBloqueado {
    overflow: hidden;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 850px) {

    .VideoYoutubeLista {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .VideoYoutubeTarjetaHorizontal {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {

    .VideoYoutube {
        margin-top: 30px;
    }

    .VideoYoutubeLista {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .VideoYoutubeTarjetaHorizontal,
    .VideoYoutubeTarjetaVertical {
        grid-column: auto;
    }

    .VideoYoutubeTarjetaVertical {
        max-width: 360px;
        margin-inline: auto;
    }

    .VideoYoutubeModal {
        padding: 16px;
    }

    .VideoYoutubeModalContenido,
    .VideoYoutubeModalContenido.es-vertical {
        width: calc(100vw - 32px);
    }

    .VideoYoutubeCerrar {
        top: -12px;
        right: -8px;
    }
}