/* ═══════════════════════════════════════════════════════════
   Company News & Updates Styles
═══════════════════════════════════════════════════════════ */

/* ── Feed Container ── */
.news-feed-container {
  padding: 20px 16px 100px;
  max-width: 900px;
  margin: 0 auto;
}

.news-feed-container .view-header {
  margin-bottom: 20px;
}

.news-feed-container .view-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* ── Card Grid ── */
.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

@media (max-width: 640px) {
  .news-feed {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .news-feed-container {
    padding: 16px 12px 100px;
  }
  .news-feed-container .view-title {
    font-size: 1.5rem;
  }
}

/* ── News Card ── */
.news-card {
  background: var(--black);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.news-card:active {
  transform: translateY(-2px);
}

/* ── Card Image ── */
.news-card-image-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--dark-gray);
  overflow: hidden;
}

.news-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}

/* ── Pin Badge ── */
.news-card-pin {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: var(--black);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ── Card Content ── */
.news-card-content {
  padding: 16px;
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.news-card-meta {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 500;
}

/* ── Card Snippet (hidden by default, shown on desktop pinned) ── */
.news-card-snippet {
  display: none;
}

/* ── Empty State ── */
.news-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.news-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.4;
}

.news-empty h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.news-empty p {
  font-size: 0.95rem;
}

/* ── Detail View ── */
.news-detail-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

.news-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 0;
  margin-bottom: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.news-back-btn:hover {
  color: var(--gold-dark);
}

.news-detail-hero {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: block;
}

.news-detail-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.1;
}

.news-detail-meta {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.news-detail-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-line;
}

.news-detail-not-found {
  text-align: center;
  padding: 60px 20px;
}

.news-detail-not-found i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
  opacity: 0.4;
}

.news-detail-not-found h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.news-detail-not-found a {
  color: var(--gold);
  font-weight: 600;
}

@media (max-width: 640px) {
  .news-detail-container {
    padding: 16px 12px 100px;
  }
  .news-detail-title {
    font-size: 1.6rem;
  }
  .news-detail-hero {
    max-height: 250px;
    border-radius: var(--radius-sm);
  }
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP STYLES (768px+)
═══════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  /* Widen news container to fill available space */
  .news-feed-container {
    max-width: 100%;
    padding: 24px 0 100px;
  }

  /* 2-column card grid */
  .news-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Subtle border + gold hover glow */
  .news-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .news-card:hover {
    border-color: rgba(232, 168, 2, 0.3);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  }

  /* Featured pinned post — full width, side-by-side layout */
  .news-card.pinned-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .news-card.pinned-card .news-card-image-wrap {
    height: 100%;
    min-height: 280px;
  }

  .news-card.pinned-card .news-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
  }

  .news-card.pinned-card .news-card-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
  }

  .news-card.pinned-card .news-card-meta {
    font-size: 0.9rem;
  }

  /* Show snippet on pinned card only */
  .news-card.pinned-card .news-card-snippet {
    font-size: 0.9rem;
    color: var(--text-secondary, #aaa);
    margin-top: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Override main-content width constraints for news views */
  #view-news.main-content,
  #view-news-detail.main-content {
    max-width: 1200px;
    padding-left: 40px;
    padding-right: 40px;
  }

  /* Detail view — slightly wider */
  .news-detail-container {
    max-width: 800px;
    padding: 24px 0 100px;
  }
}

/* ═══════════════════════════════════════════════════════════
   LARGE DESKTOP (1280px+)
═══════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* 3-column grid on wide screens */
  .news-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  /* Even wider content area */
  #view-news.main-content,
  #view-news-detail.main-content {
    max-width: 1400px;
    padding-left: 60px;
    padding-right: 60px;
  }

  .news-detail-container {
    max-width: 860px;
  }

  .news-detail-title {
    font-size: 2.4rem;
  }

  .news-detail-body {
    font-size: 1.05rem;
    line-height: 1.8;
  }
}
