.vayne-news-pair {
  --vnps-height: 466px;
  --vnps-text: 374px;
  --vnps-gap: 24px;
  --vnps-safe-text: min(var(--vnps-text), calc((var(--vayne-container-width, 100vw) - var(--vnps-gap) - 220px) / 2));
  --vnps-radius: 16px;
  --vnps-heading: #2e3272;
  --vnps-card: #f2f2f3;
  --vnps-title: #2e3272;
  --vnps-text-color: #555;
  --vnps-accent: #00aeef;
  --vnps-accent-text: #fff;
  width: 100%;
}

.vayne-news-pair *,
.vayne-news-pair *::before,
.vayne-news-pair *::after { box-sizing: border-box; }

.vayne-news-pair__header {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 48px;
}

.vayne-news-pair__heading {
  color: var(--vnps-heading);
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

section.vayne-news-pair a.vayne-news-pair__more {
  align-items: center;
  background: var(--vnps-accent);
  border-radius: 8px;
  color: var(--vnps-accent-text);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 500;
  gap: 18px;
  padding: 12px 20px;
  text-decoration: none;
  transition: filter .25s ease, transform .25s ease;
}

section.vayne-news-pair a.vayne-news-pair__more:hover { filter: brightness(.93); transform: translateY(-1px); }
section.vayne-news-pair a.vayne-news-pair__more:focus-visible { outline: 2px solid var(--vnps-heading); outline-offset: 3px; }
.vayne-news-pair__eye { height: 14px; width: 14px; }

.vayne-news-pair__list { display: flex; gap: var(--vnps-gap); }

/* Active card grows to reveal its image; the other collapses to its text column. */
.vayne-news-pair__card {
  background: var(--vnps-card);
  border-radius: var(--vnps-radius);
  display: flex;
  flex: 0 0 var(--vnps-safe-text);
  height: var(--vnps-height);
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  transition: flex-grow .6s cubic-bezier(.22, .7, .25, 1), flex-basis .6s cubic-bezier(.22, .7, .25, 1);
}

.vayne-news-pair__card.is-active { flex: 1 1 0; }
.vayne-news-pair.is-single { --vnps-safe-text: min(var(--vnps-text), calc(var(--vayne-container-width, 100vw) - 220px)); }
.vayne-news-pair.is-single .vayne-news-pair__card { flex: 1 1 auto; }

.vayne-news-pair__text {
  display: flex;
  flex: 0 0 calc(var(--vnps-safe-text) - 36px);
  flex-direction: column;
  min-width: 0;
  padding: 8px 8px 4px;
}

.vayne-news-pair__title {
  color: var(--vnps-title);
  display: -webkit-box;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 22px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.vayne-news-pair__title a { color: inherit; text-decoration: none; }
.vayne-news-pair__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.vayne-news-pair__title a:focus-visible { outline: 2px solid var(--vnps-accent); outline-offset: 2px; }

.vayne-news-pair__excerpt {
  color: var(--vnps-text-color);
  display: -webkit-box;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.vayne-news-pair__footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
}

.vayne-news-pair__date { align-items: center; color: var(--vnps-text-color); display: inline-flex; font-size: 14px; gap: 5px; }
.vayne-news-pair__date svg { height: 15px; width: 15px; }

.vayne-news-pair__view {
  align-items: center;
  background: var(--vnps-accent);
  border-radius: 50%;
  color: var(--vnps-accent-text);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  text-decoration: none;
  width: 28px;
}

.vayne-news-pair__media {
  border-radius: calc(var(--vnps-radius) - 4px);
  flex: 1 1 auto;
  margin-left: 26px;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity .35s ease;
}

.vayne-news-pair__card.is-active .vayne-news-pair__media { opacity: 1; transition: opacity .45s ease .2s; }
.vayne-news-pair__card:not(.is-active) .vayne-news-pair__media { margin-left: 0; }

.vayne-news-pair .vayne-news-pair__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .75, .25, 1);
  width: 100%;
}

.vayne-news-pair__card.is-active:hover .vayne-news-pair__media img { transform: scale(1.03); }

/* Stack the news cards while keeping each photo beside its text, as on the reference site. */
@media (max-width: 980px) {
  .vayne-news-pair__heading { font-size: 44px; }
  .vayne-news-pair__header { margin-bottom: 32px; }
  .vayne-news-pair__list { flex-direction: column; }
  .vayne-news-pair__card,
  .vayne-news-pair__card.is-active { flex: 0 0 auto; flex-direction: row; height: auto; min-height: 260px; padding: 10px; }
  .vayne-news-pair__text { flex: 1 1 0; padding: 8px 6px; }
  .vayne-news-pair__media,
  .vayne-news-pair__card:not(.is-active) .vayne-news-pair__media { align-self: stretch; aspect-ratio: auto; flex: 0 0 42%; margin: 0 0 0 10px; opacity: 1; position: relative; }
  .vayne-news-pair__media img { inset: 0; position: absolute; }
  .vayne-news-pair__footer { flex-wrap: wrap; gap: 8px; }
  .vayne-news-pair__date { max-width: 100%; }
  .vayne-news-pair__date svg { flex-shrink: 0; }
  .vayne-news-pair__view { flex-shrink: 0; margin-left: auto; }
}

@media (max-width: 560px) {
  .vayne-news-pair__header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .vayne-news-pair__heading { font-size: 34px; }
  .vayne-news-pair__title { font-size: 18px; }
  .vayne-news-pair__excerpt { font-size: 14px; }
}


/* Match the widget width when it sits inside a narrower desktop column. */

.vayne-news-pair.is-tablet .vayne-news-pair__heading { font-size: 44px; }
.vayne-news-pair.is-tablet .vayne-news-pair__header { margin-bottom: 32px; }
.vayne-news-pair.is-tablet .vayne-news-pair__list { flex-direction: column; }
.vayne-news-pair.is-tablet .vayne-news-pair__card,
.vayne-news-pair.is-tablet .vayne-news-pair__card.is-active { flex: 0 0 auto; flex-direction: row; height: auto; min-height: 260px; padding: 10px; }
.vayne-news-pair.is-tablet .vayne-news-pair__text { flex: 1 1 0; padding: 8px 6px; }
.vayne-news-pair.is-tablet .vayne-news-pair__media,
.vayne-news-pair.is-tablet .vayne-news-pair__card:not(.is-active) .vayne-news-pair__media { align-self: stretch; aspect-ratio: auto; flex: 0 0 42%; margin: 0 0 0 10px; opacity: 1; position: relative; }
.vayne-news-pair.is-tablet .vayne-news-pair__media img { inset: 0; position: absolute; }
.vayne-news-pair.is-tablet .vayne-news-pair__footer { flex-wrap: wrap; gap: 8px; }
.vayne-news-pair.is-tablet .vayne-news-pair__date { max-width: 100%; }
.vayne-news-pair.is-tablet .vayne-news-pair__date svg { flex-shrink: 0; }
.vayne-news-pair.is-tablet .vayne-news-pair__view { flex-shrink: 0; margin-left: auto; }


.vayne-news-pair.is-mobile .vayne-news-pair__header { align-items: flex-start; flex-direction: column; gap: 16px; }
.vayne-news-pair.is-mobile .vayne-news-pair__heading { font-size: 34px; }
.vayne-news-pair.is-mobile .vayne-news-pair__title { font-size: 18px; }
.vayne-news-pair.is-mobile .vayne-news-pair__excerpt { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .vayne-news-pair__card,
  .vayne-news-pair__media,
  .vayne-news-pair__media img { transition: none; }
}
