/**
 * Header + menu mobile IBG — casco próprio (sem meanmenu / header-1).
 * Cores: --btn-* / --ibg-* (CMS pode pintar via __brand).
 */

.ibg-site #back-top,
.ibg-site .back-to-top {
  display: none !important;
}

.ibg-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #0c0b0a;
  border: 0;
  backdrop-filter: blur(14px);
}

.ibg-header.is-stuck {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.ibg-header__bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.25rem 0;
}

.ibg-header__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 2;
}

.ibg-header__logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 9.5rem;
  object-fit: contain;
}

.ibg-header__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.ibg-header__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 1.05rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ibg-header__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ibg-text, #fffcf9);
  text-decoration: none;
  font-family: var(--ibg-font, "IBG", system-ui, sans-serif);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.35rem 0;
  white-space: nowrap;
}

.ibg-header__list a:hover,
.ibg-header__item.is-current > a {
  color: #fffcf9;
}

.ibg-header__item--sub {
  position: relative;
}

.ibg-header__sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 11.5rem;
  margin: 0;
  padding: 0.45rem 0;
  list-style: none;
  background: #141312;
  border: 1px solid var(--ibg-border);
  border-radius: var(--btn-radius, 4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.ibg-header__sub a {
  display: block;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
}

.ibg-header__item--sub:hover > .ibg-header__sub,
.ibg-header__item--sub.is-open > .ibg-header__sub,
.ibg-header__item--sub:focus-within > .ibg-header__sub {
  display: block;
}

.ibg-header__tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.ibg-header .ibg-lang,
.ibg-site .ibg-header .ibg-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ibg-header .ibg-lang button {
  appearance: none;
  min-width: 1.8rem;
  padding: 0.25rem 0.35rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.ibg-site .ibg-header .ibg-lang button.ibg-lang-active,
.ibg-site .ibg-header .ibg-lang button:hover,
.ibg-site .ibg-header .ibg-lang button.ibg-lang-active:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: #f2f2f2 !important;
}

.ibg-header__cta,
.ibg-site a.ibg-header__cta,
.ibg-nav-drawer__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--btn-bg);
  border-radius: var(--btn-radius, 4px);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--ibg-font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: none;
}

.ibg-header__cta:hover,
.ibg-header__cta:focus-visible,
.ibg-nav-drawer__cta:hover,
.ibg-nav-drawer__cta:focus-visible {
  background: var(--btn-hover-bg);
  border-color: var(--btn-hover-bg);
  color: var(--btn-hover-fg);
  outline: none;
}

.ibg-header__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--ibg-border);
  border-radius: var(--btn-radius, 4px);
  background: transparent;
  cursor: pointer;
}

.ibg-header__menu-bars,
.ibg-header__menu-bars::before,
.ibg-header__menu-bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ibg-text, #fffcf9);
  border-radius: 1px;
}

.ibg-header__menu-bars {
  position: relative;
}

.ibg-header__menu-bars::before,
.ibg-header__menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.ibg-header__menu-bars::before {
  top: -5px;
}

.ibg-header__menu-bars::after {
  top: 5px;
}

.ibg-header__menu:focus-visible {
  outline: 2px solid var(--btn-bg);
  outline-offset: 2px;
}

/* Drawer */
.ibg-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 8, 7, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ibg-nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ibg-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 91;
  display: flex;
  flex-direction: column;
  width: min(22.5rem, calc(100vw - 1.5rem));
  height: 100%;
  max-height: 100dvh;
  padding: 1rem 1.15rem max(1.25rem, env(safe-area-inset-bottom));
  background: #100f0e;
  border-right: 1px solid var(--ibg-border);
  transform: translateX(-110%);
  visibility: hidden;
  transition: transform 0.32s ease, visibility 0.32s ease;
  overflow: hidden;
}

.ibg-nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.ibg-nav-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--ibg-border);
}

.ibg-nav-drawer__top img {
  height: 40px;
  width: auto;
  max-width: 8.5rem;
  object-fit: contain;
}

.ibg-nav-drawer__close {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--ibg-border);
  border-radius: var(--btn-radius, 4px);
  background: transparent;
  color: var(--ibg-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ibg-nav-drawer__close:focus-visible {
  outline: 2px solid var(--btn-bg);
  outline-offset: 2px;
}

.ibg-nav-drawer__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ibg-nav-drawer__nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ibg-nav-drawer__nav > ul > li > a,
.ibg-nav-drawer__sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.78rem 0.15rem;
  color: var(--ibg-text);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.02rem;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 252, 249, 0.08);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.ibg-nav-drawer__nav a.is-current {
  color: var(--btn-bg);
}

.ibg-nav-drawer__sub {
  display: none;
  padding: 0.15rem 0 0.5rem 0.7rem;
}

.ibg-nav-drawer__item.is-open > .ibg-nav-drawer__sub {
  display: block;
}

.ibg-nav-drawer__sub a {
  display: block;
  padding: 0.45rem 0;
  color: var(--ibg-text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
}

.ibg-nav-drawer__contact {
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ibg-border);
  font-size: 0.88rem;
}

.ibg-nav-drawer__contact p {
  margin: 0 0 0.35rem;
}

.ibg-nav-drawer__contact a {
  color: var(--ibg-text-secondary);
  text-decoration: none;
}

.ibg-nav-drawer__cta {
  margin-top: 0.85rem;
  width: 100%;
}

html.ibg-mobile-menu-open,
html.ibg-mobile-menu-open body {
  overflow: hidden;
}

@media (max-width: 1020px) {
  .ibg-header__nav {
    display: none;
  }

  .ibg-header__cta,
  .ibg-site a.ibg-header__cta,
  .ibg-site .ibg-header a.ibg-header__cta {
    display: none !important;
  }

  .ibg-header__tools {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .ibg-header__menu {
    display: inline-flex;
  }

  .ibg-header__bar {
    width: calc(100% - 1.5rem);
  }
}

@media (min-width: 1021px) {
  .ibg-nav-drawer,
  .ibg-nav-overlay,
  .ibg-header__menu {
    display: none !important;
  }
}
