/* Ajustes para contenido creado en el editor de WordPress.
   Replican las clases del diseño original (.prose, .places, .story-gallery). */

/* Barra de administración (sólo visible con sesión iniciada) */
body.admin-bar .header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

/* Texto corrido de las páginas (equivalente a .prose) */
.entry > p:not(.page-lead):not(.prose__close),
.entry > ul,
.entry > ol,
.entry > h3,
.entry > .wp-block-group > p,
.entry > .wp-block-quote {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

.entry > p:not(.page-lead):not(.prose__close),
.entry li,
.prose.entry p {
  margin-top: 0;
  margin-bottom: 1.05rem;
  color: var(--cream);
  font-size: 1.02rem;
  line-height: 1.72;
}

/* Corrección: en el sitio original el texto corrido era crema sobre fondo crema
   en las secciones claras (casi ilegible). */
.section--panel .entry > p:not(.page-lead):not(.prose__close),
.section--panel .entry li,
.section--panel .prose p {
  color: var(--ink-soft);
}

.section--panel .entry > h3,
.section--panel .entry a:not(.btn):not(.wp-block-button__link) {
  color: var(--red);
}

.entry > ul,
.entry > ol {
  padding-left: 1.2rem;
  margin-bottom: 1.6rem;
}

.entry > h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  color: var(--yellow);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.entry a:not(.btn):not(.wp-block-button__link) {
  color: var(--yellow);
}

.entry > .wp-block-buttons {
  justify-content: center;
  margin-top: 1.4rem;
}

.entry .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.55rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 0;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}

.entry .wp-block-button__link:hover {
  transform: translateY(-1px);
  background: var(--gold-bright);
}

.entry .is-style-outline .wp-block-button__link {
  border: 1px solid rgba(247, 241, 232, 0.55);
  color: var(--text);
  background: rgba(22, 16, 13, 0.28);
}

.entry .is-style-outline .wp-block-button__link:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(22, 16, 13, 0.45);
}

/* Lugares de la historia */
.entry > .places {
  margin-left: auto;
  margin-right: auto;
}

.entry .places > .wp-block-group__inner-container {
  display: grid;
  gap: 0.7rem;
}

.entry .places .place {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Imágenes y videos dentro del contenido */
.entry > .wp-block-image,
.entry > .wp-block-video,
.entry > .wp-block-gallery {
  margin: 2.2rem auto 0;
  max-width: 100%;
}

.entry > .wp-block-image img {
  width: 100%;
  border-radius: 4px;
}

.entry > .wp-block-image.historia-banner img {
  aspect-ratio: 21 / 8;
  object-fit: cover;
}

/* Galería dentro de las ventanas de pilares / maestros */
.story-dialog .wp-block-gallery.has-nested-images {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem !important;
  margin-top: 1rem;
}

.story-dialog .wp-block-gallery.has-nested-images figure.wp-block-image {
  width: auto !important;
  margin: 0 !important;
}

.story-dialog .wp-block-gallery img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.story-dialog .entry p {
  margin: 0 0 0.9rem;
}

/* Próximo curso: aviso destacado y datos de transferencia (opcionales) */
.course__notice {
  display: inline-block;
  margin: 0 auto 1.6rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Si queda un dato solo en la última fila (ej. Lugar), ocupa todo el ancho */
.course__facts > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.course__bank {
  text-align: left;
  width: 100%;
  max-width: 26rem;
  margin-top: 0.6rem;
  padding: 0.9rem 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.course__bank p {
  margin: 0;
}

.course__bank-title {
  margin-bottom: 0.35rem !important;
  font-weight: 700;
  color: var(--ink);
}

/* Tarjetas de talleres: el texto viene del editor */
.svc__body > p:empty {
  display: none;
}

/* Álbum: momentos con más o menos de 3 elementos */
@media (max-width: 640px) {
  .story-dialog .wp-block-gallery.has-nested-images {
    grid-template-columns: repeat(2, 1fr);
  }
}
