/* ========================================
   CABEÇALHO ÚNICO - REDE ZANDONÁ
   Usado por TODAS as páginas (home incluída). O HTML do cabeçalho é gerado por
   tools/build_site.py; para mudar o visual, edite só este arquivo.
   Valores fixos de propósito: a home não carrega style.css/components.css.
   ======================================== */
header.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

header.header.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

header.header .container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- barra superior ---- */
header.header .header-top {
  background: #1a1d20;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  padding: 10px 0;
}

header.header .header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
}

header.header .header-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

header.header .header-contact a,
header.header .header-social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: auto;
  color: inherit;
  transition: color 0.2s ease;
}

header.header .header-contact a:hover,
header.header .header-social a:hover {
  color: #ffffff;
  transform: none;
}

header.header .header-social {
  display: flex;
  gap: 18px;
}

/* ---- barra principal ---- */
header.header .header-main {
  padding: 16px 0;
  transition: padding 0.3s ease;
}

header.header.scrolled .header-main {
  padding: 8px 0;
}

header.header .header-content {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: none;
}

header.header .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
  max-width: none;
  min-height: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #111827;
}

header.header .logo img {
  height: 50px;
  width: auto;
  max-width: none;
  transition: height 0.3s ease;
}

header.header .logo:hover img {
  transform: none;
}

header.header.scrolled .logo img {
  height: 40px;
}

/* ---- botão do menu (celular) ---- */
header.header .menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin-right: -8px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 1003;
  -webkit-tap-highlight-color: transparent;
}

header.header .menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #1a1d20;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

header.header .menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

header.header .menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

header.header .menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- menu: gaveta no celular/tablet ---- */
header.header .nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  height: 100dvh;
  padding: 96px 28px 32px;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
  z-index: 1002;
  visibility: hidden;
  transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0.4s;
}

header.header .nav.active {
  right: 0;
  visibility: visible;
  transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s;
}

header.header .nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

header.header .nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

header.header .nav-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

header.header .nav-item {
  position: relative;
}

header.header .nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 500;
  color: #2d2d2d;
  background: transparent;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

header.header .nav-link::after {
  display: none;
}

header.header .nav-link:hover,
header.header .nav-link.active {
  color: #e31b23;
  background: rgba(227, 27, 35, 0.06);
}

header.header .nav-link.active {
  font-weight: 600;
}

header.header .nav-link.portal {
  justify-content: center;
  margin: 16px 0 0;
  padding: 14px 24px;
  font-weight: 600;
  background: #e31b23;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(227, 27, 35, 0.2);
}

header.header .nav-link.portal:hover {
  background: #b31217;
  color: #ffffff;
  transform: none;
}

@media (max-width: 767px) {
  header.header .header-top {
    display: none;
  }

  header.header .container {
    padding: 0 20px;
  }

  header.header .logo {
    font-size: 1.1rem;
    gap: 10px;
  }

  header.header .logo img {
    height: 42px;
  }
}

/* ---- menu horizontal no computador ---- */
@media (min-width: 1200px) {
  header.header {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  header.header .menu-toggle,
  header.header .nav-overlay {
    display: none;
  }

  header.header .nav {
    position: static;
    right: auto;
    width: auto;
    max-width: none;
    height: auto;
    padding: 0;
    overflow: visible;
    background: none;
    box-shadow: none;
    visibility: visible;
    flex: 1 1 auto;
    min-width: 0;
    transition: none;
  }

  header.header .nav-list {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
  }

  header.header .nav-item {
    flex-shrink: 0;
  }

  header.header .nav-link {
    min-height: 0;
    padding: 10px 10px;
    font-size: 0.85rem;
  }

  header.header .nav-link.portal {
    margin: 0 0 0 8px;
    padding: 12px 20px;
  }
}

@media (min-width: 1360px) {
  header.header .nav-list {
    gap: 8px;
  }

  header.header .nav-link {
    padding: 10px 14px;
  }

  header.header .nav-link.portal {
    margin-left: 10px;
    padding: 12px 24px;
  }
}
