/* Adaptação do mesmo layout. Não redefine o componente agenda-motion. */
:where(.hero-content.container, .about-layout, .agenda-feature, .agenda-row, .site-footer-inner) > * {
  min-width: 0;
}
:where(.agenda-feature, .agenda-row, .hero-event-bar, .site-footer-inner) {
  max-width: 100%;
}
.agenda-meta, .agenda-attractions, .agenda-tag, .site-footer-location span, .site-footer-legal small {
  overflow-wrap: anywhere;
}
.agenda-title-link {
  display: inline-block;
  max-width: 100%;
  padding-block: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.agenda-button {
  max-width: 100%;
  padding-block: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.agenda-actions, .agenda-row-prize, .hero-event-main > *, .hero-event-heading > *, .site-footer-legal {
  min-width: 0;
}
.agenda-categories progress { max-width: 100%; }
.site-footer-location span { min-width: 0; }
.event-page-header > a { min-width: 0; }
.event-page-header > a:first-child { flex-shrink: 0; }
.event-page-header > [data-event-back] { max-width: 100%; text-align: center; }

/* O card mantém a mesma sequência; o cartaz passa acima quando a coluna de
   informações não comportaria tabela, botões e valores confortavelmente. */
@media (min-width: 768px) and (max-width: 1023px) {
  .agenda-feature { grid-template-columns: minmax(0, 1fr); }
  .agenda-poster { min-height: 0; aspect-ratio: 4 / 3; }
  .agenda-feature-copy { padding: 32px; }
  .agenda-feature-copy :is(h1, h3) { font-size: clamp(30px, 4vw, 36px); }
  .agenda-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .agenda-row .agenda-actions { flex: 1 1 100%; margin-left: 0; }
  .agenda-row .agenda-actions .agenda-button { flex: 1 1 180px; }
}

@media (max-width: 767px) {
  /* No celular, os controles existentes de conta ficam diretamente no topo. */
  .header-inner { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .header .header-toggle { display: none; }
  .header .header-brand { margin-left: 0; top: 4px; }
  .header .header-actions { display: grid; justify-self: end; gap: 8px; }
  .header .header-actions :is(a, button) {
    height: 48px;
    min-height: 48px;
    padding-inline: clamp(8px, 2.5vw, 12px);
    font-size: clamp(12px, 3.25vw, 14px);
  }
  .hero {
    min-height: max(640px, 100svh);
    --hero-title-size: clamp(3.5rem, 16.4vw, 4.375rem);
    --hero-lockup-gap: 16px;
  }
  .hero-brand-location, .about-identity-location { max-width: 100%; }
  .hero-brand-location span { min-width: 0; overflow-wrap: anywhere; }
  /* A localização não pode herdar a largura medida apenas para o título. */
  .hero .hero-lockup .hero-brand-location {
    width: max-content;
    max-width: none;
    margin-top: 20px;
    gap: 8px;
    font-size: clamp(12px, 3.5vw, 14px);
    letter-spacing: 0;
    white-space: nowrap;
  }
  .hero .hero-lockup .hero-brand-location span { flex: 0 0 auto; overflow-wrap: normal; }
  .hero-description { text-wrap: pretty; }
  .hero-event-bar { margin-top: 40px; }
  .hero-event-details { white-space: normal; }
  .agenda-feature-copy { padding: clamp(16px, 5vw, 24px); gap: 20px; }
  .agenda-feature-copy :is(h1, h3) { font-size: clamp(28px, 7.8vw, 36px); }
  .events .agenda-row, .agenda-page .agenda-row { padding: clamp(16px, 5vw, 24px); }
  .agenda-row-copy { align-self: center; }
  .agenda-row .agenda-actions { width: 100%; }
  .agenda-categories table { font-size: 14px; }
  .agenda-categories th, .agenda-categories td { hyphens: auto; }
  .agenda-stats .agenda-stat > * { min-width: 0; overflow-wrap: anywhere; }
  .agenda-stats .agenda-stat dt { flex: 1 1 45%; }
  .agenda-stats .agenda-stat dd { flex: 1 1 55%; font-size: clamp(24px, 6.8vw, 28px); }
  .site-footer-location { gap: 8px; }
  .site-footer-legal { max-width: 100%; }
  .event-page-main { margin-block: 32px 48px; padding-inline: 20px; }
  .event-page-header { padding: 20px; gap: 16px; }
  .event-page-header > [data-event-back] { flex: 0 1 auto; }
  .event-page-facts > * { min-width: 0; overflow-wrap: anywhere; }
  dialog:not(.mobile-menu) h2 { font-size: clamp(32px, 9vw, 40px); }
  dialog:not(.mobile-menu) > p:not(.eyebrow) { font-size: 14px; line-height: 1.75; }
}

@media (max-width: 1023px) {
  .agenda-poster img { object-fit: contain; }
}

@media (max-width: 374px) {
  .hero-description { font-size: 16px; }
  .agenda-categories th:first-child { width: 36%; }
  .agenda-stats .agenda-stat { gap: 12px; }
}
