/* ==========================================================================
   PANTALLA DE BIENVENIDA OFICIAL - VIDEO INSTITUCIONAL FULLSCREEN
   Día Internacional de la Alfabetización 2026 · UNESCO & Gobierno de México
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.welcome-page {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--sans);
  color: #FFFFFF;
  background-color: #0A2438;
}

/* ──────── VIDEO INSTITUCIONAL EN FONDO COMPLETO (PLAYLIST MULTI-VIDEO) ──────── */
.fullscreen-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background: #081C30;
}

.fullscreen-video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.fullscreen-video-bg video.active {
  opacity: 1;
  z-index: 1;
}

/* ──────── DEGRADADO DE IZQUIERDA A DERECHA PARA LEGIBILIDAD ──────── */
.welcome-gradient-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  /* Degradado suave de azul noche profundo a transparente hacia la derecha */
  background: linear-gradient(90deg,
      rgba(8, 28, 48, 0.95) 0%,
      rgba(10, 36, 60, 0.88) 32%,
      rgba(12, 45, 75, 0.65) 58%,
      rgba(14, 52, 85, 0.32) 80%,
      rgba(14, 52, 85, 0.15) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Sutil viñeta inferior para el pie de página */
.welcome-vignette-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(0deg, rgba(6, 20, 34, 0.85) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* ──────── CONTENIDO PRINCIPAL ──────── */
.welcome-layout {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4rem 6vw 2.5rem 7vw;
}

/* Cabecera / Top Bar */
.welcome-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.welcome-brand-box {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(241, 205, 83, 0.6);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.welcome-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.welcome-brand-sep {
  width: 1.5px;
  height: 28px;
  background: rgba(25, 116, 169, 0.25);
}

.welcome-brand-text {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #10537A;
}

/* Panel Central de Texto */
.welcome-center {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 3rem 0;
}

.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #F1CD53;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.welcome-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  font-weight: 500;
  line-height: 1.08;
  color: #FFFFFF;
  margin-bottom: 1.3rem;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.welcome-title span.title-accent {
  color: #F1CD53;
  font-style: italic;
  font-weight: 400;
}

.welcome-sub {
  font-size: 1.06rem;
  line-height: 1.7;
  color: rgba(245, 250, 255, 0.94);
  margin-bottom: 2.5rem;
  max-width: 540px;
  font-weight: 300;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.welcome-sub em {
  font-style: italic;
  color: #FFFFFF;
  font-weight: 400;
}

/* ──────── BOTONES DE ACCIÓN ──────── */
.welcome-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.btn-welcome-acceder {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  background: #F1CD53;
  color: #0A2438;
  border: 1px solid #D9B02D;
  padding: 0.95rem 2.2rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(241, 205, 83, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-welcome-acceder svg {
  transition: transform 0.25s ease;
}

.btn-welcome-acceder:hover {
  background: #FFFFFF;
  color: #10537A;
  border-color: #FFFFFF;
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  gap: 1.15rem;
}

.btn-welcome-acceder:hover svg {
  transform: translateX(4px);
}

.btn-welcome-login {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.95rem 1.6rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.24s ease;
}

.btn-welcome-login:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #F1CD53;
  color: #F1CD53;
}

/* ──────── SELECTOR DE CARÁTULAS DE VIDEO (ESCRITORIO: ESQUINA INFERIOR DERECHA SOBRE CONTROLES) ──────── */
.welcome-video-grid-wrap {
  position: fixed;
  bottom: 9.5rem;
  right: 6vw;
  z-index: 30;
  background: rgba(8, 28, 48, 0.72);
  border: 1px solid rgba(241, 205, 83, 0.35);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(241, 205, 83, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
  width: fit-content;
  max-width: 100%;
}

.welcome-video-grid {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.vthumb-item {
  width: 78px;
  height: 48px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
  flex-shrink: 0;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.vthumb-img,
.vthumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  filter: brightness(0.88);
  transition: filter 0.22s ease;
}

.vthumb-item:hover .vthumb-img,
.vthumb-item:hover .vthumb-video {
  filter: brightness(1.08);
}

.vthumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 36, 56, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s ease;
  pointer-events: none;
}

.vthumb-play-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 36, 56, 0.75);
  border: 1px solid rgba(241, 205, 83, 0.8);
  color: #F1CD53;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.vthumb-item:hover .vthumb-play-icon {
  opacity: 1;
  transform: scale(1);
}

.vthumb-item:hover {
  border-color: #F1CD53;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 18px rgba(241, 205, 83, 0.35);
}

.vthumb-item.active {
  border-color: #F1CD53;
  box-shadow: 0 0 18px rgba(241, 205, 83, 0.65), 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: scale(1.06) translateY(-2px);
}

.vthumb-item.active .vthumb-video {
  filter: brightness(1.05);
}

.vthumb-item.active .vthumb-overlay {
  background: rgba(241, 205, 83, 0.1);
}

.vthumb-item.active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F1CD53;
  box-shadow: 0 0 8px #F1CD53;
  animation: pulseGoldDot 1.8s infinite;
}

@keyframes pulseGoldDot {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 12px #F1CD53;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
}

/* ──────── CONTROLES FLOTANTES DE AUDIO Y REPRODUCCIÓN (ARRIBA DEL PIE DE PÁGINA) ──────── */
.video-controls-wrap {
  position: fixed;
  bottom: 5.5rem;
  right: 6vw;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-vctrl {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(10, 36, 56, 0.88);
  border: 1.5px solid rgba(245, 200, 42, 0.65);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.22s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.btn-vctrl:hover {
  background: #F5C82A;
  border-color: #F5C82A;
  color: #0A2438;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 200, 42, 0.5);
}

/* ──────── PIE DE PÁGINA ──────── */
.welcome-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 245, 250, 0.8);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  z-index: 15;
  margin-top: 2rem;
}

.welcome-footer-orgs {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* ──────── RESPONSIVE ADAPTATIVO ──────── */
@media (max-width: 900px) {
  .welcome-layout {
    padding: 3rem 1.8rem 2rem;
  }

  .welcome-center {
    margin: 2rem 0;
  }

  .welcome-title {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
  }

  .welcome-sub {
    font-size: 0.98rem;
    margin-bottom: 2rem;
  }

  .welcome-video-grid-wrap {
    bottom: 9.2rem;
    right: 1.8rem;
  }

  .vthumb-item {
    width: 80px;
    height: 48px;
  }

  .video-controls-wrap {
    bottom: 5.2rem;
    right: 1.8rem;
  }

  .welcome-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 600px) {
  .welcome-layout {
    padding: 2.2rem 1.4rem 2rem;
  }

  .welcome-brand-box {
    padding: 0.45rem 0.85rem;
    gap: 0.65rem;
  }

  .welcome-logo-img {
    height: 34px;
  }

  .welcome-brand-sep {
    height: 22px;
  }

  .welcome-brand-text {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }

  .welcome-center {
    margin: 3rem 0 2.2rem 0;
  }

  .welcome-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    margin-bottom: 1.1rem;
  }

  .welcome-title {
    font-size: clamp(2rem, 8vw, 2.65rem);
    line-height: 1.15;
    margin-bottom: 1.4rem;
  }

  .welcome-sub {
    font-size: 0.95rem;
    line-height: 1.72;
    margin-bottom: 2.5rem;
  }

  .welcome-actions {
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.4rem;
  }

  .btn-welcome-acceder,
  .btn-welcome-login {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.5rem;
    font-size: 0.88rem;
  }

  .welcome-video-grid-wrap {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 1.8rem auto 0 auto !important;
    padding: 0.4rem 0.5rem !important;
    justify-content: center !important;
    display: flex !important;
  }

  .welcome-video-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.4rem !important;
  }

  .vthumb-item {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 76px !important;
    height: 46px !important;
    width: auto !important;
  }

  .video-controls-wrap {
    bottom: 4.8rem;
    right: 1.25rem;
  }

  .btn-vctrl {
    width: 40px;
    height: 40px;
  }

  .btn-vctrl svg {
    width: 16px;
    height: 16px;
  }

  .welcome-footer {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding-bottom: 3rem;
  }

  .welcome-footer-orgs {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (max-width: 360px) {
  .welcome-brand-text {
    display: none;
  }

  .welcome-brand-sep {
    display: none;
  }

  .welcome-logo-img {
    height: 30px;
  }
}