.news-page-categories {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.news-scroll-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 15px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: var(--color-blue-100) var(--color-bg-secondary);
  align-items: center;
}

.news-scroll-wrapper.active {
  cursor: grabbing;
}

.news-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.news-scroll-wrapper::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
  border-radius: 0;
}

.news-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-blue-100);
  border-radius: 0;
  border: 1px solid var(--color-bg-secondary);
}

.news-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-blue-100);
}

.news-scroll-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  transition: all 0.2s ease;
  user-select: none;
  border-radius: 0;
  font-family: "Roboto", sans-serif;
}

.news-scroll-item:hover {
  background-color: rgba(var(--color-ink--rgb), 0.15);
  color: var(--color-text-primary);
}

.news-scroll-item._active {
  background-color: var(--color-blue-100);
  color: var(--color-white);
  pointer-events: none;
  border-color: var(--color-blue-100);
}

.news-page__main {
  margin-top: 1.3rem;
}

.news-page-list {
  display: grid;
  gap: 30px;
  margin-bottom: 50px;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.news-page-list > li,
.news-card-wrapper {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease;
}

.news-card-wrapper:hover {
  transform: translateY(-5px);
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--color-bg-primary);
  text-decoration: none;
  color: inherit;
  border-radius: 0;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  font-family: "Roboto", sans-serif;
  position: relative;
}

.news-card__image-box {
  position: relative;
  width: 100%;
  padding-top: 100%;
  height: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.news-card__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-card:hover .news-card__image {
  transform: scale(1.02);
}

.news-card__badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(var(--color-bg-primary--rgb), 0.85);
  padding: 6px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  z-index: 2;
  font-family: "Roboto", sans-serif;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  will-change: opacity, transform;
}

.pinned-icon-badge {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  will-change: opacity, transform;
}

.news-card__content {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card__title {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--color-text-primary);
  transition: color 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Roboto", sans-serif;
  min-height: 60px;
}

.news-card:hover .news-card__title {
  color: var(--color-link);
}

.news-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Roboto", sans-serif;
}

.news-card:hover .news-card__badge,
.news-card:hover .pinned-icon-badge {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
}

.news-card__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-link);
  margin-top: auto;
  font-family: "Roboto", sans-serif;
}

.news-card__link svg {
  transition: transform 0.3s;
}

.news-card:hover .news-card__link svg {
  transform: translateX(5px);
}

@media (max-width: 899px) {
  .news-page-categories {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .news-scroll-wrapper {
    padding-right: 20px;
  }

  .news-scroll-item {
    font-size: 13px;
    padding: 10px 16px;
  }
}

@media (min-width: 2000px) {
  .news-page-categories {
    margin-bottom: 40px;
  }

  .news-scroll-wrapper {
    gap: 20px;
    padding-bottom: 40px;
  }

  .news-scroll-wrapper::-webkit-scrollbar {
    height: 12px;
  }

  .news-scroll-item {
    padding: 15px 30px;
    font-size: 18px;
  }

  .news-page__main {
    margin-top: 3rem;
  }

  .news-page-list {
    gap: 60px;
    margin-bottom: 80px;
  }

  .news-card-wrapper:hover {
    transform: translateY(-10px);
  }

  .news-card__badge {
    top: 25px;
    left: 25px;
    padding: 10px 20px;
    font-size: 16px;
  }

  .news-card__content {
    padding: 40px 0;
  }

  .news-card__title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .news-card__desc {
    font-size: 18px;
    margin-bottom: 30px;
  }

  .news-card__link {
    font-size: 18px;
    gap: 12px;
  }
}

.news-card__link {
  position: relative;
  width: fit-content;
  text-decoration: none;
}

.news-card__link::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-card:hover .news-card__link::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}
._inner-header__title__container {
  display: flex;
  align-items: center;
  gap: 15px;
}

@media (max-width: 768px) {
  ._inner-header__title__container {
    gap: 10px;
  }
}

/* The only column definition of the list: the doubled class and !important
   keep it above any other grid rule that reaches this <ul>. */
.news-page-list.news-page-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 1100px) {
  .news-page-list.news-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .news-page-list.news-page-list {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

.events-controls-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  align-items: center;
  margin-bottom: 1.5rem;
  justify-content: space-between;
}

.events-search-form {
  flex: 1 1 auto;
  margin-bottom: 0;
  width: 100%;
}

.events-filters-wrapper {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}

/* The month and year selects draw their arrow from this image (set inline on
   each <select>); an image cannot follow a colour token, so each theme gets its own. */
.events-filters-wrapper {
  --news-select-arrow: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23475569%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E');
}

html[data-theme="dark"] .events-filters-wrapper {
  --news-select-arrow: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23aaaaaa%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E');
}

.events-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.events-search-input {
  width: 100%;
  height: 54px;
  padding: 0 60px 0 18px;
  background-color: var(--color-bg-secondary);
  border: 1px solid transparent;
  border-radius: 0;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  color: var(--color-text-primary);
  outline: none;
  transition: all 0.3s ease;
  appearance: none;
}

.events-search-inner input {
  padding-bottom: 0px !important;
  font-size: 16px !important;
}

.events-search-inner input::placeholder {
  font-size: 18px;
  opacity: 0.8;
}

.events-search-input::placeholder {
  color: var(--color-text-muted);
}

.events-search-input:focus {
  background-color: var(--color-bg-primary);
  border-color: var(--color-accent);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.events-search-clear {
  position: absolute;
  right: 5px;
  top: 0;
  width: 40px;
  height: 54px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-heading);
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;
}

.events-search-clear:hover {
  color: var(--color-red) !important;
}

@media (max-width: 768px) {
  .events-controls-wrapper {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .events-search-form {
    flex: 1 1 100%;
    margin-bottom: 0;
  }

  .events-filters-wrapper {
    flex-wrap: wrap;
    width: 100%;
  }

  .events-filters-wrapper select,
  .events-filters-wrapper button {
    flex: 1 1 auto;
  }

  .events-search-input {
    height: 46px !important;
    font-size: 15px !important;
  }

  .events-search-inner input::placeholder {
    font-size: 15px !important;
  }

  .events-search-clear {
    width: 36px;
    height: 46px;
  }

  .events-search-clear svg {
    width: 18px;
    height: 18px;
  }

  .news-scroll-wrapper {
    padding-bottom: 15px;
    gap: 8px;
  }

  .news-scroll-item {
    padding: 8px 16px;
    font-size: 13px;
  }

  .news-card__content {
    padding: 14px 0 0;
  }

  /*
   * One card per row on a phone, so the title no longer needs the desktop's
   * 24px to stand out from its neighbours: at that size each card read like
   * a page title and a dozen news took ten screens.
   */
  .news-card__title {
    font-size: var(--fs-card);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 8px;
    min-height: 0;
  }

  .news-card__desc {
    margin-bottom: 12px;
  }

  .news-card__badge {
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: var(--fs-caption);
  }

  .news-page-list {
    gap: 20px;
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .events-search-input {
    font-size: 14px !important;
  }

  .events-search-inner input::placeholder {
    font-size: 14px !important;
  }
}
