/*
 * News archive (/news/) — Figma 281:1718.
 * Scoped to .vt-news-archive only.
 */

/*
 * Page surface: body uses Kadence --global-palette8 (#F7FAFC).
 * Paint the Posts-page main white so content after the breadcrumb
 * is not gray; breadcrumb keeps its own #f9faff bar below.
 */
.vt-news-archive {
  background-color: #ffffff;
}

.vt-news-archive .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/*
 * Breadcrumb bar.
 */

.vt-news-archive__breadcrumb {
  background: #f9faff;
  padding-block: 1.5rem;
}

.vt-news-archive__breadcrumb .vt-breadcrumb {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.vt-news-archive__breadcrumb .vt-breadcrumb__link,
.vt-news-archive__breadcrumb .vt-breadcrumb__text {
  color: var(--vt-color-neutral-500);
}

.vt-news-archive__breadcrumb .vt-breadcrumb__current {
  color: var(--vt-color-brand);
}

.vt-news-archive__breadcrumb .vt-breadcrumb__separator {
  color: var(--vt-color-neutral-500);
}

/*
 * Main content shell.
 */

.vt-news-archive__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 5rem;
}

/*
 * Anchor target for category filter / pagination deep-links.
 * Offset matches site header height so tabs are not covered if header is sticky/fixed.
 */
.vt-news-archive #news-listing {
  scroll-margin-top: var(--vt-site-header-height, 81px);
}

@media (max-width: 767px) {
  .vt-news-archive #news-listing {
    scroll-margin-top: var(--vt-site-header-height, 81px);
  }
}

/*
 * Featured article — Figma 281:1736 (1220 × 496, 50/50 columns).
 */

.vt-news-archive__featured {
  width: 100%;
}

.vt-news-archive .vt-featured-post {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  height: 496px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.vt-news-archive .vt-featured-post__media {
  position: relative;
  display: block;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #f8f9fa;
  text-decoration: none;
}

.vt-news-archive .vt-featured-post__image,
.vt-news-archive .vt-featured-post__placeholder {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.vt-news-archive .vt-featured-post__placeholder {
  background: var(--vt-color-neutral-100);
}

.vt-news-archive .vt-featured-post__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 0;
  height: 100%;
  padding: 48px;
  /* Keep visible so the absolutely positioned badge can paint over the media column. */
  overflow: visible;
  background: #ffffff;
}

.vt-news-archive .vt-featured-post__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: var(--vt-font-weight-bold);
  line-height: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--vt-color-brand);
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.vt-news-archive .vt-featured-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
  gap: 16px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: var(--vt-font-weight-regular);
  line-height: 20px;
}

.vt-news-archive .vt-featured-post__date {
  color: #64748b;
}

.vt-news-archive .vt-featured-post__date + .vt-featured-post__category {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.vt-news-archive .vt-featured-post__date + .vt-featured-post__category::before {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 9999px;
  background: #f1f5f9;
}

.vt-news-archive .vt-featured-post__category {
  color: var(--vt-color-brand);
}

.vt-news-archive .vt-featured-post__title {
  flex-shrink: 0;
  margin: 0 0 16px;
  color: #1e293b;
  font-size: 36px;
  font-weight: var(--vt-font-weight-bold);
  line-height: 45px;
  letter-spacing: -0.9px;
}

.vt-news-archive .vt-featured-post__title a {
  color: inherit;
  text-decoration: none;
}

.vt-news-archive .vt-featured-post__title a:hover,
.vt-news-archive .vt-featured-post__title a:focus {
  color: var(--vt-color-brand);
}

.vt-news-archive .vt-featured-post__title a:focus-visible {
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

.vt-news-archive .vt-featured-post__excerpt {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(26px * 4);
  overflow: hidden;
  margin: 0 0 32px;
  color: #64748b;
  font-size: 16px;
  font-weight: var(--vt-font-weight-regular);
  line-height: 26px;
}

/*
 * Soft fade into the white content panel (Figma 281:1736).
 * Overlay only — first ~70–80% of the excerpt stays fully readable.
 */
.vt-news-archive .vt-featured-post__excerpt::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2.4em;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgb(255 255 255 / 0) 0%,
    #ffffff 100%
  );
}

.vt-news-archive .vt-featured-post__link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: 12px 24px;
  color: #ffffff;
  font-size: 16px;
  font-weight: var(--vt-font-weight-regular);
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
  background: var(--vt-color-brand);
  border-radius: 12px;
}

.vt-news-archive .vt-featured-post__link:hover,
.vt-news-archive .vt-featured-post__link:focus {
  background: var(--vt-color-brand-dark, var(--vt-color-brand-dark));
  color: #ffffff;
}

.vt-news-archive .vt-featured-post__link:focus-visible {
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

.vt-news-archive .vt-featured-post__media:focus-visible {
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

/*
 * Category tabs — Figma 281:1760 (centered pills, gap 20, pt 40 / pb 10).
 */

.vt-news-tabs {
  width: 100%;
  padding-top: 40px;
  padding-bottom: 10px;
  border-top: 1px solid #d2d7fc;
}

.vt-news-tabs__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.vt-news-tabs__list::-webkit-scrollbar {
  display: none;
}

.vt-news-tabs__item {
  flex: none;
}

.vt-news-tabs__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  color: #1e293b;
  font-size: 14px;
  font-weight: var(--vt-font-weight-regular);
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 9999px;
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.vt-news-tabs__link:hover,
.vt-news-tabs__link:focus {
  color: var(--vt-color-brand);
  border-color: #d2d7fc;
}

.vt-news-tabs__link:focus-visible {
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

.vt-news-tabs__link--active {
  color: #ffffff;
  background: var(--vt-color-brand-dark);
  border-color: var(--vt-color-brand);
  box-shadow: none;
}

.vt-news-tabs__link--active:hover,
.vt-news-tabs__link--active:focus {
  color: #ffffff;
  background: var(--vt-color-brand-dark, var(--vt-color-brand-dark));
  border-color: var(--vt-color-brand-dark, var(--vt-color-brand-dark));
}

/*
 * Article grid — Figma 281:1789 (3 cols, gap 24, cards ~462 tall).
 */

.vt-news-archive .vt-news-archive__listing {
  width: 100%;
  margin-top: 24px;
}

.vt-news-archive .vt-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

.vt-news-archive .vt-news-grid > .vt-news-card {
  min-width: 0;
  height: 100%;
}

/*
 * Archive card overrides (Figma 286:2592).
 * Defaults for Home/Projects remain in components.css.
 */

.vt-news-archive .vt-news-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 462px;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.vt-news-archive .vt-news-card__media {
  order: 0;
  flex-shrink: 0;
  border-radius: 0;
}

.vt-news-archive .vt-news-card__image,
.vt-news-archive .vt-news-card__placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.vt-news-archive .vt-news-card__placeholder {
  background: #f8f9fa;
}

.vt-news-archive .vt-news-card__meta {
  display: contents;
}

.vt-news-archive .vt-news-card__separator {
  display: none;
}

.vt-news-archive .vt-news-card__category {
  order: 1;
  flex-shrink: 0;
  padding: 24px 24px 0;
  color: var(--vt-color-brand);
  font-size: 14px;
  font-weight: var(--vt-font-weight-regular);
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
}

.vt-news-archive .vt-news-card__title {
  order: 2;
  flex: 1 1 auto;
  min-height: 112px;
  margin: 0;
  padding: 10px 24px 0;
}

.vt-news-archive .vt-news-card__title-link {
  display: block;
  color: #1e293b;
  font-size: 20px;
  font-weight: var(--vt-font-weight-bold);
  line-height: 27.5px;
  text-decoration: none;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.vt-news-archive .vt-news-card__title-link:hover,
.vt-news-archive .vt-news-card__title-link:focus {
  color: var(--vt-color-brand);
}

.vt-news-archive .vt-news-card__title-link:focus-visible {
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

.vt-news-archive .vt-news-card__date {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 24px 24px;
  color: #6b7280;
  font-size: 12px;
  font-weight: var(--vt-font-weight-regular);
  line-height: 16px;
  text-transform: none;
}

.vt-news-archive .vt-news-card__date::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
  background-color: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='2' y='3.5' width='12' height='10.5' rx='1.5' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M5 2v2.5M11 2v2.5M2 7h12' stroke='black' stroke-width='1.25' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='2' y='3.5' width='12' height='10.5' rx='1.5' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M5 2v2.5M11 2v2.5M2 7h12' stroke='black' stroke-width='1.25' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

/*
 * Pagination.
 */

.vt-news-archive .vt-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 1rem;
}

.vt-news-archive .vt-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vt-news-archive .vt-pagination .page-numbers li {
  margin: 0;
}

.vt-news-archive .vt-pagination .page-numbers a,
.vt-news-archive .vt-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--vt-color-neutral-800);
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-decoration: none;
  background: var(--vt-color-neutral-0);
  border: 1px solid var(--vt-color-neutral-100);
  border-radius: 0.75rem;
}

.vt-news-archive .vt-pagination .page-numbers a:hover,
.vt-news-archive .vt-pagination .page-numbers a:focus {
  color: var(--vt-color-brand);
  border-color: #d2d7fc;
}

.vt-news-archive .vt-pagination .page-numbers a:focus-visible {
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

.vt-news-archive .vt-pagination .page-numbers .current {
  color: var(--vt-color-neutral-0);
  background: var(--vt-color-brand-dark);
  border-color: var(--vt-color-brand);
}

.vt-news-archive .vt-pagination .page-numbers .dots {
  border: 0;
  background: transparent;
}

/*
 * Empty state.
 */

.vt-news-archive__empty {
  margin: 0;
  padding: 1rem 0 2rem;
  color: var(--vt-color-neutral-500);
  font-size: 1rem;
  line-height: 1.5rem;
  text-align: center;
}

/*
 * Responsive.
 */

@media (min-width: 1025px) {
  .vt-news-tabs__list {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (max-width: 1200px) {
  .vt-news-archive__inner {
    padding-block: 4rem;
  }

  .vt-news-archive .vt-featured-post {
    height: 440px;
  }

  .vt-news-archive .vt-featured-post__content {
    padding: 36px;
  }

  .vt-news-archive .vt-featured-post__title {
    font-size: 30px;
    line-height: 38px;
    letter-spacing: -0.6px;
  }

  .vt-news-archive .vt-featured-post__excerpt {
    max-height: calc(26px * 3);
    margin-bottom: 24px;
  }

  .vt-news-archive .vt-news-card {
    min-height: 430px;
  }
}

@media (max-width: 1024px) {
  .vt-news-archive .vt-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vt-news-archive .vt-news-card {
    min-height: 0;
  }

  .vt-news-archive .vt-news-card__title {
    min-height: 82.5px; /* ~3 lines at 27.5 */
  }

  .vt-news-archive .vt-featured-post {
    grid-template-columns: 1fr;
    height: auto;
  }

  .vt-news-archive .vt-featured-post__media {
    height: auto;
    min-height: 0;
  }

  .vt-news-archive .vt-featured-post__image,
  .vt-news-archive .vt-featured-post__placeholder {
    position: static;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .vt-news-archive .vt-featured-post__content {
    height: auto;
    padding: 32px;
    overflow: visible;
  }

  .vt-news-archive .vt-featured-post__excerpt {
    flex: 0 1 auto;
    max-height: calc(26px * 4);
    margin-bottom: 24px;
  }

  .vt-news-archive .vt-featured-post__link {
    margin-top: 0;
  }

  .vt-news-tabs__list {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .vt-news-archive__inner {
    padding-block: 3rem;
    gap: 1.25rem;
  }

  .vt-news-archive__breadcrumb {
    padding-block: 1rem;
  }

  .vt-news-archive .vt-featured-post__content {
    padding: 24px;
  }

  .vt-news-archive .vt-featured-post__title {
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -0.4px;
    margin-bottom: 12px;
  }

  .vt-news-archive .vt-featured-post__meta {
    margin-bottom: 12px;
  }

  .vt-news-archive .vt-featured-post__excerpt {
    max-height: calc(24px * 4);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 24px;
  }

  .vt-news-archive .vt-featured-post__excerpt::after {
    height: 2.2em;
  }

  .vt-news-archive .vt-news-grid {
    grid-template-columns: 1fr;
  }

  .vt-news-archive .vt-news-card__title {
    min-height: 55px; /* ~2 lines */
  }

  .vt-news-tabs {
    padding-top: 24px;
  }

  .vt-news-tabs__list {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .vt-news-archive .vt-featured-post__content {
    padding: 20px;
  }

  .vt-news-archive .vt-featured-post__title {
    font-size: 22px;
    line-height: 30px;
  }

  .vt-news-archive .vt-news-card__category {
    padding: 20px 20px 0;
  }

  .vt-news-archive .vt-news-card__title {
    padding: 10px 20px 0;
  }

  .vt-news-archive .vt-news-card__date {
    padding: 10px 20px 20px;
  }
}

@media (max-width: 390px) {
  .vt-news-archive .vt-featured-post__link {
    width: 100%;
  }

  .vt-news-tabs__link {
    padding-inline: 16px;
  }
}
