/* CSR News & Events Stylesheet
   Follows CSR design tokens: dark theme, crisp typography, clean cards, no clutter.
*/

/* --- Base Layout & Typography --- */
.ne-header {
  margin-block-end: 2.5rem;
  padding-block-end: 1.5rem;
  border-block-end: 1px solid var(--border, #223854);
}

.ne-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent, #5ee7d5);
  margin-block-end: 0.5rem;
}

.ne-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text, #e6edf3);
  line-height: 1.15;
  margin-block-end: 0.75rem;
}

.ne-lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--muted, #8b9eb5);
  max-width: 48rem;
  line-height: 1.5;
  margin: 0;
}

/* --- Section Layouts --- */
.ne-section {
  margin-block-end: 3.5rem;
}

.ne-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block-end: 1.5rem;
  border-block-end: 1px solid rgba(255, 255, 255, 0.06);
  padding-block-end: 0.75rem;
}

.ne-section-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text, #e6edf3);
  margin: 0;
}

.ne-view-all-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent, #5ee7d5);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ne-view-all-link:hover {
  text-decoration: underline;
  color: #7df5e6;
}

/* --- Grids --- */
.ne-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}

.ne-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
}

/* --- Featured / Next Event Hero Card --- */
.ne-hero-card {
  background: linear-gradient(135deg, rgba(94, 231, 213, 0.06), var(--panel, #0d1726) 60%);
  border: 1px solid var(--accent, #5ee7d5);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-block-end: 3rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.ne-hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-block-end: 1rem;
}

.ne-hero-title {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  font-weight: 700;
  color: #fff;
  margin-block-end: 0.75rem;
  line-height: 1.2;
}

.ne-hero-summary {
  font-size: 1.0625rem;
  color: var(--muted, #8b9eb5);
  line-height: 1.6;
  max-width: 52rem;
  margin-block-end: 1.25rem;
}

.ne-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text, #e6edf3);
  margin-block-end: 1.5rem;
  padding-block: 0.75rem;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.ne-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ne-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* --- Card Components (News & Events) --- */
.ne-card {
  background: var(--panel, #0d1726);
  border: 1px solid var(--border, #223854);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  height: 100%;
}

.ne-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 231, 213, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.ne-card.featured {
  border-color: rgba(94, 231, 213, 0.6);
  background: linear-gradient(180deg, rgba(94, 231, 213, 0.03), var(--panel, #0d1726) 30%);
}

.ne-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--panel-subtle, #132238);
  border-block-end: 1px solid var(--border, #223854);
}

.ne-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ne-card-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted, #8b9eb5);
  margin-block-end: 0.75rem;
}

.ne-card-title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  margin-block-end: 0.625rem;
}

.ne-card-title a {
  color: var(--text, #e6edf3);
  text-decoration: none;
}

.ne-card-title a:hover {
  color: var(--accent, #5ee7d5);
}

.ne-card-summary {
  font-size: 0.9375rem;
  color: var(--muted, #8b9eb5);
  line-height: 1.5;
  margin-block-end: 1rem;
  flex-grow: 1;
}

.ne-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-block-top: 0.75rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8125rem;
  color: var(--muted, #8b9eb5);
}

/* --- Badges & Status Indicators --- */
.ne-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.ne-badge.live {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.ne-badge.upcoming {
  background: rgba(94, 231, 213, 0.15);
  color: var(--accent, #5ee7d5);
  border: 1px solid rgba(94, 231, 213, 0.4);
}

.ne-badge.completed {
  background: rgba(139, 158, 181, 0.15);
  color: var(--muted, #8b9eb5);
  border: 1px solid rgba(139, 158, 181, 0.3);
}

.ne-badge.cancelled {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.ne-badge.type-update {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ne-badge.type-announcement {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.ne-badge.type-story {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ne-badge.type-media {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.ne-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 6px #ef4444;
  animation: ne-pulse 1.8s infinite ease-in-out;
}

@keyframes ne-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* --- Platform Reference Chips --- */
.ne-platform-chips {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ne-chip {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted, #8b9eb5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

/* --- Buttons --- */
.ne-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.ne-btn-primary {
  background: var(--accent, #5ee7d5);
  color: #080f1b;
  font-weight: 700;
}

.ne-btn-primary:hover {
  background: #7df5e6;
  box-shadow: 0 2px 10px rgba(94, 231, 213, 0.3);
}

.ne-btn-secondary {
  background: transparent;
  color: var(--text, #e6edf3);
  border-color: var(--border, #223854);
}

.ne-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(94, 231, 213, 0.4);
}

/* --- Detail Pages (Article & Event) --- */
.ne-detail-header {
  margin-block-end: 2rem;
  padding-block-end: 1.5rem;
  border-block-end: 1px solid var(--border, #223854);
}

.ne-detail-title {
  font-size: clamp(1.875rem, 4vw, 2.625rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-block-end: 1rem;
}

.ne-detail-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  color: var(--muted, #8b9eb5);
}

.ne-media-frame {
  margin-block: 1.75rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel, #0d1726);
  border: 1px solid var(--border, #223854);
}

.ne-media-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.ne-media-caption {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted, #8b9eb5);
  background: var(--panel-subtle, #132238);
  border-block-start: 1px solid var(--border, #223854);
  margin: 0;
}

/* --- Video Embed Components --- */
.ne-video-section {
  margin-block: 2rem;
}

.ne-video-section--feed {
  margin-block: 1rem 1.25rem;
}

.ne-video-frame {
  margin-inline: auto;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border, #223854);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.ne-video-frame--vertical {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9 / 16;
  max-height: 620px;
}

.ne-video-frame--widescreen {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
}

.ne-video-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ne-video-fallback-bar {
  margin-block-start: 1rem;
  display: flex;
  justify-content: center;
}

.ne-video-fallback-bar--feed {
  margin-block-start: 0.75rem;
}

.ne-video-fallback-bar--feed .ne-btn {
  font-size: 0.8125rem;
  padding: 0.35rem 0.85rem;
}

/* --- Feed Grid & Rich Feed Cards --- */
.ne-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 1.75rem;
}

.ne-card--feed {
  display: flex;
  flex-direction: column;
}

.ne-card--feed .ne-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.5rem;
}

.ne-card--feed .ne-card-title {
  font-size: 1.25rem;
  margin-block-end: 0.5rem;
}

.ne-card--feed .ne-card-summary {
  margin-block-end: 0.75rem;
  flex-grow: 0;
}

.ne-card--feed .ne-video-frame--vertical {
  max-width: 320px;
  max-height: 570px;
}

.ne-card--feed .ne-video-frame--widescreen {
  max-width: 100%;
}

.ne-card--feed .ne-card-footer {
  margin-block-start: auto;
  padding-block-start: 1rem;
}

/* Feed Image Frame */
.ne-feed-image-frame {
  margin-block: 1rem 1.25rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel-subtle, #132238);
  border: 1px solid var(--border, #223854);
}

.ne-feed-image {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.ne-chip--link {
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ne-chip--link:hover {
  color: var(--accent, #5ee7d5);
  border-color: rgba(94, 231, 213, 0.4);
}

.ne-content-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text, #e6edf3);
  max-width: 48rem;
  margin-block-end: 3rem;
}

.ne-content-body h2 {
  font-size: 1.625rem;
  font-weight: 700;
  color: #fff;
  margin-block-start: 2rem;
  margin-block-end: 0.75rem;
}

.ne-content-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent, #5ee7d5);
  margin-block-start: 1.75rem;
  margin-block-end: 0.5rem;
}

.ne-content-body p {
  margin-block-end: 1.25rem;
}

.ne-content-body ul, .ne-content-body ol {
  margin-block-end: 1.25rem;
  padding-inline-start: 1.5rem;
}

.ne-content-body li {
  margin-block-end: 0.4rem;
}

.ne-content-body blockquote {
  border-inline-start: 3px solid var(--accent, #5ee7d5);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--panel-subtle, #132238);
  border-radius: 0 4px 4px 0;
}

.ne-content-body blockquote p {
  font-style: italic;
  color: #cbd5e1;
  margin: 0;
}

.ne-content-body code {
  font-family: Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #f1f5f9;
}

.ne-cta-box {
  margin-block: 2.5rem;
  padding: 1.5rem;
  background: var(--panel, #0d1726);
  border: 1px solid rgba(94, 231, 213, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.ne-preview-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  margin-block-end: 1.5rem;
  font-size: 0.9375rem;
}

/* --- Filter Bar & Pagination --- */
.ne-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-block-end: 2rem;
}

.ne-filter-pill {
  font-size: 0.875rem;
  color: var(--muted, #8b9eb5);
  background: var(--panel, #0d1726);
  border: 1px solid var(--border, #223854);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ne-filter-pill:hover,
.ne-filter-pill.active {
  color: #080f1b;
  background: var(--accent, #5ee7d5);
  border-color: var(--accent, #5ee7d5);
  font-weight: 600;
}

.ne-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-block-start: 3rem;
  font-size: 0.9375rem;
}

/* --- Empty States --- */
.ne-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--panel, #0d1726);
  border: 1px dashed var(--border, #223854);
  border-radius: 6px;
  color: var(--muted, #8b9eb5);
}

.ne-empty-state p {
  margin-block-end: 1rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 640px) {
  .ne-hero-card {
    padding: 1.25rem;
  }
  .ne-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ne-hero-actions .ne-btn {
    width: 100%;
    text-align: center;
  }
  .ne-cta-box {
    flex-direction: column;
    align-items: stretch;
  }
  .ne-cta-box .ne-btn {
    width: 100%;
  }
  .ne-video-frame--vertical {
    max-width: 325px;
  }
  .ne-feed-grid {
    grid-template-columns: 1fr;
  }
  .ne-card--feed .ne-card-body {
    padding: 1.25rem;
  }
}
