/* Portada de FestQuest: fondo con fotos, título, menú de 7 filas y celular. Mobile first.
   La CSP no permite estilos en línea: todo va por clases (JS solo cambia clases y propiedades CSSOM). */
.portada { position: relative; overflow: hidden; background: #1a0d07; color: #fff; font-family: 'DM Sans', Arial, Helvetica, sans-serif; }

/* Fondo: 6 fotos con fundido y acercamiento lento */
.portada-fondos { position: absolute; inset: 0; }
.fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; opacity: 0; transition: opacity 1.4s ease; animation: ken 26s ease-in-out infinite alternate; }
.fondo.is-on { opacity: 1; }
@keyframes ken { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.16) translate(-2.5%, -1.5%); } }
.portada-vela { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,9,4,.7) 0%, rgba(20,9,4,.45) 40%, rgba(20,9,4,.8) 100%); }
.portada-brillo { position: absolute; right: -10%; top: -12%; width: 70%; height: 60%; border-radius: 50%; background: radial-gradient(circle, rgba(255,170,70,.5) 0%, rgba(255,120,60,0) 68%); animation: brillo 6s ease-in-out infinite; pointer-events: none; }
@keyframes brillo { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
.portada-chispas i { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,140,.95), rgba(255,170,80,0) 70%); animation: sube 10s ease-in-out infinite; pointer-events: none; }
@keyframes sube { 0% { transform: translateY(20px); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-120px); opacity: 0; } }
.portada-chispas i:nth-child(1) { left: 40%; top: 35%; width: 18px; height: 18px; animation-delay: -4s; }
.portada-chispas i:nth-child(2) { left: 51%; top: 57%; width: 18px; height: 18px; animation-delay: -9s; }
.portada-chispas i:nth-child(3) { left: 91%; top: 17%; width: 10px; height: 10px; animation-delay: -6s; }
.portada-chispas i:nth-child(4) { left: 79%; top: 64%; width: 24px; height: 24px; animation-delay: -2s; }
.portada-chispas i:nth-child(5) { left: 60%; top: 33%; width: 14px; height: 14px; animation-delay: -8s; }
.portada-chispas i:nth-child(6) { left: 84%; top: 33%; width: 10px; height: 10px; animation-delay: -3s; }
.portada-chispas i:nth-child(7) { left: 49%; top: 41%; width: 24px; height: 24px; animation-delay: -5s; }
.portada-chispas i:nth-child(8) { left: 70%; top: 30%; width: 14px; height: 14px; animation-delay: -7s; }
.portada-etiqueta { position: absolute; right: 12px; bottom: 8px; z-index: 2; margin: 0; font-size: 12px; color: #fbefdf; background: rgba(20,9,4,.6); padding: 4px 10px; border-radius: 8px; }

/* Cuadrícula: título + menú | celular */
.portada-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 28px; padding-bottom: 8px; }
.portada h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 900; font-size: clamp(38px, 11vw, 64px); line-height: 1; letter-spacing: -1.2px; margin: 0 0 10px; text-shadow: 0 4px 26px rgba(0,0,0,.55); }
.portada h1 span { color: #ffb03a; }
.portada-frase { margin: 0 0 14px; font-size: 17px; font-weight: 500; line-height: 1.4; color: #fbefdf; max-width: 560px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.portada-frase strong { color: #fff; }

/* Menú */
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.mi { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 9px 16px; border-radius: 16px; border: 2px solid rgba(255,225,180,.38); background: rgba(20,10,6,.46); color: #fff; text-align: left; font: inherit; text-decoration: none; cursor: pointer; transition: transform .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.mi:hover { transform: translateX(4px); background: rgba(20,10,6,.62); }
.mi.is-on { border-color: #ffb03a; background: rgba(255,248,236,.97); color: #2a1206; }
.mi-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,176,58,.3); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.mi.is-on .mi-n { background: #d9480f; color: #fff; }
.mi-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mi-t b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.mi-t small { font-size: 13px; color: #f6e6d2; }
.mi.is-on .mi-t small { color: #6b3a1e; }
.mi-flecha { margin-left: auto; flex: none; }
.mi:focus-visible, .cel-btn:focus-visible, .cel-lista button:focus-visible, .cel-q:focus-visible, .cel-play:focus-visible { outline: 3px solid #ffb03a; outline-offset: 2px; }

/* Celular */
.portada-der { display: flex; justify-content: center; }
.celular { position: relative; width: 100%; height: 560px; border-radius: 22px; overflow: hidden; background: #1a0d07; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.celular-pantalla { position: relative; width: 100%; height: 100%; }
.cel-aviso { margin: 0; padding: 24px; color: #fbefdf; text-align: center; }

/* Vista 1: fiesta por fiesta */
.cel-slide { position: absolute; inset: 0; }
.cel-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cel-slide.entra > img { animation: entra .5s ease; }
@keyframes entra { from { transform: scale(1.05); } to { transform: scale(1); } }
.cel-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,9,4,.3) 0%, rgba(20,9,4,0) 35%, rgba(20,9,4,.92) 100%); }
.cel-chip { position: absolute; left: 16px; top: 16px; padding: 7px 12px; border-radius: 20px; background: #d9480f; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.cel-ilus { position: absolute; right: 12px; top: 16px; padding: 5px 10px; border-radius: 8px; background: rgba(20,9,4,.62); font-size: 11.5px; color: #fbefdf; }
.cel-texto { position: absolute; left: 18px; right: 18px; bottom: 70px; }
.cel-n { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #ffd9a8; text-transform: uppercase; }
.cel-nombre { margin: 4px 0 0; font-family: 'Fraunces', Georgia, serif; font-weight: 900; font-size: 28px; line-height: 1.06; }
.cel-lugar { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: #ffd9a8; }
.cel-fecha { margin: 2px 0 0; font-size: 12.5px; color: #f6e6d2; }
.cel-play { position: absolute; left: 50%; top: 40%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 0; background: #fff; color: #d9480f; display: flex; align-items: center; justify-content: center; cursor: pointer; animation: pulso 1.8s ease-out infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.65); } 100% { box-shadow: 0 0 0 26px rgba(255,255,255,0); } }
.cel-video { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 56px); object-fit: contain; background: #000; }
.cel-slide.reproduciendo .cel-velo, .cel-slide.reproduciendo .cel-texto, .cel-slide.reproduciendo .cel-chip, .cel-slide.reproduciendo .cel-ilus { display: none; }
.cel-slide.reproduciendo > img { visibility: hidden; }
.cel-nav { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; background: rgba(18,9,4,.88); }
.cel-btn { min-height: 44px; min-width: 44px; padding: 0 12px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.cel-nav span { font-size: 14px; font-weight: 800; text-align: center; }

/* Vistas 2 y 3: listas y mosaico dentro del celular */
.cel-panel { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px 14px 12px; background: linear-gradient(180deg, #2a1206, #1a0d07); }
.cel-panel h2 { margin: 0 0 4px; font-family: 'Fraunces', Georgia, serif; font-weight: 900; font-size: 22px; }
.cel-panel > p { margin: 0 0 10px; font-size: 13px; color: #f6e6d2; }
.cel-lista { list-style: none; margin: 0; padding: 0 2px 0 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.cel-lista li { padding: 10px 12px; border-radius: 12px; background: rgba(255,248,236,.08); border: 1px solid rgba(255,225,180,.18); }
.cel-lista b { display: block; font-size: 15px; line-height: 1.25; }
.cel-lista small { display: block; margin-top: 2px; font-size: 12.5px; color: #ffd9a8; }
.cel-lista .cel-f { color: #f6e6d2; font-size: 12px; }
.cel-mas { margin-top: 8px; align-self: flex-start; color: #ffb03a; font-weight: 700; font-size: 14px; padding: 10px 4px; }
.cel-mosaico { list-style: none; margin: 0; padding: 0 2px 0 0; overflow-y: auto; flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; }
.cel-mosaico li { padding: 10px 8px; border-radius: 12px; background: rgba(255,248,236,.08); border: 1px solid rgba(255,225,180,.18); text-align: center; }
.cel-mosaico .ico { width: 56px; height: 40px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; }
.cel-mosaico img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cel-mosaico .ini { font-weight: 800; font-size: 20px; color: #ffb03a; }
.cel-mosaico b { display: block; font-size: 13px; line-height: 1.2; }
.cel-mosaico small { font-size: 11.5px; color: #ffd9a8; }

/* Vista 4: buscador */
.cel-q { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 2px solid rgba(255,225,180,.4); background: #fff8ec; color: #2a1206; font: inherit; font-size: 16px; }
.cel-res { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 170px; overflow-y: auto; }
.cel-res button { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,225,180,.3); background: rgba(255,248,236,.08); color: #fff; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.cel-res small { color: #ffd9a8; margin-left: 6px; }
.cel-msg { margin: 8px 0 0; font-size: 13px; color: #f6e6d2; min-height: 18px; }
.cel-ficha { margin-top: 10px; padding: 12px; border-radius: 14px; background: rgba(255,248,236,.1); border: 1px solid rgba(255,225,180,.25); overflow-y: auto; font-size: 14px; line-height: 1.4; }
.cel-ficha h3 { margin: 0 0 2px; font-family: 'Fraunces', Georgia, serif; font-size: 19px; }
.cel-ficha ul { margin: 4px 0 8px 18px; }

.cel-wa { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: #1fa855; color: #fff; font-weight: 700; text-decoration: none; }
.cel-reintentar { margin: 0 auto; color: #ffb03a; }

/* Pie: cifras y botones */
.portada-pie { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding-top: 18px; padding-bottom: 44px; }
.portada .stats { max-width: 520px; }

@media (min-width: 960px) {
  .portada-vela { background: linear-gradient(90deg, rgba(20,9,4,.86) 0%, rgba(20,9,4,.62) 36%, rgba(20,9,4,.12) 62%, rgba(20,9,4,0) 80%), linear-gradient(180deg, rgba(20,9,4,.35), rgba(20,9,4,0) 22%); }
  .portada-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 44px; }
  .portada-der { padding-top: 6px; }
  .celular { width: 340px; height: 700px; border-radius: 50px; padding: 13px; background: #120904; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 2px rgba(255,220,170,.35), 0 0 90px rgba(255,170,70,.35); animation: flota 6s ease-in-out infinite; }
  .celular-pantalla { border-radius: 38px; overflow: hidden; background: #1a0d07; }
  .portada-pie { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 50px; }
  .portada-pie .stats { flex: 0 1 460px; }
}
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Celular (pantallas chicas): el menú es una fila deslizable arriba y el contenido va debajo, a todo el ancho, sin marco */
@media (max-width: 959px) {
  .portada-grid { gap: 10px; }
  .portada-izq { display: contents; }
  .portada-izq h1 { order: 1; }
  .portada-frase { order: 2; margin-bottom: 6px; }
  .portada-izq nav { order: 3; margin: 0 -16px; min-width: 0; }
  .portada-der { order: 4; min-width: 0; }
  .menu { flex-direction: row; max-width: none; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu li { flex: 0 0 auto; scroll-snap-align: start; }
  .mi { width: auto; min-height: 48px; padding: 8px 16px; gap: 8px; border-radius: 999px; white-space: nowrap; }
  .mi:hover { transform: none; }
  .mi-n, .mi-t small, .mi-flecha { display: none; }
  .mi-t b { font-size: 15px; }
  .celular { height: min(74vh, 600px); min-height: 460px; border-radius: 18px; }
  .portada-etiqueta { bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .fondo, .portada-brillo, .portada-chispas i, .cel-play, .celular, .cel-slide.entra > img { animation: none !important; transition: none !important; }
    .portada-chispas { display: none; }
  .mi:hover { transform: none; }
}
