/* =========================================================
   MEDFOCO • CABEÇALHO DO SITE  ([medfoco_cabecalho])
   Tudo dentro de .medfoco-header, com prefixo mfh-: não atinge o tema
   nem as páginas (calculadoras, guias) que também usam classes mf-.
   ========================================================= */
.medfoco-header {
  --mfh-navy: #0b2545;
  --mfh-navy2: #13315c;
  --mfh-blue: #1d4ed8;
  --mfh-teal: #0f9ea8;
  --mfh-ink: #102033;
  --mfh-text: #334155;
  --mfh-muted: #64748b;
  --mfh-line: #e6eaf0;
  --mfh-bg: #f6f8fb;
  --mfh-ease: cubic-bezier(.22, 1, .36, 1);
  --mfh-h: 74px;
  --mfh-maxw: 1200px;

  position: sticky;
  top: 0;
  z-index: 9990;
  display: block;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--mfh-line);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: box-shadow .25s ease;
}
.admin-bar .medfoco-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .medfoco-header { top: 0; } }
.medfoco-header.is-stuck { box-shadow: 0 6px 24px rgba(15, 23, 42, .08); }
.medfoco-header *,
.medfoco-header *::before,
.medfoco-header *::after { box-sizing: border-box; }
.medfoco-header a { color: inherit; text-decoration: none !important; }
.medfoco-header ul,
.medfoco-header li { margin: 0; padding: 0; list-style: none; }
.medfoco-header button { font-family: inherit; }
/* O Astra põe sombra, maiúsculas e cor de fundo em todo <button> do site: aqui não. */
.medfoco-header.medfoco-header button:not(.mfh-btn-primary) { box-shadow: none; text-shadow: none; text-transform: none; letter-spacing: normal; }
/* Contorno só para quem navega pelo teclado (acessibilidade) */
.medfoco-header :is(a, button, input):focus { outline: none; }
.medfoco-header :is(a, button):focus-visible { outline: 2px solid var(--mfh-teal) !important; outline-offset: 2px; }

.medfoco-header .mfh-inner {
  display: flex;
  height: var(--mfh-h);
  max-width: var(--mfh-maxw);
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.medfoco-header a.mfh-logo { display: flex !important; flex: 0 0 auto; align-items: center; }
.medfoco-header .mfh-logo-img { display: block !important; width: auto; max-width: none; height: 48px; object-fit: contain; }

/* ===== Navegação ===== */
.medfoco-header .mfh-nav { display: flex; flex: 1; align-items: center; justify-content: center; }
.medfoco-header .mfh-nav > ul { display: flex; align-items: center; gap: 2px; }
.medfoco-header .mfh-nav > ul > li { position: relative; }
.medfoco-header .mfh-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mfh-ink);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color .2s ease, background .2s ease;
}
/* As abas com submenu são <button>: anula o estilo de botão do tema (fundo, sombra, borda, maiúsculas) */
.medfoco-header button.mfh-nav-link,
.medfoco-header button.mfh-nav-link:focus,
.medfoco-header button.mfh-nav-link:active {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 13px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mfh-ink) !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  line-height: normal !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
}
.medfoco-header .mfh-caret { color: #aeb9c6; font-size: 11px; transition: transform .25s var(--mfh-ease), color .2s; }
.medfoco-header .mfh-nav-link:hover,
.medfoco-header button.mfh-nav-link:hover,
.medfoco-header .mfh-nav > ul > li.is-open > .mfh-nav-link { background: var(--mfh-bg) !important; color: var(--mfh-teal) !important; }
.medfoco-header button.mfh-nav-link.is-active { color: var(--mfh-teal) !important; }
.medfoco-header .mfh-nav-link:hover .mfh-caret { color: var(--mfh-teal); }
.medfoco-header .mfh-nav > ul > li.is-open .mfh-caret { transform: rotate(180deg); color: var(--mfh-teal); }
.medfoco-header .mfh-nav-link.is-active { color: var(--mfh-teal); }

/* Mega-menu */
.medfoco-header .mfh-mega {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 50;
  min-width: 430px;
  padding: 14px;
  border: 1px solid var(--mfh-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .22s var(--mfh-ease), transform .22s var(--mfh-ease), visibility .22s;
}
.medfoco-header .mfh-mega::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; } /* ponte para o mouse */
.medfoco-header .mfh-mega::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  border-top: 1px solid var(--mfh-line);
  border-left: 1px solid var(--mfh-line);
  border-radius: 3px 0 0 0;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}
.medfoco-header .mfh-nav > ul > li.is-open .mfh-mega { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.medfoco-header .mfh-mega.is-wide { min-width: 540px; }
.medfoco-header .mfh-mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.medfoco-header .mfh-mega-grid.is-one { grid-template-columns: 1fr; }
.medfoco-header .mfh-mega-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-radius: 12px; transition: background .2s ease, transform .2s ease; }
.medfoco-header .mfh-mega-item:hover,
.medfoco-header .mfh-mega-item.is-active { background: var(--mfh-bg); transform: translateX(2px); }
.medfoco-header .mfh-mega-ic {
  display: flex;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--ac, #0f9ea8) 20%, #fff);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ac, #0f9ea8) 13%, #fff);
  color: var(--ac, #0f9ea8);
  font-size: 16px;
}
.medfoco-header .mfh-mega-tx { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.medfoco-header .mfh-mega-tx b { color: var(--mfh-ink); font-size: 14px; font-weight: 700; line-height: 1.25; }
.medfoco-header .mfh-mega-tx small { color: var(--mfh-muted); font-size: 11.5px; line-height: 1.35; }
.medfoco-header .mfh-mega-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px 6px 0 12px; border-top: 1px solid var(--mfh-line); }
.medfoco-header .mfh-mega-foot span { color: var(--mfh-muted); font-size: 12px; }
.medfoco-header .mfh-mega-all { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; background: #e8f6f7; color: var(--mfh-teal); font-size: 13px; font-weight: 700; transition: gap .2s ease, background .2s ease; }
.medfoco-header .mfh-mega-all:hover { gap: 11px; background: #d8eff0; }

/* ===== Ações ===== */
.medfoco-header .mfh-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; height: 44px; }
.medfoco-header .mfh-icon-btn {
  display: flex;
  width: 44px;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mfh-line);
  border-radius: 11px;
  background: #fff;
  color: var(--mfh-ink);
  font-size: 16px;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.medfoco-header .mfh-icon-btn:hover { border-color: #cfe6e8; background: var(--mfh-bg); color: var(--mfh-teal); }
.medfoco-header .mfh-btn {
  display: inline-flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--mfh-line);
  border-radius: 11px;
  background: #fff;
  color: var(--mfh-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.medfoco-header .mfh-btn-light:hover { border-color: #cfe6e8; background: var(--mfh-bg); color: var(--mfh-teal); }
.medfoco-header .mfh-btn-primary {
  padding: 0 18px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--mfh-teal), #0c7f87 55%, var(--mfh-blue));
  box-shadow: 0 8px 20px rgba(15, 158, 168, .26);
  color: #fff !important;
  font-weight: 700;
}
.medfoco-header .mfh-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15, 158, 168, .32); }
.medfoco-header .mfh-btn-ghost { border-color: transparent; background: transparent; color: var(--mfh-muted); }
.medfoco-header .mfh-btn-ghost:hover { color: #b91c1c; }
.medfoco-header .mfh-btn.is-loading { opacity: .75; pointer-events: none; }

/* Menu da conta (logado) */
.medfoco-header .mfh-user { position: relative; }
.medfoco-header .mfh-user-btn {
  display: inline-flex;
  height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 12px 0 5px;
  border: 1px solid var(--mfh-line);
  border-radius: 11px;
  background: #fff;
  color: var(--mfh-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.medfoco-header .mfh-user-btn:hover,
.medfoco-header .mfh-user.is-open .mfh-user-btn { border-color: #cfe6e8; background: var(--mfh-bg); }
.medfoco-header .mfh-user.is-open .mfh-caret { transform: rotate(180deg); color: var(--mfh-teal); }
.medfoco-header .mfh-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--mfh-teal), var(--mfh-blue));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.medfoco-header .mfh-user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medfoco-header .mfh-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: 240px;
  padding: 8px;
  border: 1px solid var(--mfh-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s var(--mfh-ease), transform .2s var(--mfh-ease), visibility .2s;
}
.medfoco-header .mfh-user.is-open .mfh-user-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.medfoco-header .mfh-user-head { margin-bottom: 6px; padding: 8px 10px 10px; border-bottom: 1px solid var(--mfh-line); }
.medfoco-header .mfh-user-head b { display: block; color: var(--mfh-ink); font-size: 14.5px; }
.medfoco-header .mfh-plan { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 9px; border-radius: 999px; background: var(--mfh-bg); color: var(--mfh-muted); font-size: 11.5px; font-weight: 700; }
.medfoco-header .mfh-plan.is-premium { background: #fff7e6; color: #b45309; }
.medfoco-header .mfh-user-menu a,
.medfoco-header .mfh-user-logout {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mfh-text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.medfoco-header .mfh-user-menu a i,
.medfoco-header .mfh-user-logout i { width: 18px; color: var(--mfh-teal); text-align: center; }
.medfoco-header .mfh-user-menu a:hover { background: var(--mfh-bg); color: var(--mfh-ink); }
.medfoco-header .mfh-user-logout { margin-top: 4px; border-top: 1px solid var(--mfh-line); border-radius: 0 0 10px 10px; }
.medfoco-header .mfh-user-logout:hover { color: #b91c1c; }
.medfoco-header .mfh-user-logout:hover i { color: #b91c1c; }

/* ===== Busca ===== */
.medfoco-header .mfh-search-bar { max-height: 0; overflow: hidden; background: #fff; transition: max-height .3s var(--mfh-ease); }
.medfoco-header.is-search-open .mfh-search-bar { max-height: 96px; border-top: 1px solid var(--mfh-line); }
.medfoco-header .mfh-search-form { display: flex; max-width: var(--mfh-maxw); margin: 0 auto; padding: 14px 24px; }
.medfoco-header .mfh-search-box {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 18px;
  border: 1px solid var(--mfh-line);
  border-radius: 13px;
  background: var(--mfh-bg);
  transition: border-color .2s, box-shadow .2s;
}
.medfoco-header .mfh-search-box:focus-within { border-color: var(--mfh-teal); box-shadow: 0 0 0 3px rgba(15, 158, 168, .13); }
.medfoco-header .mfh-search-box > i { flex: 0 0 auto; color: var(--mfh-muted); font-size: 16px; }
.medfoco-header .mfh-search-box input,
.medfoco-header .mfh-drawer-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mfh-ink);
  font-family: inherit;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
}
.medfoco-header .mfh-search-box input::placeholder { color: #94a3b8; }
.medfoco-header .mfh-search-box button,
.medfoco-header .mfh-drawer-search button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  background: var(--mfh-navy2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s;
}
.medfoco-header .mfh-search-box button:hover { background: var(--mfh-navy); }

/* ===== Menu do celular ===== */
.medfoco-header .mfh-burger {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--mfh-line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}
.medfoco-header .mfh-burger span { position: relative; display: block; width: 20px; height: 14px; }
.medfoco-header .mfh-burger span::before,
.medfoco-header .mfh-burger span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; border-radius: 999px; background: var(--mfh-ink); }
.medfoco-header .mfh-burger span::before { top: 3px; }
.medfoco-header .mfh-burger span::after { bottom: 3px; }

.medfoco-header .mfh-overlay { position: fixed; inset: 0; z-index: 9991; background: rgba(8, 18, 32, .5); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
.medfoco-header .mfh-overlay.is-show { opacity: 1; visibility: visible; }
.medfoco-header .mfh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9992;
  display: flex;
  width: 340px;
  max-width: 88vw;
  height: 100%;
  flex-direction: column;
  background: #fff;
  box-shadow: -12px 0 40px rgba(8, 18, 32, .18);
  transform: translateX(100%);
  transition: transform .32s var(--mfh-ease);
}
.medfoco-header .mfh-drawer.is-open { transform: translateX(0); }
.medfoco-header .mfh-drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--mfh-line); }
.medfoco-header .mfh-drawer-close { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--mfh-line); border-radius: 10px; background: #fff; color: var(--mfh-ink); font-size: 17px; cursor: pointer; }
.medfoco-header .mfh-drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }
.medfoco-header .mfh-drawer-user { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--mfh-line); border-radius: 14px; background: var(--mfh-bg); }
.medfoco-header .mfh-drawer-user b { display: block; color: var(--mfh-ink); font-size: 14.5px; }
.medfoco-header .mfh-drawer-user small { display: block; color: var(--mfh-muted); font-size: 12px; }
.medfoco-header .mfh-drawer-user > span:nth-child(2) { flex: 1; min-width: 0; }
.medfoco-header .mfh-drawer-user > i { color: #aeb9c6; }
.medfoco-header .mfh-drawer-search { display: flex; height: 46px; align-items: center; gap: 9px; margin-bottom: 16px; padding: 0 4px 0 14px; border: 1px solid var(--mfh-line); border-radius: 12px; background: var(--mfh-bg); }
.medfoco-header .mfh-drawer-search:focus-within { border-color: var(--mfh-teal); box-shadow: 0 0 0 3px rgba(15, 158, 168, .13); }
.medfoco-header .mfh-drawer-search > i { color: var(--mfh-muted); }
.medfoco-header .mfh-drawer-search button { height: 34px; padding: 0 14px; }
.medfoco-header .mfh-acc { border-bottom: 1px solid var(--mfh-line); }
.medfoco-header .mfh-acc-head,
.medfoco-header .mfh-drawer-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 4px;
  border: 0;
  background: transparent;
  color: var(--mfh-ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.medfoco-header .mfh-acc-head i { color: #aeb9c6; transition: transform .25s; }
.medfoco-header .mfh-acc.is-open .mfh-acc-head i { transform: rotate(180deg); color: var(--mfh-teal); }
.medfoco-header .mfh-acc-panel { max-height: 0; overflow: hidden; transition: max-height .3s var(--mfh-ease); }
.medfoco-header .mfh-acc.is-open .mfh-acc-panel { max-height: 600px; }
.medfoco-header .mfh-acc-panel a { display: flex; align-items: center; gap: 11px; padding: 11px 6px 11px 8px; color: var(--mfh-text); font-size: 14px; font-weight: 500; }
.medfoco-header .mfh-acc-panel a:hover { color: var(--mfh-teal); }
.medfoco-header .mfh-acc-panel a i { display: flex; flex: 0 0 auto; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: color-mix(in srgb, var(--ac, #0f9ea8) 13%, #fff); color: var(--ac, #0f9ea8); font-size: 13px; }
.medfoco-header .mfh-pill { padding: 2px 9px; border-radius: 999px; background: #fff7e6; color: #b45309; font-size: 11px; font-weight: 800; }
.medfoco-header .mfh-drawer-foot { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-top: 1px solid var(--mfh-line); }
.medfoco-header .mfh-drawer-foot .mfh-btn { width: 100%; }

/* ===== Confirmação de saída ===== */
.medfoco-header .mfh-modal { position: fixed; inset: 0; z-index: 9994; display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s ease; }
.medfoco-header .mfh-modal.is-show { opacity: 1; visibility: visible; pointer-events: auto; }
.medfoco-header .mfh-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 32, .56); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.medfoco-header .mfh-modal-card { position: relative; width: min(420px, 100%); padding: 24px; border: 1px solid var(--mfh-line); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(8, 18, 32, .24); transform: translateY(12px) scale(.98); transition: transform .25s var(--mfh-ease); }
.medfoco-header .mfh-modal.is-show .mfh-modal-card { transform: none; }
.medfoco-header .mfh-modal-icon { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 14px; border: 1px solid #cfe6e8; border-radius: 15px; background: #e8f6f7; color: var(--mfh-teal); font-size: 20px; }
.medfoco-header .mfh-modal-card h3 { margin: 0 0 6px; color: var(--mfh-ink); font-size: 20px; font-weight: 800; line-height: 1.2; }
.medfoco-header .mfh-modal-card p { margin: 0; color: var(--mfh-muted); font-size: 14px; line-height: 1.5; }
.medfoco-header .mfh-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.medfoco-header .mfh-modal-actions .mfh-btn { flex: 1; }

/* ===== Responsivo ===== */
@media (max-width: 1180px) {
  .medfoco-header .mfh-user-name { display: none; }
  .medfoco-header .mfh-user-btn { padding-right: 9px; }
}
@media (max-width: 1080px) {
  .medfoco-header .mfh-nav,
  .medfoco-header .mfh-desk { display: none; }
  .medfoco-header .mfh-inner { max-width: none; justify-content: space-between; gap: 0; padding: 0 28px; }
  .medfoco-header .mfh-actions { gap: 12px; margin-left: auto; }
  .medfoco-header .mfh-burger { display: flex; }
}
@media (min-width: 1081px) {
  .medfoco-header .mfh-drawer,
  .medfoco-header .mfh-overlay { display: none; }
}
@media (max-width: 520px) {
  .medfoco-header { --mfh-h: 70px; }
  .medfoco-header .mfh-inner { padding: 0 18px; }
  .medfoco-header .mfh-logo-img { height: 40px; }
  .medfoco-header .mfh-actions { gap: 10px; }
  .medfoco-header .mfh-search-form { padding: 12px 16px; }
  .medfoco-header .mfh-modal-actions { flex-direction: column-reverse; }
}
@media (max-width: 380px) {
  .medfoco-header .mfh-inner { padding: 0 14px; }
  .medfoco-header .mfh-logo-img { height: 36px; }
  .medfoco-header .mfh-icon-btn,
  .medfoco-header .mfh-burger { width: 42px; min-width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .medfoco-header * { transition: none !important; }
}
