/* ─── Estilos compartidos de FICHA de evento (usados por todas las fichas generadas) ─── */
.obra-hero { margin-top: 64px; padding: 2.25rem 2rem 3.5rem; background: var(--negro); border-bottom: 1px solid var(--borde); }
.obra-hero .breadcrumbs { margin-bottom: 0.5rem; }
.obra-hero-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 360px; gap: 4rem; align-items: start; }
.breadcrumbs { font-size: 0.72rem; color: #8f8f8f; letter-spacing: 0.03em; margin-bottom: 1.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.breadcrumbs a { color: #8f8f8f; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--rojo); }
.breadcrumbs .sep { color: #6f6f6f; }
.breadcrumbs .current { color: #999999; }
.obra-tipo-tag { display: inline-block; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rojo); border: 1px solid var(--rojo); padding: 0.25rem 0.7rem; }

/* Tags del hero (tipo + badge de tendencia) */
.obra-hero-tags { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 1.75rem 0 0; }

/* Estrellas y botón de compartir en la MISMA fila: calificas → compartes ahí mismo */
.rating-row { display: flex; align-items: center; gap: 0.9rem; }

/* Badge "En tendencia" (🔥): se enciende a mano solo cuando es real */
.badge-tendencia { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: #ff8a3d; background: rgba(255, 88, 20, 0.12); border: 1px solid rgba(255, 88, 20, 0.4); padding: 0.25rem 0.6rem; white-space: nowrap; }

/* Flechita de compartir del hero */
.obra-share-btn { flex-shrink: 0; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #ccc; background: transparent; border: 1px solid #333; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.obra-share-btn:hover { border-color: var(--rojo); color: var(--rojo); background: rgba(232, 66, 30, 0.08); }

.obra-hero-titulo { font-family: var(--fuente-sans); font-size: clamp(2.2rem, 4vw, 3.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.obra-hero-subtitulo { font-size: clamp(1.15rem, 2vw, 1.45rem); color: #ededed; line-height: 1.5; font-weight: 400; margin: 0; }
.obra-hero-desc { font-size: 1rem; color: #aaa; line-height: 1.8; max-width: 540px; }

/* Gancho (subtítulo) + botón de compartir en la misma línea, bajo el H1 */
.obra-hero-gancho { display: flex; align-items: center; justify-content: space-between; gap: 0.9rem; max-width: 540px; margin: 0 0 1.75rem; }
.obra-hero-gancho .obra-hero-subtitulo { flex: 1 1 auto; }
.obra-hero-gancho .obra-share-btn { flex: 0 0 auto; }

/* Cartel con estrellas sobreimpuestas en la base (degradado CORTO sobre la parte oscura) */
.obra-cartel { position: relative; max-width: 400px; margin: 0 0 2rem; }
.obra-cartel img { width: 100%; height: auto; display: block; border: 1px solid #2a2a2a; }
.obra-cartel .ficha-rating { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.55rem; padding: 1.6rem 0.85rem 0.6rem; background: linear-gradient(to top, rgba(0,0,0,0.92), rgba(0,0,0,0.55) 60%, rgba(0,0,0,0)); }
.obra-cartel .ficha-rating .ficha-label { color: rgba(255,255,255,0.9); text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.obra-cartel .ficha-rating .rating-stars { gap: 0.2rem; }
.obra-cartel .ficha-rating .rating-star { font-size: 1.6rem; color: rgba(255,255,255,0.7); text-shadow: 0 1px 4px rgba(0,0,0,0.95); }
.obra-cartel .ficha-rating .rating-star.on { color: #e8c24e; }
.obra-cartel .ficha-rating .rating-msg { flex-basis: 100%; margin: 0; color: rgba(255,255,255,0.85); text-shadow: 0 1px 3px rgba(0,0,0,0.9); }

/* Celular: cartel a todo el ancho de la columna (el overlay se queda sobre el cartel) */
@media (max-width: 600px) {
  .obra-cartel { max-width: 100%; }
  .obra-hero { padding: 2.25rem 1.1rem 2.5rem; }
}
/* Pantallas muy angostas (~320px): el header fijo crece a ~121px, así que se reserva más arriba */
@media (max-width: 329px) {
  .obra-hero { padding-top: 4rem; }
}
.ficha-lateral { background: var(--gris1); border: 1px solid var(--borde); padding: 2rem; position: sticky; top: 80px; }
.ficha-titulo { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: #8f8f8f; margin-bottom: 1.5rem; border-bottom: 1px solid var(--borde); padding-bottom: 0.75rem; }
.ficha-row { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 1.1rem; }
.ficha-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8f8f8f; }
.ficha-valor { font-size: 0.95rem; color: #ddd; font-weight: 500; }
.ficha-valor a { color: var(--rojo); }
.ficha-separator { border: none; border-top: 1px solid var(--borde); margin: 1.2rem 0; }

/* ─── Fichitas de REPARTO de la lateral: una por persona, TODA la fichita es el enlace
   a su perfil (/artista/<id>/, o su par /en/ en la ficha EN). Foto cuadrada; si su foto
   sigue pendiente de publicación, avatar con iniciales (nunca el cartel del evento).
   Nombre en rojo de marca con flechita y, debajo, "rol · género" en gris.
   Escala sola: 1 persona, 2 o N apiladas. */
.reparto-bloque { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.1rem; }
.reparto-lista { display: flex; flex-direction: column; gap: 0.5rem; }
.reparto-ficha { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.6rem; background: var(--gris1); border: 1px solid var(--borde); transition: transform 0.2s, border-color 0.2s; }
.reparto-ficha:hover { transform: translateY(-2px); border-color: var(--rojo); }
.reparto-ficha-foto { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--gris2); border: 1px solid var(--borde); border-radius: 8px; }
.reparto-ficha-foto img { width: 100%; height: 100%; object-fit: cover; }
.reparto-ficha-iniciales { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.03em; color: var(--rojo); }
.reparto-ficha-datos { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.reparto-ficha-nombre { font-size: 0.92rem; font-weight: 600; color: var(--rojo); line-height: 1.3; }
.reparto-ficha-meta { font-size: 0.72rem; color: #8f8f8f; line-height: 1.45; }
.ficha-precio-destacado { margin: 0.5rem 0 1.2rem; }
.ficha-precio-fila { display: flex; justify-content: space-between; align-items: baseline; padding: 0.35rem 0; }
.ficha-precio-nombre { font-size: 0.82rem; color: #aaa; }
.ficha-precio-monto { font-size: 1.05rem; font-weight: 700; color: #fff; }
.ficha-cta { width: 100%; background: var(--rojo); color: #fff; font-size: 0.9rem; font-weight: 600; padding: 0.9rem; border: none; cursor: pointer; text-align: center; display: block; margin-bottom: 0.75rem; transition: opacity 0.2s; }
.ficha-cta:hover { opacity: 0.85; }
.ficha-cta-sec { width: 100%; background: transparent; color: #888; font-size: 0.8rem; padding: 0.7rem; border: 1px solid #333; cursor: pointer; text-align: center; display: block; transition: border-color 0.2s, color 0.2s; }
.ficha-cta-sec:hover { border-color: #666; color: #ccc; }
.obra-contenido { max-width: 1280px; margin: 0 auto; padding: 4rem 2rem 6rem; display: grid; grid-template-columns: 1fr 360px; gap: 4rem; align-items: start; }
.obra-body { color: #bbb; }
.obra-body h2 { font-family: var(--fuente-sans); font-size: 1.5rem; font-weight: 700; color: #fff; margin: 3rem 0 1rem; padding-top: 3rem; border-top: 1px solid var(--borde); }
.obra-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.obra-body h3 { font-size: 1rem; font-weight: 600; color: #ddd; margin: 1.5rem 0 0.5rem; }
.obra-body p { font-size: 0.95rem; line-height: 1.85; margin-bottom: 1.2rem; color: #999; }
.obra-body strong { color: #ddd; font-weight: 600; }
.obra-body em { color: #ccc; }
.para-ti-lista { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.para-ti-lista li { font-size: 0.9rem; color: #999; line-height: 1.6; padding-left: 1.2rem; position: relative; }
.para-ti-lista li::before { content: '·'; position: absolute; left: 0; color: var(--rojo); }
.faq-item { border-top: 1px solid var(--borde); padding: 1.2rem 0; }
.faq-pregunta { font-size: 0.95rem; font-weight: 600; color: #ddd; margin-bottom: 0.5rem; }
.faq-respuesta { font-size: 0.88rem; color: #888; line-height: 1.7; }
.ver-tambien { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.ver-tambien a { font-size: 0.85rem; color: var(--rojo); transition: opacity 0.2s; }
.ver-tambien a:hover { opacity: 0.7; }
.nota-informativa { margin-top: 3rem; padding: 1.5rem; background: var(--gris1); border-left: 2px solid var(--borde); }
.nota-informativa p { font-size: 0.8rem; color: #8f8f8f; line-height: 1.7; margin: 0; }
.nota-informativa strong { color: #a0a0a0; }
/* Mini-mapa compacto: caja de 330x260px (328x258 útiles) = ~4 tiles de 256px de
   OpenStreetMap (2 columnas x 2 filas; antes el ancho lo estiraba el layout: 757px en
   la ficha y 892px en el foro, 8-12 tiles). La altura útil pasa de los 256px para que
   la segunda fila siempre exista.
   El tamaño AUTORITATIVO va inline en el <div> del mapa dentro de los generadores
   (generar-fichas.js y generar-foros.js): el HTML se revalida y llega al instante,
   mientras que este archivo se cachea 7 días. Espejo aquí para que la clase no
   contradiga al HTML. */
.mapa-container { width: 100%; max-width: 330px; aspect-ratio: 3/2; background: var(--gris2); border: 1px solid var(--borde); margin-top: 1rem; }
/* Móvil: la caja usa aspect-ratio 3/2 (SIEMPRE más ancha que alta = horizontal),
   sin alto fijo. Antes tenía height:260px fijo y en celulares angostos (columna <260px,
   p.ej. 275px en ficha a 375px) el ancho quedaba menor que el alto y se veía VERTICAL.
   El tamaño autoritativo va inline en el <div> (generar-fichas.js / generar-foros.js);
   como el HTML se sirve fresco (max-age=0), este cambio llega sin cache-bust.
   Solo en PC (>=901px, layout no colapsado): caja APAISADA fija de 576x384px = 2x3 en
   horizontal (~3 columnas x 2 filas de tiles de 256px). Va con !important porque el
   inline manda; al fijar height, el aspect-ratio se ignora y la caja queda 576x384. */
@media (min-width: 901px) {
  .mapa-container { max-width: 576px !important; height: 384px !important; }
  .obra-hero { padding-top: 0.6rem; }
}
.mapa-address { margin-top: 0.75rem; font-size: 0.82rem; color: #8f8f8f; line-height: 1.6; }
.sidebar-secundario { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-bloque { background: var(--gris1); border: 1px solid var(--borde); padding: 1.5rem; }
.sidebar-bloque-titulo { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: #8f8f8f; margin-bottom: 1rem; border-bottom: 1px solid var(--borde); padding-bottom: 0.75rem; }
@media (max-width: 900px) { .obra-hero-inner, .obra-contenido { grid-template-columns: 1fr; } .ficha-lateral { position: static; } .sidebar-secundario { display: none; } }

/* ─── FICHA DE FORO ─── */
.foro-page { margin-top: 64px; padding: 3rem 2rem 5rem; }
.foro-page .section-inner { max-width: 1280px; margin: 0 auto; }
.foro-tag { display: inline-block; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rojo); border: 1px solid var(--rojo); padding: 0.25rem 0.7rem; margin-bottom: 1.2rem; }
.foro-h1 { font-family: var(--fuente-sans); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; line-height: 1.05; margin-bottom: 0.5rem; }
.foro-sub { font-size: 0.95rem; color: var(--rojo); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1.5rem; }
.foro-desc { font-size: 1rem; color: #aaa; line-height: 1.8; max-width: 560px; margin-bottom: 2.5rem; }
.artista-foto-wrap { margin: 1.4rem 0 2rem; }
.artista-foto { display: block; width: 100%; max-width: 300px; height: auto; border: 1px solid var(--borde); border-radius: 4px; }
@media (max-width: 600px) { .artista-foto { max-width: 240px; } }
.foro-layout { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start; }
.info-row { display: flex; flex-direction: column; gap: 0.15rem; padding: 1rem 0; border-top: 1px solid var(--borde); }
.info-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8f8f8f; }
.info-valor { font-size: 0.95rem; color: #ddd; }
.info-valor a { color: var(--rojo); }
.foro-side { background: var(--gris1); border: 1px solid var(--borde); border-radius: 14px; padding: 1.75rem; }
.foro-side-titulo { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: #8f8f8f; margin-bottom: 1.25rem; border-bottom: 1px solid var(--borde); padding-bottom: 0.75rem; }
.obra-en-foro { display: block; padding: 1rem 0; border-top: 1px solid var(--borde); color: #ddd; }
.obra-en-foro:hover { color: var(--rojo); }
.obra-en-foro small { display: block; color: #999999; font-size: 0.78rem; margin-top: 0.2rem; }
@media (max-width: 820px) { .foro-layout { grid-template-columns: 1fr; } }

/* Galería de fotos del evento (festivales, eventos con varias imágenes) */
.ficha-galeria { display:grid; grid-template-columns:repeat(2,1fr); gap:0.6rem; margin:0.5rem 0 1.5rem; }
.ficha-galeria img { width:100%; height:220px; object-fit:cover; border:1px solid #2a2a2a; display:block; }
@media (max-width:600px){ .ficha-galeria{ grid-template-columns:1fr; } .ficha-galeria img{ height:260px; } }

/* Galería bajo el póster: enlaces clicables + lightbox */
.galeria-item { cursor: zoom-in; display: block; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; }
