:root {
  --etx-news-blue: var(--etx-blue, #1f40ab);
  --etx-news-blue-dark: var(--etx-blue-2, #173489);
  --etx-news-ink: var(--etx-ink, #101828);
  --etx-news-text: var(--etx-text, #344054);
  --etx-news-muted: var(--etx-muted, #667085);
  --etx-news-line: var(--etx-line, #d9e2ec);
  --etx-news-soft: var(--etx-soft, #f5f7fa);
}

body.etx-news-body .wp-block-post-title,
body.etx-news-body h1.entry-title {
  display: none !important;
}

.etx-news-page {
  width: min(75vw, 1240px);
  max-width: min(75vw, 1240px) !important;
  margin: 0 auto !important;
  padding: 38px 0 82px;
  box-sizing: border-box;
  color: var(--etx-news-ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

.etx-news-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--etx-news-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.07);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.etx-news-card:hover,
.etx-news-card:focus-within {
  border-color: #b7c6da;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.11);
  transform: translateY(-2px);
}

.etx-news-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--etx-news-line);
  background: #ffffff;
}

.etx-news-card-image.is-empty {
  display: none;
}

.etx-news-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
}

.etx-news-card:hover .etx-news-card-image img,
.etx-news-card:focus-within .etx-news-card-image img {
  transform: scale(1.025);
}

.etx-news-card-content {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  padding: 21px 22px 23px;
}

.etx-news-card-content time {
  margin: 0 0 10px;
  color: var(--etx-news-blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.etx-news-card-content h2 {
  margin: 0 0 12px;
  color: var(--etx-news-ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.28;
}

.etx-news-card-content h2 a {
  color: inherit !important;
  text-decoration: none !important;
}

.etx-news-card-content h2 a:hover,
.etx-news-card-content h2 a:focus-visible {
  color: var(--etx-news-blue) !important;
  outline: none;
}

.etx-news-card-content p {
  margin: 0 0 18px;
  color: var(--etx-news-text);
  font-size: 15px;
  line-height: 1.58;
}

.etx-news-read-more {
  align-self: flex-start;
  margin-top: auto;
  color: var(--etx-news-blue) !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none !important;
}

.etx-news-read-more::after {
  content: " ›";
  font-size: 18px;
  line-height: 0;
}

.etx-news-read-more:hover,
.etx-news-read-more:focus-visible {
  color: var(--etx-news-blue-dark) !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
  outline: none;
}

.etx-news-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.etx-news-pagination .page-numbers {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 11px;
  place-items: center;
  box-sizing: border-box;
  border: 1px solid var(--etx-news-line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--etx-news-ink) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
}

.etx-news-pagination .page-numbers.current,
.etx-news-pagination a.page-numbers:hover,
.etx-news-pagination a.page-numbers:focus-visible {
  border-color: var(--etx-news-blue);
  background: var(--etx-news-blue);
  color: #ffffff !important;
  outline: none;
}

.etx-news-empty {
  width: min(100%, 620px);
  margin: 20px auto;
  padding: 28px;
  box-sizing: border-box;
  border: 1px solid var(--etx-news-line);
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.etx-news-empty p {
  margin: 0 0 10px;
  color: var(--etx-news-text);
}

.etx-news-empty a,
.etx-news-original-link a {
  color: var(--etx-news-blue) !important;
  font-weight: 800;
}

body.etx-news-single-body .wp-block-post-content,
body.etx-news-single-body .entry-content {
  font-family: Arial, Helvetica, sans-serif;
}

.etx-news-original-link {
  margin-top: 30px !important;
  padding-top: 18px;
  border-top: 1px solid var(--etx-news-line);
}

header .etx-news-navigation-item.current-menu-item > a,
header a[href*="/novosti/"][aria-current="page"] {
  color: var(--etx-news-blue) !important;
}

@media (max-width: 1000px) {
  .etx-news-page {
    width: calc(100% - 40px);
    max-width: calc(100% - 40px) !important;
  }

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

@media (max-width: 640px) {
  .etx-news-page {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px) !important;
    padding: 22px 0 58px;
  }

  .etx-news-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .etx-news-card-content {
    padding: 18px 18px 20px;
  }

  .etx-news-card-content h2 {
    font-size: 19px;
  }

  .etx-news-card:hover,
  .etx-news-card:focus-within {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .etx-news-card,
  .etx-news-card-image img {
    transition: none;
  }
}
