/* ═══════════════════════════════════════════════════════════════════════════
   PGI-Data — News Page Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Nav active link ─────────────────────────────────────────────────────── */
.nav__active {
  color: var(--cyan) !important;
  position: relative;
}
.nav__active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
  border-radius: 1px;
}

/* ── Hero floating label chips (news-specific ambient element) ───────────── */
.news-chip {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  animation: chipFloat 5s ease-in-out infinite;
  pointer-events: none;
}

.news-chip--1 { top: 25%; left: 12%;  animation-delay: 0s;   }
.news-chip--2 { top: 55%; right: 10%; animation-delay: 1.8s; }
.news-chip--3 { top: 75%; left: 30%;  animation-delay: 3.2s; }

@keyframes chipFloat {
  0%, 100% { transform: translateY(0);    opacity: 0.75; }
  50%       { transform: translateY(-12px); opacity: 1;   }
}

/* ── Category Filter ────────────────────────────────────────────────────── */
.news-filter {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.news-filter__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-mid);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--blue-mid);
  color: var(--blue-mid);
}

.filter-pill--active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  font-weight: 500;
}

.filter-pill--active:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}

/* ── News Section ───────────────────────────────────────────────────────── */
.news-section {
  background: var(--blue-pale);
  padding: var(--section-pad);
  min-height: 400px;
}

.news-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Loading state ──────────────────────────────────────────────────────── */
.news-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--ink-light);
  font-size: 14px;
}

.news-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Error / Empty states ───────────────────────────────────────────────── */
/* [hidden] must be explicit — CSS display overrides the HTML attribute */
[hidden] { display: none !important; }

.news-error,
.news-empty {
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--ink-light);
  text-align: center;
}

/* shown via JS: element.hidden = false */
.news-error:not([hidden]),
.news-empty:not([hidden]) {
  display: flex;
}

.news-error svg {
  color: var(--ink-light);
  opacity: 0.5;
}

/* ── News Grid ──────────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 960px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* ── News Card ──────────────────────────────────────────────────────────── */
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow var(--transition-md), transform var(--transition-md);
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-md);
}

.news-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 171, 0.1);
  transform: translateY(-2px);
}

.news-card:hover::before {
  transform: scaleX(1);
}

/* Featured badge */
.news-card--featured {
  border-color: rgba(0, 200, 255, 0.4);
  background: linear-gradient(135deg, #fff 85%, rgba(0, 200, 255, 0.04) 100%);
}

.news-card--featured::before {
  transform: scaleX(1);
}

/* ── Card header ─────────────────────────────────────────────────────────── */
.news-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Category badge ──────────────────────────────────────────────────────── */
.news-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.news-badge--company-news        { background: #EEF2FF; color: #3730A3; }
.news-badge--project-delivery    { background: var(--success-bg); color: var(--success); }
.news-badge--partner-announcement{ background: #FFF7ED; color: #92400E; }
.news-badge--industry-insight    { background: #F0F9FF; color: #0369A1; }
.news-badge--event               { background: #FDF4FF; color: #7E22CE; }
.news-badge--award-recognition   { background: #FFFBEB; color: #92400E; }

/* ── Date ────────────────────────────────────────────────────────────────── */
.news-card__date {
  font-size: 12px;
  color: var(--ink-light);
  white-space: nowrap;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.news-card__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}

/* ── Summary ─────────────────────────────────────────────────────────────── */
.news-card__summary {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── LinkedIn link ───────────────────────────────────────────────────────── */
.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--linkedin);
  text-decoration: none;
  transition: opacity var(--transition);
}

.news-card__link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.news-card__link svg {
  flex-shrink: 0;
}

/* ── Card clickable state ────────────────────────────────────────────────── */
.news-card {
  cursor: pointer;
}

.news-card__read-more {
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-mid);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition), color var(--transition);
}

.news-card:hover .news-card__read-more {
  gap: 8px;
  color: var(--blue);
}

/* ── News Modal ──────────────────────────────────────────────────────────── */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.2s ease;
}

.news-modal-overlay[hidden] {
  display: none !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.news-modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.news-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-mid);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 1;
}

.news-modal__close:hover {
  background: var(--blue-pale);
  border-color: var(--blue);
  color: var(--blue);
}

.news-modal__scroll {
  overflow-y: auto;
  padding: 36px 36px 32px;
  border-radius: 12px;
}

.news-modal__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.news-modal__date {
  font-size: 12px;
  color: var(--ink-light);
}

.news-modal__title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
}

.news-modal__summary {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.75;
  margin: 0 0 28px;
}

.news-modal__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--linkedin);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}

.news-modal__linkedin:hover {
  opacity: 0.88;
  color: var(--white);
  transform: translateY(-1px);
}

.news-modal__no-link {
  font-size: 13px;
  color: var(--ink-light);
  font-style: italic;
}

@media (max-width: 600px) {
  .news-modal-overlay { padding: 0; align-items: flex-end; }
  .news-modal { max-height: 90vh; border-radius: 16px 16px 0 0; }
  .news-modal__scroll { padding: 28px 20px 24px; }
}

/* ── Load more ───────────────────────────────────────────────────────────── */
.news-more {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

/* ── Responsive overrides ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .news-hero        { padding: 80px 20px 52px; }
  .news-filter      { padding: 16px 20px; }
  .news-section     { padding: var(--section-pad-sm); }
  .news-card        { padding: 22px; }
}
