/* Video Block Template Styles */

.sbt-video-block {
    @apply py-16 xl:py-24;
}

.sbt-video-block__container {
    @apply max-w-container mx-auto px-6 xl:px-[100px];
}

/* Header layout — solo se usa en fallback (YouTube o solo texto sin video) */
.sbt-video-block__header {
    @apply text-center mb-10 xl:mb-14;
}

.sbt-video-block__title--standalone {
    @apply text-[32px] xl:text-[56px] leading-tight mb-4 text-center;
    color: inherit;
}

.sbt-video-block__text--standalone {
    @apply text-[14px] xl:text-[16px] leading-relaxed max-w-3xl mx-auto text-center;
    color: inherit;
}

.sbt-video-block__player {
    @apply mx-auto;
    max-width: 1184px;
    width: 100%;
}

/* Self-contained native player. La altura del wrapper la define la imagen
   poster en su ratio natural (no se fuerza aspect-ratio). El video y el
   botón Play se posicionan absolutos encima ocupando ese mismo área. */
.sbt-video-block__media {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
}

.sbt-video-block__poster {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    transition: opacity .25s ease;
}

.sbt-video-block__poster img {
    display: block;
    width: 100%;
    height: auto;
}

/* Overlay sobre el poster: 2 columnas (texto izq 50% / play der 50%).
   Capa oscura por debajo (gradient) para que el texto blanco se lea. */
.sbt-video-block__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    transition: opacity .25s ease;
}

.sbt-video-block__overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
    z-index: 0;
}

.sbt-video-block__overlay-text,
.sbt-video-block__overlay-cta {
    position: relative;
    z-index: 1;
    flex: 0 0 50%;
    max-width: 50%;
}

.sbt-video-block__overlay-text {
    padding: 32px 24px 32px 40px;
    color: #fff;
}

.sbt-video-block__overlay-cta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 50px;
}

.sbt-video-block__overlay .sbt-video-block__title {
    color: #fff;
    font-size: 32px;
    line-height: 1.05;
    font-weight: 400;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
    font-family: Manrope, sans-serif;
}

.sbt-video-block__overlay .sbt-video-block__text {
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.sbt-video-block__play {
    position: relative;
    width: 96px;
    height: 96px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    transition: transform .15s ease, opacity .25s ease;
}

.sbt-video-block__play:hover {
    transform: scale(1.05);
}

.sbt-video-block__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    background: #000;
}

.sbt-video-block__media.is-playing .sbt-video-block__poster,
.sbt-video-block__media.is-playing .sbt-video-block__overlay {
    opacity: 0;
    pointer-events: none;
}

.sbt-video-block__media.is-playing .sbt-video-block__video {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .sbt-video-block__overlay {
        flex-direction: column;
        align-items: stretch;
        justify-content: space-between;
    }
    .sbt-video-block__overlay-text,
    .sbt-video-block__overlay-cta {
        flex: initial;
        max-width: 100%;
    }
    .sbt-video-block__overlay-text {
        padding: 24px 20px 0 20px;
    }
    .sbt-video-block__overlay-cta {
        justify-content: center;
        padding: 0 0 24px 0;
    }
    .sbt-video-block__overlay .sbt-video-block__title {
        font-size: 28px;
    }
    .sbt-video-block__overlay::before {
        background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.55) 100%);
    }
}

@media (max-width: 640px) {
    .sbt-video-block__media {
        border-radius: 16px;
    }
    .sbt-video-block__play {
        width: 72px;
        height: 72px;
    }
    .sbt-video-block__play svg {
        width: 72px;
        height: 72px;
    }
}

/* YouTube responsive embed */
.sbt-video-block__youtube {
    @apply relative w-full overflow-hidden mx-auto;
    aspect-ratio: 16 / 9;
    max-width: 1184px;
    border-radius: 24px;
}

.sbt-video-block__youtube iframe {
    @apply absolute top-0 left-0 w-full h-full;
}

/* When bg is container-width, add padding inside */
.sbt-video-block--bg-container .sbt-video-block__container {
    @apply py-12 xl:py-16 px-8 xl:px-16;
}

/* Font variants */
.sbt-video-block--font-sans {
    @apply font-sans;
}

.sbt-video-block--font-mono {
    @apply font-mono;
}
