/* =========================================================
   PROMPT 4D, D2 - Insights category browser. Insights page only.
   Prompt 4E, E7/E11: open-row left nav (no cards), a sliding active
   background, icons moved into the nav rows, no repeated panel
   header, and a panel height that always exactly matches the nav's.
   ========================================================= */
/* The components below set their own `display` at the same
   specificity as the UA stylesheet's `[hidden]{display:none}` - since
   this stylesheet loads later, it would otherwise win and the
   `hidden` attribute would do nothing visually even though the JS/PHP
   state (the attribute itself) is correct - caught in verification. */
.dv-ib-card[hidden],
.dv-ib-empty[hidden] {
  display: none !important;
}

.dv-ib {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 1100px) {
  /* E7: one grid row, stretch - the panel's height always matches the
     nav's real height exactly, the nav is the height source. */
  .dv-ib {
    grid-template-columns: 280px 1fr;
    grid-template-rows: 1fr;
    align-items: stretch;
    gap: 32px;
  }
}

.dv-ib-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, .28);
}
@media (max-width: 1099px) {
  /* E7: two-column grid of the same open rows under 1100px, lines
     between them both ways. */
  .dv-ib-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .dv-ib-nav-item:nth-child(odd) { border-right: 1px solid rgba(16, 38, 62, .12); }
}
@media (max-width: 479px) {
  .dv-ib-nav { grid-template-columns: 1fr; }
  .dv-ib-nav-item:nth-child(odd) { border-right: none; }
}

/* The sliding active background - one element, repositioned/resized
   by dv-4d-insights.js to track whichever row is active, same pattern
   as the Home FAQ's indicator. Sits behind the row's own text/icon. */
.dv-ib-nav-active-bg {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  background: #167b8c;
  box-shadow: 0 14px 30px rgba(16, 38, 62, .32);
  opacity: 0;
  transition: transform .35s var(--m-ease-out), height .35s var(--m-ease-out), opacity .25s var(--m-ease-out);
}
.dv-ib-nav-active-bg.is-ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .dv-ib-nav-active-bg { transition: opacity .25s var(--m-ease-out); }
}

.dv-ib-nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s var(--m-ease-out), box-shadow .2s var(--m-ease-out);
}
/* E7: not a card, just a faint tint + soft shadow so hover still
   reads as clickable. Never on the active row (its own blue fill
   already does that job). */
.dv-ib-nav-item:hover:not(.is-active),
.dv-ib-nav-item:focus-visible:not(.is-active) {
  background: #167B8C;
  box-shadow: 0 6px 18px rgba(16,38,62, .14);
}
/* E11: the icon column, 28px wide, white at 85% - full white on the
   active row. */
.dv-ib-nav-icon {
  flex: 0 0 28px;
  width: 28px;
  font-size: 1.25rem;
  text-align: center;
  color: rgba(255, 255, 255, .85);
  transition: color .2s var(--m-ease-out);
}
.dv-ib-nav-item.is-active .dv-ib-nav-icon { color: #fff; }
.dv-ib-nav-label { flex: 1 1 auto; }

.dv-ib-panel {
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1100px) {
  /* E7: the panel never grows past the nav's height - cards scroll
     inside it (thin custom scrollbar) once they need more room. */
  .dv-ib-panel {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .3) transparent;
  }
  .dv-ib-panel::-webkit-scrollbar { width: 6px; }
  .dv-ib-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .3); border-radius: 999px; }
}
@media (max-width: 1099px) {
  /* E7: natural height under 1100px - no inner scrolling on touch screens. */
  .dv-ib-panel { overflow: visible; }
}

/* E7: a 2-column grid of compact cards for 2+ articles, or a single
   wide horizontal card for exactly one - never masonry. */
.dv-ib-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  transition: opacity .2s var(--m-ease-out);
}
.dv-ib-cards--single { grid-template-columns: 1fr; }
@media (max-width: 699px) {
  .dv-ib-cards { grid-template-columns: 1fr; }
}

.dv-ib-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(16, 38, 62, .16);
}
.dv-ib-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
/* Compact (2-column grid) card: image a fixed 16:9, ~150px tall. */
.dv-ib-card-media {
  aspect-ratio: 16 / 9;
  max-height: 150px;
  overflow: hidden;
  background: var(--navy);
}
/* Single-article card: horizontal, image fills the left 40%. */
.dv-ib-cards--single .dv-ib-card-link { flex-direction: row; }
.dv-ib-cards--single .dv-ib-card-media {
  flex: 0 0 40%;
  max-height: none;
  aspect-ratio: auto;
  align-self: stretch;
}
.dv-ib-cards--single .dv-ib-card-body { flex: 1 1 auto; }
@media (max-width: 599px) {
  .dv-ib-cards--single .dv-ib-card-link { flex-direction: column; }
  .dv-ib-cards--single .dv-ib-card-media { flex: none; aspect-ratio: 16 / 9; max-height: 220px; }
}
.dv-ib-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dv-ib-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .78);
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
}
.dv-ib-card-body { padding: 20px 22px 24px; }
.dv-ib-card-cat {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.dv-ib-card-title {
  margin-top: .5rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.dv-ib-card-excerpt {
  margin-top: .5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dv-ib-card-read {
  margin-top: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--teal-deep);
}

.dv-ib-empty {
  color: rgba(255, 255, 255, .78);
  font-size: 1.0625rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .dv-ib-nav-item,
  .dv-ib-cards {
    transition: none;
  }
}
