/* News archive and article styling, aligned with the homepage design. */
body.category-novosti .m2 {
  margin-top: 26px;
}

body.category-novosti .m2l {
  min-width: 0;
}

body.category-novosti .r-block-btitle {
  margin: 34px 0 16px;
  padding: 0;
  overflow: visible;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ts-color-brand);
}

body.category-novosti .r-block-btitle:before,
body.category-novosti .r-block-btitle span:after {
  display: none;
}

body.category-novosti .r-block-btitle a {
  color: #064a83 !important;
  text-decoration: none !important;
}

body.category-novosti .m2l > .r-block-btitle:first-child {
  margin-top: 0;
}

body.category-novosti .mnews {
  justify-content: flex-start;
  gap: 16px;
}

body.category-novosti .mnews > *,
body.category-novosti .mnews-item,
body.category-novosti .mnews-item-d {
  flex: 0 0 calc(33.333% - 11px);
  width: calc(33.333% - 11px);
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ts-color-border);
  border-radius: 8px;
  color: var(--ts-color-text);
  background: var(--ts-color-surface);
  box-shadow: 0 8px 20px rgba(8, 55, 92, 0.045);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body.category-novosti .mnews-item:hover,
body.category-novosti .mnews-item-d:hover {
  border-color: var(--ts-color-border-strong);
  box-shadow: 0 12px 24px rgba(8, 55, 92, 0.09);
  transform: translateY(-2px);
}

body.category-novosti .mnews-item-img,
body.category-novosti .mnews-item-d-bg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ts-color-surface-muted);
}

body.category-novosti .mnews-item-img img,
body.category-novosti .mnews-item-d-bg > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.category-novosti .mnews-item-d-bg:after {
  display: none;
}

body.category-novosti .mnews-item-box,
body.category-novosti .mnews-item-d-box {
  position: static;
  display: flex;
  height: auto;
  min-height: 150px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 15px 16px 14px;
}

body.category-novosti .mnews-item-title,
body.category-novosti .mnews-item-d-title {
  display: -webkit-box;
  overflow: hidden;
  padding: 0;
  color: var(--ts-color-brand) !important;
  font: 700 18px/1.3 "PT Sans", Arial, sans-serif;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.category-novosti .mnews-item-info-box {
  flex-grow: 0;
  margin-top: auto;
  padding-top: 13px;
}

body.category-novosti .mnews-item-info,
body.category-novosti .mnews-item-d-title + .npage-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 13px;
  color: var(--ts-color-text-muted);
  font-size: 13px;
}

body.category-novosti .mnews-item-d-title + .npage-info > * {
  display: flex;
  align-items: center;
}

body.category-novosti .mnews-item-category,
body.category-novosti .mnews-item-d-title + .npage-info a {
  margin: 0;
  padding: 4px 9px;
  border-radius: 5px;
  color: var(--ts-color-brand) !important;
  background: var(--ts-color-surface-muted);
  font-size: 12px;
  text-decoration: none !important;
}

body.category-novosti .mnews-item-date,
body.category-novosti .mnews-item-d-title + .npage-info .npage-info-icons span {
  margin: 0;
  padding: 0;
  color: var(--ts-color-text-muted);
  background: none;
  font-size: 13px;
}

body.category-novosti .mnews-item-d-title + .npage-info .npage-info-icons img {
  display: none;
}

body.single-post .npage {
  margin-top: 0;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(8, 55, 92, 0.045);
}

body.single-post .npage-info {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

body.single-post .npage-info a {
  margin: 0;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--ts-color-brand) !important;
  background: var(--ts-color-surface-muted);
  font-size: 12px;
  letter-spacing: 0;
  text-decoration: none;
}

body.single-post .npage-info-icons img {
  display: none;
}

body.single-post .npage-info-icons span {
  color: var(--ts-color-text-muted);
}

body.single-post .npage-title {
  margin: 0 0 22px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.16;
  text-transform: none;
}

body.single-post .npage-bimg {
  margin-bottom: 26px;
  overflow: hidden;
  border-radius: 7px;
}

body.single-post .npage-bimg img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

body.single-post .npage > p,
body.single-post .npage > ul,
body.single-post .npage > ol {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.72;
  text-align: left;
}

body.single-post .npage > :is(h2, h3, h4) {
  margin: 30px 0 14px;
  color: var(--ts-color-brand);
  line-height: 1.25;
}

body.single-post .npage > h2 { font-size: 28px; }
body.single-post .npage > h3 { font-size: 23px; }

body.single-post .npage blockquote {
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
}

body.single-post .npage-news .r-block-title {
  color: var(--ts-color-brand);
}

body.single-post .npage-news .vcsr-news-item {
  overflow: hidden;
  border-color: var(--ts-color-border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(8, 55, 92, 0.045);
}

body.single-post .npage-news .vcsr-news-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ts-color-surface-muted);
}

body.single-post .npage-news .vcsr-news-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.single-post .npage-news .vcsr-news-main {
  padding: 14px 16px 16px;
}

body.single-post .npage-news .vcsr-news-title {
  min-height: 0;
  color: var(--ts-color-brand) !important;
  font: 700 17px/1.3 "PT Sans", Arial, sans-serif;
  text-decoration: none;
}

body.single-post .npage-news .vcsr-news-text {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  color: var(--ts-color-text-muted);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.single-post .npage-news .vcsr-news-bottom {
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

body.single-post .npage-news :is(.vcsr-news-tag, .vcsr-news-date) {
  margin: 0;
  color: var(--ts-color-text-muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  body.category-novosti .mnews > *,
  body.category-novosti .mnews-item,
  body.category-novosti .mnews-item-d {
    flex-basis: calc(50% - 8px);
    width: calc(50% - 8px);
  }
}

@media (max-width: 600px) {
  body.category-novosti .m2 {
    margin-top: 14px;
    padding-bottom: 36px;
  }

  body.category-novosti .r-block-btitle {
    margin: 26px 0 13px;
    font-size: 24px;
  }

  body.category-novosti .mnews {
    gap: 12px;
  }

  body.category-novosti .mnews > *,
  body.category-novosti .mnews-item,
  body.category-novosti .mnews-item-d {
    flex-basis: 100%;
    width: 100%;
  }

  body.category-novosti .mnews-item-box,
  body.category-novosti .mnews-item-d-box {
    min-height: 0;
    padding: 14px 15px;
  }

  body.category-novosti .mnews-item-title,
  body.category-novosti .mnews-item-d-title {
    font-size: 17px;
  }

  body.single-post .npage {
    padding: 18px 16px;
  }

  body.single-post .npage-title {
    margin-bottom: 17px;
    font-size: 27px;
  }

  body.single-post .npage-bimg {
    margin-bottom: 20px;
  }

  body.single-post .npage > p,
  body.single-post .npage > ul,
  body.single-post .npage > ol {
    font-size: 16px;
    line-height: 1.65;
  }

  body.single-post .npage > h2 { font-size: 23px; }
  body.single-post .npage > h3 { font-size: 20px; }
}

@media (max-width: 500px) {
  body.category-novosti .r-block-btitle {
    font-size: 22px;
  }
}

/* Nested news categories use the legacy featured-card markup. Keep its image
   separate from the headline so titles stay readable on every poster. */
body[class*="category-novosti-"] .mnews-item-d {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ts-color-border);
  border-radius: 8px;
  color: var(--ts-color-text);
  background: var(--ts-color-surface);
}

body[class*="category-novosti-"] .mnews-item-d-bg {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ts-color-surface-muted);
}

body[class*="category-novosti-"] .mnews-item-d-bg > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[class*="category-novosti-"] .mnews-item-d-bg:after {
  display: none;
}

body[class*="category-novosti-"] .mnews-item-d-box {
  position: static;
  display: flex;
  height: auto;
  min-height: 0;
  flex-direction: column;
  justify-content: flex-start;
  padding: 15px 16px 14px;
}

body[class*="category-novosti-"] .mnews-item-d-title {
  display: block;
  color: var(--ts-color-brand) !important;
  font: 700 19px/1.3 "PT Sans", Arial, sans-serif;
  text-decoration: none;
}

body[class*="category-novosti-"] .mnews-item-d-title + .npage-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 13px;
  color: var(--ts-color-text-muted);
  font-size: 13px;
}

body[class*="category-novosti-"] .mnews-item-d-title + .npage-info a {
  margin: 0;
  padding: 4px 9px;
  border-radius: 5px;
  color: var(--ts-color-brand) !important;
  background: var(--ts-color-surface-muted);
  font-size: 12px;
  text-decoration: none;
}

body[class*="category-novosti-"] .mnews-item-d-title + .npage-info .npage-info-icons img {
  display: none;
}

body[class*="category-novosti-"] .mnews-item-d-title + .npage-info .npage-info-icons span {
  color: var(--ts-color-text-muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  body[class*="category-novosti-"] .mnews-item-d-box {
    padding: 14px 15px;
  }

  body[class*="category-novosti-"] .mnews-item-d-title {
    font-size: 17px;
  }
}

/* Standard category archives share the compact card and sidebar grid used by
   the news pages; the custom union-news landing page keeps its own layout. */
body.category:not(.category-novosti) .m2 {
  margin-top: 20px;
  padding-bottom: 20px;
}

body.category:not(.category-novosti) .m2 > .container {
  box-sizing: border-box;
  width: calc(100% - 30px);
  max-width: 1570px;
  margin-right: auto;
  margin-left: auto;
}

body.category:not(.category-novosti) .m2-box {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  overflow: visible;
}

body.category:not(.category-novosti) .m2l {
  flex: 1 1 auto;
  min-width: 0;
}

body.category:not(.category-novosti) .m2-box > .page-r.ts-sidebar-column {
  flex: 0 0 340px;
  width: 340px;
  padding: 0;
}

body.category:not(.category-novosti) .mnews {
  justify-content: flex-start;
  gap: 16px;
}

body.category:not(.category-novosti) .mnews > *,
body.category:not(.category-novosti) .mnews-item,
body.category:not(.category-novosti) .mnews-item-d {
  flex: 0 0 calc(33.333% - 11px);
  width: calc(33.333% - 11px);
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ts-color-border);
  border-radius: 8px;
  color: var(--ts-color-text);
  background: var(--ts-color-surface);
  box-shadow: 0 8px 20px rgba(8, 55, 92, 0.045);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body.category:not(.category-novosti) .mnews-item:hover,
body.category:not(.category-novosti) .mnews-item-d:hover {
  border-color: var(--ts-color-border-strong);
  box-shadow: 0 12px 24px rgba(8, 55, 92, 0.09);
  transform: translateY(-2px);
}

body.category:not(.category-novosti) .mnews-item-img,
body.category:not(.category-novosti) .mnews-item-d-bg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ts-color-surface-muted);
}

body.category:not(.category-novosti) .mnews-item-img img,
body.category:not(.category-novosti) .mnews-item-d-bg > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.category:not(.category-novosti) .mnews-item-d-bg:after {
  display: none;
}

body.category:not(.category-novosti) .mnews-item-box,
body.category:not(.category-novosti) .mnews-item-d-box {
  position: static;
  display: flex;
  height: auto;
  min-height: 130px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 15px 16px 14px;
}

body.category:not(.category-novosti) .mnews-item-title,
body.category:not(.category-novosti) .mnews-item-d-title {
  display: -webkit-box;
  overflow: hidden;
  padding: 0;
  color: var(--ts-color-brand) !important;
  font: 700 18px/1.3 "PT Sans", Arial, sans-serif;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.category:not(.category-novosti) .mnews-item-info-box {
  flex-grow: 0;
  margin-top: auto;
  padding-top: 13px;
}

body.category:not(.category-novosti) .mnews-item-info,
body.category:not(.category-novosti) .mnews-item-d-title + .npage-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 13px;
  color: var(--ts-color-text-muted);
  font-size: 13px;
}

body.category:not(.category-novosti) .mnews-item-category,
body.category:not(.category-novosti) .mnews-item-d-title + .npage-info a {
  margin: 0;
  padding: 4px 9px;
  border-radius: 5px;
  color: var(--ts-color-brand) !important;
  background: var(--ts-color-surface-muted);
  font-size: 12px;
  text-decoration: none !important;
}

body.category:not(.category-novosti) .mnews-item-date,
body.category:not(.category-novosti) .mnews-item-d-title + .npage-info .npage-info-icons span {
  margin: 0;
  padding: 0;
  color: var(--ts-color-text-muted);
  background: none;
  font-size: 13px;
}

body.category:not(.category-novosti) .mnews-item-d-title + .npage-info .npage-info-icons img {
  display: none;
}

@media (max-width: 767px) {
  body.category:not(.category-novosti) .m2-box {
    flex-wrap: wrap;
  }

  body.category:not(.category-novosti) .m2-box > .m2l,
  body.category:not(.category-novosti) .m2-box > .page-r.ts-sidebar-column {
    flex: 0 0 100%;
    width: 100%;
  }

  body.category:not(.category-novosti) .m2-box > .page-r.ts-sidebar-column {
    padding-top: 20px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body.category:not(.category-novosti) .m2-box {
    flex-wrap: wrap;
  }

  body.category:not(.category-novosti) .m2-box > .m2l,
  body.category:not(.category-novosti) .m2-box > .page-r.ts-sidebar-column {
    flex: 0 0 100%;
    width: 100%;
  }
}

@media (max-width: 900px) {
  body.category:not(.category-novosti) .mnews > *,
  body.category:not(.category-novosti) .mnews-item,
  body.category:not(.category-novosti) .mnews-item-d {
    flex-basis: calc(50% - 8px);
    width: calc(50% - 8px);
  }
}

@media (max-width: 600px) {
  body.category:not(.category-novosti) .m2 > .container {
    width: calc(100% - 16px);
    max-width: none;
  }

  body.category:not(.category-novosti) .mnews {
    gap: 12px;
  }

  body.category:not(.category-novosti) .mnews > *,
  body.category:not(.category-novosti) .mnews-item,
  body.category:not(.category-novosti) .mnews-item-d {
    flex-basis: 100%;
    width: 100%;
  }

  body.category:not(.category-novosti) .mnews-item-box,
  body.category:not(.category-novosti) .mnews-item-d-box {
    min-height: 0;
    padding: 14px 15px;
  }

  body.category:not(.category-novosti) .mnews-item-title,
  body.category:not(.category-novosti) .mnews-item-d-title {
    font-size: 17px;
  }
}
