/* ==========================================================================
   HEADER / NAVBAR - CSS (Barra Flutuante Cápsula / Figma Exact)
   ========================================================================== */

/* Wrapper que fixa o Header Flutuante */
.header-wrapper {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
  box-sizing: border-box;
}

/* Cápsula Flutuante Centralizada */
.header-capsule {
  position: relative;
  pointer-events: auto;
  width: 100%;
  max-width: 1382px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 100px;
  box-shadow: 0 20px 45px -10px rgba(18, 131, 116, 0.12), 0 4px 16px -2px rgba(16, 24, 40, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 20px 40px;
  transition: all var(--transition-normal);
  box-sizing: border-box;
}

/* Logotipo UHS */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

/* Links Centrais (Desktop) */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-links-list {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  color: #4e4e4e;
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 6px 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--color-teal);
}

/* Elementos exclusivos do drawer mobile (ocultos no desktop) */
.nav-icon-wrap,
.nav-arrow,
.mobile-nav-cta {
  display: none;
}

/* Ações / Botão Direita */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-header {
  padding: 8px 24px 8px 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.54px;
  color: #4e4e4e;
  background-color: #f2faf8;
  border: 1px solid #dcf2ed;
}

.btn-header .icon-circle {
  width: 38px;
  height: 38px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(18, 131, 116, 0.12);
}

/* Botão Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 102;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2.2px;
  background-color: var(--color-teal, #128374);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Animação do Hamburger para X quando ativo */
.mobile-toggle.is-active span:nth-child(1) {
  transform: translateY(7.2px) rotate(45deg);
}

.mobile-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-toggle.is-active span:nth-child(3) {
  transform: translateY(-7.2px) rotate(-45deg);
}


/* ==========================================================================
   RESPONSIVIDADE & DRAWER MOBILE (Header Flutuante)
   ========================================================================== */
@media (max-width: 991px) {
  .header-wrapper {
    top: 12px;
    padding: 0 12px;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .header-capsule {
    padding: 8px 14px 8px 20px;
    border-radius: 50px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
  }

  .logo-img {
    height: 36px;
    max-width: 130px;
  }

  /* Drawer Dropdown do Menu Mobile */
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    flex-direction: column;
    padding: 16px 14px 18px 14px;
    gap: 12px;
    border-radius: 24px;
    border: 1.5px solid rgba(18, 131, 116, 0.2);
    box-shadow: 0 20px 50px -10px rgba(16, 24, 40, 0.2), 0 0 0 1px rgba(18, 131, 116, 0.08);
    pointer-events: auto;
    animation: menuSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes menuSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .nav-menu.active {
    display: flex;
  }

  /* Lista de Links no Drawer */
  .nav-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  /* Card Individual de Link com Ícone Lucide */
  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(18, 131, 116, 0.035);
    border: 1px solid rgba(18, 131, 116, 0.1);
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
  }

  .nav-link:hover,
  .nav-link:active {
    background: #eef9f7;
    border-color: rgba(18, 131, 116, 0.3);
    color: var(--color-teal);
    transform: translateX(2px);
  }

  /* Ícone Lucide no Círculo Mint */
  .nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef9f7;
    border: 1px solid #d5f2ed;
    color: var(--color-teal, #128374);
    flex-shrink: 0;
  }

  .nav-text {
    font-family: var(--font-heading);
    font-size: 15.5px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    text-align: left;
  }

  .nav-link:hover .nav-text {
    color: var(--color-teal);
  }

  /* Seta Indicadora */
  .nav-arrow {
    display: flex;
    align-items: center;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .nav-link:hover .nav-arrow {
    color: var(--color-teal);
    transform: translateX(3px);
  }

  /* Bloco CTA Dentro do Menu Mobile */
  .mobile-nav-cta {
    display: block;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(18, 131, 116, 0.12);
  }

  .btn-mobile-menu {
    width: 100%;
    height: 50px;
    background-color: var(--color-teal, #128374);
    color: #ffffff;
    border: none;
    border-radius: 100px;
    font-family: var(--font-primary, 'DM Sans', sans-serif);
    font-size: 15.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(18, 131, 116, 0.32);
    transition: all 0.2s ease;
  }

  .btn-mobile-menu:hover,
  .btn-mobile-menu:active {
    background-color: var(--color-teal-dark, #0e6b5e);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(18, 131, 116, 0.4);
  }

  .btn-mobile-menu .icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-teal, #128374);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .header-actions .btn-header {
    display: none;
  }
}