/* ==============================
   Acceseo Video Slider
================================= */

/* Romper padding lateral de contenedores Elementor (slider a ancho de pantalla) */
.elementor-element:has(.acceseo-video-slider-section),
.e-con:has(.acceseo-video-slider-section) {
    --padding-left: 0 !important;
    --padding-right: 0 !important;
}

.elementor-widget-shortcode:has(.acceseo-video-slider-section) .elementor-widget-container {
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
}

.acceseo-video-slider-section {
    position: relative;
    z-index: 1;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: visible;
    font-family: "Poppins", sans-serif;
    background: transparent;
    padding: clamp(20px, 3vw, 20px) 0 30px;
    box-sizing: border-box;
    isolation: isolate;
}

/* Fondo full-bleed del carrusel */
.acceseo-video-slider-section::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    top: 0;
    bottom: 0;
    min-height: 100%;
    pointer-events: none;
    background-color: #f6f9ff;
    background-image: url("../image/fondo-carrusel-video.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

/* Línea separadora: 100% del viewport, pegada al borde inferior del bloque */
.acceseo-video-slider-section::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 1;
    width: 100vw;
    max-width: none;
    height: 1px;
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
    background-color: #d3e4ff;
    pointer-events: none;
    box-sizing: border-box;
}

/* Continuidad del fondo azul debajo de la línea, sobre la siguiente sección (sin bloquear clics) */
.acceseo-video-slider__post-bleed {
    position: absolute;
    left: 50%;
    top: 100%;
    z-index: 2;
    width: 100vw;
    max-width: none;
    height: clamp(96px, 7vh, 260px);
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
    pointer-events: none;
    box-sizing: border-box;
    background: linear-gradient(
        180deg,
        #e8f0ff 0%,
        rgba(230, 240, 255, 0.65) 35%,
        rgba(246, 249, 255, 0.28) 70%,
        rgba(255, 255, 255, 0) 100%
    );
}

.acceseo-video-slider__nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: calc(100% - clamp(32px, 6vw, 80px));
    max-width: calc(100% - clamp(32px, 6vw, 80px));
    margin: 0 auto 32px;
    padding: 1px;
    border: 1px solid #000;
    border-radius: 35px;
    box-sizing: border-box;
    max-width: 1620px;
}

.acceseo-video-slider__tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px 16px;
    border: none;
    border-radius: 0;
    background: #ffffff;
    color: #000;
    font-size: 25px;
    font-weight: 500;
    line-height: 95%;
    letter-spacing: -1.25px;
    text-align: center;
    cursor: pointer;
    appearance: none;
    box-shadow: inset -1px 0 0 #ffffff;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, z-index 0s;
}

.acceseo-video-slider__tab:last-child {
    box-shadow: none;
}

.acceseo-video-slider__tab:first-child {
    border-radius: 34px 0 0 34px;
}

.acceseo-video-slider__tab:last-child {
    border-radius: 0 34px 34px 0;
}

.acceseo-video-slider__tab:hover:not(.is-active):not([aria-selected="true"]),
.acceseo-video-slider__tab:focus-visible:not(.is-active):not([aria-selected="true"]) {
    z-index: 2;
    background: #2c3e5f;
    color: #ffffff;
    border-color: #2c3e5f;
}

.acceseo-video-slider__tab:focus-visible:not(.is-active):not([aria-selected="true"]) {
    outline: 2px solid #2c3e5f;
    outline-offset: 2px;
}

.acceseo-video-slider__tab:active:not(.is-active):not([aria-selected="true"]) {
    background: #2c3e5f;
    border-color: #2c3e5f;
}

.acceseo-video-slider__tab.is-active,
.acceseo-video-slider__tab[aria-selected="true"] {
    z-index: 3;
    background: #2c3e5f;
    color: #ffffff;
    border-color: #2c3e5f;
}

/* Swiper (misma estructura que el demo oficial: .swiper > .swiper-wrapper > .swiper-slide) */

.acceseo-video-slider.swiper,
.videos-slider.swiper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: clamp(16px, 3vw, 48px);
    padding-right: clamp(16px, 3vw, 48px);
    overflow: hidden;
    box-sizing: border-box;
    padding-bottom: 20px;
}

/* slidesPerView: auto — ancho del slide en CSS (~1.2 visibles) */

.acceseo-video-slider .swiper-slide.videos-slide {
    width: 83.333%;
    box-sizing: border-box;
    height: auto;
}

.videos-slide-card {
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    align-items: center;
    gap: 53px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px 16px;
    box-sizing: border-box;
    min-height: 212px;
    will-change: transform;
    box-shadow: 0 4px 24px rgba(44, 62, 95, 0.14);
}

.swiper-slide-active .videos-slide-card,
.videos-slide.is-active .videos-slide-card {
    will-change: transform;
}

.acceseo-video-slider-section .videos-slide-heading {
    color: #000;
    margin: 10px 0 40px;
    font-size: 55px;
    font-weight: 500;
    line-height: 100%;
    text-align: center;
    letter-spacing: -2.75px;
    opacity: 0;
    visibility: hidden;
}

.acceseo-video-slider-section .swiper-slide-active .videos-slide-heading {
    visibility: visible;
    animation: avs-heading-enter 1s ease forwards;
}

@keyframes avs-heading-enter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acceseo-video-slider-section .swiper-slide-active .videos-slide-heading {
        animation: none;
        opacity: 1;
    }
}

.videos-slide-media {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    min-height: 190px;
}

.videos-slide-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    border-radius: 10px;
}

/* Contenido */

.videos-slide-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.videos-slide-kicker {
    display: none;
}

.videos-slide-content h3 {
    margin: 0 0 18px;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 700;
    line-height: 1.05;
    color: #111111;
}

/* Lista */

.videos-slide-list {
    list-style: none;
    margin: 40px 0 0 0 !important;
    padding: 0 !important;
}

.videos-slide-list li {
    position: relative;
    color: #000;
    margin-bottom: 24px;
    padding-left: 36px;
    font-size: 30px;
    line-height: 95%;
    font-weight: 400;
    letter-spacing: -1.8px;
}

.videos-slide-list li:last-child {
    margin-bottom: 0;
}

.videos-slide-list li::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 0px;
    width: 30px;
    height: 29px;
    background: url("../image/checkmark.svg") no-repeat center / contain;
}

/* Botón */

.videos-slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 20px;
    border-radius: 25px;
    background: #4979D1;
    color: #ffffff;
    font-size: 25px;
    font-weight: 500;
    line-height: 95%;
    letter-spacing: -1.25px;
    text-decoration: none;
    box-shadow: 0 4px 4px 0 rgba(112, 112, 112, 0.30);
    transition: background 0.25s ease, transform 0.25s ease;
}

.videos-slide-button:hover,
.videos-slide-button:focus {
    background: #346bc4;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Flechas en los bordes del contenedor swiper */

.acceseo-video-slider.swiper {
    --avs-arrow-size: 48px;
    --avs-arrow-inset: 7.5%;
}

.acceseo-video-slider__arrow,
.videos-slider-arrow,
.acceseo-video-slider .swiper-button-prev,
.acceseo-video-slider .swiper-button-next {
    position: absolute;
    top: 58%;
    z-index: 30;
    width: var(--avs-arrow-size);
    height: var(--avs-arrow-size);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transform: translateY(-50%);
    transition: opacity 0.25s ease;
}

.acceseo-video-slider__arrow::after,
.videos-slider-arrow::after,
.acceseo-video-slider .swiper-button-prev::after,
.acceseo-video-slider .swiper-button-next::after {
    content: none;
    display: none;
}

.acceseo-video-slider__arrow--prev,
.videos-slider-arrow-prev,
.acceseo-video-slider .swiper-button-prev {
    left: var(--avs-arrow-inset);
    right: auto;
}

.acceseo-video-slider__arrow--next,
.videos-slider-arrow-next,
.acceseo-video-slider .swiper-button-next {
    left: auto;
    right: var(--avs-arrow-inset);
}

.acceseo-video-slider__arrow .acceseo-video-slider__arrow-icon,
.videos-slider-arrow .acceseo-video-slider__arrow-icon {
    display: block;
    width: var(--avs-arrow-size);
    height: var(--avs-arrow-size);
    object-fit: contain;
    pointer-events: none;
    border-radius: 100% !important;
}

.acceseo-video-slider__arrow--next .acceseo-video-slider__arrow-icon,
.videos-slider-arrow-next .acceseo-video-slider__arrow-icon,
.acceseo-video-slider .swiper-button-next .acceseo-video-slider__arrow-icon {
    transform: rotate(90deg);
}

.acceseo-video-slider__arrow--prev .acceseo-video-slider__arrow-icon,
.videos-slider-arrow-prev .acceseo-video-slider__arrow-icon,
.acceseo-video-slider .swiper-button-prev .acceseo-video-slider__arrow-icon {
    transform: rotate(-90deg);
}

.acceseo-video-slider__arrow:disabled,
.acceseo-video-slider__arrow.is-disabled,
.videos-slider-arrow:disabled,
.videos-slider-arrow.is-disabled,
.acceseo-video-slider .swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}
/* ==============================
     Pantalla pequeña
  ================================= */
  @media (max-width: 1480px) {
    .videos-slide-list li {
        margin-bottom: 18px;
        padding-left: 36px;
        font-size: 24px;
    }

    .videos-slide-list li::before {
        top: 0px;
    }
}


/* ==============================
     Tablet
  ================================= */

@media (max-width: 1024px) {
    .acceseo-video-slider__nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 20px;
        padding-bottom: 1px;
        border-radius: 28px;
    }

    .acceseo-video-slider__nav::-webkit-scrollbar {
        display: none;
    }

    .acceseo-video-slider__tab {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 40px;
        font-size: 13px;
        letter-spacing: -0.65px;
        padding: 8px 12px;
        width: 25%;
    }

    .acceseo-video-slider__tab:first-child {
        border-radius: 27px 0 0 27px;
    }

    .acceseo-video-slider__tab:last-child {
        border-radius: 0 27px 27px 0;
    }

    .videos-slide-card {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 18px;
    }

    .acceseo-video-slider-section .videos-slide-heading {
        font-size: 32px !important;
        letter-spacing: -1.5px;
    }

    .videos-slide-content h3 {
        font-size: 30px;
    }

    .videos-slide-list{
        margin: 20px 0 20px 0 !important;
    }
    .videos-slide-list li {
        font-size: 22px;
        margin-bottom: 0;
        min-height: 30px;
        display: flex;
        align-items: center;
    }
    .videos-slide-list li:before {
        top: 0px;
    }

    .acceseo-video-slider.swiper {
        --avs-arrow-inset: 10px;
        --avs-arrow-size: 36px;
    }
}

/* ==============================
     Play overlay
  ================================= */

.videos-slide-media--video {
    cursor: pointer;
}

.videos-slide-media--video::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.28);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='38' fill='white' fill-opacity='.9'/%3E%3Cpath d='M31 22 L31 58 L61 40 Z' fill='%234979D1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 72px 72px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.videos-slide-media--video:hover::after,
.videos-slide-media--video:focus-visible::after {
    opacity: 1;
}

/* ==============================
     Video modal (bg-video-modal)
  ================================= */

.slider-bg-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    background: rgba(0, 0, 0, 0.90);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: bgModalIn 0.2s ease;
}

.slider-bg-video-modal[hidden] { display: none !important; }

@keyframes bgModalIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.slider-bg-video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.slider-bg-video-modal-close {
    position: absolute;
    top: -42px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
    outline: none !important;
    box-shadow: none !important;
}

.slider-bg-video-modal-close:hover {
    opacity: 1;
}

.slider-bg-video-modal-close:focus,
.slider-bg-video-modal-close:focus-visible {
    outline: none !important;
}

.slider-bg-video-modal-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.slider-bg-video-modal-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==============================
     Móvil
  ================================= */

@media (max-width: 767px) {
    .acceseo-video-slider-section {
        overflow: visible;
    }

    /* Nav 2×2 — pegados por columnas, separados por filas */
    .acceseo-video-slider__nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 0;
        row-gap: 8px;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        margin: 0 16px 20px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .acceseo-video-slider__tab {
        flex: none;
        width: 100%;
        min-height: 36px;
        margin: 0;
        padding: 8px 6px;
        border: 1px solid #2c3e5f;
        border-radius: 0;
        box-shadow: none;
        font-size: 13px;
        line-height: 1.15;
        white-space: normal;
        letter-spacing: -0.65px;
    }

    /* Fila 1 y 2 — columna izquierda */
    .acceseo-video-slider__tab:nth-child(odd) {
        border-radius: 28px 0 0 28px;
    }

    /* Fila 1 y 2 — columna derecha (pegada a la izquierda) */
    .acceseo-video-slider__tab:nth-child(even) {
        margin-left: -1px;
        border-radius: 0 28px 28px 0;
        box-shadow: inset 1px 0 0 #ffffff;
    }

    .acceseo-video-slider.swiper,
    .videos-slider.swiper {
        padding-left: 16px;
        padding-right: 16px;
    }

    .acceseo-video-slider .swiper-slide.videos-slide {
        width: 86vw;
    }

    /* Título: fade-in 1s en .swiper-slide-active */
    .acceseo-video-slider-section .videos-slide-heading {
        display: flex;
        font-size: 22px !important;
        letter-spacing: -1px;
        margin: 0 0 22px;
        text-align: center;
        min-height: 40px;
        justify-content: center;
        align-items: center;
    }

    /* Card: media → CTA → lista */
    .videos-slide-card {
        display: flex;
        flex-direction: column;
        gap: 16px;
        grid-template-columns: none;
        padding: 16px;
        border-radius: 40px 40px 5px 5px;
        background: linear-gradient(180deg,#8eb6f6 0%,#c9dcfa 35%,#eef5ff 70%,#ffffff 100%);
        box-shadow: 0 4px 20px rgba(44, 62, 95, 0.16);
        min-height: 417px;
    }

    .videos-slide-media,
    .videos-slide-media img {
        min-height: 140px;
        border-radius: 30px !important;
    }

    .videos-slide-content {
        display: flex;
        flex-direction: column;
        gap: 16px;
        height: auto;
        width: 100%;
    }

    .videos-slide-content h3 {
        font-size: 26px;
        margin-bottom: 0;
    }

    .videos-slide-list {
        order: 3;
        margin: 0 !important;
    }

    .videos-slide-list li {
        font-size: 15px;
        padding-left: 28px;
        margin-bottom: 0px;
        letter-spacing: -0.9px;
        padding-top: 5px;
        min-height: 35px;
        display: flex;
        align-items: center;
    }
    .videos-slide-list li:before {
        top: 5px;
    }

    .videos-slide-button {
        order: 2;
        font-size: 16px !important;
        min-height: 42px;
        padding: 8px 16px;
        border-radius: 21px;
    }

    /* Flechas */
    .acceseo-video-slider.swiper {
        --avs-arrow-inset: 6px;
        --avs-arrow-size: 32px;
    }

    .slider-bg-video-modal {
        padding: 12px;
    }

    .slider-bg-video-modal-close {
        top: -38px;
        font-size: 34px;
    }

    .videos-slide-media--video::after {
        background-size: 52px 52px;
    }
}
