/* ===========================================================================
   Navegação padrão — Dr. Lucas Burttet
   Estado topo  : barra branca de largura total (tradicional)
   Ao rolar     : encolhe para pílula flutuante centralizada (.scrolled)
   Calculadora  : dropdown com sub-itens (hover + clique/touch), sem gap-bug
   Arquivo único: alterar aqui reflete em todas as páginas.
   =========================================================================== */

/* wrapper = fundo da barra (ocupa toda a largura) */
.pill-nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #ececec;
  box-shadow: 0 1px 0 rgba(26,39,68,0.04);
  pointer-events: auto;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, padding .35s ease;
}

/* conteúdo central da barra */
.pill-nav {
  position: relative; left: auto; top: auto; transform: none;
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  background: transparent; border: none; border-radius: 0; box-shadow: none;
  padding: 12px 40px;
  transition: background .35s ease, border-radius .35s ease, box-shadow .35s ease,
              padding .35s ease, max-width .35s ease, backdrop-filter .35s ease;
}

/* logo na barra */
.nav-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-link img {
  height: 34px; width: auto; display: block;
  transition: opacity .3s ease, max-width .3s ease, margin .3s ease;
}

/* links centrais */
.pill-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.pill-links > a,
.pill-drop-trigger {
  font-family: 'Inter', sans-serif; font-size: 14.5px; font-weight: 500; color: #1a2744;
  padding: 9px 15px; border-radius: 100px; white-space: nowrap; text-decoration: none;
  background: transparent; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, color .2s;
}
.pill-links > a:hover,
.pill-drop-trigger:hover { background: rgba(26,39,68,0.07); }
.pill-links a.active { background: rgba(26,39,68,0.10); font-weight: 600; }

/* ações à direita */
.pill-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pill-btn-blog {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; color: #1a2744;
  background: transparent; border: 1.5px solid #d8d5cf; border-radius: 100px;
  padding: 9px 20px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.pill-btn-blog:hover { background: #f5f3ef; border-color: #c0bdb7; }
.pill-btn-contact {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: #fff;
  background: #1a2744; border: none; border-radius: 100px; padding: 10px 22px;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .25s, transform .2s;
}
.pill-btn-contact:hover, .pill-btn-contact.active-page { background: #253560; }

/* ===== Dropdown Calculadora ===== */
.pill-dropdown { position: relative; display: inline-flex; }
.pill-drop-trigger .caret { width: 11px; height: 11px; transition: transform .25s ease; }
.pill-dropdown:hover .caret,
.pill-dropdown:focus-within .caret { transform: rotate(180deg); }

.pill-drop-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 250px;
  padding-top: 12px;            /* ponte invisível: elimina o gap que fecha no hover */
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.pill-dropdown:hover .pill-drop-menu,
.pill-dropdown:focus-within .pill-drop-menu,
.pill-drop-menu.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.pill-drop-inner {
  background: #fff; border: 1px solid #ececec; border-radius: 16px;
  box-shadow: 0 16px 44px rgba(26,39,68,0.16); padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.pill-drop-menu a {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: 10px;
  text-decoration: none; color: #1a2744; font-size: 14px; font-weight: 600; transition: background .18s;
}
.pill-drop-menu a:hover { background: #f5f3ef; }
.pill-drop-menu a small { font-weight: 500; font-size: 11.5px; color: #8a97ad; }

/* hamburger (mobile) */
.pill-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.pill-hamburger span { display: block; width: 22px; height: 2px; background: #1a2744; border-radius: 2px; transition: transform .3s, opacity .3s; }
.pill-nav-title { display: none; }

/* ===== Estado rolado: encolhe para pílula flutuante ===== */
.pill-nav-wrap.scrolled {
  background: transparent; border-bottom-color: transparent; box-shadow: none; padding-top: 14px;
}
.pill-nav-wrap.scrolled .pill-nav {
  max-width: max-content;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6); border-radius: 40px;
  box-shadow: 0 10px 30px rgba(26,39,68,0.12);
  padding: 9px 18px; gap: 10px;
}
.pill-nav-wrap.scrolled .nav-logo-link { max-width: 0; margin: 0; overflow: hidden; opacity: 0; pointer-events: none; }
.pill-nav-wrap.scrolled .nav-logo-link img { max-width: 0; }
.pill-nav-wrap.scrolled .pill-links { flex: 0 0 auto; }

/* ===== Menu mobile ===== */
.pill-mobile-menu {
  display: none; position: fixed; top: 70px; left: 16px; right: 16px;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  border-radius: 20px; border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 12px 40px rgba(26,39,68,0.16); z-index: 999;
  padding: 12px; flex-direction: column; gap: 4px;
}
.pill-mobile-menu.open { display: flex; }
.pill-mobile-menu a {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 500; color: #1a2744;
  text-decoration: none; padding: 13px 18px; border-radius: 12px;
}
.pill-mobile-menu a:hover { background: #f0ede8; }
.pill-mobile-menu .pill-menu-divider { height: 1px; background: #eeebe6; margin: 4px 0; }
.pill-mobile-menu .pill-menu-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9aabb8; padding: 10px 18px 2px; }
.pill-mobile-menu .pill-menu-sub { padding-left: 30px; font-size: 14px; color: #3a4a6a; }
.pill-mobile-menu .pill-menu-contact { background: #1a2744; color: #fff; font-weight: 600; text-align: center; border-radius: 12px; margin-top: 4px; }
.pill-mobile-menu .pill-menu-contact:hover { background: #253560; }

/* breakpoint (alinhado ao CSS inline das páginas p/ evitar conflito) */
@media (max-width: 680px) {
  .pill-links, .pill-actions { display: none !important; }
  .pill-hamburger { display: flex; }
  .pill-nav { justify-content: space-between; padding: 10px 18px; gap: 10px; }
  .pill-nav-wrap.scrolled .pill-nav { padding: 8px 16px; }
  .nav-logo-link img { height: 30px; }
  /* na pílula rolada do mobile, mantém a logo (não há links visíveis) */
  .pill-nav-wrap.scrolled .nav-logo-link { max-width: none; margin: 0; overflow: visible; opacity: 1; pointer-events: auto; }
  .pill-nav-wrap.scrolled .nav-logo-link img { max-width: none; }
}
@media (min-width: 681px) { .pill-mobile-menu { display: none !important; } }
