/* ===============================================================
   Catedral Anglicana de São Paulo | V1.0.5
   Navbar com melhor hierarquia, leitura e espaços.
   Respeita o logotipo e as fontes configuráveis da V1.0.4.
   =============================================================== */

/* Barra superior com altura definida: previne expansão acidental causada
   pelo conflito height:auto / height:100% de versões anteriores. */
.site-header + main { clear: both; }
.utility {height:44px;min-height:44px;}
.utility-inner {height:100%;min-height:0;}
@media (max-width:480px) { .utility {height:39px;min-height:39px;} }

/* Estados compartilhados e maior área de interação. */
.site-header .main-nav > a {
  font-family: var(--fonte-titulos, 'Cinzel', Georgia, serif);
  font-weight: 600;
  letter-spacing: .012em;
  line-height: 1.45;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.site-header .main-nav > a.nav-contact {
  min-height: 58px;
  border-radius: 5px;
  font-size: 16px;
  padding: 17px 23px;
  gap: 18px;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(157,25,44,.16);
}
.site-header .main-nav > a.nav-contact span {
  font-size: 20px;
  line-height: 1;
}
.site-header .main-nav > a:focus-visible {
  outline: 3px solid var(--accent, #bb2635);
  outline-offset: 5px;
  border-radius: 3px;
}

/* Telas largas: navbar de uma linha sem sacrificar a legibilidade. */
@media (min-width: 1680px) {
  .site-header .nav-shell {
    max-width: 1840px;
    min-height: 126px;
    height: auto;
    gap: 30px;
    padding-left: 40px;
    padding-right: 40px;
    flex-wrap: nowrap;
  }
  .site-header .site-brand {
    width: 344px;
    max-width: 344px;
    flex: 0 0 344px;
  }
  .site-header .logo-horizontal-catedral { max-height: 107px; }
  .site-header .menu-toggle { display: none; }
  .site-header .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 1.15vw, 23px);
    width: auto;
    margin-left: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    max-height: none;
    overflow: visible;
  }
  .site-header .main-nav > a { font-size: 16px; white-space: nowrap; padding: 12px 0; }
  .site-header .main-nav > a:not(.nav-contact)::after { bottom: 4px; }
  .site-header .main-nav > a.nav-contact { padding: 17px 23px; }
}

/* Monitores comuns e notebooks amplos: logo acima de uma navegação arejada.
   Evita reduzir letras para encaixar 9 itens ao lado do logotipo. */
@media (min-width: 1240px) and (max-width: 1679px) {
  .site-header .nav-shell {
    height: auto;
    min-height: 186px;
    max-width: 1510px;
    padding-top: 14px;
    padding-bottom: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .site-header .site-brand {
    width: 335px;
    max-width: 335px;
    flex: 0 0 auto;
    margin: 0 auto;
  }
  .site-header .logo-horizontal-catedral { max-height: 96px; }
  .site-header .menu-toggle { display: none; }
  .site-header .main-nav {
    position: static;
    display: flex;
    width: 100%;
    max-height: none;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    overflow: visible;
    margin: 0;
    padding: 10px 0 0;
    gap: clamp(11px, 1.3vw, 20px);
    border: 0;
    border-top: 1px solid #eae0e9;
    background: transparent;
    box-shadow: none;
  }
  .site-header .main-nav > a {
    font-size: clamp(14px, 1.1vw, 16px);
    white-space: nowrap;
    padding: 11px 0;
  }
  .site-header .main-nav > a:not(.nav-contact)::after { bottom: 2px; }
  .site-header .main-nav > a.nav-contact {
    min-height: 54px;
    padding: 13px 18px;
    font-size: clamp(14px, 1.1vw, 16px);
    gap: 12px;
  }
}

/* Notebook menor, tablet e celular: links grandes no menu expandido. */
@media (max-width: 1239px) {
  .site-header .nav-shell {
    height: 102px;
    min-height: 102px;
    gap: 18px;
  }
  .site-header .site-brand {
    width: 310px;
    max-width: calc(100% - 78px);
    flex: 0 1 auto;
    min-width: 0;
  }
  .site-header .logo-horizontal-catedral { max-height: 88px; }
  .site-header .menu-toggle {
    display: block;
    flex: 0 0 54px;
    width: 54px;
    min-height: 52px;
    padding: 9px 10px;
    border: 1px solid #ddd1e0;
    border-radius: 6px;
    background: #fff;
  }
  .site-header .menu-toggle span {
    width: 28px;
    height: 2px;
    margin: 6px auto;
  }
  .site-header .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - 102px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 24px clamp(24px, 6vw, 62px) 32px;
    background: #fffcfa;
    box-shadow: 0 18px 35px rgba(27,16,50,.19);
    border-top: 2px solid var(--accent, #bb2635);
    margin: 0;
  }
  .site-header .main-nav.open { display: flex; }
  .site-header .main-nav > a {
    font-size: 18px;
    white-space: normal;
    padding: 14px 9px;
    line-height: 1.5;
  }
  .site-header .main-nav > a:not(.nav-contact)::after { bottom: 5px; }
  .site-header .main-nav > a.nav-contact {
    display: flex;
    justify-content: space-between;
    min-height: 60px;
    font-size: 18px;
    padding: 16px 22px;
    margin-top: 12px;
  }
}

@media (max-width: 800px) {
  .site-header .nav-shell { height: 90px; min-height: 90px; }
  .site-header .site-brand { width: 275px; }
  .site-header .logo-horizontal-catedral { max-height: 78px; }
  .site-header .main-nav { max-height: calc(100dvh - 90px); }
}

@media (max-width: 480px) {
  .site-header .nav-shell { height: 82px; min-height: 82px; gap: 10px; }
  .site-header .site-brand { width: 224px; max-width: calc(100% - 65px); }
  .site-header .logo-horizontal-catedral { max-height: 69px; }
  .site-header .menu-toggle { flex-basis: 51px; width: 51px; min-height: 50px; }
  .site-header .main-nav {
    max-height: calc(100dvh - 82px);
    padding: 20px 22px 30px;
    gap: 4px;
  }
  .site-header .main-nav > a { font-size: 17px; padding: 13px 7px; }
  .site-header .main-nav > a.nav-contact { font-size: 17px; min-height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .main-nav > a { transition: none; }
}
