/* News / Blog Component */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.post-card {
  background: var(--color-base);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.post-card__img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-light);
}

.post-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-card__img {
  transform: scale(1.06);
}

.post-card__body {
  padding: var(--space-5);
}

.post-card__category {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-highlight);
  margin-bottom: var(--space-2);
}

.post-card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: var(--line-height-tight);
}

.post-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-4);
}

.post-card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

@media (max-width: 1024px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .news-grid { grid-template-columns: 1fr; } }

/* =============================================================================
   News Post / Article Page — np-* component styles
   ============================================================================= */

/* Reading progress bar */
.np-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-highlight);
  z-index: 9999;
  transition: width 80ms linear;
  border-radius: 0 2px 2px 0;
}

/* Article wrapper — accounts for fixed header */
.np-article {
  margin-top: calc(-1 * var(--header-height, 72px));
}

/* Hero image — full-bleed, flush with header */
.np-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: var(--header-height, 72px);
  background: var(--color-accent);
}

/* Aspect-ratio container prevents layout shift */
.np-hero__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  max-height: 560px;
}

.np-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.np-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(15,15,26,0.5) 100%);
  pointer-events: none;
}

/* When no hero image — still offset for header */
.np-article--no-hero .np-container {
  padding-top: calc(var(--header-height, 72px) + var(--space-10));
}

/* Main container */
.np-container {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-20);
}

/* Breadcrumb */
.np-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.np-breadcrumb a {
  color: var(--color-highlight);
  text-decoration: none;
  font-weight: 600;
}

.np-breadcrumb a:hover {
  text-decoration: underline;
}

.np-breadcrumb__sep {
  color: var(--color-border);
}

/* Article header */
.np-header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.np-category-badge {
  margin-bottom: var(--space-4);
}

.np-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.np-excerpt {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  border-left: 3px solid var(--color-highlight);
  padding-left: var(--space-4);
}

.np-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.np-meta__date,
.np-meta__read-time {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

.np-meta__date i,
.np-meta__read-time i {
  font-size: 0.85rem;
}

/* Article body / content */
.np-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
}

.np-content h2 {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.np-content h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.np-content h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.np-content p {
  margin-bottom: var(--space-6);
}

.np-content a {
  color: var(--color-highlight);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.np-content a:hover {
  opacity: 0.82;
}

/* Images inside content */
.np-content img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  display: block;
}

/* Video / iframe embeds inside content */
.np-content iframe,
.np-content video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  margin: var(--space-8) 0;
  display: block;
  border: none;
  box-shadow: var(--shadow-md);
}

/* Responsive iframe wrapper */
.np-content .video-embed,
.np-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-md);
  background: var(--color-accent);
}

.np-content .video-embed iframe,
.np-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  margin: 0;
  border-radius: var(--radius-md);
}

/* Blockquotes */
.np-content blockquote {
  border-left: 4px solid var(--color-highlight);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
  background: var(--color-bg-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
}

/* Lists */
.np-content ul,
.np-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
  list-style: revert;
}

.np-content li {
  margin-bottom: var(--space-2);
  line-height: 1.75;
}

/* Inline code */
.np-content code {
  font-family: monospace;
  background: var(--color-bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Code blocks */
.np-content pre {
  background: var(--color-accent);
  color: #e5e7eb;
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  margin-bottom: var(--space-6);
}

.np-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.9em;
}

/* Related posts section */
.np-related {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 2px solid var(--color-border);
}

.np-related__title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
  color: var(--color-text);
  border-left: 4px solid var(--color-highlight);
  padding-left: var(--space-4);
}

/* Related grid — 3-col on wide, narrows on smaller screens */
.np-related__grid {
  max-width: none !important;
}

@media (max-width: 640px) {
  .np-related__grid {
    grid-template-columns: 1fr !important;
  }
}

/* Social bar integration — single bordered section */
.np-social-bar-wrap {
  margin: var(--space-12) 0 0;
  padding: var(--space-6) 0 var(--space-8);
  border-top: 1px solid var(--color-border);
}

.np-social-bar-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .np-hero__img-wrap {
    aspect-ratio: 4 / 3;
    max-height: 280px;
  }
  .np-container {
    padding: var(--space-6) var(--space-4) var(--space-12);
  }
  .np-article--no-hero .np-container {
    padding-top: calc(var(--header-height, 72px) + var(--space-6));
  }
  .np-title {
    font-size: 1.75rem;
  }
  .np-content {
    font-size: 1rem;
  }
}

/* =============================================================================
   Feed post YouTube / Vimeo inline embed
   ============================================================================= */

.social-post__yt-embed {
  margin: var(--space-3) 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.social-post__yt-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  border-radius: var(--radius-md);
}

.social-post__yt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition-normal);
}

.social-post__yt-thumb-wrap:hover .social-post__yt-thumb {
  opacity: 0.85;
}

.social-post__yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform var(--transition-fast);
}

.social-post__yt-thumb-wrap:hover .social-post__yt-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
}

.social-post__yt-badge {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ff0000;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
}

.social-post__yt-badge--vimeo {
  background: #1ab7ea;
}

.social-post__yt-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.social-post__yt-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: var(--radius-md);
}

/* =============================================================================
   Trending news video card (tcard-news-video)
   ============================================================================= */

.tcard-news-video {
  display: flex;
  flex-direction: column;
}

.tcard-news-video__thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tcard-news-video__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition-normal), transform var(--transition-slow);
}

.tcard-news-video__thumb-wrap:hover .tcard-news-video__thumb {
  opacity: 0.85;
  transform: scale(1.03);
}

.tcard-news-video__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform var(--transition-fast);
}

.tcard-news-video__thumb-wrap:hover .tcard-news-video__play-btn {
  transform: translate(-50%, -50%) scale(1.12);
}

.tcard-news-video__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

.tcard-news-video__iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.tcard-news-video__iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.tcard-news-video__body {
  padding: var(--space-4) var(--space-5);
  background: var(--color-base);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--color-border);
  border-top: none;
}

.tcard-news-video__body .tcard-text__title {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  margin-bottom: var(--space-1);
}

.tcard-news-video__body .tcard-text__title:hover {
  color: var(--color-highlight);
}
