/* =========================================================================
   News Stream Pro  -  scoped under .opc-nsp. Editorial / grid news + video.
   ========================================================================= */
.opc-nsp {
  --nsp-accent: #0090ff;
  --nsp-accent-dark: #006fc7;
  --nsp-ink: #17212d;
  --nsp-text: #3f4a56;
  --nsp-muted: #718096;
  --nsp-line: #dfe5eb;
  --nsp-soft: #f6f8fa;
  --nsp-gap: 24px;
  --nsp-max-width: 1240px;
  width: 100%;
  max-width: var(--nsp-max-width);
  margin: 0 auto;
  color: var(--nsp-text);
}

.opc-nsp,
.opc-nsp * { box-sizing: border-box; }
.opc-nsp a { color: inherit; }

/* ------------------------------------------------------------------ Header */
.opc-nsp__header {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.opc-nsp__line { height: 1px; background: var(--nsp-line); }

.opc-nsp__header p {
  margin: 0 0 3px;
  color: var(--nsp-accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.opc-nsp__header h2 {
  margin: 0;
  color: var(--nsp-ink);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
}

/* ------------------------------------------------------------------- Tabs */
.opc-nsp__tools {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: var(--nsp-gap);
  border-bottom: 1px solid var(--nsp-line);
}

.opc-nsp__tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.opc-nsp__tabs::-webkit-scrollbar { display: none; }

.opc-nsp__tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 11px;
  border: 0;
  background: transparent;
  color: var(--nsp-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.opc-nsp__tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--nsp-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.opc-nsp__tab:hover,
.opc-nsp__tab:focus-visible,
.opc-nsp__tab.is-active { color: var(--nsp-ink); }
.opc-nsp__tab.is-active::after { transform: scaleX(1); }

.opc-nsp__all {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 0 11px;
  color: var(--nsp-accent-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.opc-nsp__all i { font-size: 12px; transition: transform 0.2s ease; }
.opc-nsp__all:hover i,
.opc-nsp__all:focus i { transform: translate(2px, -2px); }

/* ----------------------------------------------------------------- Layout */
.opc-nsp__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.82fr);
  gap: 0 var(--nsp-gap);
  align-items: start;
}

.opc-nsp--grid .opc-nsp__layout,
.opc-nsp[data-nsp-featured="false"] .opc-nsp__layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nsp-gap);
}

.opc-nsp__list { grid-column: 2; min-width: 0; scrollbar-gutter: stable; }
.opc-nsp__list.has-scroll-limit { padding-right: 10px; }
.opc-nsp__list.has-scroll-limit::-webkit-scrollbar { width: 6px; }
.opc-nsp__list.has-scroll-limit::-webkit-scrollbar-thumb { border-radius: 999px; background: #c8d2dc; }

/* ------------------------------------------------------------------- Card */
.opc-nsp__card {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--nsp-line);
  animation: opc-nsp-in 0.28s ease both;
}

.opc-nsp__card[hidden] { display: none; }

.opc-nsp__list .opc-nsp__card:first-child { border-top: 0; padding-top: 0; }

.opc-nsp__card.is-featured {
  display: flex;
  grid-column: 1;
  flex-direction: column;
  align-self: start;
  padding: 0 var(--nsp-gap) 0 0;
  border-top: 0;
  border-right: 1px solid var(--nsp-line);
}

/* Grid / no-feature cards become bordered boxes */
.opc-nsp--grid .opc-nsp__card,
.opc-nsp[data-nsp-featured="false"] .opc-nsp__card {
  display: flex;
  grid-column: auto;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--nsp-line);
  border-radius: 8px;
}

/* ------------------------------------------------------------------ Media */
.opc-nsp__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 164px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--nsp-soft);
  text-decoration: none;
}

.opc-nsp__card.is-featured .opc-nsp__media { width: 100%; aspect-ratio: 16 / 7.4; }
.opc-nsp--grid .opc-nsp__media,
.opc-nsp[data-nsp-featured="false"] .opc-nsp__media { width: 100%; aspect-ratio: 16 / 9; }

.opc-nsp--ratio-wide .opc-nsp__card.is-featured .opc-nsp__media { aspect-ratio: 16 / 9; }
.opc-nsp--ratio-landscape .opc-nsp__card.is-featured .opc-nsp__media { aspect-ratio: 4 / 3; }
.opc-nsp--ratio-square .opc-nsp__card.is-featured .opc-nsp__media { aspect-ratio: 1 / 1; }

.opc-nsp__media picture { display: flex; width: 100%; height: 100%; }

.opc-nsp__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transition: transform 0.35s ease;
}

.opc-nsp--fit-contain .opc-nsp__media img {
  padding: 8px;
  background: #fff;
  object-fit: contain;
}

.opc-nsp__card:hover .opc-nsp__media img,
.opc-nsp__card:focus-within .opc-nsp__media img { transform: scale(1.03); }

.opc-nsp__placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #c2cad3;
  font-size: 36px;
}

/* -------------------------------------------------------------- Video play */
.opc-nsp__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 18px;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.opc-nsp__play i { margin-left: 3px; }
.opc-nsp__card:hover .opc-nsp__play { background: var(--nsp-accent); transform: translate(-50%, -50%) scale(1.06); }
.opc-nsp__card.is-featured .opc-nsp__play { width: 72px; height: 72px; font-size: 24px; }

/* ------------------------------------------------------------------- Body */
.opc-nsp__body { display: flex; flex-direction: column; min-width: 0; }
.opc-nsp__card.is-featured .opc-nsp__body { padding: 22px 0 4px; }
.opc-nsp--grid .opc-nsp__body,
.opc-nsp[data-nsp-featured="false"] .opc-nsp__body { flex: 1 1 auto; padding: 18px; }

.opc-nsp__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--nsp-muted);
  font-size: 11px;
  line-height: 1.3;
}

.opc-nsp__meta span { color: var(--nsp-accent-dark); font-weight: 700; text-transform: uppercase; }
.opc-nsp__meta span::after { content: "/"; margin-left: 7px; color: #aeb8c2; }

.opc-nsp__card h3 {
  margin: 0;
  color: var(--nsp-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.opc-nsp__card.is-featured h3 { font-size: 30px; line-height: 1.22; }
.opc-nsp__card h3 a { text-decoration: none; transition: color 0.2s ease; }
.opc-nsp__card h3 a:hover,
.opc-nsp__card h3 a:focus { color: var(--nsp-accent-dark); text-decoration: none; }

.opc-nsp__card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--nsp-muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.opc-nsp__card.is-featured p {
  max-width: 680px;
  margin-top: 11px;
  font-size: 15px;
  -webkit-line-clamp: 3;
}

.opc-nsp__read-more {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--nsp-accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.opc-nsp__card.is-featured .opc-nsp__read-more { margin-top: 18px; padding-top: 0; font-size: 14px; }
.opc-nsp__read-more i { font-size: 12px; transition: transform 0.2s ease; }
.opc-nsp__read-more:hover i,
.opc-nsp__read-more:focus i { transform: translateX(3px); }

/* ------------------------------------------------------------------ Empty */
.opc-nsp__empty {
  margin: 0;
  padding: 56px 24px;
  border: 1px dashed var(--nsp-line);
  color: var(--nsp-muted);
  text-align: center;
}

/* --------------------------------------------------------------- Lightbox */
.opc-nsp__lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.opc-nsp__lightbox[hidden] { display: none; }
.opc-nsp__lightbox-backdrop { position: absolute; inset: 0; background: rgba(8, 13, 22, 0.82); }

.opc-nsp__lightbox-dialog {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
}

.opc-nsp__lightbox-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.opc-nsp__lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.opc-nsp__lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.opc-nsp__lightbox-close:hover,
.opc-nsp__lightbox-close:focus { background: rgba(255, 255, 255, 0.28); }

/* ------------------------------------------------------------------ Preview */
.opc-nsp-preview {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-areas: "f l" "c c";
  gap: 14px;
  padding: 22px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #fff;
}

.opc-nsp-preview__feature { grid-area: f; aspect-ratio: 16 / 9; border-radius: 6px; background: linear-gradient(135deg, #eef4fb, #fff); }
.opc-nsp-preview__list { grid-area: l; display: flex; flex-direction: column; gap: 8px; }
.opc-nsp-preview__list span { height: 28px; border-radius: 4px; background: #eef2f6; }
.opc-nsp-preview strong { grid-area: c; color: #1f2933; }

@keyframes opc-nsp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 991px) {
  .opc-nsp__layout { grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr); }
  .opc-nsp__card { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .opc-nsp__media { width: 120px; }
  .opc-nsp__card:not(.is-featured) p { display: none; }
  .opc-nsp--grid .opc-nsp__layout,
  .opc-nsp[data-nsp-featured="false"] .opc-nsp__layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .opc-nsp__header p { display: none; }
  .opc-nsp__header h2 { font-size: 24px; }
  .opc-nsp__tools { display: block; margin-bottom: 20px; }
  .opc-nsp__all { display: none; }
  .opc-nsp__layout,
  .opc-nsp--grid .opc-nsp__layout,
  .opc-nsp[data-nsp-featured="false"] .opc-nsp__layout { display: block; }
  .opc-nsp__list { padding-right: 0; }
  .opc-nsp__card,
  .opc-nsp--grid .opc-nsp__card,
  .opc-nsp[data-nsp-featured="false"] .opc-nsp__card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--nsp-line);
    border-radius: 0;
  }
  .opc-nsp__card.is-featured { display: flex; padding: 0 0 8px; border: 0; }
  .opc-nsp__media,
  .opc-nsp--grid .opc-nsp__media,
  .opc-nsp[data-nsp-featured="false"] .opc-nsp__media { width: 112px; aspect-ratio: 4 / 3; }
  .opc-nsp__card.is-featured .opc-nsp__media { width: 100%; aspect-ratio: 16 / 9; }
  .opc-nsp__card.is-featured h3 { font-size: 22px; }
  .opc-nsp__card h3 { font-size: 16px; }
  .opc-nsp__card:not(.is-featured) .opc-nsp__read-more { display: none; }
  .opc-nsp__play { width: 44px; height: 44px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .opc-nsp *, .opc-nsp *::before, .opc-nsp *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
