/* ==========================================================================
   Markad Publicidad Estudio — Sección de video
   ========================================================================== */


/* --------------------------------------------------------------------------
   Sección principal
   -------------------------------------------------------------------------- */

.mk-video-showcase {
    position: relative;
    display: flex;
    min-height: 620px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--mk-indigo-950);
    color: var(--mk-white);
    isolation: isolate;
}


/* --------------------------------------------------------------------------
   Imagen de fondo
   -------------------------------------------------------------------------- */

.mk-video-showcase__background {
    position: absolute;
    z-index: -3;
    inset: 0;
}

.mk-video-showcase__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* --------------------------------------------------------------------------
   Capa de color corporativo
   -------------------------------------------------------------------------- */

.mk-video-showcase__overlay {
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        rgba(8, 13, 38, 0.78);
    pointer-events: none;
}


/* --------------------------------------------------------------------------
   Contenido
   -------------------------------------------------------------------------- */

.mk-video-showcase__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block:
        clamp(90px, 10vw, 140px);
    text-align: center;
}

.mk-video-showcase__header {
    display: flex;
    max-width: 920px;
    flex-direction: column;
    align-items: center;
}


/* --------------------------------------------------------------------------
   Etiqueta superior
   -------------------------------------------------------------------------- */

.mk-video-showcase__eyebrow {
    margin-bottom: 20px;
    color: var(--mk-magenta-400);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}


/* --------------------------------------------------------------------------
   Título
   -------------------------------------------------------------------------- */

.mk-video-showcase__title {
    max-width: 900px;
    margin: 0;
    color: var(--mk-white);
    font-family: var(--mk-font-heading);
    font-size: clamp(
        2.3rem,
        4vw,
        4.25rem
    );
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.035em;
}


/* --------------------------------------------------------------------------
   Descripción
   -------------------------------------------------------------------------- */

.mk-video-showcase__description {
    max-width: 760px;
    margin-top: 24px;
    color: var(--mk-text-light-muted);
    font-size: 1.04375rem;
    line-height: 1.72;
}


/* ==========================================================================
   Botón de reproducción
   ========================================================================== */

.mk-video-showcase__play {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 38px;
    color: var(--mk-white);
}


/* --------------------------------------------------------------------------
   Círculo del video
   -------------------------------------------------------------------------- */

.mk-video-showcase__play-icon {
    position: relative;
    display: inline-flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    border: 1px solid
        rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background:
        rgba(255, 255, 255, 0.08);
    color: var(--mk-white);
    box-shadow:
        0 0 0 12px
        rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color var(--mk-transition-base),
        background-color var(--mk-transition-base),
        box-shadow var(--mk-transition-base),
        transform var(--mk-transition-base);
}

.mk-video-showcase__play-icon svg {
    width: 30px;
    height: 30px;
    margin-left: 4px;
    fill: currentColor;
    stroke: none;
}


/* --------------------------------------------------------------------------
   Texto del botón
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Etiqueta del botón tipo cápsula
   -------------------------------------------------------------------------- */

.mk-video-showcase__play-label {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border: 1px solid
        rgba(255, 255, 255, 0.24);
    border-radius: var(--mk-border-radius-pill);
    background:
        rgba(255, 255, 255, 0.07);
    color: var(--mk-white);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color var(--mk-transition-base),
        background-color var(--mk-transition-base),
        box-shadow var(--mk-transition-base),
        transform var(--mk-transition-base);
}


/* --------------------------------------------------------------------------
   Hover
   -------------------------------------------------------------------------- */

.mk-video-showcase__play:hover
.mk-video-showcase__play-icon {
    border-color: var(--mk-magenta-400);
    background: var(--mk-magenta-700);
    box-shadow:
        0 0 0 14px
        rgba(163, 44, 204, 0.12);
    transform: scale(1.04);
}

.mk-video-showcase__play:hover
.mk-video-showcase__play-label {
    border-color: var(--mk-magenta-500);
    background: var(--mk-magenta-700);
    color: var(--mk-white);
    box-shadow:
        0 12px 28px
        rgba(8, 13, 38, 0.2);
    transform: translateY(-1px);
}


/* --------------------------------------------------------------------------
   Foco accesible
   -------------------------------------------------------------------------- */

.mk-video-showcase__play:focus-visible {
    outline: none;
}

.mk-video-showcase__play:focus-visible
.mk-video-showcase__play-icon {
    outline: 3px solid
        rgba(209, 91, 234, 0.45);
    outline-offset: 7px;
}


/* ==========================================================================
   Transcripción
   ========================================================================== */

.mk-video-showcase__transcript {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 70px;
}

.mk-video-showcase__transcript details {
    border: 1px solid
        rgba(255, 255, 255, 0.14);
    border-radius: var(--mk-border-radius-md);
    background:
        rgba(8, 13, 38, 0.55);
}

.mk-video-showcase__transcript summary {
    padding: 18px 22px;
    color: var(--mk-white);
    font-weight: 700;
}

.mk-video-showcase__transcript-content {
    padding:
        0
        22px
        22px;
    color: var(--mk-text-light-muted);
    line-height: 1.75;
}

/* ==========================================================================
   Modal del video
   ========================================================================== */

.mk-video-dialog {
    position: fixed;
    z-index: calc(
        var(--mk-z-modal) + 100
    );
    inset: 0;
    display: flex;
    width: 100%;
    min-width: 100vw;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    padding: clamp(
        16px,
        3vw,
        40px
    );
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    pointer-events: none;
    transition:
        visibility var(--mk-transition-base),
        opacity var(--mk-transition-base);
}

.mk-video-dialog[hidden] {
    display: none;
}

.mk-video-dialog.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


/* --------------------------------------------------------------------------
   Fondo del modal
   -------------------------------------------------------------------------- */

.mk-video-dialog__backdrop {
    position: fixed;
    z-index: 0;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    background:
        rgba(3, 6, 22, 0.92);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


/* --------------------------------------------------------------------------
   Ventana del reproductor
   -------------------------------------------------------------------------- */

.mk-video-dialog__content {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(
        1100px,
        calc(100vw - 48px)
    );
    max-height: calc(
        100dvh - 48px
    );
    flex-direction: column;
    overflow: hidden;
    border: 1px solid
        rgba(255, 255, 255, 0.16);
    border-radius: var(--mk-border-radius-lg);
    background: var(--mk-indigo-950);
    box-shadow:
        0 32px 110px
        rgba(0, 0, 0, 0.6);
    transform:
        translateY(24px)
        scale(0.98);
    transition:
        transform var(--mk-transition-slow);
}

.mk-video-dialog.is-open
.mk-video-dialog__content {
    transform:
        translateY(0)
        scale(1);
}


/* --------------------------------------------------------------------------
   Encabezado
   -------------------------------------------------------------------------- */

.mk-video-dialog__header {
    display: flex;
    min-height: 70px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding:
        13px
        16px
        13px
        24px;
    border-bottom: 1px solid
        rgba(255, 255, 255, 0.12);
    background: var(--mk-indigo-950);
}

.mk-video-dialog__title {
    margin: 0;
    color: var(--mk-white);
    font-family: var(--mk-font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}


/* --------------------------------------------------------------------------
   Botón cerrar
   -------------------------------------------------------------------------- */

.mk-video-dialog__close {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid
        rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background:
        rgba(255, 255, 255, 0.04);
    color: var(--mk-white);
}

.mk-video-dialog__close span {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.mk-video-dialog__close span:first-child {
    transform: rotate(45deg);
}

.mk-video-dialog__close span:last-child {
    transform: rotate(-45deg);
}

.mk-video-dialog__close:hover {
    border-color: var(--mk-magenta-500);
    background: var(--mk-magenta-700);
    color: var(--mk-white);
    transform: rotate(4deg);
}

.mk-video-dialog__close:focus-visible {
    outline: 3px solid
        rgba(209, 91, 234, 0.42);
    outline-offset: 3px;
}


/* --------------------------------------------------------------------------
   Reproductor responsive
   -------------------------------------------------------------------------- */

.mk-video-dialog__player {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--mk-black);
}

.mk-video-dialog__video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: calc(
        100dvh - 118px
    );
    border: 0;
    background: var(--mk-black);
    object-fit: contain;
}

.mk-video-dialog__video--mobile {
    display: none;
}



/* ==========================================================================
   Modal en tablet
   ========================================================================== */

@media (max-width: 900px) {

    .mk-video-dialog {
        padding: 18px;
    }

    .mk-video-dialog__content {
        width: calc(100vw - 36px);
        max-height: calc(
            100dvh - 36px
        );
    }

}

/* --------------------------------------------------------------------------
   Video vertical en móvil
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {

    .mk-video-dialog__content:has(
        .mk-video-dialog__player.has-mobile-video
    ) {
        width: min(
            calc(100vw - 20px),
            430px
        );
    }

    .mk-video-dialog__player.has-mobile-video {
        width: auto;
        max-width: 100%;
        height: calc(
            100dvh - 94px
        );
        max-height: 760px;
        margin-inline: auto;
        aspect-ratio: 9 / 16;
    }

    .mk-video-dialog__player.has-mobile-video
    .mk-video-dialog__video--desktop {
        display: none;
    }

    .mk-video-dialog__player.has-mobile-video
    .mk-video-dialog__video--mobile {
        display: block;
    }

    .mk-video-dialog__video {
        max-height: calc(
            100dvh - 94px
        );
    }

}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 900px) {

    .mk-video-showcase {
        min-height: 570px;
    }

    .mk-video-showcase__container {
        padding-block: 90px;
    }

    .mk-video-showcase__title {
        font-size: clamp(
            2.2rem,
            6vw,
            3.5rem
        );
    }

}


/* ==========================================================================
   Móvil
   ========================================================================== */

@media (max-width: 600px) {

    .mk-video-showcase {
        min-height: 620px;
    }

    .mk-video-showcase__container {
        padding-block: 74px;
    }

    .mk-video-showcase__title {
        font-size: clamp(
            2rem,
            9vw,
            2.9rem
        );
    }

    .mk-video-showcase__description {
        margin-top: 20px;
        font-size: 1rem;
    }

    .mk-video-showcase__play {
        margin-top: 32px;
    }

    .mk-video-showcase__play-icon {
        width: 70px;
        height: 70px;
    }

    .mk-video-dialog {
        padding: 12px;
    }

    .mk-video-dialog__header {
        min-height: 64px;
        padding-inline: 18px 12px;
    }

    .mk-video-dialog__title {
        font-size: 0.92rem;
    }

}


/* ==========================================================================
   Movimiento reducido
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .mk-video-showcase__play-icon,
    .mk-video-showcase__play-label,
    .mk-video-dialog,
    .mk-video-dialog__content {
        transition-duration: 0.01ms;
    }

}