/* Huamantla Core 5.0.27 - portal hardening. Concatenacion literal; sin cambios visuales. */

/* === visual-hardening.css === */
/*
 * Huamantla Disfruta — capa de fidelidad Beta4.
 *
 * Esta hoja NO redefine el Sistema de Diseño. Su función es impedir que los
 * estilos genéricos de Hello/Elementor alteren las medidas ya cerradas en
 * Demo 2.0 y el Laboratorio Visual.
 */
body { overflow-x: hidden; background: var(--hd-paper, #f2f4f4); }

/*
 * Superficie global del documento. Demo 2.0 trabaja sobre Papel y las tarjetas
 * blancas flotan sobre esa superficie. Hello/Elementor pueden dejar el main
 * en blanco si no se declara aquí, por eso la base se fija una sola vez.
 */
body main#content,
body main.site-main,
body #content.site-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--hd-paper, #f2f4f4);
}

/*
 * IMPORTANTE: no se neutraliza el padding de la raíz Elementor. Cada plantilla
 * HD ya define su aire superior/inferior y ese espaciado forma parte del diseño
 * aprobado. La versión anterior ponía --padding-bottom:0 y era la causa de que
 * algunas páginas terminaran pegadas al Footer B.
 */
body.elementor-page .elementor > .e-con,
body.elementor-page .elementor > .elementor-element.e-con {
  --gap: 0;
  gap: 0;
}

/* Guardia global: la última raíz de una página HD nunca termina pegada al footer.
 * Se usa padding solo como respaldo; las clases de cada plantilla pueden definir
 * un valor mayor mediante su propia hoja. */
body.elementor-page .elementor > .e-con:last-child,
body.elementor-page .elementor > .elementor-element.e-con:last-child {
  min-height: 1px;
}
/*
 * Inicio v2: el Demo cerrado usa exactamente 1180 px de ancho máximo y 24 px
 * laterales en escritorio (16 px en móvil). Elementor puede inyectar un ancho
 * propio en .e-con; estos selectores de raíz conservan la geometría aprobada.
 */
body.elementor-page .elementor > .e-con.home-shell,
body.elementor-page .elementor > .elementor-element.e-con.home-shell,
.home-v2 .home-shell {
  width: min(100% - 48px, 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}
.home-v2 .observatory-inner {
  width: min(100% - 48px, 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

/* En el hero claro, Elementor no debe convertir enlaces utilitarios o botones
 * neutrales en el color de acento global. */
.home-v2 .button-primary { color:#fff !important; }
.home-v2 .button-secondary,
.home-v2 .hero-utilities a { color:var(--ink) !important; }

/*
 * Regla cromática protegida: rosa en fondos claros; dorado en fondos oscuros.
 * Blanco para títulos y contenido principal sobre tinta.
 */
.home-v2 .home-fair,
.home-v2 .home-observatory,
.footer-b-preview,
.hd-data-participation,
.data-actions article:first-child {
  --pink: var(--gold);
  --pink-text: var(--gold);
  --pink-text-accessible: var(--gold);
}

.home-v2 .home-fair .microtitle,
.home-v2 .home-observatory .microtitle,
.home-v2 .home-fair .special-links span,
.footer-b-preview :is(.social-card > p, .link-card h2),
.hd-data-participation .hd-data-microtitle,
.data-actions article:first-child .hd-data-microtitle {
  color: var(--gold) !important;
}

.home-v2 .home-fair .special-copy h2,
.home-v2 .home-observatory :is(h2, h3),
.home-v2 .home-fair .special-links strong,
.hd-data-participation h2,
.data-actions article:first-child :is(h2, h3) {
  color: #fff !important;
}

.home-v2 .home-fair .special-copy > p:not(.microtitle),
.home-v2 .home-observatory p:not(.microtitle),
.hd-data-participation .hd-data-section-heading > p:last-child,
.data-actions article:first-child p:not(.hd-data-microtitle) {
  color: rgba(255,255,255,.74) !important;
}

/* El CTA claro de Feria nunca hereda el acento global de Elementor. */
.home-v2 .home-fair .button-light,
.home-v2 .home-fair a.button-light {
  border-color: #fff !important;
  background: #fff !important;
  color: var(--ink) !important;
}
.home-v2 .home-fair .special-links a { color: #fff !important; }
.home-v2 .home-fair .special-links a:hover strong,
.home-v2 .home-fair .special-links a:focus-visible strong { color: var(--gold) !important; }

/* Los globals de Elementor no sustituyen la tipografía cerrada por componente. */
.home-v2 :is(h1,h2,h3),
.hd-cultural-page :is(h1,h2,h3),
.hd-catalog-page :is(h1,h2,h3),
.hd-imported-page :is(h1,h2,h3) {
  font-family: "Montserrat", system-ui, sans-serif !important;
}

/* Foco visible: rosa sobre superficies claras y oro sobre tinta. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--hd-pink) !important;
  outline-offset: 3px !important;
}
.footer-b-preview :where(a,button):focus-visible,
.home-v2 .home-fair :where(a,button):focus-visible,
.home-v2 .home-observatory :where(a,button):focus-visible,
.hd-data-participation :where(a,button):focus-visible,
.data-actions article:first-child :where(a,button):focus-visible {
  outline-color: var(--gold) !important;
}

/* Evita animaciones no esenciales cuando el sistema operativo las reduce. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 620px) {
  body.elementor-page .elementor > .e-con.home-shell,
  body.elementor-page .elementor > .elementor-element.e-con.home-shell,
  .home-v2 .home-shell,
  .home-v2 .observatory-inner {
    width: calc(100% - 32px) !important;
  }
}

/* Las plantillas especiales Feria/Boletos usan la clase histórica `page-shell`.
 * No se modifica su geometría; únicamente se garantiza el mismo cierre visual
 * antes de Footer B que usa el resto del sistema. */
body.elementor-page .elementor > .e-con.page-shell:last-child,
body.elementor-page .elementor > .elementor-element.e-con.page-shell:last-child {
  padding-bottom: 72px;
}
@media (max-width: 620px) {
  body.elementor-page .elementor > .e-con.page-shell:last-child,
  body.elementor-page .elementor > .elementor-element.e-con.page-shell:last-child {
    padding-bottom: 48px;
  }
}

/*
 * 3.4.4 — Geometría protegida de fichas culturales.
 * Elementor puede escribir variables de ancho en la raíz .e-con que terminan
 * ganando al width de cultural.css. Se fijan tanto las propiedades reales como
 * las variables que Elementor usa para calcular el contenedor. Esto mantiene
 * el mismo margen lateral de la Plantilla Museo Completa en Haciendas, Museos
 * y Templos y conserva aire suficiente antes del Footer B.
 */
body.elementor-page .elementor > .e-con.hd-cultural-page,
body.elementor-page .elementor > .elementor-element.e-con.hd-cultural-page,
body.elementor-page .elementor > .e-con.hd-catalog-page,
body.elementor-page .elementor > .elementor-element.e-con.hd-catalog-page,
body.elementor-page .elementor > .e-con.hd-imported-page,
body.elementor-page .elementor > .elementor-element.e-con.hd-imported-page {
  --width: min(calc(100% - 48px), 1180px) !important;
  --max-width: 1180px !important;
  --container-max-width: 1180px !important;
  width: min(calc(100% - 48px), 1180px) !important;
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 34px !important;
  padding-right: 0 !important;
  padding-bottom: 72px !important;
  padding-left: 0 !important;
}

/* Si Elementor anida accidentalmente el documento bajo un contenedor full width,
 * la ficha sigue centrada y no se pega a los bordes de la ventana. */
.elementor .hd-cultural-page,
.elementor .hd-catalog-page,
.elementor .hd-imported-page {
  box-sizing: border-box;
  margin-inline: auto !important;
}

@media (max-width: 620px) {
  body.elementor-page .elementor > .e-con.hd-cultural-page,
  body.elementor-page .elementor > .elementor-element.e-con.hd-cultural-page,
  body.elementor-page .elementor > .e-con.hd-catalog-page,
  body.elementor-page .elementor > .elementor-element.e-con.hd-catalog-page,
  body.elementor-page .elementor > .e-con.hd-imported-page,
  body.elementor-page .elementor > .elementor-element.e-con.hd-imported-page {
    --width: calc(100% - 32px) !important;
    width: calc(100% - 32px) !important;
    padding-top: 24px !important;
    padding-bottom: 48px !important;
  }
}


/*
 * 3.4.5 — Reparación geométrica por tipo de contenido, no por clase Elementor.
 * Algunas fichas antiguas fueron guardadas con una raíz distinta y podían perder
 * el margen aunque su contenido fuese correcto. WordPress sí conserva la clase
 * del post type en <body>, por eso esta guardia actúa incluso sobre documentos
 * Elementor heredados. También endurece el responsive para impedir desbordes.
 */
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
:is(main#content, main.site-main, #content.site-main)
.elementor[data-elementor-type="wp-post"] > .e-con:first-child,
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
:is(main#content, main.site-main, #content.site-main)
.elementor[data-elementor-type="wp-post"] > .elementor-element.e-con:first-child {
  --width: min(calc(100% - 48px), 1180px) !important;
  --max-width: 1180px !important;
  --container-max-width: 1180px !important;
  width: min(calc(100% - 48px), 1180px) !important;
  max-width: 1180px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 34px !important;
  padding-right: 0 !important;
  padding-bottom: 72px !important;
  padding-left: 0 !important;
  box-sizing: border-box !important;
}

/* Ningún hijo de la ficha puede ensanchar la página por encima de su viewport. */
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
:is(main#content, main.site-main, #content.site-main) {
  min-width: 0;
  overflow-x: clip;
}
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"],
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"] :is(.e-con, .elementor-element, .elementor-widget, .hero-copy, .page-hero > *, .editorial-card > *, .location-section > *, .section-heading--row > *) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"] :is(img, video, iframe, svg) {
  max-width: 100%;
}
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"] :is(h1, h2, h3, p, li, a, strong, span) {
  overflow-wrap: anywhere;
}
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"] :is(.contact-actions a, .location-section > a, .hd-cta__button, .hd-map__button, .hd-gallery__more > summary) {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"] .hd-gallery__grid--horizontal {
  max-width: 100%;
  min-width: 0;
}
:is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
.elementor[data-elementor-type="wp-post"] .hd-gallery__more > summary {
  width: fit-content;
}

@media (max-width: 900px) {
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] :is(.page-hero, .editorial-card, .editorial-card--right, .catalog-hero) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .editorial-card--right figure {
    grid-row: 1;
    order: initial;
  }
}

@media (max-width: 620px) {
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  :is(main#content, main.site-main, #content.site-main)
  .elementor[data-elementor-type="wp-post"] > .e-con:first-child,
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  :is(main#content, main.site-main, #content.site-main)
  .elementor[data-elementor-type="wp-post"] > .elementor-element.e-con:first-child {
    --width: calc(100% - 32px) !important;
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    padding-top: 24px !important;
    padding-bottom: 48px !important;
  }

  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .page-hero {
    gap: 22px !important;
    margin-top: 22px !important;
    padding: 22px 16px !important;
    border-radius: 22px !important;
  }
  /* 3.6.20: el H1 móvil ya no se bloquea con !important.
   * cultural.css aporta el fallback y Elementor puede modificar la instancia. */
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .hero-introduction {
    max-width: 100% !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .contact-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100%;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .contact-actions a {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .editorial-card {
    gap: 20px !important;
    padding: 18px 16px !important;
    border-radius: 22px !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .editorial-card figure {
    width: 100%;
    max-width: 100%;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .section-heading--row,
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .location-section {
    align-items: stretch !important;
    flex-direction: column !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .location-section {
    gap: 18px !important;
    padding: 22px 16px !important;
    border-radius: 22px !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .location-section > a {
    width: 100% !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] :is(.gallery-grid, .related-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .contact-actions {
    grid-template-columns: 1fr !important;
  }
  :is(body.single-hd_hacienda, body.single-hd_museo, body.single-hd_templo)
  .elementor[data-elementor-type="wp-post"] .related-grid {
    grid-template-columns: 1fr;
  }
}


/*
 * 3.4.7 — Guardia final de márgenes culturales.
 * La versión anterior dependía de la clase avanzada guardada por Elementor y
 * algunas fichas de Museos habían sido creadas antes de que esa clase se
 * guardara con la clave interna correcta (_css_classes). Aquí el ancho se fija
 * también sobre el main del CPT, que WordPress controla y no Elementor.
 */
body.hd-cultural-single :is(main#content, main.site-main, #content.site-main) {
  width: min(calc(100% - 48px), 1180px) !important;
  max-width: 1180px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* El documento de Elementor ocupa el main ya centrado; no vuelve a sumar ancho. */
body.hd-cultural-single :is(main#content, main.site-main, #content.site-main)
.elementor[data-elementor-type="wp-post"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
}

body.hd-cultural-single :is(main#content, main.site-main, #content.site-main)
.elementor[data-elementor-type="wp-post"] > :is(.e-con, .elementor-element.e-con):first-child {
  --width: 100% !important;
  --max-width: 100% !important;
  --container-max-width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
  padding-top: 34px !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  box-sizing: border-box !important;
}

/* Respaldo para fichas antiguas cuyo main no usa las clases estándar de Hello. */
body.hd-cultural-single .elementor[data-elementor-type="wp-post"] > .hd-cultural-page,
body.hd-cultural-single .elementor[data-elementor-type="wp-post"] > .e-con.hd-cultural-page,
body.hd-cultural-single .elementor[data-elementor-type="wp-post"] > .elementor-element.hd-cultural-page {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
}

@media (max-width: 620px) {
  body.hd-cultural-single :is(main#content, main.site-main, #content.site-main) {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
  }
  body.hd-cultural-single :is(main#content, main.site-main, #content.site-main)
  .elementor[data-elementor-type="wp-post"] > :is(.e-con, .elementor-element.e-con):first-child {
    padding-top: 24px !important;
    padding-bottom: 0 !important;
  }
}


/* 3.4.8 — Cierre estructural antes del Footer B.
 * El espacio vive en el documento Elementor, no en una clase interna de la
 * primera sección, para que ninguna página nieta cultural pueda perderlo. */
body.hd-cultural-single .elementor[data-elementor-type="wp-post"] {
  box-sizing:border-box !important;
  padding-bottom:72px !important;
}
body.hd-cultural-single .elementor[data-elementor-type="wp-post"] > :first-child {
  padding-bottom:0 !important;
}
@media (max-width:620px) {
  body.hd-cultural-single .elementor[data-elementor-type="wp-post"] {
    padding-bottom:48px !important;
  }
}

/* 4.3.0 — Pulido final de UX/accesibilidad para producción.
 * Compensa el header fijo al navegar por anclas o mover el foco, mantiene una
 * jerarquía tipográfica más estable y evita desbordes de enlaces largos. */
html {
  scroll-padding-top: 104px;
}

:where(h1, h2, h3, h4, h5, h6, section[id], article[id], [id].e-con) {
  scroll-margin-top: 104px;
}

:where(h1, h2, h3) {
  text-wrap: balance;
}

:where(p, li) {
  text-wrap: pretty;
}

:where(.hd-legal-page, .hd-source-page, .hd-widget, .hd-events-page, .hd-governance-page) a {
  overflow-wrap: anywhere;
}

/* No se desactiva el outline nativo: esta capa solo refuerza la visibilidad. */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  scroll-margin-top: 104px;
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 88px;
  }

  :where(h1, h2, h3, h4, h5, h6, section[id], article[id], [id].e-con),
  :where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    scroll-margin-top: 88px;
  }
}

/* === responsive-5.0.6.css === */
/*
 * Huamantla Core 5.0.6 — endurecimiento responsive global.
 * Carga al final del sistema visual. Corrige desbordamientos reales sin ocultarlos
 * con overflow-x:hidden y conserva las reglas de columnas aprobadas por familia.
 */

@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  .elementor[data-elementor-type="wp-post"],
  .elementor[data-elementor-type="wp-post"] :is(.e-con, .e-con-inner, .elementor-element, .elementor-widget, .elementor-widget-container) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .elementor[data-elementor-type="wp-post"] :is(img, picture, video, iframe, canvas, svg) {
    max-width: 100%;
    box-sizing: border-box;
  }

  .elementor[data-elementor-type="wp-post"] :is(h1, h2, h3, h4, h5, h6, p, li, dd, dt, blockquote, figcaption, a, strong, span) {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .elementor[data-elementor-type="wp-post"] :is(pre, code) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .elementor[data-elementor-type="wp-post"] :is(a[class*="button"], button, [role="button"]) {
    max-width: 100%;
    white-space: normal;
  }

  /* Patrones de dos columnas que deben apilarse antes de entrar a móvil. */
  :is(
    .hd-cultural-page .page-hero,
    .hd-cultural-page .editorial-card,
    .hd-cultural-page .editorial-card--left,
    .hd-cultural-page .editorial-card--right,
    .hd-catalog-page .catalog-hero,
    .hd-imported-page .imported-hero--media,
    .hd-imported-page .imported-section--media,
    .hd-imported-page .imported-section--left,
    .hd-first-visit-split,
    .hd-arrival-page .hd-first-visit-split,
    .hd-malinche-page .hd-first-visit-split,
    .hd-city-introduction,
    .hd-city-meaning,
    .hd-city-feature,
    .hd-buy-hero,
    .hd-contact-hero,
    .hd-news-hero,
    .hd-celebration-hero,
    .hd-disfruta-hero,
    .hd-experience-parent-hero,
    .hd-experience-hero,
    .hd-experience-booking,
    .observatory-hero,
    .data-product-hero,
    .tickets-page .page-hero,
    .tickets-hero
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Muéganos y el widget HD - Información con imagen: imagen arriba, texto debajo. */
  .hd-cultural-page .editorial-card > :is(figure, div) {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    grid-column: 1 !important;
  }
  .hd-cultural-page .editorial-card > figure {
    order: 0 !important;
    grid-row: auto !important;
  }
  .hd-cultural-page .editorial-card > div {
    order: 1 !important;
  }
  .hd-cultural-page .editorial-card figure :is(img, picture) {
    width: 100%;
    max-width: 100%;
  }
  .hd-cultural-page .hd-editorial-prose {
    width: 100%;
    max-width: 64ch;
    min-width: 0;
  }
}

@media (max-width: 620px) {
  /* Guardia geométrica común. No recorta el body: corrige al elemento causante. */
  .elementor[data-elementor-type="wp-post"] :is(
    .page-hero,
    .catalog-hero,
    .editorial-card,
    .imported-hero,
    .imported-section,
    .hd-cta,
    .structured-quote,
    .structured-video-quote,
    .gallery-section,
    .location-section,
    .hd-structured-faq
  ) {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Muéganos: corrige específicamente el fallo visible de 5.0.5. */
  .hd-cultural-page--gastronomia .editorial-card,
  .hd-cultural-page--gastronomia .editorial-card--left,
  .hd-cultural-page--gastronomia .editorial-card--right {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
    padding: 18px !important;
    border-radius: 24px;
  }
  .hd-cultural-page--gastronomia .editorial-card > :is(figure, div),
  .hd-cultural-page--gastronomia .editorial-card .hd-editorial-prose {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .hd-cultural-page--gastronomia .editorial-card figure {
    aspect-ratio: 16 / 9;
    border-radius: 18px;
  }
  .hd-cultural-page--gastronomia .editorial-card figure img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    display: block;
    object-fit: cover;
  }
  .hd-cultural-page--gastronomia .editorial-card h2 {
    max-width: 100%;
    font-size: clamp(1.85rem, 9vw, 2.35rem);
    line-height: 1.02;
  }
  .hd-cultural-page--gastronomia .hd-editorial-prose {
    font-size: .95rem;
    line-height: 1.65;
  }

  /* Contenedores base: respiración lateral estable a 320–430 px. */
  :is(.hd-cultural-page, .hd-catalog-page, .hd-imported-page) {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    margin-inline: auto !important;
  }

  /* Medios y embeds nunca fuerzan scroll del documento. */
  .elementor[data-elementor-type="wp-post"] :is(iframe, video, canvas, object, embed) {
    width: 100%;
    max-width: 100%;
  }
  .elementor[data-elementor-type="wp-post"] table {
    max-width: 100%;
  }

  /* Acciones táctiles: se mantienen dentro de la tarjeta. */
  .elementor[data-elementor-type="wp-post"] :is(
    .hd-cta__button,
    .hd-map__button,
    .hd-experience-button,
    .hd-disfruta-primary,
    .hd-disfruta-button,
    .catalog-card-button,
    .tickets-page a[class*="button"]
  ) {
    max-width: 100%;
    white-space: normal !important;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .hd-cultural-page--gastronomia .editorial-card {
    gap: 18px !important;
    padding: 16px !important;
  }
  .hd-cultural-page--gastronomia .editorial-card h2 {
    font-size: clamp(1.7rem, 9vw, 2.05rem);
  }
}

/* === responsive-audit-5.0.15.css === */
/* Huamantla Core 5.0.12 — auditoría responsive transversal.
 * Objetivos: respetar grids Elementor, evitar compresión/overflow y corregir
 * mapas culturales en tableta/móvil. No oculta desbordamientos con overflow-x.
 */

/* Geometría segura para contenedores Elementor y widgets HD. */
.elementor :is(.elementor-element,.e-con,.e-con-inner,[class*="-grid"],[class*="-copy"],[class*="-card"]) {
  min-width: 0;
}
.elementor :is(img,video,svg,iframe,canvas) {
  max-width: 100%;
}
.elementor iframe {
  width: 100%;
}
.elementor :is(.catalog-card,.hd-visit-map-card,.hd-visit-map-copy) > * {
  min-width: 0;
}
.elementor :is(.catalog-card h3,.catalog-card p,.hd-visit-map-copy h3,.hd-visit-map-copy p) {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Catálogo automático: los valores inline viajan con el HTML del widget.
 * Esta capa los convierte en la columna activa según el viewport aunque el
 * archivo CSS generado por Elementor siga cacheado con el valor de escritorio.
 */
.elementor-widget-hd-catalog-grid .catalog-grid {
  --hd-grid-columns: var(--hd-grid-columns-desktop, 4) !important;
  grid-template-columns: repeat(var(--hd-grid-columns), minmax(0, 1fr)) !important;
}
@media (max-width: 1024px) {
  .elementor-widget-hd-catalog-grid .catalog-grid {
    --hd-grid-columns: var(--hd-grid-columns-tablet, 3) !important;
  }
}
@media (max-width: 767px) {
  .elementor-widget-hd-catalog-grid .catalog-grid {
    --hd-grid-columns: var(--hd-grid-columns-mobile, 2) !important;
    gap: 10px;
  }
  .elementor-widget-hd-catalog-grid .catalog-card {
    min-width: 0;
  }
  .elementor-widget-hd-catalog-grid .catalog-card > div {
    min-width: 0;
    padding: 14px;
  }
  .elementor-widget-hd-catalog-grid .catalog-card h3 {
    font-size: clamp(.9rem, 4.5vw, 1.02rem);
    line-height: 1.18;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }
  .elementor-widget-hd-catalog-grid .catalog-card p {
    font-size: clamp(.72rem, 3.5vw, .82rem);
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }
}

/* Mapa compartido: desde tableta la copia y los CTA deben ocupar una fila
 * completa. La versión anterior mantenía 1fr/auto hasta 760px y el CTA largo
 * dejaba el texto reducido a una columna de pocos caracteres. */
@media (max-width: 1024px) {
  .hd-visit-map-card,
  .hd-visit-map-copy,
  .hd-visit-map-copy > div,
  .hd-visit-map-actions {
    min-width: 0;
    max-width: 100%;
  }
  .hd-visit-map-copy {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start;
    gap: 18px;
    padding: 20px;
  }
  .hd-visit-map-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
  }
  .hd-visit-map-copy .hd-visit-primary-action,
  .hd-visit-map-copy .hd-visit-secondary-action {
    width: auto;
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
    text-align: center;
    line-height: 1.25;
  }
  .hd-cultural-page--museo .hd-visit-map-stage,
  .hd-cultural-page--templo .hd-visit-map-stage {
    aspect-ratio: 16 / 7 !important;
  }
  .hd-catalog-page .hd-visit-section.hd-visit-map {
    padding: 32px;
  }
}

@media (max-width: 767px) {
  .elementor :is(.elementor-element,.e-con,.e-con-inner) {
    max-width: 100%;
  }
  .elementor :is(a,button,.elementor-button) {
    max-width: 100%;
  }
  .hd-visit-map-copy {
    padding: 16px;
  }
  .hd-visit-map-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .hd-visit-map-copy .hd-visit-primary-action,
  .hd-visit-map-copy .hd-visit-secondary-action {
    width: 100%;
  }
  .hd-cultural-page--museo .hd-visit-map-stage,
  .hd-cultural-page--templo .hd-visit-map-stage {
    aspect-ratio: 16 / 9 !important;
  }
  .hd-catalog-page .hd-visit-section.hd-visit-map {
    padding: 24px 18px;
  }
}

@media (max-width: 430px) {
  .hd-catalog-page .hd-visit-section.hd-visit-map {
    padding: 20px 16px;
  }
  .elementor-widget-hd-catalog-grid .catalog-grid {
    gap: 8px;
  }
  .elementor-widget-hd-catalog-grid .catalog-card > div {
    padding: 12px;
  }
}

/* Scroll horizontal solo donde el contenido naturalmente puede necesitarlo;
 * nunca se aplica al body para esconder errores de layout. */
.elementor :is(.hd-data-table-wrap,.hd-document-table-wrap,.hd-sitemap-table-wrap) {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Huamantla Core 5.0.13 — Vida Huamantla / Completa tu visita.
 * Entre 701 y 1000 px la hoja base dejaba cada tarjeta con dos columnas
 * (imagen min. 240px + texto), lo que comprimía la copia hasta una franja.
 * Desde tableta apilamos imagen y contenido y conservamos el grid configurable
 * del widget para escritorio. La regla es del componente compartido, no de una
 * página concreta, por lo que protege Día de Muertos, Corpus y otras celebraciones.
 */
@media (max-width: 1000px) {
  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid > a,
  .hd-celebration-page .hd-celebration-plan-grid > a {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid > a > img,
  .hd-celebration-page .hd-celebration-plan-grid > a > img {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid > a > span,
  .hd-celebration-page .hd-celebration-plan-grid > a > span {
    width: 100%;
    min-width: 0;
    padding: 20px;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid :is(small,strong,em),
  .hd-celebration-page .hd-celebration-plan-grid :is(small,strong,em) {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }
}

@media (max-width: 700px) {
  .elementor-widget-hd-celebration-plan .hd-celebration-plan,
  .hd-celebration-page .hd-celebration-plan {
    padding: 18px;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid,
  .hd-celebration-page .hd-celebration-plan-grid {
    gap: 14px;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid > a > span,
  .hd-celebration-page .hd-celebration-plan-grid > a > span {
    padding: 18px;
  }
}

@media (max-width: 430px) {
  .elementor-widget-hd-celebration-plan .hd-celebration-plan,
  .hd-celebration-page .hd-celebration-plan {
    padding: 16px;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid > a,
  .hd-celebration-page .hd-celebration-plan-grid > a {
    border-radius: 20px;
  }

  .elementor-widget-hd-celebration-plan .hd-celebration-plan-grid > a > span,
  .hd-celebration-page .hd-celebration-plan-grid > a > span {
    padding: 16px;
  }
}

/* Huamantla Core 5.0.15 — segunda auditoría responsive transversal.
 * Se revisaron las familias padre, hija y nieta del portal y se refuerzan aquí
 * los contratos geométricos compartidos. Esta capa no oculta overflow del body:
 * reduce/recorta el elemento que lo provoca y preserva las decisiones de Elementor.
 */
@media (max-width: 1024px) {
  .elementor[data-elementor-type="wp-post"] :is(
    .hd-celebration-shell,
    .hd-history-shell,
    .hd-data-shell,
    .hd-data-page-shell,
    .hd-contact-shell,
    .hd-first-visit-shell,
    .hd-malinche-shell,
    .hd-conoce-shell,
    .hd-disfruta-shell,
    .hd-events-shell,
    .hd-governance-shell,
    .hd-search-shell,
    .hd-cultural-page,
    .hd-catalog-page,
    .hd-imported-page
  ) {
    min-width: 0;
    max-width: 100%;
  }

  .elementor[data-elementor-type="wp-post"] :is(
    .hd-celebration-hero,
    .hd-celebration-hero > div,
    .hd-celebration-hero-image,
    .hd-history-introduction,
    .hd-history-timeline,
    .hd-history-source,
    .hd-city-introduction,
    .hd-city-meaning,
    .hd-city-feature,
    .hd-codex-introduction,
    .hd-codex-section,
    .hd-monuments-introduction,
    .hd-monuments-feature,
    .hd-contact-hero,
    .hd-news-hero,
    .observatory-hero,
    .data-product-hero
  ) {
    min-width: 0;
    max-width: 100%;
  }

  .elementor[data-elementor-type="wp-post"] :is(h1,h2,h3,h4) {
    max-inline-size: 100%;
    min-width: 0;
    word-break: normal;
  }
}

@media (max-width: 700px) {
  /* Los encabezados deben poder reflowar incluso cuando son una sola palabra.
   * break-word permanece como regla ordinaria; anywhere solo actúa si no existe
   * un punto de corte normal y el término rebasaría físicamente el contenedor. */
  .elementor[data-elementor-type="wp-post"] :is(
    .hd-celebration-hero h1,
    .hd-contact-hero h1,
    .hd-news-hero h1,
    .hd-events-hero__title,
    .observatory-hero h1,
    .data-product-hero h1,
    .page-hero h1,
    .catalog-hero h1
  ) {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .elementor[data-elementor-type="wp-post"] :is(
    .hd-celebration-short-answer,
    .short-answer,
    .hd-data-short-answer,
    .hd-news-short-answer,
    .hd-experience-short-answer
  ) {
    min-width: 0;
    max-width: 100%;
  }

  .elementor[data-elementor-type="wp-post"] :is(
    .hd-celebration-hero-actions,
    .hd-data-actions,
    .hd-contact-actions,
    .hd-experience-actions,
    .hd-disfruta-actions
  ) > :is(a,button) {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .elementor[data-elementor-type="wp-post"] :is(
    .hd-history-year-row,
    .hd-history-event,
    .hd-history-event-copy,
    .hd-celebration-document-card,
    .hd-celebration-guide-theme,
    .hd-data-product-grid > *,
    .hd-disfruta-service-grid > *,
    .hd-disfruta-news-grid > *,
    .catalog-grid > *,
    .related-grid > *,
    .gallery-grid > *
  ) {
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .elementor[data-elementor-type="wp-post"] :is(h1,h2,h3,h4,p,li,a,strong,span,small) {
    max-width: 100%;
  }

  /* Evita que botones largos conviertan la tarjeta en un viewport más ancho. */
  .elementor[data-elementor-type="wp-post"] :is(
    .hd-celebration-button,
    .hd-data-button,
    .hd-contact-button,
    .hd-experience-button,
    .hd-disfruta-button,
    .catalog-card-button
  ) {
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
  }
}
