/* Cabeçalho TVDA — fixo, proporcional e responsivo. */
:root {
  --tvda-fixed-header-height: 78px;
}

html {
  scroll-padding-top: calc(var(--tvda-fixed-header-height) + 1rem);
}

body {
  padding-top: var(--tvda-fixed-header-height);
}

main [id] {
  scroll-margin-top: calc(var(--tvda-fixed-header-height) + 1rem);
}

.site-header {
  --tvda-header-height: var(--tvda-fixed-header-height);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(14, 59, 58, 0.98);
  border-bottom: 1px solid rgba(243, 239, 227, 0.14);
  box-shadow: 0 8px 24px rgba(8, 35, 34, 0.12);
}

.site-header .nav {
  position: relative;
  width: 100%;
  max-width: 1280px;
  min-height: var(--tvda-header-height);
  padding: 0.55rem clamp(1rem, 2.5vw, 2rem);
  gap: 1rem;
}

.site-header .nav-brand {
  min-width: 0;
  flex: 0 1 auto;
  gap: 0.75rem;
  font-size: 1rem;
}

.site-header .nav-brand-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.site-header .nav-brand-text {
  min-width: 0;
  line-height: 1.12;
}

.site-header .nav-brand-title {
  display: block;
  max-width: 235px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.site-header .nav-brand-text small {
  margin-top: 0.28rem;
  color: rgba(243, 239, 227, 0.72);
  font-size: 0.64rem;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

.site-header .nav-links {
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 0.18rem;
  margin-left: auto;
}

.site-header .nav-links a {
  display: block;
  padding: 0.58rem 0.68rem;
  border-radius: 999px;
  color: rgba(243, 239, 227, 0.82);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.site-header .nav-links a:hover,
.site-header .nav-links a:focus-visible,
.site-header .nav-links a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-header .nav-contact {
  flex: 0 0 auto;
  gap: 0.3rem;
  margin-left: 0.15rem;
}

.site-header .nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.site-header .nav-toggle {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(243, 239, 227, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.45rem;
}

@media (max-width: 1020px) {
  .site-header .nav-toggle {
    display: block;
  }

  .site-header .nav-contact {
    display: none;
  }

  .site-header .nav-links {
    position: fixed;
    z-index: 99;
    top: var(--tvda-header-height);
    left: 0;
    right: 0;
    display: flex;
    max-height: calc(100dvh - var(--tvda-header-height));
    margin: 0;
    padding: 0.8rem clamp(1rem, 4vw, 2rem) 1rem;
    overflow-y: auto;
    align-items: stretch;
    gap: 0.2rem;
    background: #0e3b3a;
    border-top: 1px solid rgba(243, 239, 227, 0.12);
    box-shadow: 0 18px 28px rgba(7, 31, 30, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.75rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .site-header .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header .nav-links a {
    padding: 0.78rem 0.9rem;
    border-radius: 8px;
    font-size: 0.96rem;
  }
}

@media (max-width: 560px) {
  :root {
    --tvda-fixed-header-height: 68px;
  }

  .site-header {
    --tvda-header-height: var(--tvda-fixed-header-height);
  }

  .site-header .nav {
    min-height: var(--tvda-header-height);
    padding: 0.42rem 0.75rem;
    gap: 0.65rem;
  }

  .site-header .nav-brand {
    gap: 0.6rem;
  }

  .site-header .nav-brand-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .site-header .nav-brand-title {
    max-width: min(54vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.88rem;
  }

  .site-header .nav-brand-text small {
    font-size: 0.59rem;
  }

  .site-header .nav-toggle {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 390px) {
  .site-header .nav-brand-text small {
    display: none;
  }
}
