/* =============================================================
   News page (featured carousel + article list + pagination)
   Used by: lists_article.htm (/index.php/company-news/)
   Depends on: styles.css design tokens (.page-shell, .section-heading,
   .content-hero, .eyebrow, .button, .text-button are global/content-pages).
   ============================================================= */

/* ---------- Featured carousel ---------- */
.feature-carousel {
  position: relative;
  margin-top: clamp(44px, 4vw, 64px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(16, 28, 44, .06);
}

.feature-track {
  display: flex;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}

.feature-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, .95fr);
  gap: clamp(30px, 4vw, 72px);
  align-items: center;
  padding: clamp(26px, 3vw, 48px);
}

.feature-media { margin: 0; }

.feature-media img {
  width: 100%;
  height: auto; /* override the HTML height attribute so aspect-ratio applies */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(16, 28, 44, .08);
}

.feature-copy h3 {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 40px);
  line-height: 1.22;
}

.feature-copy > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: inline-block;
  margin-top: 16px;
  color: #8593a8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
}

.feature-copy .text-button { margin-top: 20px; }

/* Controls: arrows + dots */
.feature-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 clamp(20px, 2vw, 32px) clamp(22px, 2.4vw, 30px);
}

.feature-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: #33445c;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.feature-arrow:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }

.feature-dots { display: flex; align-items: center; gap: 8px; }

.feature-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #d3dde9;
  cursor: pointer;
  transition: background .25s ease, width .25s ease;
}

.feature-dot.is-active { width: 22px; background: var(--blue); }

/* ---------- Latest articles grid ---------- */
.news-grid {
  margin-top: clamp(44px, 4vw, 64px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2vw, 30px);
}

.news-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(16, 28, 44, .10);
}

.news-card > a { display: block; height: 100%; }

.news-card figure { margin: 0; overflow: hidden; }

.news-card figure img {
  width: 100%;
  height: auto; /* override the HTML height attribute so aspect-ratio applies */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.news-card:hover figure img { transform: scale(1.03); }

.news-card-body { padding: clamp(20px, 2vw, 28px); }

.news-card-meta {
  display: inline-block;
  color: #8593a8;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
}

.news-card-body h3 {
  margin: 10px 0 0;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.4;
  transition: color .2s ease;
}

.news-card:hover h3 { color: var(--blue); }

.news-card-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-body .text-button { margin-top: 16px; }

/* ---------- Pagination (rendered by {zan:pagelist}: nav > span > a, span.active = current) ---------- */
.news-pagination {
  margin-top: clamp(44px, 4.5vw, 68px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.news-pagination a,
.news-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
}

.news-pagination span { border: 0; padding: 0; }

.news-pagination a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: #33445c;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.news-pagination a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Current page: rendered as <span class="active"><a>1</a></span> */
.news-pagination span.active a {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  pointer-events: none;
}

/* Prev/next arrows without href have no target on the current edge page */
.news-pagination a.prev-next:not([href]) {
  opacity: .45;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-slide { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
  .feature-controls { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-track { transition: none; }
  .news-card, .news-card figure img, .feature-arrow { transition: none; }
}
