/* Faixa superior baseada no node Figma 2063:1883. */
.app-header-section {
  width: 100%;
  padding: 24px 0 0;
  background: #fafafa;
}

/* Shell desktop do frame: 1442px de largura por 54px de altura. */
.app-header-shell {
  width: min(1442px, 100%);
  height: 54px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Link da marca mantendo o logo exatamente no canto esquerdo do frame. */
.app-header-logo-link {
  width: 198.948px;
  height: 54px;
  flex: 0 0 198.948px;
  display: block;
  text-decoration: none;
}

/* Logo do topo no tamanho do node. */
.app-header-logo {
  width: 198.948px;
  height: 54px;
  display: block;
  object-fit: contain;
}

/* Controle nativo usado apenas para abrir e fechar o drawer mobile. */
.app-header-menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.app-header-menu-button,
.app-header-backdrop,
.app-header-drawer-logo-link,
.app-header-menu-close {
  display: none;
}

/* Grupo de ações à direita do Figma. */
.app-header-actions {
  width: auto;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
}

/* Base compartilhada dos controles do topo. */
.app-header-action {
  height: 54px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  color: #4c4c4c;
  background: transparent;
  font-family: "Muring Display", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.333;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.app-header-action:hover {
  transform: translateY(-1px);
}

/* Ícones em traço para espelhar a biblioteca usada no Figma. */
.app-header-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: block;
  object-fit: contain;
}

.app-header-action--login {
  width: 137px;
  color: #ffffff;
  background: var(--violet);
}

.app-header-action--signup {
  width: 170px;
  color: #ffffff;
  background: var(--cyan);
}

.app-header-action--primary:hover {
  box-shadow: 0 11px 35px rgba(137, 90, 246, 0.34);
}

.app-header-action--accent:hover {
  box-shadow: 0 11px 35px rgba(87, 212, 255, 0.36);
}

/* Tablet horizontal conserva a composição desktop, apenas com respiro lateral. */
@media (max-width: 1180px) and (min-width: 901px) {
  .app-header-shell {
    width: calc(100% - 48px);
  }

  .app-header-actions {
    width: auto;
    gap: 10px;
  }

  .app-header-action {
    padding-right: 18px;
    padding-left: 18px;
    font-size: 16px;
  }

  .app-header-action--login,
  .app-header-action--signup {
    width: auto;
  }
}

/* Tablet vertical e mobile usam drawer lateral acionado pelo hamburguer. */
@media (max-width: 900px) {
  .app-header-section {
    padding: 24px 20px 16px;
  }

  .app-header-shell {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .app-header-logo-link,
  .app-header-logo {
    width: 174px;
    height: auto;
  }

  .app-header-menu-button {
    position: relative;
    z-index: 30;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(132, 92, 255, 0.12);
    cursor: pointer;
  }

  .app-header-menu-button span {
    width: 22px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: var(--violet);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

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

  .app-header-menu-toggle:checked ~ .app-header-menu-button span:nth-child(2) {
    opacity: 0;
  }

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

  .app-header-menu-toggle:checked ~ .app-header-menu-button {
    opacity: 0;
    pointer-events: none;
  }

  .app-header-actions {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 25;
    width: 100vw;
    height: 100vh;
    min-height: 479px;
    padding: 0;
    display: block;
    overflow-y: auto;
    border-radius: 0;
    background: #fafafa;
    box-shadow: 0 39px 70.7px -50px rgba(0, 0, 0, 0.51);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    transition:
      opacity 180ms ease,
      transform 220ms ease;
  }

  .app-header-menu-toggle:checked ~ .app-header-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .app-header-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    background: rgba(0, 0, 0, 0.76);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .app-header-menu-toggle:checked ~ .app-header-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-header-drawer-logo-link {
    position: absolute;
    left: 21px;
    top: 35px;
    width: 107px;
    height: 29.043px;
    display: block;
    text-decoration: none;
  }

  .app-header-drawer-logo {
    width: 107px;
    height: 29.043px;
    display: block;
  }

  .app-header-menu-close {
    position: absolute;
    top: 22px;
    left: min(311px, calc(100vw - 49px));
    width: 22px;
    height: 22px;
    display: block;
    cursor: pointer;
  }

  .app-header-menu-close::before {
    content: "";
    position: absolute;
    inset: 1.375px;
    border: 2px solid var(--violet);
    border-radius: 999px;
  }

  .app-header-menu-close span {
    position: absolute;
    left: 7px;
    top: 10px;
    width: 8px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: var(--violet);
  }

  .app-header-menu-close span:first-child {
    transform: rotate(45deg);
  }

  .app-header-menu-close span:last-child {
    transform: rotate(-45deg);
  }

  .app-header-action {
    position: absolute;
    height: auto;
    min-height: 0;
    padding: 0;
    justify-content: center;
    gap: 10px;
    border-radius: 66px;
    box-shadow: none;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.356;
    letter-spacing: 0.36px;
    transform: none;
  }

  .app-header-action:hover {
    transform: none;
  }

  .app-header-action--login {
    left: 27px;
    top: 148px;
    width: 302px;
    height: 54px;
    padding: 15px 25px;
    color: #ffffff;
    background: var(--violet);
  }

  .app-header-action--signup {
    left: 27px;
    top: 217px;
    width: 302px;
    height: 54px;
    padding: 15px 25px;
    color: #ffffff;
    background: var(--cyan);
  }

  .app-header-action span {
    white-space: nowrap;
  }
}

/* Mobile vertical: controles compactos e sem overflow horizontal. */
@media (max-width: 480px) {
  .app-header-section {
    padding: 22px 16px 14px;
  }

  .app-header-logo-link,
  .app-header-logo {
    width: 156px;
  }

  .app-header-actions {
    width: 100vw;
    height: 100vh;
  }

  .app-header-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .app-header-action {
    font-size: 18px;
  }

  .app-header-action--login,
  .app-header-action--signup {
    width: min(302px, calc(100% - 54px));
  }
}
