/* CONFUT: menu flutuante dos eventos (Nordeste, USA, Sudamericana, Euro).
   Markup em includes/event-floating-nav.php; comportamento em js/event-floating-nav.js.
   Carregado depois de css/event-mobile-nav.css. Cada evento só troca as variáveis de cor. */

.cfn-header {
  --cfn-bar-bg: rgba(10, 24, 48, 0.84);
  --cfn-bar-bg-scrolled: rgba(8, 18, 38, 0.95);
  --cfn-panel-bg: rgba(8, 20, 42, 0.97);
  --cfn-line: rgba(255, 255, 255, 0.09);
  --cfn-accent: #ff9800;
  --cfn-accent-ink: #1a1206;
  --cfn-tile-bg: rgba(255, 255, 255, 0.08);
  --cfn-hover-bg: rgba(255, 255, 255, 0.07);
  --cfn-current-bg: rgba(255, 255, 255, 0.1);
  --cfn-group: rgba(255, 255, 255, 0.6);
  --cfn-muted: rgba(255, 255, 255, 0.7);
  --cfn-title-font: var(--event-font, inherit);
  --cfn-body-font: Montserrat, "Alibaba Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.event-nordeste .cfn-header {
  --cfn-bar-bg: rgba(36, 8, 8, 0.84);
  --cfn-bar-bg-scrolled: rgba(30, 7, 7, 0.95);
  --cfn-panel-bg: rgba(34, 8, 8, 0.97);
  --cfn-accent: #ff9800;
  --cfn-accent-ink: #2a0a0a;
  --cfn-tile-bg: rgba(255, 152, 0, 0.12);
  --cfn-hover-bg: rgba(255, 152, 0, 0.1);
  --cfn-current-bg: rgba(167, 4, 4, 0.3);
  --cfn-group: #e0a597;
  --cfn-muted: rgba(255, 236, 230, 0.72);
}

body.confut-usa-refactor .cfn-header {
  --cfn-bar-bg: rgba(6, 26, 56, 0.86);
  --cfn-bar-bg-scrolled: rgba(4, 20, 44, 0.96);
  --cfn-panel-bg: rgba(5, 22, 48, 0.97);
  --cfn-accent: #ff5468;
  --cfn-accent-ink: #fff;
  --cfn-tile-bg: rgba(255, 84, 104, 0.14);
  --cfn-hover-bg: rgba(255, 255, 255, 0.07);
  --cfn-current-bg: rgba(207, 28, 49, 0.32);
  --cfn-group: #9fb8dc;
  --cfn-muted: rgba(226, 236, 250, 0.72);
}

body.confut-sudamericana-refactor .cfn-header {
  --cfn-bar-bg: rgba(10, 38, 71, 0.86);
  --cfn-bar-bg-scrolled: rgba(7, 30, 58, 0.96);
  --cfn-panel-bg: rgba(7, 30, 58, 0.97);
  --cfn-accent: #4fd1bf;
  --cfn-accent-ink: #04231f;
  --cfn-tile-bg: rgba(79, 209, 191, 0.13);
  --cfn-hover-bg: rgba(79, 209, 191, 0.09);
  --cfn-current-bg: rgba(14, 102, 93, 0.45);
  --cfn-group: #8fc7bf;
  --cfn-muted: rgba(224, 240, 238, 0.72);
}

body.confut-euro-refactor .cfn-header {
  --cfn-bar-bg: rgba(0, 31, 63, 0.86);
  --cfn-bar-bg-scrolled: rgba(0, 24, 50, 0.96);
  --cfn-panel-bg: rgba(0, 26, 54, 0.97);
  --cfn-accent: #d4b06e;
  --cfn-accent-ink: #001f3f;
  --cfn-tile-bg: rgba(212, 176, 110, 0.14);
  --cfn-hover-bg: rgba(212, 176, 110, 0.09);
  --cfn-current-bg: rgba(212, 176, 110, 0.2);
  --cfn-group: #c9b48a;
  --cfn-muted: rgba(236, 232, 222, 0.72);
}

/* Sudamericana: o tema pinta o link ativo de verde-escuro (#0A524B), ilegível sobre a pílula. */
body.confut-sudamericana-refactor .cfn-header #mainmenu > li > a.menu-item.active,
body.confut-sudamericana-refactor .cfn-header #mainmenu > li > a.menu-item:hover,
body.confut-sudamericana-refactor .cfn-header #mainmenu > li > a.menu-item:focus-visible,
body.confut-sudamericana-refactor .cfn-header #mainmenu > li.is-open > a.cfn-mega__trigger {
  color: var(--cfn-accent) !important;
}

.cfn-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body section[id],
body h2[id],
body h3[id] {
  scroll-margin-top: calc(var(--cfn-bar-h, 96px) + 16px);
}

/* Logo centrada na pílula: o link inline deixava um vão de linha embaixo da imagem. */
.cfn-header .cfn-brand,
.cfn-header .cfn-logo-link {
  display: flex !important;
  align-items: center;
  align-self: center;
  line-height: 0;
}

/* ---------- Gatilho "Programação" (é um <a>: herda o visual dos outros links) ---------- */
.cfn-header #mainmenu .cfn-mega__trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

/* O tema (style.css) dá `width: 0%`, borda e caixa alta a todo span dentro de link do menu. */
.cfn-header #mainmenu .cfn-mega span,
.cfn-header #mainmenu .cfn-mega__trigger span {
  float: none;
  width: auto;
  margin: 0;
  border: 0;
  text-transform: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* No celular o tema esconde (`display: none`) todo span de a.menu-item. */
html body .cfn-header #mainmenu a.cfn-mega__trigger .cfn-mega__trigger-text {
  display: inline !important;
}

.cfn-header .cfn-mega__caret {
  flex: none;
  transition: transform 0.2s ease;
}

.cfn-header .is-open > .cfn-mega__trigger .cfn-mega__caret {
  transform: rotate(180deg);
}

/* ---------- Painel ---------- */
.cfn-header #mainmenu .cfn-mega .cfn-mega__group {
  margin: 0;
  padding: 0.35rem 0.75rem 0.3rem;
  font-family: var(--cfn-body-font);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--cfn-group);
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.75rem;
  overflow: hidden;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  text-align: left;
  text-decoration: none;
  text-shadow: none;
  transition: background-color 0.2s ease;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item::after,
.cfn-header #mainmenu .cfn-mega .cfn-mega__all::after {
  display: none;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  line-height: 0;
  border-radius: 11px;
  background: var(--cfn-tile-bg);
  color: var(--cfn-accent);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__title {
  display: block;
  font-family: var(--cfn-title-font);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #fff;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__desc {
  display: block;
  font-family: var(--cfn-body-font);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--cfn-muted);
}

.cfn-header .cfn-mega__art {
  position: absolute;
  right: -10px;
  bottom: -16px;
  width: 92px;
  height: 92px;
  color: var(--cfn-accent);
  opacity: 0;
  transform: translate(12px, 10px) rotate(-8deg);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item:hover,
.cfn-header #mainmenu .cfn-mega .cfn-mega__item:focus-visible {
  background: var(--cfn-hover-bg);
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item:focus-visible {
  outline: 2px solid var(--cfn-accent);
  outline-offset: -2px;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item:hover .cfn-mega__icon,
.cfn-header #mainmenu .cfn-mega .cfn-mega__item:focus-visible .cfn-mega__icon,
.cfn-header #mainmenu .cfn-mega .cfn-mega__item.is-current .cfn-mega__icon {
  background: var(--cfn-accent);
  color: var(--cfn-accent-ink);
}

.cfn-header .cfn-mega__item:hover .cfn-mega__art,
.cfn-header .cfn-mega__item:focus-visible .cfn-mega__art {
  opacity: 0.18;
  transform: none;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item.is-current {
  background: var(--cfn-current-bg);
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__item.is-current .cfn-mega__title {
  color: var(--cfn-accent);
}

.cfn-header .cfn-mega__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0.75rem 0.75rem 0.15rem;
  border-top: 1px solid var(--cfn-line);
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__when {
  display: block;
  font-family: var(--cfn-body-font);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--cfn-muted);
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.2rem;
  background: none;
  font-family: var(--cfn-title-font);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--cfn-accent);
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__all:hover,
.cfn-header #mainmenu .cfn-mega .cfn-mega__all:focus-visible {
  color: #fff;
}

.cfn-header #mainmenu .cfn-mega .cfn-mega__all:focus-visible {
  outline: 2px solid var(--cfn-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.cfn-header .cfn-mega__all svg {
  transition: transform 0.2s ease;
}

.cfn-header .cfn-mega__all:hover svg {
  transform: translateX(3px);
}

/* ---------- Desktop: pílula flutuante + painel em 2 colunas ---------- */
@media (min-width: 992px) {
  html body #wrapper > header.cfn-header,
  html body #wrapper > header.cfn-header.smaller {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body header.cfn-header .cfn-bar {
    width: min(1340px, calc(100% - 40px));
    margin: 16px auto 0;
    /* !important: o .ne-header__bar e o .suda-header__bar zeram o padding lateral com seletor
       mais forte, e a logo e o botão ficavam colados na borda da pílula. */
    padding: 0.5rem 0.55rem 0.5rem 1.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: var(--cfn-bar-bg) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
    transition: margin 0.3s ease, padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  }

  html body header.cfn-header.cfn-scrolled .cfn-bar {
    margin-top: 10px;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    background: var(--cfn-bar-bg-scrolled) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  }

  html body header.cfn-header .cfn-bar > .container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  /* width/height auto: o USA tinha largura fixa (175px) com altura limitada e a logo esticava. */
  html body header.cfn-header .cfn-logo-link img {
    width: auto !important;
    height: auto !important;
    max-height: 46px !important;
    transition: max-height 0.3s ease;
  }

  /* Seletor de evento: USA e Euro herdavam padding vertical e line-height altos do tema, e a
     pílula de destaque (::before com inset fixo) virava quase um círculo em volta do nome. */
  html body header.cfn-header #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1 !important;
  }

  html body header.cfn-header.cfn-scrolled .cfn-logo-link img {
    max-height: 40px !important;
  }

  html body header.cfn-header #mainmenu {
    flex-wrap: nowrap !important;
  }

  .cfn-header .cfn-mega-item {
    position: relative;
  }

  .cfn-header .cfn-mega {
    position: absolute;
    top: calc(100% + 22px);
    left: 50%;
    z-index: 300;
    width: 640px;
    padding: 0.85rem;
    background: var(--cfn-panel-bg);
    border: 1px solid var(--cfn-line);
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.24s;
  }

  /* Ponte invisível entre o gatilho e o painel: o hover não cai no vão. */
  .cfn-header .cfn-mega::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -24px;
    height: 24px;
  }

  .cfn-header .is-open > .cfn-mega {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }

  .cfn-header .cfn-mega__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.15rem 0.6rem;
    align-items: start;
  }

  .cfn-header .cfn-mega__col {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* O tema dá margin-right 30px a cada item (USA, Euro) e o inner da Euro tem 80px de altura
   mínima; na pílula isso empurrava o FAQ para cima do botão de compra. */
@media (min-width: 992px) {
  html body header.cfn-header #mainmenu > li {
    margin-right: 0 !important;
  }

  html body header.cfn-header #mainmenu {
    column-gap: clamp(1.25rem, 1.9vw, 1.9rem) !important;
  }

  /* Medidas do Nordeste (aprovado) valem para todos: pílula de 70px, botão de 52px.
     O USA tinha inner com min-height 64px (pílula de 82px) e a Euro botão de 38px. */
  html body header.cfn-header .cfn-bar [class$="-header__inner"],
  html body header.cfn-header .cfn-bar [class*="-header__inner "] {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  html body header.cfn-header .cfn-bar [class*="-header__actions"] a[class*="-cta-cred"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 52px !important;
    padding: 0.65rem 1.1rem !important;
    border-radius: 999px !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  html body header.cfn-header .cfn-bar {
    padding-left: 1.1rem !important;
  }

  /* Rótulos longos (SUDAMERICANA, Credenciais e hospedagem) não cabem com o espaço do desktop largo. */
  html body header.cfn-header #mainmenu {
    column-gap: 0.85rem !important;
  }

  html body header.cfn-header #mainmenu > li > a.menu-item {
    font-size: 0.8rem !important;
  }

  html body header.cfn-header .cfn-logo-link img {
    max-height: 40px !important;
    max-width: 150px !important;
  }
}

/* ---------- Mobile: pílula + acordeão dentro do overlay ---------- */
@media (max-width: 991.98px) {
  html body #wrapper > header.cfn-header,
  html body #wrapper > header.cfn-header.smaller,
  html body header.cfn-header.header-mobile {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body header.cfn-header .cfn-bar,
  html body header.cfn-header.header-mobile .cfn-bar {
    margin: 8px 8px 0;
    padding: 0.35rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: var(--cfn-bar-bg-scrolled) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  }

  html body header.cfn-header .cfn-logo-link img {
    max-height: min(44px, 14vw) !important;
  }

  html body .cfn-header .cfn-nav-scrim {
    top: 0 !important;
  }

  html body .cfn-header .cfn-nav-panel {
    top: var(--cfn-bar-h, 72px) !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px !important;
  }

  html body .cfn-nav-panel #mainmenu > li > .cfn-mega__trigger {
    width: 100% !important;
    justify-content: space-between !important;
    padding-right: 4px !important;
  }

  html body .cfn-nav-panel #mainmenu > li > .cfn-mega__trigger::after {
    display: none !important;
  }

  .cfn-header .cfn-mega__caret {
    width: 16px;
    height: 16px;
    margin-right: 12px;
  }

  .cfn-header .cfn-mega {
    display: none;
    padding: 0 0 0.75rem;
  }

  .cfn-header .is-open > .cfn-mega {
    display: block;
  }

  .cfn-header .cfn-mega__col + .cfn-mega__col {
    margin-top: 0.5rem;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__group {
    padding-left: 0;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.55rem 0.5rem 0.55rem 0;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__item.is-current {
    padding-left: 0.5rem;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__icon svg {
    width: 20px;
    height: 20px;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__title {
    font-size: 1.05rem;
  }

  .cfn-header #mainmenu .cfn-mega .cfn-mega__desc {
    font-size: 0.75rem;
  }

  .cfn-header .cfn-mega__art,
  .cfn-header #mainmenu .cfn-mega .cfn-mega__when {
    display: none;
  }

  .cfn-header .cfn-mega__foot {
    margin-top: 0.25rem;
    padding: 0.5rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body header.cfn-header .cfn-bar,
  html body header.cfn-header .cfn-logo-link img,
  .cfn-header .cfn-mega,
  .cfn-header .is-open > .cfn-mega,
  .cfn-header .cfn-mega__caret,
  .cfn-header #mainmenu .cfn-mega .cfn-mega__icon,
  .cfn-header .cfn-mega__art,
  .cfn-header .cfn-mega__all svg,
  .cfn-header #mainmenu .cfn-mega .cfn-mega__item {
    transition: none !important;
  }

  .cfn-header .cfn-mega__art {
    transform: none;
  }
}

/* Nordeste: a Bebas Neue desenha as maiúsculas no alto da caixa de linha, então o texto do
   seletor de evento ficava ~1,5px acima do centro da pílula. Sobe a pílula na mesma medida. */
@media (min-width: 992px) {
  body.confut-nordeste-refactor .cfn-header #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger::before {
    inset: -9.5px -12px -6.5px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  body.confut-nordeste-refactor .cfn-header #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger::before {
    inset: -8.5px -8px -5.5px;
  }
}

/* Sudamericana: rótulos mais longos (SUDAMERICANA, Credenciais e hospedagem); abaixo de 1100px
   o botão de compra saía da pílula. */
@media (min-width: 992px) and (max-width: 1099.98px) {
  html body.confut-sudamericana-refactor header.cfn-header #mainmenu {
    column-gap: 0.55rem !important;
  }

  html body.confut-sudamericana-refactor header.cfn-header #mainmenu > li > a.menu-item,
  html body.confut-sudamericana-refactor header.cfn-header #mainmenu > li > button.menu-item {
    font-size: 0.74rem !important;
  }
}

/* A fonte da Sudamericana é bem mais larga que a condensada do Nordeste: com o mesmo tamanho
   o menu ficava apertado. Letra um pouco menor e mais espaço entre os itens. */
@media (min-width: 1200px) {
  html body.confut-sudamericana-refactor header.cfn-header #mainmenu {
    column-gap: clamp(1.4rem, 2.4vw, 2.4rem) !important;
  }

  html body.confut-sudamericana-refactor header.cfn-header #mainmenu > li > a.menu-item,
  html body.confut-sudamericana-refactor header.cfn-header #mainmenu > li > button.menu-item {
    font-size: 0.875rem !important;
  }
}

/* Sudamericana: a fonte desenha as maiúsculas ~1px abaixo do centro da linha; desce a pílula
   na mesma medida. Entre 1100 e 1199px o nome do evento acompanha o tamanho dos outros itens. */
@media (min-width: 992px) {
  body.confut-sudamericana-refactor .cfn-header #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger::before {
    inset: -7px -12px -9px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  body.confut-sudamericana-refactor .cfn-header #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger::before {
    inset: -6px -8px -8px;
  }

}

@media (min-width: 1100px) and (max-width: 1199.98px) {
  html body.confut-sudamericana-refactor header.cfn-header #mainmenu > li > button.menu-item {
    font-size: 0.8rem !important;
  }
}

/* Sudamericana: o verde-escuro do evento (#0A524B) some no azul da pílula; o destaque do
   seletor usa o mesmo verde-claro dos links ativos, como o laranja do Nordeste. */
@media (min-width: 992px) {
  body.confut-sudamericana-refactor .cfn-header #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger {
    --event-menu-switcher-accent: var(--cfn-accent);
  }
}

/* ---------- Seletor de evento no padrão do painel "Programação" ----------
   Cada evento: código da cidade (aeroporto), nome e "cidade · data", nas cores do evento
   atual (variáveis --cfn-*). Markup em confut_event_menu_link_inner(). */
html body .cfn-header #mainmenu li.event-menu-switcher a.event-menu-switcher__option.cfn-ev {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.85rem;
  padding: 0.6rem 0.7rem !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #fff !important;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span {
  position: static;
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
  text-transform: none !important;
  color: inherit;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__date {
  display: inline !important;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__icon {
  display: grid !important;
  place-items: center;
  width: 44px !important;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--cfn-accent) 26%, transparent) !important;
  border-radius: 9px;
  background: color-mix(in srgb, var(--cfn-accent) 5%, transparent);
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--cfn-muted);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__text {
  display: flex !important;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__title {
  font-family: var(--cfn-title-font);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #fff;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__desc {
  font-family: var(--cfn-body-font);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cfn-muted);
}

html body .cfn-header #mainmenu li.event-menu-switcher a.event-menu-switcher__option.cfn-ev:is(:hover, :focus-visible) {
  background: var(--cfn-hover-bg) !important;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev:is(:hover, :focus-visible, .active) span.cfn-ev__icon {
  border-color: color-mix(in srgb, var(--cfn-accent) 65%, transparent) !important;
  background: color-mix(in srgb, var(--cfn-accent) 9%, transparent);
  color: var(--cfn-accent);
}

html body .cfn-header #mainmenu li.event-menu-switcher a.event-menu-switcher__option.cfn-ev.active {
  background: var(--cfn-current-bg) !important;
}

html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev.active span.cfn-ev__title {
  color: var(--cfn-accent);
}

@media (min-width: 992px) {
  html body .cfn-header #mainmenu li.event-menu-switcher .event-menu-switcher__panel {
    top: calc(100% + 22px) !important;
    min-width: 330px;
    padding: 0.6rem !important;
    border: 1px solid var(--cfn-line) !important;
    border-radius: 22px !important;
    background: var(--cfn-panel-bg) !important;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5) !important;
  }

  html body .cfn-header #mainmenu li.event-menu-switcher .event-menu-switcher__list {
    display: flex !important;
    flex-direction: column;
    gap: 0.15rem;
  }

  /* Ponte invisível do tamanho do recuo: o hover não cai no vão. */
  html body .cfn-header #mainmenu li.event-menu-switcher .event-menu-switcher__panel::before {
    top: -24px;
    height: 24px;
  }
}

/* ---------- Menu do celular: mesmo padrão do site principal ----------
   Ponto brilhante na página atual, seta para o lado em link simples e seta
   para baixo (que gira ao abrir) onde há submenu. Tudo na cor do evento. */
@media (max-width: 991.98px) {
  html body .cfn-nav-panel #mainmenu > li > a.menu-item {
    position: relative;
    display: flex !important;
    align-items: center;
  }

  html body .cfn-nav-panel #mainmenu > li > a.menu-item.active::before {
    content: "" !important;
    position: static !important;
    flex: 0 0 auto;
    width: 7px !important;
    height: 7px !important;
    margin: 0 12px 0 0 !important;
    border: 0 !important;
    border-radius: 50%;
    background: var(--cfn-accent) !important;
    box-shadow: 0 0 12px var(--cfn-accent);
    opacity: 1 !important;
    transform: none !important;
  }

  html body .cfn-nav-panel #mainmenu > li:not(.cfn-mega-item):not(.event-menu-switcher) > a.menu-item::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    width: 9px !important;
    height: 9px !important;
    margin-top: -5px !important;
    border: 0 !important;
    border-top: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-right: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 0 !important;
    background: none !important;
    opacity: 1 !important;
    transform: rotate(45deg) !important;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }

  html body .cfn-nav-panel #mainmenu > li:not(.cfn-mega-item):not(.event-menu-switcher) > a.menu-item:is(:hover, :focus-visible)::after {
    border-color: var(--cfn-accent) !important;
    transform: translateX(4px) rotate(45deg) !important;
  }

  /* Setas para baixo: o "Programação" tinha um SVG e o seletor de evento um
     ícone de fonte, cada um de um tamanho. Agora as duas são a mesma seta. */
  html body .cfn-nav-panel .cfn-mega__caret,
  html body .cfn-nav-panel .event-menu-switcher__trigger-caret {
    display: block !important;
    flex: none;
    width: 9px !important;
    height: 9px !important;
    /* 14px: a seta para baixo é simétrica e a lateral (16px da borda) tem o
       traço só do lado direito; com 14px as duas ficam na mesma coluna. */
    margin: -4px 14px 0 0 !important;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 0 !important;
    overflow: hidden;
    transform: rotate(45deg) !important;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, margin 0.28s ease !important;
  }

  html body .cfn-nav-panel .cfn-mega__caret path,
  html body .cfn-nav-panel .event-menu-switcher__trigger-caret::before {
    display: none !important;
  }

  html body .cfn-nav-panel .is-open > .cfn-mega__trigger .cfn-mega__caret,
  html body .cfn-nav-panel .event-menu-switcher.is-open .event-menu-switcher__trigger-caret {
    margin-top: 4px !important;
    border-color: var(--cfn-accent);
    transform: rotate(-135deg) !important;
  }

  /* Sem recuo à direita nos dois gatilhos: o seletor de evento tinha 52px e
     a seta dele ficava bem à esquerda das outras. */
  html body .cfn-nav-panel #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger,
  html body .cfn-nav-panel #mainmenu > li > .cfn-mega__trigger {
    width: 100% !important;
    justify-content: space-between !important;
    padding-right: 0 !important;
  }

  /* Alguns eventos desenham uma seta própria no ::after do botão; ficava
     uma segunda seta ao lado da nova. */
  html body .cfn-nav-panel #mainmenu > li.event-menu-switcher > .event-menu-switcher__trigger::after {
    display: none !important;
    content: none !important;
  }

  /* Seletor aberto: sem a caixa com borda, recuado como o painel "Programação". */
  html body .cfn-nav-panel #mainmenu li.event-menu-switcher .event-menu-switcher__panel {
    margin: 0 !important;
    padding: 0 0 0.75rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }

  html body .cfn-nav-panel #mainmenu li.event-menu-switcher .event-menu-switcher__list {
    display: flex !important;
    flex-direction: column;
    gap: 0.1rem;
  }

  html body .cfn-header #mainmenu li.event-menu-switcher a.event-menu-switcher__option.cfn-ev {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 0.75rem;
    min-height: 48px;
    padding: 0.55rem 0.5rem !important;
  }

  html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__icon {
    width: 42px !important;
    height: 34px;
    border-radius: 8px;
  }

  html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__title {
    font-size: 1.05rem;
  }

  html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__desc {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .cfn-nav-panel .cfn-mega__caret,
  html body .cfn-nav-panel .event-menu-switcher__trigger-caret,
  html body .cfn-nav-panel #mainmenu > li > a.menu-item::after {
    transition: none !important;
  }
}

/* Linha "cidade · data" do seletor de evento nunca passa da caixa do item. */
html body .cfn-header #mainmenu li.event-menu-switcher a.cfn-ev span.cfn-ev__desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
