/* =============================================================
   BDA Solutions — Navbar + Mega Menu estilo IBM
   ============================================================= */

:root {
  --bda-navy:        #003366;
  --bda-navy-hover:  #002244;
  --bda-green:       #00a651;
  --bda-green-dark:  #007a3d;
  --nav-h:           72px;
  --sidebar-w:       240px;
  --mega-border:     3px solid #00a651;
  --header-x:        40px;
}

.bda-nav-wrap ~ .sticky-navbar,
.header .sticky-navbar:not(.bda-navbar) {
  display: none !important;
}

/* Bloco do menu — fundo branco, alinhado ao header */
.bda-nav-wrap {
  position: relative;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.bda-navbar {
  background: #fff;
  height: auto;
  min-height: var(--nav-h);
  padding: 0;
  position: relative;
  z-index: 1001;
}

.bda-navbar-inner.container-fluid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  padding-top: 22px !important;
  padding-bottom: 22px !important;
  padding-left: var(--header-x) !important;
  padding-right: var(--header-x) !important;
  min-height: var(--nav-h);
  gap: 0;
}

.bda-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 24px;
  flex-shrink: 0;
}
.bda-brand img {
  height: 40px;
  width: auto;
}

.bda-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.bda-nav > li {
  display: flex;
  align-items: center;
}

.bda-nav-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--bda-navy);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  padding: 12px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}
.bda-nav-btn:hover {
  color: var(--bda-green);
  border-bottom-color: rgba(0, 166, 81, 0.35);
  background: rgba(0, 51, 102, 0.04);
}
.bda-nav-btn[aria-expanded="true"] {
  color: var(--bda-navy);
  border-bottom-color: var(--bda-green);
  background: rgba(0, 166, 81, 0.06);
}
.bda-nav-btn .caret {
  transition: transform 0.2s;
  display: inline-block;
  flex-shrink: 0;
  color: var(--bda-navy);
  opacity: 0.7;
}
.bda-nav-btn[aria-expanded="true"] .caret {
  transform: rotate(180deg);
  opacity: 1;
}

.bda-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 24px;
  flex-shrink: 0;
}
.btn-outline-nav {
  background: #fff;
  border: 1px solid var(--bda-navy);
  color: var(--bda-navy);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-outline-nav:hover {
  background: var(--bda-navy);
  color: #fff;
  border-color: var(--bda-navy);
}
.btn-green-nav {
  background: var(--bda-green);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-green-nav:hover {
  background: var(--bda-green-dark);
  color: #fff;
}

.bda-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--bda-navy);
  padding: 8px 12px;
  margin-left: 8px;
  cursor: pointer;
}
.bda-mobile-toggle .menu-lines {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bda-navy);
  position: relative;
}
.bda-mobile-toggle .menu-lines::before,
.bda-mobile-toggle .menu-lines::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--bda-navy);
}
.bda-mobile-toggle .menu-lines::before { top: -7px; }
.bda-mobile-toggle .menu-lines::after  { top: 7px; }

/* ─── MEGA MENU ──────────────────────────────────────────────── */
.bda-nav-wrap .mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: var(--mega-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
}
.bda-nav-wrap .mega-menu.is-open {
  display: flex;
}

.mega-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: #f8f8f8;
  border-right: 1px solid #e8e8e8;
  padding: 12px 0;
}
.mega-sidebar-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  padding: 14px 24px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  line-height: 1.35;
}
.mega-sidebar-link:hover {
  background: #eee;
  color: #111;
}
.mega-sidebar-link.is-active {
  background: #fff;
  border-left-color: var(--bda-green);
  color: var(--bda-navy);
  font-weight: 600;
}

.mega-content {
  flex: 1;
  padding: 40px 48px 48px;
  overflow-y: auto;
  max-height: 520px;
}

.mega-section-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--bda-navy);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: inherit;
}
.mega-section-title:hover {
  color: var(--bda-green);
}
.mega-section-title .arrow {
  color: var(--bda-green);
  font-weight: 500;
}

.mega-panel {
  display: none;
}
.mega-panel.is-active {
  display: block;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 48px;
  row-gap: 0;
}
.mega-item {
  padding: 16px 0;
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: background 0.1s, padding-left 0.1s;
}
.mega-item:hover {
  background: #f5faf7;
  padding-left: 8px;
}
.mega-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bda-navy);
  margin-bottom: 6px;
  line-height: 1.35;
  font-family: inherit;
}
.mega-item-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.55;
  font-family: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bda-nav-wrap .mega-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
}
.bda-nav-wrap .mega-backdrop.is-open {
  display: block;
}

.mega-menu--no-sidebar .mega-content {
  padding: 40px 48px 48px;
  width: 100%;
}

/* ─── RESPONSIVO ─────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  :root {
    --header-x: 28px;
  }
  .bda-actions .btn-outline-nav {
    display: none;
  }
}

@media (max-width: 991.98px) {
  :root {
    --header-x: 20px;
  }

  .bda-navbar-inner.container-fluid {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .bda-brand {
    margin-right: auto;
  }

  .bda-actions {
    display: none;
  }

  .bda-mobile-toggle {
    display: flex;
    align-items: center;
  }

  .bda-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 12px 0;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  .bda-nav.is-open {
    display: flex;
  }
  .bda-nav > li {
    flex-direction: column;
    width: 100%;
  }
  .bda-nav-btn {
    width: 100%;
    padding: 16px var(--header-x);
    border-bottom: none;
    border-left: 3px solid transparent;
    justify-content: space-between;
  }
  .bda-nav-btn[aria-expanded="true"] {
    border-left-color: var(--bda-green);
    border-bottom-color: transparent;
  }

  .bda-nav-wrap .mega-menu {
    position: static;
    flex-direction: column;
    box-shadow: none;
    max-height: none;
  }
  .bda-nav-wrap .mega-menu.is-open {
    display: flex;
  }

  .mega-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px var(--header-x);
  }
  .mega-sidebar-link {
    border-left: none;
    border-bottom: 3px solid transparent;
    flex: 0 0 auto;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    width: auto;
  }
  .mega-sidebar-link.is-active {
    border-bottom-color: var(--bda-green);
    border-left-color: transparent;
    background: #fff;
  }

  .mega-content {
    padding: 24px var(--header-x) 32px;
    max-height: none;
  }

  .mega-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

@media (min-width: 1400px) {
  :root {
    --header-x: 48px;
  }
}
