/* Module catalog UI: header mega menu, portal login button, New badges,
   grouped module grids, custom-module call-to-action, and module FAQs. */

/* ── Portal login button ───────────────────────────────────────────── */
.sc-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.sc-login-btn:hover,
.sc-login-btn:focus {
  background: #fff;
  color: #0b2442 !important;
  border-color: #fff;
}
.sc-login-btn i { font-size: 13px; }
.sc-login-btn--block {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-bottom: 10px;
  border-color: #0b2442;
  background: #fff;
  color: #0b2442 !important;
  border-radius: 10px;
}
.sc-login-btn--block:hover { background: #0b2442; color: #fff !important; }
.sc-header-actions { gap: 10px; }

@media (max-width: 991.98px) {
  .sc-header-actions { order: 2; margin-left: auto; margin-right: 62px; }
  .navbar > .container > .navbar-toggler { order: 3; }
  .sc-header-actions .sc-login-btn { height: 34px; padding: 0 13px; font-size: 13px; min-width: 0 !important; width: auto !important; }
}
@media (max-width: 380px) {
  .sc-header-actions .sc-login-btn span { display: none; }
  .sc-header-actions .sc-login-btn { width: 36px; padding: 0; justify-content: center; }
}

/* ── New badge ─────────────────────────────────────────────────────── */
.sc-new-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff1e6;
  color: #d9480f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
}
.sc-new-badge--hero {
  margin-left: 12px;
  padding: 4px 11px;
  font-size: 13px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  position: relative;
  top: -6px;
}
.module-formerly {
  display: inline-block;
  margin: -6px 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
}

/* ── Header mega menu ──────────────────────────────────────────────── */
.navbar .sc-mega-menu { padding: 0; }
.sc-mega-menu__inner {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 26px;
  padding: 24px 28px 0;
}
.sc-mega-menu__group { display: flex; flex-direction: column; padding-bottom: 14px; }
.sc-mega-menu__title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a8aa0;
}
.navbar .sc-mega-menu__link,
.sc-mega-menu__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  color: #1f314f !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  text-transform: none;
}
.sc-mega-menu__link i { width: 18px; text-align: center; font-size: 14px; }
.sc-mega-menu__link:hover { background: #f1f6fc; color: #0092ff !important; }
.sc-mega-menu__footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin: 0 -28px;
  padding: 13px 28px;
  border-top: 1px solid #e6edf5;
  background: #f7fafd;
}
.sc-mega-menu__footer a { font-size: 13px; font-weight: 700; color: #0b6fd6 !important; }
.sc-mega-menu__footer a:hover { color: #0b2442 !important; }

@media only screen and (min-width: 992px) {
  .navbar .sc-has-mega { position: static; }
  .navbar .sc-has-mega > .sc-mega-menu {
    left: 50%;
    right: auto;
    width: min(940px, calc(100vw - 40px));
    transform: translateX(-50%) translateY(10px);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(9, 30, 62, .18);
  }
  /* Invisible bridge over the gap between "Modules" and the panel, so the
     menu stays open while the pointer travels down to it. */
  .navbar .sc-has-mega > .sc-mega-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 44px;
  }
  .sc-mega-menu__inner { border-radius: 16px; }
  .sc-mega-menu__footer { border-radius: 0 0 16px 16px; }
  .navbar .sc-has-mega:hover > .sc-mega-menu { transform: translateX(-50%) translateY(0); }
  /* 5 groups in 3 columns: people | operations + admin | foundation + communication */
  .sc-mega-menu__group:nth-child(1) { grid-column: 3; grid-row: 1; }
  .sc-mega-menu__group:nth-child(2) { grid-column: 1; grid-row: 1 / span 2; }
  .sc-mega-menu__group:nth-child(3) { grid-column: 2; grid-row: 1; }
  .sc-mega-menu__group:nth-child(4) { grid-column: 3; grid-row: 2; }
  .sc-mega-menu__group:nth-child(5) { grid-column: 2; grid-row: 2; }
  .sc-mega-menu__footer { grid-row: 3; }
}
@media only screen and (max-width: 991.98px) {
  .sc-mega-menu__inner { display: block; padding: 6px 0 4px 30px; }
  .sc-mega-menu__group { padding-bottom: 10px; }
  .sc-mega-menu__title { margin-top: 8px; }
  .navbar .sc-mega-menu__link { margin: 0; padding: 5px 0; white-space: normal; }
  .sc-mega-menu__footer { margin: 4px 0 8px; padding: 12px 0 0; background: transparent; flex-direction: column; }
}

/* ── Grouped module grid (Department Portal) ───────────────────────── */
.sc-module-group { margin-top: 44px; }
.sc-module-group:first-child { margin-top: 10px; }
.sc-module-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 18px; }
.sc-module-group__head h3 { margin: 0; font-size: 22px; color: #0b2442; }
.sc-module-group__head p { margin: 0; font-size: 15px; color: #5b6b80; }
.portal-module-card__badge--new { background: #fff1e6 !important; color: #d9480f !important; }
.portal-module-card__formerly { display: block; margin: -4px 0 8px; font-size: 12px; font-weight: 600; color: #7a8aa0; }

/* ── Home page module band ─────────────────────────────────────────── */
.home-solution .module-grid { grid-template-columns: repeat(5, 1fr); }
.module-card { position: relative; }
.module-card__new {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ff8a3d;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.module-card--custom { border-style: dashed !important; }
@media (max-width: 991px) { .home-solution .module-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .home-solution .module-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Custom module call-to-action ──────────────────────────────────── */
.sc-custom-module {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 40px;
  padding: 30px 34px;
  border-radius: 20px;
  border: 1.5px dashed #9fc3ec;
  background: linear-gradient(135deg, #f4f9ff, #eef4ff);
}
.sc-custom-module__icon {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b2442;
  color: #fff;
  font-size: 26px;
}
.sc-custom-module__body { flex: 1; }
.sc-custom-module__body h3 { margin: 0 0 6px; font-size: 22px; color: #0b2442; }
.sc-custom-module__body p { margin: 0; font-size: 15px; line-height: 1.65; color: #4b5b70; }
.sc-custom-module .btn { flex: 0 0 auto; }
.module-section--tight { padding-top: 10px !important; padding-bottom: 60px !important; }
.module-section--tight .sc-custom-module { margin-top: 0; }
@media (max-width: 767px) {
  .sc-custom-module { flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 16px; }
  .sc-custom-module .btn { width: 100%; }
}

/* ── Module detail extras ──────────────────────────────────────────── */
.sc-module-facts { margin-top: 18px; }
.connection-chips a i { margin-right: 4px; opacity: .75; }
.module-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.module-cta .btn__outlined { background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, .7) !important; }
.module-cta .btn__outlined:hover { background: #fff !important; color: #0b2442 !important; }

.sc-faq { max-width: 820px; margin: 0 auto; }
.sc-faq__item {
  border: 1px solid #e3edf4;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 12px;
  padding: 0 22px;
}
.sc-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  position: relative;
  font-weight: 700;
  font-size: 17px;
  color: #0b2442;
}
.sc-faq__item summary::-webkit-details-marker { display: none; }
.sc-faq__item summary:after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--module-accent, #0092ff);
}
.sc-faq__item[open] summary:after { content: "\2212"; }
.sc-faq__item p { margin: 0 0 18px; font-size: 15px; line-height: 1.7; color: #4b5b70; }

/* ── Contact form: grouped module list ─────────────────────────────── */
.modules-dropdown__group {
  display: block;
  margin: 10px 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a97a8;
}
.modules-dropdown__group:first-child { margin-top: 0; }
