/* ───────────────────────────────────────
   ANNOUNCEMENT BAR  (replaces old .announcement-bar block)
   Keep .announcement-bar selector so existing JS still works
─────────────────────────────────────────────────────────── */
.announcement-bar {
  background: var(--md-yellow);
  height: var(--ann-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--md-navy);
  padding: 0;
  overflow: hidden;
}

.announcement-bar p {
  margin: 0;
}

.announcement-bar .divider {
  margin: 0 10px;
  color: rgba(13, 27, 76, .35);
}

.announcement-bar .cta-link {
  font-weight: 700;
  color: var(--md-navy);
  text-decoration: none !important;
  border-bottom: 1.5px solid rgba(13, 27, 76, .3);
  transition: border-color .18s ease;
}

.announcement-bar .cta-link:hover {
  border-color: var(--md-navy);
}

/* ───────────────────────────────────────
   NAVBAR SHELL
─────────────────────────────────────────────────────────── */
.md-nav {
  background: var(--md-navy);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: relative;
  /* sticks inside fixed <header> */
}

.md-nav__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: space-between;
  position: relative;
}

/* Logo */
.md-nav__logo {
  flex-shrink: 0;
  margin-right: 32px;
}

.md-nav__logo img {
  height: 28px;
  display: block;
}

/* ───────────────────────────────────────
   NAV LIST + ITEMS
─────────────────────────────────────────────────────────── */
.md-nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center !important;
  list-style: none;
  margin: 0 auto;
  padding: 0;

}

.md-nav__item {
  position: relative;
}

.md-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--nav-h);
  padding: 0 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s ease;
  position: relative;
  text-decoration: none !important;
  background: none;
  border: none;
  font-family: 'Roboto', sans-serif;
}

/* Yellow underline on hover */
.md-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--md-yellow);
  transform: scaleX(0);
  transition: transform .18s ease;
  border-radius: 2px 2px 0 0;
}

.md-nav__link:hover,
.md-nav__item:hover>.md-nav__link {
  color: #fff;
}

.md-nav__link:hover::after,
.md-nav__item:hover>.md-nav__link::after {
  transform: scaleX(1);
}

.md-nav__chevron {
  font-size: 10px;
  color: rgba(255, 255, 255, .4);
  transition: transform .18s ease, color .18s ease;
  pointer-events: none;
}

.md-nav__item:hover>.md-nav__link .md-nav__chevron {
  transform: rotate(180deg);
  color: var(--md-yellow);
}

/* ── Marketplace CTA pill ── */
.md-nav__item--mkt {
  /* margin-left: auto; */
  padding-left: 16px;
}

.md-nav__item--mkt .md-nav__link {
  padding: 0;
  height: auto;
  color: var(--md-navy);
}

.md-nav__item--mkt .md-nav__link::after {
  display: none;
}

.md-nav__link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--md-yellow);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background .18s ease;
}

.md-nav__link-pill:hover {
  border: 1.5px solid var(--md-yellow);
}

/* ── Action buttons ── */
.md-nav__actions {
  /*margin-left: 32px;*/
  flex-shrink: 0;
}

.md-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  border: none;
  text-decoration: none !important;
}

.md-nav__btn--login {
  background: transparent;
  color: rgba(255, 255, 255, .72);
  border: 1.5px solid rgba(255, 255, 255, .2) !important;
}

.md-nav__btn--login:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .5) !important;
  background: rgba(255, 255, 255, .08);
}

.md-nav__btn--register {
  background: var(--md-yellow) !important;
  color: var(--md-navy) !important;
  border: 1.5px solid var(--md-yellow) !important;
}

.md-nav__btn--register:hover {
  background: transparent !important;
  color: var(--md-yellow) !important;
}

/* ───────────────────────────────────────
   MEGA MENU BASE
─────────────────────────────────────────────────────────── */
.md-mega,
.md-dropdown {
  position: absolute;
  top: calc(var(--nav-h) - 1px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 24px 64px rgba(13, 27, 76, .16), 0 4px 12px rgba(0, 0, 0, .07);
  border-top: 3px solid var(--md-yellow);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1050;
}

.md-nav__item:hover>.md-mega,
.md-nav__item:hover>.md-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Mega grid inner */
.md-mega__inner {
  display: grid;
  padding: 22px 24px 20px;
  gap: 0;
}

/* Column */
.md-mega__col {
  padding: 0 20px 0 0;
}

.md-mega__col:last-child {
  padding-right: 0;
}

.md-mega__col+.md-mega__col {
  border-left: 1px solid #f1f5f9;
  padding-left: 20px;
}

/* Column heading */
.md-mega__heading {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--md-yellow-dark);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* Mega links */
.md-mega__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.md-mega__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  transition: background .16s ease, color .16s ease;
  text-decoration: none !important;
}
.md-mega__link:hover {
  background: var(--md-blue-light);
  color: var(--md-blue);
}

.md-mega__link:hover .md-mega__icon {
  background: var(--md-blue);
  color: #fff;
}

.md-mega__icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: background .16s ease, color .16s ease;
}

.md-mega__link-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  display: block;
}

.md-mega__link-sub {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.3;
  margin-top: 1px;
  display: block;
}

/* Tag pill */
.md-mega__tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: .3px;
}

.md-mega__tag--free {
  background: #d1fae5;
  color: #065f46;
}

.md-mega__tag--new {
  background: #fef3c7;
  color: #92400e;
}

/* Feature block (dark callout inside mega) */
.md-mega__feature {
  background: linear-gradient(135deg, var(--md-navy) 0%, #1a2f6e 100%);
  border-radius: 10px;
  padding: 16px;
  color: #fff;
  margin-top: 8px;
}

.md-mega__feature-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--md-yellow);
  margin-bottom: 5px;
}

.md-mega__feature-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
}

.md-mega__feature-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.5;
  margin-bottom: 10px;
}

.md-mega__feature-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--md-yellow);
  color: var(--md-navy);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 5px;
  text-decoration: none !important;
  transition: background .16s ease;
}

.md-mega__feature-btn:hover {
  background: var(--md-yellow-dark);
  color: var(--md-navy) !important;
}

/* Simple dropdown (Resources) */
.md-dropdown {
  min-width: 210px;
  padding: 10px 6px;
}

.md-dropdown__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  transition: background .16s ease, color .16s ease;
  text-decoration: none !important;
}

.md-dropdown__link:hover {
  background: var(--md-blue-light);
  color: var(--md-blue);
}

.md-dropdown__link i {
  font-size: 13px;
  color: #9ca3af;
  width: 16px;
}

.md-dropdown__link:hover i {
  color: var(--md-blue);
}

.md-dropdown__divider {
  height: 1px;
  background: #f1f5f9;
  margin: 5px 12px;
}

/* ───────────────────────────────────────
   HAMBURGER
─────────────────────────────────────────────────────────── */
.md-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.md-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}

.md-nav__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.md-nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.md-nav__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ───────────────────────────────────────
   RESPONSIVE  ≤ 1100px
─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .md-nav__toggle {
    display: flex;
  }

  .md-nav__list {
    display: none;
  }

  .md-nav__actions {
    display: none;
  }

  .md-nav__list.mob-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(var(--ann-h) + var(--nav-h));
    left: 0;
    right: 0;
    background: var(--md-navy);
    padding: 10px 0 16px;
    gap: 0;
    z-index: 1049;
    border-top: 1px solid rgba(255, 255, 255, .08);
    max-height: calc(100vh - var(--ann-h) - var(--nav-h));
    overflow-y: auto;
    top: 45px;
  }

  .md-nav__actions.mob-open {
    display: flex;
    position: absolute;
    top: calc(var(--ann-h) + var(--nav-h) + 420px);
    left: 0;
    right: 0;
    background: var(--md-navy);
    padding: 10px 20px 20px;
    gap: 8px;
    z-index: 1048;
    top: 400px;
  }

  .md-nav__actions.mob-open .md-nav__btn {
    width: 100%;
    justify-content: center;
  }

  .md-nav__item {
    width: 100%;
  }

  .md-nav__link {
    height: auto;
    padding: 13px 20px;
    width: 100%;
  }

  .md-nav__link::after {
    display: none;
  }

  .md-mega,
  .md-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: all;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    border-left: 3px solid var(--md-yellow);
    margin: 0 20px 8px 20px;
    display: none;
    min-width: unset;
  }

  .md-nav__item.mob-open>.md-mega,
  .md-nav__item.mob-open>.md-dropdown {
    display: block;
  }

  .md-mega__inner {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .md-mega__col+.md-mega__col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
  }

  .md-mega__feature {
    display: none;
  }

  .md-nav__item--mkt {
    margin-left: 0;
  }

  .md-nav__item--mkt .md-nav__link {
    padding: 13px 20px;
    height: auto;
  }

  .md-nav__link-pill {
    width: 100%;
    justify-content: center;
  }
}