/* ===========================================================
   Pantalla de proyección - Estilos
   Diseñado para pantallas panorámicas. El logo/fecha ocupan
   una franja mínima arriba; el título es una sola línea;
   todo el resto del alto se dedica a la imagen/video/texto.
   =========================================================== */
:root {
    --color-primario: #0057FF;
    --color-acento: #FF7A00;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #FFFFFF;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Franja superior: logo + fecha/hora ---------- */
.top-bar {
    height: 8vh;
    min-height: 56px;
    max-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3vw;
    background: #FFFFFF;
    border-bottom: 0.4vh solid var(--color-primario);
}
.logo-wrap { display: flex; align-items: center; height: 100%; }
.logo-img { max-height: 70%; max-width: 22vw; object-fit: contain; }
.logo-text { font-size: 2.4vh; font-weight: 800; color: var(--color-primario); letter-spacing: .5px; }

.fecha-hora { text-align: right; line-height: 1.15; }
#hora { display: block; font-size: 3vh; font-weight: 800; color: var(--color-primario); }
#fecha { display: block; font-size: 1.5vh; font-weight: 600; color: var(--color-acento); text-transform: capitalize; }

/* ---------- Línea de título (opcional, una sola línea) ---------- */
.titulo-linea {
    height: 6vh;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 3vw;
    background: var(--color-primario);
    color: #FFFFFF;
    font-size: 2.6vh;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 1vh solid var(--color-acento);
}

/* ---------- Área grande de contenido ---------- */
.contenido-grande {
    position: relative;
    width: 100%;
    height: 86vh; /* se ajusta dinámicamente por JS según si hay título */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-imagen, .slide-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.slide-texto-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    overflow: hidden;
}

.slide-texto {
    color: var(--color-primario);
    font-weight: 800;
    line-height: 1.3;
}

/* ---- Estático: centrado y quieto ---- */
.efecto-estatico .slide-texto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4vw;
    font-size: 6vh;
}

/* ---- Marquee: una sola línea que se desliza horizontalmente ---- */
.efecto-marquee {
    display: flex;
    align-items: center;
}
.efecto-marquee .slide-texto {
    position: absolute;
    left: 0;
    top: 50%;
    white-space: nowrap;
    font-size: 8vh;
    padding: 0 2vw;
    transform: translate(100vw, -50%);
    will-change: transform;
}

/* ---- Vertical: sube desde abajo como cortinilla de créditos ---- */
.efecto-vertical .slide-texto {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 0 6vw;
    font-size: 6vh;
    transform: translateY(100%);
    will-change: transform;
}

.sin-contenido {
    color: #FFFFFF;
    font-size: 3vh;
    text-align: center;
    opacity: .7;
}

/* ---------- Selector de video / manuales (esquina superior izquierda) ---------- */
.selectores-esquina {
    position: absolute;
    top: 1.5vh;
    left: 1.5vw;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.selector-videos { position: relative; }
.btn-selector-videos {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #FFFFFF;
    border: none;
    padding: 1vh 1.4vw;
    border-radius: 999px;
    font-size: 1.7vh;
    font-weight: 700;
    cursor: pointer;
}
.icono-lista { font-size: 1.9vh; line-height: 1; }
.lista-videos {
    list-style: none;
    margin: 8px 0 0;
    padding: 6px;
    background: rgba(20, 20, 20, 0.92);
    border-radius: 12px;
    max-height: 50vh;
    overflow-y: auto;
    width: max(20vw, 260px);
}
.lista-videos li {
    padding: 1.2vh 1vw;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 1.6vh;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lista-videos li:hover,
.lista-videos li:focus {
    background: rgba(255, 255, 255, 0.12);
}
.lista-videos li.activo {
    background: var(--color-acento);
    font-weight: 700;
}

.btn-chat-ia {
    text-decoration: none;
    background: var(--color-acento) !important;
}

/* ---------- Botón "siguiente" (único control, solo si es carrusel) ---------- */
.btn-siguiente {
    position: absolute;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    width: 6vh;
    height: 6vh;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--color-acento);
    color: #FFFFFF;
    font-size: 3.5vh;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    opacity: .85;
    z-index: 20;
    transition: opacity .15s ease, transform .15s ease;
}
.btn-siguiente:hover { opacity: 1; transform: translateY(-50%) scale(1.08); }

/* ---------- Overlay: activar sonido (una sola vez) ---------- */
.overlay-audio {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.btn-activar-audio {
    background: var(--color-acento);
    color: #FFFFFF;
    border: none;
    padding: 3vh 5vw;
    border-radius: 999px;
    font-size: 3vh;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    animation: pulso-audio 1.6s ease-in-out infinite;
}
@keyframes pulso-audio {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ---------- Control de volumen permanente ---------- */
.control-volumen {
    position: fixed;
    right: 1.5vw;
    bottom: 1.5vh;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.55);
    padding: 1vh 1.4vw;
    border-radius: 999px;
    z-index: 30;
}
.btn-mute {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 2.4vh;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.slider-volumen {
    width: 12vw;
    max-width: 160px;
    accent-color: var(--color-acento);
    cursor: pointer;
}

/* ---------- Línea de tiempo del video ---------- */
.control-video {
    position: fixed;
    left: 50%;
    bottom: 1.5vh;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.55);
    padding: 1vh 1.6vw;
    border-radius: 999px;
    z-index: 30;
    width: min(60vw, 720px);
}
.btn-video-control {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 2.2vh;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}
.tiempo-texto {
    color: #FFFFFF;
    font-size: 1.6vh;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 3.2em;
    text-align: center;
}
.slider-tiempo {
    flex: 1;
    accent-color: var(--color-acento);
    cursor: pointer;
}
