/* =========================================================
   iFody Blog — Header (topbar +18 + subnav mega-dropdown)
   Carregado em todas as páginas. Sobrescreve o subnav de produto.
   ========================================================= */

/* ============================================
   TOPBAR BLOG
   ============================================ */
.topbar--blog {
  background: var(--bg-2, #15101f);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.topbar--blog .topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.topbar__item--badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 500;
}
.topbar__plus18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.topbar__item--center {
  color: var(--text-3);
  font-style: italic;
}
/* Esconde o item central em telas estreitas */
@media (max-width: 860px) { .topbar__item--center { display: none; } }
@media (max-width: 600px) { .topbar__item--badge { font-size: 11px; } }

.topbar__item--links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.topbar__link {
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.topbar__link:hover { color: var(--pink-light); }
@media (max-width: 520px) { .topbar__item--links { display: none; } }

/* ============================================
   SUBNAV BLOG (mega-dropdown)
   ============================================ */
.subnav--blog {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: visible;
}
.subnav--blog .subnav__inner {
  display: flex;
  gap: 2px;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.subnav--blog .subnav__inner::-webkit-scrollbar { display: none; }
@media (min-width: 980px) {
  .subnav--blog .subnav__inner { overflow: visible; justify-content: center; }
}

.subnav--blog .subnav__group {
  position: relative;
  flex-shrink: 0;
}

.subnav--blog .subnav__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.subnav--blog .subnav__item:hover { color: var(--text); }
.subnav--blog .subnav__item--active {
  color: var(--pink-light);
  border-bottom-color: var(--pink);
  background: transparent;
}
.subnav__caret { opacity: .5; transition: transform .2s; }
.subnav--blog .subnav__group:hover .subnav__caret { transform: rotate(180deg); opacity: 1; }

/* Dropdown */
.subnav__drop {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 60;
}
/* Ponte invisível para o mouse não "cair" entre o item e o dropdown */
.subnav__drop::before {
  content: '';
  position: absolute;
  top: -10px; left: 0; right: 0;
  height: 10px;
}
.subnav__group:hover .subnav__drop,
.subnav__group:focus-within .subnav__drop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(4px);
}
/* No mobile (sem hover real), o dropdown vira fluxo normal só se focado via teclado */
@media (max-width: 979px) {
  .subnav__drop {
    position: static;
    transform: none;
    min-width: 0;
    box-shadow: none;
    display: none;
  }
  .subnav__group:focus-within .subnav__drop { display: block; }
}

.subnav__drop-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.subnav__drop-link:hover { background: var(--bg); color: var(--text); }
.subnav__drop-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.subnav__drop-all {
  display: block;
  margin-top: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--pink-light);
  text-decoration: none;
  transition: color .15s;
}
.subnav__drop-all:hover { color: var(--pink); }
