/* Styles for server-rendered Knowledge Base pages (see KbRenderer). Loaded ONLY on KB
   pages, so it may safely override the site header for the no-JS (stripped-hydration) case. */

.kb-article,
.kb-tiles,
.kb-grid,
.kb-stub,
.kb-crumbs {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

.kb-crumbs { font-size: 14px; color: #5a6b8c; padding-top: 28px; }
.kb-crumbs a { color: #2f6fed; text-decoration: none; }

/* Navy, search-first hero (matches the retired KnowledgeBase page). */
.kb-hero2 {
  background: linear-gradient(180deg, #223055 0%, #192442 100%);
  color: #fff;
  padding: 56px 24px 58px;
}
.kb-hero2-inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.kb-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7aa5ff;
}
.kb-hero2 h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 10px 0 14px;
  color: #fff;
}
.kb-hero2-sub {
  color: #b9c8e4;
  font-size: 16px;
  margin: 0 0 26px;
}
.kb-search-wrap {
  position: relative;
}
.kb-search-ic {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #5a6b88;
  pointer-events: none;
}
#kb-search {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 18px 15px 46px;
  font-size: 17px;
  color: #0f172a;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(9, 16, 38, 0.3);
}
#kb-search:focus {
  outline: 2px solid #5691ff;
  outline-offset: 2px;
}
.kb-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}
.kb-popular-label {
  color: #8ea1c2;
  font-size: 13.5px;
  margin-right: 2px;
}
.kb-pop {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.kb-pop:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* eConnect University bar. */
.kb-ecu-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #2f6fed, #2461d6);
  color: #fff;
  text-decoration: none;
  padding: 15px 24px;
}
.kb-ecu-bar-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15.5px;
  max-width: 900px;
}
.kb-ecu-ic {
  font-size: 20px;
}
.kb-ecu-bar-btn {
  flex-shrink: 0;
  background: #fff;
  color: #223055;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kb-ecu-bar:hover .kb-ecu-bar-btn {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

/* eConnect University — full section. */
.kb-ecu {
  background: linear-gradient(180deg, #192442 0%, #223055 100%);
  color: #fff;
  margin-top: 8px;
}
.kb-ecu-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.kb-eyebrow-accent {
  color: #5691ff;
}
.kb-ecu h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 10px 0 16px;
  color: #fff;
}
.kb-ecu-main > p {
  color: #a9bada;
  line-height: 1.7;
  margin: 0 0 20px;
}
.kb-ecu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
}
.kb-ecu-list li {
  position: relative;
  padding-left: 26px;
  color: #cdd9ec;
  font-size: 15px;
}
.kb-ecu-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #36c2c9;
  font-weight: 800;
}
.kb-ecu-cta {
  display: inline-block;
  background: #2f6fed;
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.kb-ecu-cta:hover {
  background: #2461d6;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(47, 111, 237, 0.4);
}
.kb-ecu-card {
  background: #192442;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 28px;
}
.kb-ecu-stat {
  display: block;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.kb-ecu-stat-label {
  display: block;
  color: #9fb2d4;
  margin-top: 6px;
}
.kb-ecu-divider {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 18px 0;
}
.kb-ecu-note {
  display: block;
  color: #cdd9ec;
  font-size: 14.5px;
}
@media (max-width: 720px) {
  .kb-ecu-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kb-pop,
  .kb-ecu-bar-btn,
  .kb-ecu-cta {
    transition: none;
  }
  .kb-pop:hover,
  .kb-ecu-cta:hover,
  .kb-ecu-bar:hover .kb-ecu-bar-btn {
    transform: none;
  }
}

.kb-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-block: 40px;
}
/* Photo-backed category tile: image + gradient overlay + label, with hover motion. */
.kb-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(15, 24, 48, 0.1);
  isolation: isolate;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.32s ease;
}
.kb-tile-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0f1830 center / cover no-repeat;
  transform: scale(1.03);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.kb-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 16, 38, 0.12) 0%, rgba(9, 16, 38, 0.5) 52%, rgba(9, 16, 38, 0.9) 100%);
  transition: background 0.32s ease;
}
.kb-tile-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.kb-tile-body::before {
  content: '';
  width: 32px;
  height: 3px;
  margin-bottom: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2f6fed, #36c2c9);
  transition: width 0.32s ease;
}
.kb-tile-name {
  font-weight: 800;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.kb-tile-count {
  margin-top: 5px;
  font-size: 13px;
  color: #d4e2ff;
  opacity: 0.92;
}
.kb-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(15, 24, 48, 0.3);
}
.kb-tile:hover .kb-tile-img {
  transform: scale(1.12);
}
.kb-tile:hover::after {
  background: linear-gradient(180deg, rgba(9, 16, 38, 0.05) 0%, rgba(19, 44, 96, 0.48) 48%, rgba(9, 16, 38, 0.92) 100%);
}
.kb-tile:hover .kb-tile-body::before {
  width: 68px;
}
.kb-tile:focus-visible {
  outline: 3px solid #36c2c9;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .kb-tile,
  .kb-tile-img,
  .kb-tile::after,
  .kb-tile-body::before {
    transition: none;
  }
  .kb-tile:hover {
    transform: none;
  }
  .kb-tile:hover .kb-tile-img {
    transform: scale(1.03);
  }
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding-block: 32px;
}
.kb-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f2;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.kb-card:hover {
  box-shadow: 0 14px 34px rgba(15, 24, 48, 0.18);
  transform: translateY(-4px);
  border-color: #cfe0ff;
}
.kb-card-thumb {
  aspect-ratio: 16 / 9;
  background: #0f1830 center / cover no-repeat;
  transition: transform 0.4s ease;
}
.kb-card:hover .kb-card-thumb { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  .kb-card,
  .kb-card-thumb { transition: none; }
  .kb-card:hover { transform: none; }
  .kb-card:hover .kb-card-thumb { transform: none; }
}
.kb-card-type {
  margin: 14px 16px 0;
  font-size: 12px;
  font-weight: 700;
  color: #1fa0b4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kb-card-title { margin: 6px 16px; font-weight: 700; font-size: 16.5px; }
.kb-card-summary { margin: 0 16px 16px; color: #5a6b8c; font-size: 14px; }

.kb-article h1 { font-size: clamp(26px, 3.5vw, 36px); margin: 14px 0; }
.kb-summary { color: #5a6b8c; font-size: 18px; margin: 0 0 22px; }
.kb-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0f1830;
}
.kb-video iframe,
.kb-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kb-body { max-width: 760px; margin-top: 28px; line-height: 1.7; }
.kb-body p { margin: 0 0 16px; }
.kb-empty { text-align: center; color: #7386a6; padding: 48px; }

/* Reserved-section "coming soon" panel (Blog, White Papers). Reads as intentional, not broken. */
.kb-stub {
  margin-block: 8px 56px;
  padding: 48px 40px;
  border: 1px solid #e2e8f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3fd 100%);
  text-align: center;
}
.kb-stub-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1fa0b4;
  background: rgba(31, 160, 180, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
}
.kb-stub h2 { font-size: clamp(22px, 3vw, 28px); margin: 18px 0 10px; color: #16203c; }
.kb-stub p { color: #5a6b8c; font-size: 16px; max-width: 560px; margin: 0 auto 24px; line-height: 1.6; }
.kb-stub-cta {
  display: inline-block;
  font-weight: 700;
  color: #2f6fed;
  text-decoration: none;
}
.kb-stub-cta:hover { text-decoration: underline; }

/* Reserved-section home tiles (no photo): give the tile a branded fill so the white
   .kb-tile-name text stays legible without a background image. */
.kb-stub-tile { background: linear-gradient(140deg, #1c3a72 0%, #0f1830 100%); }

.kb-hidden { display: none !important; }
.kb-home-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; padding-block: 32px; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.kb-home-empty { text-align: center; color: #7386a6; padding: 40px; }

/* No-JS fallback: hydration is stripped on KB pages, so the MUI mobile drawer button is
   inert. Show the primary nav at every width and hide the dead hamburger. */
@media (max-width: 1023px) {
  nav[aria-label='Primary'] { display: flex !important; flex-wrap: wrap; }
  [aria-label='Open menu'] { display: none !important; }
}
