/* Nota de Transparencia: Código generado/refactorizado con asistencia de IA Generativa (Claude Code) bajo la Política ODTI012 del CCS. Requiere supervisión y validación humana permanente. */
/* Banner del inicio: logo y textos a la izquierda; fotos y videos del carrusel como tarjetas apiladas a la derecha */

.bi {
    display: grid;
    /* Las fotos y videos se llevan la mayor parte del ancho */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 48px;
    min-height: 78vh;
    padding: 70px clamp(20px, 5vw, 80px) 60px;
    /* Termina abajo en el mismo azul de la sección siguiente (Próximos Eventos / ¿Por qué?) para que no se vea el corte */
    /* El último tercio es azul-letra puro (sin brillos) para que empate sin línea con la sección de abajo */
    background:
        radial-gradient(ellipse 60% 55% at 82% 12%, rgba(67, 188, 255, .18) 0%, rgba(67, 188, 255, 0) 100%),
        linear-gradient(180deg, var(--azul, #09579e) 0%, var(--azul-letra, #002C81) 68%, var(--azul-letra, #002C81) 100%);
    color: #fff;
    font-family: var(--letra2, 'Lexend', sans-serif);
    overflow: hidden;
}

.bi.bi_sin_piezas {
    grid-template-columns: 1fr;
    text-align: center;
}

.bi_texto {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 560px;
}

.bi_sin_piezas .bi_texto {
    margin: 0 auto;
    align-items: center;
}

.bi_marca {
    margin: 0;
    line-height: 1;
}

.bi_logo {
    display: block;
    width: auto;
    max-width: min(100%, 520px);
    max-height: 170px;
    object-fit: contain;
}

.bi_titulo {
    color: #fff;
    font-family: var(--letra, 'Oswald', sans-serif);
    font-weight: 700;
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    letter-spacing: .02em;
}

.bi_lema {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 300;
}

.bi_lema i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--verde-forforesente, #6FD100);
}

.bi_desc {
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 1.05rem;
    line-height: 1.55;
}

.bi_botones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.bi_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    white-space: nowrap;
    border: 2px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.bi_btn.verde {
    background: var(--verde-forforesente, #6FD100);
    color: var(--azul-opaco, #0E0F27);
}

.bi_btn.borde {
    border-color: rgba(255, 255, 255, .75);
    color: #fff;
}

.bi_btn:hover,
.bi_btn:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--azul-letra, #002C81);
}

/* Tarjetas apiladas: la activa adelante, las dos siguientes detrás (más arriba y más pequeñas) */
.bi_zona {
    position: relative;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
}

/* Computador: tarjeta grande de tamaño fijo 16:9 (las piezas de "Ordenador" son horizontales) */
.bi_pila {
    position: relative;
    width: 96%;
    margin: 44px auto 0;
    aspect-ratio: 16 / 9;
}

.bi_carta {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: var(--azul-opaco, #0E0F27);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(0) scale(.9);
    transition: transform .5s ease, opacity .5s ease;
}

.bi_carta img,
.bi_carta video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.bi_carta:focus-visible {
    outline: 3px solid var(--verde-forforesente, #6FD100);
    outline-offset: 4px;
}

.bi_controles {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
}

.bi_flecha,
.bi_pausa {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--azul-letra, #002C81);
    font-size: 1.2rem;
    cursor: pointer;
}

.bi_pausa {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 1rem;
}

.bi_flecha:hover,
.bi_pausa:hover {
    background: var(--border, #43BCFF);
    color: var(--azul-letra, #002C81);
}

.bi_puntos {
    display: flex;
    gap: 8px;
}

.bi_puntos button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .2s ease;
}

.bi_puntos button.activo {
    width: 28px;
    background: var(--verde-forforesente, #6FD100);
}

/* Botón "Ampliar video" sobre la tarjeta del frente */
/* Arriba a la derecha: abajo suele estar el texto de las piezas y lo tapaba */
.bi_ampliar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(14, 15, 39, .72);
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.bi_ampliar[hidden] {
    display: none;
}

.bi_ampliar ion-icon {
    font-size: 1.1rem;
    color: var(--verde-forforesente, #6FD100);
}

.bi_ampliar:hover,
.bi_ampliar:focus-visible {
    background: var(--verde-forforesente, #6FD100);
    color: var(--azul-opaco, #0E0F27);
    transform: scale(1.04);
}

.bi_ampliar:hover ion-icon,
.bi_ampliar:focus-visible ion-icon {
    color: var(--azul-opaco, #0E0F27);
}

/* Modal de video con controles propios */
html.bi_modal_abierto {
    overflow: hidden;
}

/* Centrado a la fuerza: el CSS general del sitio le quita al <dialog> el margin:auto con que el navegador lo centra */
.bi_modal {
    position: fixed;
    inset: 0;
    width: min(1180px, 94vw);
    height: fit-content;
    max-width: none;
    max-height: 94vh;
    margin: auto !important;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    overflow: visible;
}

.bi_modal::backdrop {
    background: rgba(14, 15, 39, .88);
    backdrop-filter: blur(6px);
}

.bi_reproductor {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    font-family: var(--letra2, 'Lexend', sans-serif);
}

.bi_reproductor video {
    display: block;
    width: 100%;
    max-height: 84vh;
    background: #000;
    cursor: pointer;
}

/* Modo imagen: la imagen completa (sin recortar) y sin controles de video */
.bi_imagen {
    display: none;
}

.bi_reproductor.modo_imagen {
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.bi_reproductor.modo_imagen video,
.bi_reproductor.modo_imagen .bi_barra,
.bi_reproductor.modo_imagen .bi_centro {
    display: none !important;
}

.bi_reproductor.modo_imagen .bi_imagen {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 88vh;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    object-fit: contain;
}

.bi_ver_mas {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 3;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 999px;
    background: var(--verde-forforesente, #6FD100);
    color: var(--azul-opaco, #0E0F27);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.bi_ver_mas[hidden] {
    display: none;
}

.bi_ver_mas:hover,
.bi_ver_mas:focus-visible {
    background: #fff;
    color: var(--azul-letra, #002C81);
}

/* En video, "Ver más" va arriba a la izquierda para no tapar los controles */
.bi_reproductor:not(.modo_imagen) .bi_ver_mas {
    top: 14px;
    bottom: auto;
    left: 14px;
    transform: none;
}

.bi_reproductor:fullscreen {
    border-radius: 0;
    display: flex;
    align-items: center;
}

.bi_reproductor:fullscreen video {
    max-height: 100vh;
    height: 100%;
}

.bi_centro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding: 0 0 0 6px;
    border: 0;
    border-radius: 50%;
    background: var(--verde-forforesente, #6FD100);
    color: var(--azul-opaco, #0E0F27);
    font-size: 2.4rem;
    cursor: pointer;
    box-shadow: 0 0 0 10px rgba(111, 209, 0, .25);
    transition: transform .15s ease;
}

.bi_centro:hover {
    transform: translate(-50%, -50%) scale(1.07);
}

.bi_centro[hidden] {
    display: none;
}

.bi_cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--azul-letra, #002C81);
    font-size: 1.4rem;
    cursor: pointer;
}

.bi_cerrar:hover,
.bi_cerrar:focus-visible {
    background: var(--verde-forforesente, #6FD100);
}

/* Barra de controles: se esconde sola mientras el video corre */
.bi_barra {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 34px 18px 12px;
    background: linear-gradient(180deg, rgba(0, 44, 129, 0) 0%, rgba(0, 44, 129, .85) 55%, rgba(14, 15, 39, .95) 100%);
    color: #fff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

.bi_reproductor.controles_visibles .bi_barra,
.bi_reproductor.en_pausa .bi_barra,
.bi_reproductor:focus-within .bi_barra {
    opacity: 1;
    transform: none;
}

.bi_reproductor:not(.controles_visibles):not(.en_pausa) {
    cursor: none;
}

.bi_fila {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.bi_espacio {
    flex: 1;
}

.bi_ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
}

.bi_ctrl:hover,
.bi_ctrl:focus-visible {
    background: rgba(255, 255, 255, .14);
    color: var(--verde-forforesente, #6FD100);
}

.bi_ctrl.bi_play {
    background: var(--verde-forforesente, #6FD100);
    color: var(--azul-opaco, #0E0F27);
}

.bi_tiempo {
    margin-left: 6px;
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, .9);
}

/* Barras de avance y volumen (range) con el verde de la marca */
.bi_progreso,
.bi_volumen {
    --p: 0%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--verde-forforesente, #6FD100) var(--p), rgba(255, 255, 255, .28) var(--p));
    cursor: pointer;
}

.bi_progreso {
    display: block;
    width: 100%;
}

.bi_volumen {
    width: 90px;
}

.bi_progreso::-webkit-slider-thumb,
.bi_volumen::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 3px solid var(--verde-forforesente, #6FD100);
    border-radius: 50%;
    background: #fff;
}

.bi_progreso::-moz-range-thumb,
.bi_volumen::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 3px solid var(--verde-forforesente, #6FD100);
    border-radius: 50%;
    background: #fff;
}

.bi_progreso:focus-visible,
.bi_volumen:focus-visible {
    outline: 2px solid var(--border, #43BCFF);
    outline-offset: 4px;
}

/* Animaciones de entrada: el logo aparece y se enfoca, el texto y los botones suben en cascada
   y las tarjetas entran desde la derecha */
@keyframes bi_logo_entrar {
    from { opacity: 0; transform: scale(.9); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes bi_subir {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
}

@keyframes bi_entrar_derecha {
    from { opacity: 0; transform: translateX(70px) rotate(2deg) scale(.96); }
    to { opacity: 1; transform: none; }
}

.bi_marca {
    animation: bi_logo_entrar 1s cubic-bezier(.2, .7, .2, 1) .1s both;
}

.bi_lema {
    animation: bi_subir .8s cubic-bezier(.2, .7, .2, 1) .35s both;
}

.bi_desc {
    animation: bi_subir .8s cubic-bezier(.2, .7, .2, 1) .5s both;
}

.bi_botones {
    animation: bi_subir .8s cubic-bezier(.2, .7, .2, 1) .65s both;
}

.bi_zona {
    animation: bi_entrar_derecha 1.1s cubic-bezier(.2, .7, .2, 1) .3s both;
}

/* Computador / celular: si hay piezas de los dos tipos, cada una se ve en su pantalla */
.bi_solo_movil {
    display: none;
}

@media (max-width: 768px) {
    .bi {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 0;
        /* Arriba deja libre el botón "Menú"; abajo, espacio para que la sombra de la tarjeta se desvanezca antes del borde (si no, se ve una línea) */
        padding: 84px 20px 76px;
    }

    .bi_logo {
        max-height: 110px;
    }

    .bi_lema {
        font-size: 1rem;
        gap: 10px;
    }

    .bi_desc {
        font-size: .95rem;
    }

    .bi_btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    /* Celular: --r = proporción (ancho/alto) de la pieza del frente, la pone banner_inicio.js, para que las
       verticales se vean completas. El ancho se limita para que no quede más alta que --alto_max. */
    .bi_pila {
        --r: 1.7778;
        --alto_max: 70vh;
        width: min(92%, calc(var(--alto_max) * var(--r)));
        aspect-ratio: var(--r);
        transition: width .45s ease, aspect-ratio .45s ease;
    }

    /* Logo, frase y botones centrados */
    .bi_texto {
        align-items: center;
        margin: 0 auto;
        text-align: center;
    }

    .bi_marca,
    .bi_logo {
        margin-left: auto;
        margin-right: auto;
    }

    .bi_lema,
    .bi_botones {
        justify-content: center;
    }

    .bi_botones {
        width: 100%;
    }

    .bi_solo_pc {
        display: none;
    }

    .bi_solo_movil {
        display: block;
    }

    .bi_modal {
        width: 100vw;
    }

    .bi_reproductor {
        border-radius: 0;
    }

    .bi_volumen,
    .bi_ctrl.bi_atras,
    .bi_ctrl.bi_adelante {
        display: none; /* en celular el volumen es el del teléfono */
    }

    .bi_centro {
        width: 68px;
        height: 68px;
        font-size: 1.9rem;
    }

    .bi_solo_movil .bi_pila {
        --r: .8; /* mientras carga la primera pieza */
        width: min(88%, 420px, calc(var(--alto_max) * var(--r)));
    }
}

/* "Compartir" en celular y tablet: solo el ícono, redondo y pequeño, a la altura de "Menú" para no tapar el banner */
@media (max-width: 990px) {
    .home-compartir-btn {
        top: 58px;
        right: 10px;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    }

    .home-compartir-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .home-compartir-btn ion-icon {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bi_marca,
    .bi_lema,
    .bi_desc,
    .bi_botones,
    .bi_zona {
        animation: none;
    }

    .bi_carta,
    .bi_puntos button,
    .bi_btn {
        transition: none;
    }
}
