*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

.news-page {
  overflow-x: clip;
  padding-bottom: 0;
}

.news-shell {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
}

.news-hero {
  position: relative;
  padding: 14px 0 18px;
}

.news-hero__shell {
  position: relative;
}

.applications-hero__breadcrumbs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-inline-start: auto;
  margin-bottom: 16px;
  color: var(--color-neutral-7);
  width: fit-content;
}

.applications-hero__breadcrumbs img {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
}

.applications-hero__breadcrumb {
  color: inherit;
  white-space: nowrap;
}

.applications-hero__breadcrumb--current {
  color: var(--color-green-500);
}

.news-hero__tabs-wrap {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 12px;
  justify-content: space-between;
}

.news-search {
  width: min(600px, 100%);
  min-height: 52px;
  padding: 0 18px 0 16px;
  border-radius: 8px;
  background: var(--color-neutral-3);
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

.news-search__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--color-neutral-10);
}

.news-search__input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--color-neutral-10);
  direction: rtl;
  text-align: right;
  font-family: var(--font-primary);
  font-size: var(--fs-button-2);
  line-height: var(--lh-button-2);
  font-weight: var(--fw-button-2);
  outline: none;
  caret-color: var(--color-neutral-10);
}

.news-search__input::placeholder {
  color: var(--color-neutral-9);
  opacity: 1;
}

.news-search__input::-webkit-search-cancel-button,
.news-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.news-tabs {
  display: inline-flex;
  padding: 10px;
  border-radius: 8px;
  background: var(--color-neutral-3);
}

.news-tabs__tab {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--color-neutral-3);
  color: var(--color-neutral-7);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.news-tabs__tab:hover,
.news-tabs__tab:focus-visible {
  outline: none;
}

.news-tabs__tab--active {
  background: var(--color-violet-500);
  color: var(--color-white);
}

.news-tabs .news-tabs__tab:not(.news-tabs__tab--active):hover {
  background: var(--color-violet-500);
  color: var(--color-white);
}

.news-tabs__tab--active:hover {
  background: var(--color-violet-800);
}

.news-panels {
  position: relative;
  overflow: hidden;
  transition: height 0.28s ease;
}

/*
 * The WordPress template renders every category as a visible section. Keep
 * these sections in normal document flow so no category can be hidden by the
 * tab-transition styles used by the static prototype.
 */
.news-panels--server-rendered {
  display: grid;
  gap: 20px;
  height: auto !important;
  overflow: visible;
}

.news-panels--server-rendered .news-section {
  position: static;
  inset: auto;
  width: auto;
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition: none;
  will-change: auto;
}

.news-hero__social-rail {
  position: fixed;
  right: 8px;
  left: auto;
  top: 50%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 52px;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  color: var(--color-neutral-9);
  font-family: var(--font-primary);
  font-size: 12px;
  line-height: 1;
  z-index: 3;
  text-decoration: none;
  pointer-events: auto;
  height: auto;
  opacity: 1;
  transition: opacity 180ms ease;
}

.news-hero__social-link {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.news-hero__social-link:hover,
.news-hero__social-link:focus-visible {
  color: var(--color-neutral-11);
  outline: none;
}

.news-section {
  padding: 18px 0 2px;
  scroll-margin-top: 24px;
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease,
    visibility 0s linear 0.24s;
  will-change: opacity, transform;
}

.news-section[hidden] {
  display: none !important;
}

.news-section.is-active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease,
    visibility 0s;
}

.news-section.is-leaving {
  opacity: 0;
  transform: translateY(10px);
  visibility: visible;
}

.news-section__heading {
  min-height: 40px;
  padding: 8px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 8px;
  background: var(--color-neutral-3);
}

.news-section__title {
  margin: 0;
  color: var(--color-violet-700);
}

.news-stack {
  display: grid;
  gap: 22px;
}

.news-empty-state {
  margin-top: 4px;
  min-height: 160px;
  padding: 24px 20px;
  border-radius: 12px;
  background: var(--color-neutral-3);
  color: var(--color-neutral-8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.news-empty-state[hidden] {
  display: none !important;
}

.news-highlight {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--color-warning-300);
  color: var(--color-neutral-11);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.news-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.97fr) minmax(0, 1.03fr);
  min-height: 482px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--color-green-500);
  color: var(--color-white);
  direction: ltr;
}

.news-feature__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: transparent;
  color: inherit;
  direction: rtl;
  text-align: right;
  transition: background-color 180ms ease, color 180ms ease;
}

.news-feature__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.news-feature__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-feature__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--color-violet-400);
  color: var(--color-white);
  white-space: nowrap;
}

.news-feature__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-feature__title {
  margin: 0;
  color: inherit;
}

.news-feature__copy {
  margin: 0;
  color: inherit;
}

.news-feature__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.news-feature__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-neutral-11);
  padding: 0;
  text-decoration: none;
  flex: 0 0 auto;
}

.news-feature__action svg {
  display: block;
  width: 20px;
  height: 20px;
}

.news-feature__date {
  margin: 0;
  color: inherit;
  white-space: nowrap;
}

.news-feature__media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: var(--color-neutral-2);
}

.news-feature__media::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgb(0 0 0 / 33%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.news-hero__social-rail.is-scrolled {
  opacity: 0.72;
}

.news-feature__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.news-feature:hover .news-feature__media::after,
.news-feature:focus-within .news-feature__media::after {
  opacity: 1;
}

.news-feature:hover .news-feature__text,
.news-feature:focus-within .news-feature__text {
  background: var(--color-white);
  color: var(--color-neutral-11);
}

.news-feature:hover .news-feature__title,
.news-feature:hover .news-feature__copy,
.news-feature:hover .news-feature__date,
.news-feature:focus-within .news-feature__title,
.news-feature:focus-within .news-feature__copy,
.news-feature:focus-within .news-feature__date {
  color: var(--color-neutral-11);
}

.news-feature__action {
  transition: background-color 180ms ease;
}

.news-feature__action-icon {
  transition: filter 180ms ease;
}

.news-feature:hover .news-feature__action,
.news-feature:focus-within .news-feature__action {
  background: var(--color-green-500);
}

.news-feature:hover .news-feature__action-icon,
.news-feature:focus-within .news-feature__action-icon {
  filter: brightness(0) invert(1);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.news-card {
  position: relative;
  min-height: 272px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-neutral-2);
}

.news-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.news-card__overlay {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  z-index: 1;
  min-height: 128px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-end;
  align-items: flex-end;
  border-radius: 10px;
  background: rgb(255 255 255 / 84%);
  backdrop-filter: blur(2px);
  color: var(--color-neutral-11);
  direction: rtl;
  text-align: right;
}

.news-card__tag {
  align-self: flex-end;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
}

.news-card__content {
  display: grid;
  gap: 8px;
}

.news-card__title {
  margin: 0;
  color: inherit;
}

.news-card__copy {
  margin: 0;
  color: var(--color-neutral-10);
}

.news-card__footer {
  width: 100%;
  display: flex;
  direction: ltr;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.news-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.news-card__date {
  margin: 0;
  color: var(--color-neutral-10);
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .news-hero__social-rail {
    display: none;
  }
}

@media (max-width: 1200px) {
  .news-shell {
    width: calc(100% - 32px);
  }

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

  .news-feature__media {
    min-height: 320px;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .news-page {
    padding-bottom: 240px;
  }

  .news-shell {
    width: calc(100% - 24px);
  }

  .news-hero {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .news-hero__shell {
    padding-inline-end: 0;
  }

  .news-hero__tabs-wrap {
    gap: 10px;
  }

  .news-tabs {
    display: none;
  }

  .news-search {
    width: 100%;
    min-height: 48px;
    padding-inline: 14px;
  }

  .news-section {
    padding-top: 16px;
    position: static;
    inset: auto;
    width: auto;
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: none;
    will-change: auto;
  }

  .news-section__heading {
    display: none;
  }

  .news-stack {
    gap: 16px;
  }

  .news-empty-state {
    min-height: 128px;
    padding: 18px 16px;
  }

  .news-feature {
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
  }

  .news-feature__text {
    padding: 24px 18px 16px;
  }

  .news-feature__header {
    gap: 14px;
  }

  .news-feature__content {
    gap: 14px;
  }

  .news-feature__title,
  .news-feature__copy {
    max-width: none;
  }

  .news-feature__footer {
    gap: 12px;
  }

  .news-feature__media {
    flex: 0 0 auto;
    height: 200px;
    min-height: 0;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .news-card {
    min-height: 248px;
  }

  .news-card:last-child {
    grid-column: auto;
  }

  .news-card__overlay {
    inset-inline: 10px;
    bottom: 10px;
    padding: 12px 10px 10px;
  }

  .news-panels {
    height: auto !important;
    overflow: visible;
  }
}

@media (min-width: 1201px) {
  .news-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: clamp(410px, 33vw, 420px);
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    direction: ltr;
  }

  .news-grid::-webkit-scrollbar {
    display: none;
  }

  .news-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}
