/* ================================================================
   HEADER
   ================================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 114px;
  background-color: var(--color-black);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Borda inferior com fade nas laterais */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(63, 189, 165, 0.25) 20%,
    rgba(63, 189, 165, 0.25) 80%,
    transparent 100%
  );
}

.header--scrolled {
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}

.header--scrolled::after {
  opacity: 0.5;
}

/* ===== LINHA SUPERIOR ===== */

.header__top {
  height: 66px;
  flex-shrink: 0;
}

.header__top__inner {
  display: flex;
  align-items: center;
  height: 100%;
}

/* ===== LOGO ===== */

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: clamp(1.5rem, 3vw, 2.5rem);
  transition: opacity 0.2s ease;
}

.header__logo:hover { opacity: 0.8; }

.header__logo svg {
  height: 40px;
  width: auto;
}

/* ===== BUSCA ===== */

.header__busca {
  flex: 1;
  display: flex;
  justify-content: center;
  padding-inline: clamp(1rem, 2vw, 2rem);
  min-width: 0;
}

.header__busca__inner {
  position: relative;
  width: 100%;
  max-width: 460px;
}

.header__busca__icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  pointer-events: none;
  font-size: 17px;
}

.header__busca input[type="search"] {
  width: 100%;
  height: 46px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0 1.25rem 0 2.75rem;
  color: var(--color-white);
  font-family: var(--font-corpo);
  font-size: var(--font-sm);
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.header__busca input[type="search"]::-webkit-search-cancel-button { display: none; }

.header__busca input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.header__busca input[type="search"]:focus {
  border-color: rgba(63, 189, 165, 0.5);
  background-color: rgba(255, 255, 255, 0.07);
}

.header__busca input[type="search"]:focus + .header__busca__icon,
.header__busca input[type="search"]:focus ~ .header__busca__icon {
  color: var(--color-destaque);
}

/* ===== AÇÕES ===== */

.header__acoes {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
}

/* Ícones sociais */

.header__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.header__social iconify-icon {
  font-size: 16px;
  display: flex;
}

.header__social:hover {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.07);
}

/* Separador */

.header__sep {
  width: 1px;
  height: 20px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.12) 70%,
    transparent
  );
  margin-inline: 0.625rem;
  flex-shrink: 0;
}

/* WhatsApp */

.header__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 36px;
  padding-inline: 1rem;
  border-radius: 8px;
  background-color: var(--color-destaque);
  color: var(--color-white);
  font-family: var(--font-titulo);
  font-weight: 600;
  font-size: var(--font-xs);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.header__whatsapp iconify-icon {
  font-size: 15px;
  display: flex;
  flex-shrink: 0;
}

.header__whatsapp:hover {
  filter: brightness(0.88);
  transform: translateY(-1px);
}

.header__whatsapp:active {
  transform: translateY(0);
}

/* Telefone */

.header__telefone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.625rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-titulo);
  font-size: var(--font-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.header__telefone iconify-icon {
  font-size: 15px;
  display: flex;
  flex-shrink: 0;
}

.header__telefone:hover { color: var(--color-white); }

/* ===== MENU DE NAVEGAÇÃO ===== */

.header__nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  position: relative;
}

/* Divisor elegante com fade nas laterais */
.header__nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 1000px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(63, 189, 165, 0.12) 15%,
    rgba(63, 189, 165, 0.32) 50%,
    rgba(63, 189, 165, 0.12) 85%,
    transparent 100%
  );
}

.header__nav__link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-titulo);
  font-size: var(--font-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.header__nav__link iconify-icon {
  font-size: 15px;
  display: flex;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.header__nav__link:hover {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Estado ativo */
.header__nav__link--ativo {
  color: var(--color-white);
}

.header__nav__link--ativo iconify-icon {
  color: var(--color-destaque);
}

.header__nav__link--ativo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.875rem;
  right: 0.875rem;
  height: 2px;
  border-radius: 2px;
  background-color: var(--color-destaque);
}

/* ===== COMPENSAÇÃO BODY ===== */

body { padding-top: 114px; }

/* ===== RESPONSIVO ===== */

@media (max-width: 1100px) {
  .header__nav__link span { display: none; }

  .header__nav__link {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
  }

  .header__nav__link--ativo::after { display: none; }

  .header__nav__link--ativo {
    background-color: rgba(63, 189, 165, 0.1);
  }
}

@media (max-width: 860px) {
  .header__whatsapp span,
  .header__telefone span { display: none; }

  .header__whatsapp {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
  }
}

/* ===== HAMBURGER ===== */

.header__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header__hamburger:hover {
  background: rgba(63, 189, 165, 0.1);
  border-color: rgba(63, 189, 165, 0.35);
}

.header__hamburger__icon {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
}

.header__hamburger__icon span {
  position: absolute;
  left: 0;
  display: block;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.22s ease,
              width     0.22s ease,
              top       0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.header__hamburger__icon span:nth-child(1) { top: 0;    width: 100%; }
.header__hamburger__icon span:nth-child(2) { top: 6px;  width: 70%; }
.header__hamburger__icon span:nth-child(3) { top: 12px; width: 100%; }

/* Estado aberto — anima para X */
.header__hamburger--ativo .header__hamburger__icon span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
  width: 100%;
}
.header__hamburger--ativo .header__hamburger__icon span:nth-child(2) {
  opacity: 0;
  transform: translateX(-6px);
  width: 70%;
}
.header__hamburger--ativo .header__hamburger__icon span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}


/* ===== MOBILE MENU ===== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.4s;
}

.mobile-menu--aberto {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

/* Backdrop */
.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mobile-menu--aberto .mobile-menu__backdrop {
  opacity: 1;
}

/* Drawer */
.mobile-menu__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 88vw);
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

/* Textura de pontos no fundo */
.mobile-menu__drawer::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(63, 189, 165, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Glow decorativo */
.mobile-menu__drawer::after {
  content: '';
  position: fixed;
  width: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 189, 165, 0.08) 0%, transparent 70%);
  bottom: -80px;
  left: -60px;
  pointer-events: none;
  z-index: 0;
}

.mobile-menu--aberto .mobile-menu__drawer {
  transform: translate3d(0, 0, 0);
}

/* Barra teal no topo do drawer */
.mobile-menu__drawer > * {
  position: relative;
  z-index: 1;
}

/* Linha teal topo */
.mobile-menu__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(63, 189, 165, 0.12);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(63,189,165,0.06) 0%, transparent 100%);
}

.mobile-menu__topo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-destaque), transparent);
}

.mobile-menu__logo svg {
  height: 34px;
  width: auto;
}

.mobile-menu__fechar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu__fechar:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu__fechar iconify-icon {
  font-size: 22px;
  display: flex;
}

/* Nav links */
.mobile-menu__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 2px;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-titulo);
  font-size: var(--font-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;

  /* Animação de entrada escalonada */
  opacity: 0;
  transform: translate3d(20px, 0, 0);
  transition: color 0.2s ease, background 0.2s ease,
              opacity 0.32s ease calc(var(--i) * 0.055s + 0.12s),
              transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--i) * 0.055s + 0.12s);
}

.mobile-menu--aberto .mobile-menu__link {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.mobile-menu__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--color-destaque);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.mobile-menu__link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-menu__link:hover::before {
  transform: scaleY(1);
}

.mobile-menu__link--ativo {
  color: var(--color-white);
  background: rgba(63, 189, 165, 0.08);
}

.mobile-menu__link--ativo::before {
  transform: scaleY(1);
}

.mobile-menu__link-icone {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu__link:hover .mobile-menu__link-icone,
.mobile-menu__link--ativo .mobile-menu__link-icone {
  background: rgba(63, 189, 165, 0.12);
  color: var(--color-destaque);
}

.mobile-menu__link-icone iconify-icon {
  font-size: 18px;
  display: flex;
}

.mobile-menu__link-texto {
  flex: 1;
}

.mobile-menu__link-seta {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-menu__link:hover .mobile-menu__link-seta {
  color: var(--color-destaque);
  transform: translateX(3px);
}

/* Rodapé do drawer */
.mobile-menu__rodape {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;

  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease 0.42s, transform 0.35s ease 0.42s;
}

.mobile-menu--aberto .mobile-menu__rodape {
  opacity: 1;
  transform: translateY(0);
}

@keyframes wpp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.35); }
  60%       { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
}

.mobile-menu__wpp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: #25d366;
  color: var(--color-white);
  font-family: var(--font-titulo);
  font-size: var(--font-sm);
  font-weight: 700;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  animation: wpp-pulse 2.4s ease infinite;
  transition: filter 0.2s ease;
}

.mobile-menu__wpp:hover {
  filter: brightness(0.92);
  animation: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.mobile-menu__wpp iconify-icon {
  font-size: 22px;
  display: flex;
}

.mobile-menu__tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-titulo);
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.mobile-menu__tel:hover {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.18);
}

.mobile-menu__tel iconify-icon {
  font-size: 17px;
  display: flex;
  color: var(--color-destaque);
}


/* ===== BREAKPOINTS ===== */

@media (max-width: 640px) {
  .header { height: 68px; }
  body { padding-top: 68px; }

  .header__top { height: 68px; }

  .header__logo svg { height: 32px; }

  .header__busca { display: none; }

  .header__nav { display: none; }

  .header__hamburger { display: inline-flex; }

  .header__social { display: none; }
  .header__sep    { display: none; }

  /* Sem o campo de busca (flex:1), empurra as ações para a direita */
  .header__acoes { margin-left: auto; }
}

/* Acessibilidade: reduz animações */
@media (prefers-reduced-motion: reduce) {
  .header,
  .header__nav__link,
  .header__social,
  .header__whatsapp,
  .header__telefone { transition: none; }
}
