/* News list and detail pages: shared news carousel plus page-scoped layout styles. */
.news-list-page {
  padding: clamp(54px, 6vw, 88px) 0 clamp(70px, 8vw, 112px);
  background: var(--color-bg);
}

.news-detail-more {
  padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  background: var(--color-bg-muted);
}

.news-detail-more__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.news-detail-more__title {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.news-detail-more__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: clamp(148px, 15vw, 180px);
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid rgba(var(--brand-aubergine-rgb), 0.58);
  color: var(--color-text-muted);
  font-size: var(--font-size-ui);
  font-weight: 600;
  line-height: 1;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.news-detail-more__all i {
  font-size: 20px;
  transition: transform 180ms ease;
}

.news-detail-more__all:hover,
.news-detail-more__all:focus-visible {
  border-color: var(--color-secondary);
  background: var(--color-secondary);
  color: var(--color-text-inverse);
}

.news-detail-more__all:hover i,
.news-detail-more__all:focus-visible i {
  transform: translateX(4px);
}

.news-detail-more__all:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px;
}

.news-detail-more .news-featured {
  margin-bottom: 0;
}

.news-list-tabs {
  margin-bottom: clamp(28px, 3vw, 42px);
  overflow: hidden;
}

.news-list-tabs__track {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(var(--brand-warm-gray-rgb), 0.78);
  background: var(--color-bg-elevated);
}

.news-list-tabs__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 20%;
  min-width: 0;
  min-height: clamp(48px, 5vw, 64px);
  padding: 10px clamp(4px, 1vw, 16px);
  border: 0;
  border-radius: 0;
  background: var(--color-bg-elevated);
  box-shadow: none;
  color: var(--color-text-muted);
  font-size: clamp(12px, calc(10px + 0.45vw), 16px);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease;
}

.news-list-tabs__link + .news-list-tabs__link {
  border-left: 1px solid rgba(var(--brand-warm-gray-rgb), 0.78);
}

.news-list-tabs__link:hover {
  background: var(--color-surface-hover);
  color: var(--color-secondary);
}

.news-list-tabs__link.is-active,
.news-list-tabs__link[aria-current='page'] {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  box-shadow: none;
  color: var(--color-text-inverse);
  font-weight: 600;
}

.news-list-tabs__link:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: -3px;
}

.news-featured {
  position: relative;
  margin: 0 0 clamp(48px, 6vw, 80px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 14%, rgba(var(--brand-blue-rgb), 0.08), transparent 36%),
    linear-gradient(150deg, var(--color-bg-elevated) 24%, var(--color-bg-muted) 100%);
}

.news-list-page[data-page-count='0'] .news-featured {
  display: none;
}

.news-featured::after {
  position: absolute;
  right: -12%;
  bottom: -52%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(var(--brand-blue-rgb), 0.025),
    0 0 0 64px rgba(var(--brand-cyan-rgb), 0.018);
  content: '';
  pointer-events: none;
}

.news-featured__viewport {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.news-featured__track {
  display: flex;
  width: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 650ms cubic-bezier(0.45, 0, 0.18, 1);
  will-change: transform;
}

.news-featured__slide {
  flex: 0 0 100%;
  min-width: 0;
  pointer-events: none;
}

.news-featured__slide.is-active {
  pointer-events: auto;
}

.news-featured__item {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(42px, 5vw, 76px);
  min-height: clamp(390px, 38vw, 480px);
  padding: clamp(42px, 5vw, 70px);
  color: var(--color-text);
}

.news-featured__title-link:focus-visible,
.news-featured__detail:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px;
}

.news-featured__media {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg-muted);
}

.news-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.news-featured__content {
  display: flex;
  min-width: 0;
  padding: clamp(2px, 1vw, 12px) 0 clamp(28px, 3vw, 42px);
  flex-direction: column;
}

.news-featured__date {
  margin-bottom: clamp(24px, 3vw, 38px);
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: 1;
}

.news-featured__title {
  display: -webkit-box;
  margin: 0 0 clamp(18px, 2vw, 26px);
  overflow: hidden;
  color: var(--color-text);
  font-size: clamp(24px, 2.15vw, 32px);
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-featured__title-link {
  color: inherit;
}

.news-featured__description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: 1.85;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-featured__detail {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  margin-top: auto;
  padding: 12px 24px;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
  font-size: var(--font-size-ui);
  font-weight: 600;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease;
}

.news-featured__detail i {
  font-size: 18px;
  transition: transform 180ms ease;
}

.news-featured__slide:hover .news-featured__media img {
  transform: scale(1.025);
}

.news-featured__detail:hover,
.news-featured__detail:focus-visible {
  background: var(--color-secondary);
  color: var(--color-text-inverse);
}

.news-featured__detail:hover i,
.news-featured__detail:focus-visible i {
  transform: translateX(4px);
}

.news-featured__controls {
  position: absolute;
  z-index: 3;
  right: clamp(42px, 5vw, 70px);
  bottom: clamp(28px, 3vw, 42px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-featured__dot {
  position: relative;
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(var(--brand-warm-gray-rgb), 0.7);
  cursor: pointer;
  overflow: hidden;
  transition: width 180ms ease, background-color 180ms ease;
}

.news-featured__dot::after {
  position: absolute;
  inset: 0;
  background: var(--color-secondary);
  content: '';
  transform: scaleX(0);
  transform-origin: left center;
}

.news-featured__dot.is-active,
.news-featured__dot[aria-current='true'] {
  width: 36px;
  background: rgba(var(--brand-blue-rgb), 0.2);
}

.news-featured.is-autoplay-running .news-featured__dot.is-active::after,
.news-featured.is-autoplay-running .news-featured__dot[aria-current='true']::after {
  animation: news-featured-dot-progress var(--news-featured-autoplay-duration, 3000ms) linear forwards;
}

@keyframes news-featured-dot-progress {
  to {
    transform: scaleX(1);
  }
}

.news-featured__dot:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px;
}

.news-list-card__title-link:focus-visible,
.news-list-card__detail:focus-visible,
.news-list-pagination .page-numbers:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px;
}

.news-list-cards {
  display: block;
}

.news-list-card {
  --news-list-column-gap: clamp(34px, 4vw, 60px);
  --news-list-media-width: clamp(280px, 27.35vw, 320px);

  position: relative;
  display: grid;
  grid-template-columns: var(--news-list-media-width) minmax(0, 1fr) minmax(76px, 96px);
  gap: var(--news-list-column-gap);
  min-height: 260px;
  padding: clamp(34px, 3.4vw, 46px) 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--color-text);
  transition: color 180ms ease;
}

.news-list-card::before,
.news-list-card:last-child::after {
  position: absolute;
  right: 0;
  left: calc(var(--news-list-media-width) + var(--news-list-column-gap));
  height: 1px;
  background: rgba(var(--brand-warm-gray-rgb), 0.62);
  content: '';
}

.news-list-card::before {
  top: 0;
}

.news-list-card:last-child::after {
  bottom: 0;
}

.news-list-card:hover {
  background: transparent;
  box-shadow: none;
  color: var(--color-text);
}

.news-list-card__media {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0;
  background: var(--color-bg-muted);
}

.news-list-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.news-list-card:hover .news-list-card__media img {
  transform: scale(1.025);
}

.news-list-card__body {
  display: flex;
  min-width: 0;
  padding: clamp(6px, 1vw, 14px) 0 clamp(4px, 0.8vw, 10px);
  flex-direction: column;
  justify-content: space-between;
}

.news-list-card__copy {
  display: block;
  min-width: 0;
}

.news-list-card__title {
  display: -webkit-box;
  margin: 0 0 clamp(10px, 1.2vw, 16px);
  overflow: hidden;
  color: var(--color-text);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-list-card__title-link {
  color: inherit;
}

.news-list-card__description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: 1.75;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-list-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: clamp(26px, 3vw, 46px);
}

.news-list-card__detail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: var(--font-size-ui);
  font-weight: 500;
  white-space: nowrap;
}

.news-list-card__detail i {
  font-size: 18px;
  transition: transform 180ms ease;
}

.news-list-card:hover .news-list-card__detail i {
  transform: translateX(4px);
}

.news-list-card:hover .news-list-card__detail {
  color: var(--color-secondary);
}

.news-list-card__date {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
  padding-top: clamp(10px, 1.4vw, 18px);
  color: var(--color-text-subtle);
  text-align: right;
}

.news-list-card__date time {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.news-list-card__day {
  color: rgba(var(--brand-aubergine-rgb), 0.43);
  font-size: clamp(42px, 4.7vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.news-list-card__month {
  margin-top: clamp(14px, 1.5vw, 20px);
  color: var(--color-text-subtle);
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.news-list-empty {
  display: none;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 60px) 15px;
  color: var(--color-text-subtle);
  font-size: var(--font-size-small);
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
}

.news-list-page[data-page-count='0'] .news-list-empty {
  display: block;
}

.news-list-page[data-page-count='0'] .news-list-cards,
.news-list-page[data-page-count='0'] .news-list-pagination {
  display: none;
}

.news-list-pagination.pagination-block {
  margin: clamp(38px, 5vw, 60px) auto 0;
}

.news-list-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(var(--brand-warm-gray-rgb), 0.78);
  border-radius: 0;
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  line-height: 1;
}

.news-list-pagination .page-numbers.current,
.news-list-pagination .page-numbers:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
}

.news-list-pagination .page-numbers i {
  font-size: 17px;
}

@media (max-width: 991px) {
  .news-featured__item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 34px;
    min-height: 350px;
    padding: 38px;
  }

  .news-featured__content {
    padding-bottom: 30px;
  }

  .news-featured__date {
    margin-bottom: 22px;
  }

  .news-featured__title {
    margin-bottom: 14px;
    font-size: clamp(21px, 2.7vw, 26px);
  }

  .news-featured__description {
    font-size: var(--font-size-small);
    -webkit-line-clamp: 3;
  }

  .news-featured__detail {
    min-height: 46px;
    padding: 10px 18px;
  }

  .news-featured__controls {
    right: 38px;
    bottom: 28px;
  }

  .news-list-card {
    --news-list-column-gap: 20px;
    --news-list-media-width: clamp(220px, 35vw, 270px);

    grid-template-columns: var(--news-list-media-width) minmax(0, 1fr) minmax(68px, 82px);
    min-height: 210px;
    padding: clamp(26px, 3.4vw, 34px) 0;
  }

  .news-list-card__body {
    padding-right: 0;
  }

  .news-list-card__footer {
    margin-top: 22px;
  }
}

@media (max-width: 767px) {
  .news-detail-more {
    padding: 48px 0 68px;
  }

  .news-detail-more__header {
    gap: 18px;
    margin-bottom: 28px;
  }

  .news-detail-more__title {
    font-size: clamp(25px, 7vw, 30px);
  }

  .news-detail-more__all {
    min-width: 120px;
    min-height: 44px;
    padding: 9px 14px;
    gap: 10px;
  }

  .news-list-page {
    padding-top: 44px;
    padding-bottom: 74px;
  }

  .news-list-tabs {
    margin-bottom: 28px;
  }

  .news-featured {
    margin-bottom: 48px;
  }

  .news-featured::after {
    right: -38%;
    bottom: -18%;
    width: 110%;
  }

  .news-featured__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    padding: 24px 24px 78px;
  }

  .news-featured__media {
    align-self: auto;
  }

  .news-featured__content {
    padding: 24px 4px 0;
  }

  .news-featured__date {
    order: 0;
    margin-bottom: 16px;
    font-size: var(--font-size-small);
  }

  .news-featured__title {
    margin-bottom: 12px;
    font-size: clamp(20px, 5.8vw, 24px);
    -webkit-line-clamp: 2;
  }

  .news-featured__description {
    -webkit-line-clamp: 3;
  }

  .news-featured__detail {
    min-height: 44px;
    margin-top: 24px;
    padding: 10px 16px;
  }

  .news-featured__controls {
    right: 28px;
    bottom: 32px;
  }

  .news-featured__dot {
    width: 22px;
  }

  .news-featured__dot.is-active,
  .news-featured__dot[aria-current='true'] {
    width: 30px;
  }

  .news-list-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    padding: 28px 0;
  }

  .news-list-card::before,
  .news-list-card:last-child::after {
    left: 0;
  }

  .news-list-card__media {
    display: block;
    grid-column: 1;
  }

  .news-list-card__body {
    grid-column: 1;
    padding: 22px 8px 0;
  }

  .news-list-card__description {
    -webkit-line-clamp: 3;
  }

  .news-list-card__footer {
    margin-top: 20px;
  }

  .news-list-card__date {
    grid-column: 1;
    padding: 18px 8px 0;
  }

  .news-list-card__date time {
    align-items: baseline;
    flex-direction: row;
    gap: 12px;
  }

  .news-list-card__day {
    font-size: 34px;
  }

  .news-list-card__month {
    margin-top: 0;
  }
}

@media (max-width: 575px) {
  .news-list-tabs__link {
    min-height: 48px;
    padding: 8px 2px;
    font-size: clamp(12px, 3.3vw, 13px);
  }

  .news-featured__item {
    padding: 18px 18px 72px;
  }

  .news-featured__content {
    padding-top: 20px;
  }

  .news-featured__controls {
    right: 22px;
    bottom: 26px;
  }

  .news-list-card__body {
    padding-top: 18px;
  }

  .news-list-card__title {
    margin-bottom: 9px;
    font-size: clamp(17px, 4.8vw, 19px);
  }

  .news-list-card__description {
    font-size: var(--font-size-small);
    line-height: 1.7;
  }

  .news-list-card__footer {
    margin-top: 18px;
  }

  .news-list-pagination.pagination-block {
    gap: 8px;
  }

  .news-list-pagination .page-numbers {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
  }
}

@media (max-width: 359px) {
  .news-list-pagination__last {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-detail-more__all,
  .news-detail-more__all i,
  .news-list-tabs__link,
  .news-featured__track,
  .news-featured__media img,
  .news-featured__detail,
  .news-featured__detail i,
  .news-featured__dot,
  .news-list-card,
  .news-list-card__media img,
  .news-list-card__detail i {
    transition: none;
  }

  .news-list-tabs__link:hover,
  .news-detail-more__all:hover i,
  .news-detail-more__all:focus-visible i,
  .news-featured__slide:hover .news-featured__media img,
  .news-featured__detail:hover i,
  .news-featured__detail:focus-visible i,
  .news-list-card:hover,
  .news-list-card:hover .news-list-card__media img,
  .news-list-card:hover .news-list-card__detail i {
    transform: none;
  }

  .news-featured__dot::after {
    animation: none !important;
  }
}

/* The article title is distinct from the category hero and related-news titles. */
#blog-page .single-blog-wrap > .news-detail-title {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
