.header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: var(--header-top-space) 0 0;
}

.header__container {
  width: min(var(--container-max), calc(100% - var(--container-inline)));
  margin: 0 auto;
  min-height: var(--header-shell-height);
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 18px 14px 28px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

/* NOVO BLOCO */
.header__right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.header__logo img {
  height: 35px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* NAV */
.header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__link {
  text-decoration: none;
  color: #0f4f67;
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.header__cta {
  text-decoration: none;
  background: var(--gradient-blue);
  color: #ffffff;
  min-height: var(--button-height);
  padding: 0 calc(var(--button-padding-x) + 4px);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--button-font-size);
  font-weight: var(--button-font-weight);
  box-shadow: var(--shadow-button-blue);
  transition: var(--button-transition);
}

.header__menu-button,
.header__mobile-menu {
  display: none;
}

.header--scrolled .header__container {
  background: #ffffff;
  border-color: rgba(0, 57, 77, 0.08);
  box-shadow: 0 8px 18px rgba(8, 37, 50, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  .header__link:hover {
    color: var(--primary-light);
  }
}

@media (max-width: 1199px) {
  .header__container {
    padding: 12px 14px 12px 20px;
  }

  .header__right {
    gap: 18px;
  }

  .header__nav {
    gap: 14px;
  }

  .header__link {
    font-size: 0.88rem;
  }

  .header__cta {
    padding: 0 22px;
  }

  .header__logo img {
    height: 31px;
  }
}

@media (max-width: 1024px) and (min-width: 768px) {
  .header__container {
    padding: 11px 12px 11px 18px;
  }

  .header__logo img {
    height: 27px;
  }

  .header__right {
    gap: 12px;
  }

  .header__nav {
    gap: 10px;
  }

  .header__link {
    font-size: 0.82rem;
  }

  .header__cta {
    padding: 0 16px;
    font-size: 0.82rem;
  }
}

@media (max-width: 767px) {
  .header__container {
    padding: 10px 12px 10px 16px;
  }

  .header__logo img {
    height: 24px;
  }

  .header__right {
    display: none;
  }

  .header__menu-button {
    --control-hover-shadow: var(--shadow-control-soft-hover);
    --control-active-shadow: var(--shadow-control-soft-active);
    --control-focus-ring: rgba(15, 79, 103, 0.14);

    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 79, 103, 0.08);
    color: #0f4f67;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .header__menu-line {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
      transform 0.24s ease,
      opacity 0.2s ease;
  }

  .header__mobile-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    width: calc(100% - 32px);
    padding: 12px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 57, 77, 0.08);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-50%, -10px, 0) scale(0.985);
    transform-origin: top center;
    backface-visibility: hidden;
    transition:
      opacity 0.18s ease-out,
      transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0.26s;
    z-index: 25;
  }

  .header--menu-open .header__menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .header--menu-open .header__menu-line:nth-child(2) {
    opacity: 0;
  }

  .header--menu-open .header__menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .header__mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) scale(1);
    transition:
      opacity 0.18s ease-out,
      transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0s;
    animation: none;
  }

  .header__mobile-nav {
    display: flex;
    flex-direction: column;
  }

  .header__mobile-link {
    padding: 12px 8px;
    text-decoration: none;
    color: #0f4f67;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(15, 79, 103, 0.08);
  }

  .header__mobile-nav .header__mobile-link:last-child {
    border-bottom: 0;
  }

  .header__mobile-cta {
    width: 100%;
    min-height: var(--button-height);
    padding: 0 var(--button-padding-x);
    border-radius: var(--radius-pill);
    text-align: center;
    text-decoration: none;
    background: var(--gradient-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    box-shadow: var(--shadow-button-blue);
  }
}

@media (hover: hover) and (pointer: fine) {
  .header__menu-button:hover {
    background: rgba(15, 79, 103, 0.12);
  }
}
