/* =========================================================
   news.css — ELI News Portal  |  Scoped to .news-*
   Funky Radio-Style  |  Colors: #EA2027 #0778C4 #86C325
   ========================================================= */

/* ── Reset (scoped) ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ──────────────────────────────────────────── */
:root {
  --news-red:      #EA2027;
  --news-blue:     #0778C4;
  --news-green:    #86C325;
  --news-dark:     #111416;
  --news-gray-900: #1c2128;
  --news-gray-700: #374151;
  --news-gray-500: #6b7280;
  --news-gray-200: #e5e7eb;
  --news-gray-100: #f3f4f6;
  --news-white:    #ffffff;
  --news-font-display: 'Syne', sans-serif;
  --news-font-body:    'DM Sans', sans-serif;
  --news-radius: 12px;
  --news-radius-sm: 6px;
  --news-shadow: 0 4px 24px rgba(0,0,0,.08);
  --news-shadow-md: 0 8px 40px rgba(0,0,0,.12);
  --news-transition: .22s cubic-bezier(.4,0,.2,1);
  --news-container: 1200px;
}

/* ── Base ───────────────────────────────────────────────── */
.news-body {
  font-family: var(--news-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--news-dark);
  background: var(--news-gray-100);
  -webkit-font-smoothing: antialiased;
}
.news-container {
  max-width: var(--news-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────── */
.news-header {
  background: var(--news-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.news-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Logo */
.news-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.news-logo__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: news-pulse 2.4s ease-in-out infinite;
}
.news-logo__dot--red   { background: var(--news-red);   animation-delay: 0s; }
.news-logo__dot--blue  { background: var(--news-blue);  animation-delay: .3s; }
.news-logo__dot--green { background: var(--news-green); animation-delay: .6s; }
@keyframes news-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.35); opacity: .7; }
}
.news-logo__wordmark {
  font-family: var(--news-font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--news-white);
  letter-spacing: -0.02em;
}

/* Nav */
.news-nav { display: flex; gap: 24px; }
.news-nav__link {
  font-family: var(--news-font-body);
  font-weight: 600;
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color var(--news-transition);
}
.news-nav__link:hover { color: var(--news-green); }

/* ── News Ticker ────────────────────────────────────────── */
.news-ticker {
  background: var(--news-red);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 34px;
}
.news-ticker__label {
  flex-shrink: 0;
  background: var(--news-dark);
  color: var(--news-white);
  font-family: var(--news-font-display);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
}
.news-ticker__track {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
}
.news-ticker__text {
  display: inline-block;
  color: var(--news-white);
  font-size: .8rem;
  font-weight: 600;
  animation: news-ticker-scroll 28s linear infinite;
  padding-left: 100%;
}
@keyframes news-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── Main ───────────────────────────────────────────────── */
.news-main { padding: 40px 0 60px; }

/* ── Section Heading ─────────────────────────────────────── */
.news-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 28px;
}
.news-section-head__title {
  font-family: var(--news-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--news-dark);
  white-space: nowrap;
}
.news-section-head__title span {
  color: var(--news-red);
}
.news-section-head__line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--news-red), var(--news-blue), var(--news-green));
  border-radius: 2px;
  opacity: .35;
}

/* ── Hero ───────────────────────────────────────────────── */
.news-hero {
  border-radius: var(--news-radius);
  overflow: hidden;
  box-shadow: var(--news-shadow-md);
  margin-bottom: 8px;
}
.news-hero__link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-decoration: none;
  color: inherit;
  min-height: 420px;
}
.news-hero__img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--news-gray-200);
}
.news-hero__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .5s ease;
}
.news-hero__link:hover .news-hero__img { transform: scale(1.03); }
.news-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(234,32,39,.1), rgba(7,120,196,.05));
  pointer-events: none;
}
.news-hero__body {
  background: var(--news-dark);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.news-hero__body::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--news-red);
  opacity: .06;
}
.news-hero__title {
  font-family: var(--news-font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  color: var(--news-white);
  line-height: 1.25;
}
.news-hero__meta {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  gap: 6px;
}
.news-hero__excerpt {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Badge ──────────────────────────────────────────────── */
.news-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--news-font-display);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 4px;
}
.news-badge--red   { background: var(--news-red);   color: #fff; }
.news-badge--blue  { background: var(--news-blue);  color: #fff; }
.news-badge--green { background: var(--news-green); color: #fff; }

/* ── Button ─────────────────────────────────────────────── */
.news-btn {
  display: inline-block;
  font-family: var(--news-font-display);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px 22px;
  border-radius: var(--news-radius-sm);
  text-decoration: none;
  transition: all var(--news-transition);
  cursor: pointer;
  width: fit-content;
}
.news-btn--red {
  background: var(--news-red);
  color: #fff;
}
.news-btn--red:hover {
  background: #c0191f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234,32,39,.35);
}

/* ── Card Grid ──────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  background: var(--news-white);
  border-radius: var(--news-radius);
  overflow: hidden;
  box-shadow: var(--news-shadow);
  transition: transform var(--news-transition), box-shadow var(--news-transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--news-shadow-md);
}
.news-card__img-wrap {
  display: block;
  overflow: hidden;
  background: var(--news-gray-100);
  aspect-ratio: 16/9;
}
.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .4s ease;
}
.news-card:hover .news-card__img { transform: scale(1.04); }
.news-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-card__date {
  font-size: .75rem;
  color: var(--news-gray-500);
  font-weight: 500;
}
.news-card__title {
  font-family: var(--news-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__title a {
  color: var(--news-dark);
  text-decoration: none;
  transition: color var(--news-transition);
}
.news-card__title a:hover { color: var(--news-blue); }
.news-card__excerpt {
  font-size: .85rem;
  color: var(--news-gray-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.news-card__read {
  font-size: .8rem;
  font-weight: 700;
  color: var(--news-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  transition: gap var(--news-transition);
}
.news-card__read:hover { gap: 8px; }

/* ── Pagination ─────────────────────────────────────────── */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
}
.news-pagination__btn,
.news-pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--news-radius-sm);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--news-transition);
}
.news-pagination__btn {
  background: var(--news-dark);
  color: var(--news-white);
}
.news-pagination__btn:hover { background: var(--news-blue); }
.news-pagination__num {
  background: var(--news-white);
  color: var(--news-dark);
  border: 2px solid var(--news-gray-200);
}
.news-pagination__num:hover {
  border-color: var(--news-blue);
  color: var(--news-blue);
}
.news-pagination__num--active {
  background: var(--news-red);
  color: var(--news-white);
  border-color: var(--news-red);
  cursor: default;
}
.news-pagination__ellipsis {
  color: var(--news-gray-500);
  font-size: .9rem;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.news-breadcrumb {
  font-size: .82rem;
  color: var(--news-gray-500);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.news-breadcrumb a {
  color: var(--news-blue);
  text-decoration: none;
  font-weight: 600;
}
.news-breadcrumb a:hover { text-decoration: underline; }

/* ── Detail Layout ──────────────────────────────────────── */
.news-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

/* Article */
.news-detail {
  background: var(--news-white);
  border-radius: var(--news-radius);
  box-shadow: var(--news-shadow);
  overflow: hidden;
}
.news-detail__img-wrap {
  background: var(--news-gray-100);
  max-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-detail__img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
  display: block;
}
.news-detail__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 32px 0;
}
.news-detail__date {
  font-size: .82rem;
  color: var(--news-gray-500);
  font-weight: 500;
}
.news-detail__title {
  font-family: var(--news-font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--news-dark);
  line-height: 1.25;
  padding: 16px 32px 0;
}
.news-detail__divider {
  display: flex;
  gap: 6px;
  padding: 18px 32px;
}
.news-detail__divider-dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  display: block;
}
.news-detail__divider-dot--red   { background: var(--news-red); }
.news-detail__divider-dot--blue  { background: var(--news-blue); }
.news-detail__divider-dot--green { background: var(--news-green); }

/* Content body — raw HTML from DB */
.news-detail__body.news-content {
  padding: 0 32px 32px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--news-gray-700);
}
.news-content h1,
.news-content h2,
.news-content h3,
.news-content h4 {
  font-family: var(--news-font-display);
  color: var(--news-dark);
  margin: 1.5em 0 .5em;
  line-height: 1.3;
}
.news-content p { margin-bottom: 1em; }
.news-content a { color: var(--news-blue); }
.news-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--news-radius-sm);
  object-fit: contain;
  margin: 1em 0;
}
.news-content ul,
.news-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}
.news-content blockquote {
  border-left: 4px solid var(--news-red);
  padding: 8px 16px;
  margin: 1.5em 0;
  color: var(--news-gray-700);
  font-style: italic;
  background: var(--news-gray-100);
  border-radius: 0 var(--news-radius-sm) var(--news-radius-sm) 0;
}
.news-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: .9rem;
}
.news-content table th,
.news-content table td {
  border: 1px solid var(--news-gray-200);
  padding: 8px 12px;
  text-align: left;
}
.news-content table th { background: var(--news-gray-100); font-weight: 700; }

/* Share */
.news-share {
  border-top: 2px solid var(--news-gray-100);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.news-share__label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--news-gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.news-share__buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.news-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--news-radius-sm);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--news-transition);
}
.news-share__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.news-share__btn--wa {
  background: #25D366;
  color: #fff;
}
.news-share__btn--wa:hover {
  background: #1daf57;
  transform: translateY(-2px);
}
.news-share__btn--fb {
  background: #1877F2;
  color: #fff;
}
.news-share__btn--fb:hover {
  background: #0c60d0;
  transform: translateY(-2px);
}
.news-share__btn--tw {
  background: var(--news-dark);
  color: #fff;
}
.news-share__btn--tw:hover {
  background: #374151;
  transform: translateY(-2px);
}

/* ── Sidebar ────────────────────────────────────────────── */
.news-sidebar {
  position: sticky;
  top: 84px;
}
.news-sidebar__widget {
  background: var(--news-white);
  border-radius: var(--news-radius);
  box-shadow: var(--news-shadow);
  overflow: hidden;
}
.news-sidebar__title {
  font-family: var(--news-font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--news-dark);
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--news-gray-100);
}
.news-sidebar__title-bar {
  display: block;
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--news-red), var(--news-blue));
  border-radius: 2px;
}
.news-sidebar__list { list-style: none; }
.news-sidebar__item {
  border-bottom: 1px solid var(--news-gray-100);
}
.news-sidebar__item:last-child { border-bottom: none; }
.news-sidebar__link {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  transition: background var(--news-transition);
}
.news-sidebar__link:hover { background: var(--news-gray-100); }
.news-sidebar__thumb-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 56px;
  border-radius: var(--news-radius-sm);
  overflow: hidden;
  background: var(--news-gray-100);
}
.news-sidebar__thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.news-sidebar__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-sidebar__item-date {
  font-size: .72rem;
  color: var(--news-gray-500);
  font-weight: 500;
}
.news-sidebar__item-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--news-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Footer ─────────────────────────────────────────────── */
.news-footer {
  background: var(--news-dark);
  color: rgba(255,255,255,.6);
  padding: 40px 0;
  margin-top: auto;
  border-top: 3px solid var(--news-red);
}
.news-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.news-footer__brand .news-logo__wordmark {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 6px;
}
.news-footer__brand p {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
}
.news-footer__copy {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}

/* ── 404 ────────────────────────────────────────────────── */
.news-404 {
  text-align: center;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.news-404__number {
  font-family: var(--news-font-display);
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--news-red);
  line-height: 1;
  letter-spacing: -0.04em;
}
.news-404__title {
  font-family: var(--news-font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--news-dark);
}
.news-404__msg {
  color: var(--news-gray-500);
  max-width: 400px;
}

/* ── Empty State ────────────────────────────────────────── */
.news-empty {
  text-align: center;
  color: var(--news-gray-500);
  padding: 40px;
  font-size: .95rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .news-detail-layout {
    grid-template-columns: 1fr;
  }
  .news-sidebar { position: static; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .news-hero__link {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .news-hero__img-wrap {
    height: 220px;
  }
  .news-hero__body {
    padding: 28px 24px;
  }
  .news-grid { grid-template-columns: 1fr; }
  .news-detail__title,
  .news-detail__meta,
  .news-detail__divider,
  .news-detail__body.news-content,
  .news-share {
    padding-left: 20px;
    padding-right: 20px;
  }
  .news-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .news-container { padding: 0 16px; }
  .news-header__inner { height: 56px; }
  .news-share { flex-direction: column; align-items: flex-start; }
}

/* ── Card entrance animation (JS-triggered) ─────────────── */
.news-card {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .5s ease,
    transform .5s ease,
    box-shadow var(--news-transition);
}
.news-card--visible {
  opacity: 1;
  transform: translateY(0);
}
/* Fallback: if JS disabled, show cards */
@media (prefers-reduced-motion: reduce) {
  .news-card { opacity: 1; transform: none; transition: none; }
}
