/* ==========================================================================
   Дягиль — детальная страница новости
   ========================================================================== */

.article {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  color: #000000;
  background: var(--article-bg, var(--rubric-city, #CF6656));
}

.article--city {
  --article-bg: #CF6656;
}

.article--people {
  --article-bg: #8F79B9;
}

.article--fun {
  --article-bg: #79B997;
}

.article--spec {
  --article-bg: #A2997F;
}

.article__inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 0 60px;
  box-sizing: border-box;
}

/* Top: rubric + close */
.article__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.article__rubric {
  color: #F1F0EB;
}

.article__section {
  color: #F1F0EB;
}

.article__tag {
  color: #000000;
}

.article__close {
  position: static;
  flex-shrink: 0;
  width: 32px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000000;
}

.article__close img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Title */
.article__title {
  margin: 0;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 500;
  font-style: normal;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #000000;
  max-width: 940px;
}

/* Author + date */
.article__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 50px;
  margin-bottom: 36px;
  max-width: 940px;
}

.article__author {
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 600;
  font-style: normal;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000000;
}

.article__date {
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 600;
  font-style: normal;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-align: right;
  text-transform: uppercase;
  vertical-align: bottom;
  color: #000000;
  white-space: nowrap;
}

/* Photo */
.article__figure {
  margin: 0 0 36px;
  max-width: 940px;
}

.article__media {
  width: 780px;
  max-width: 100%;
  height: 480px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}

.article__media img,
.article__media .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article__caption {
  margin-top: 12px;
  max-width: 780px;
}

.article__caption-text {
  margin: 0 0 6px;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #F1F0EB;
}

.article__caption-credit {
  margin: 0;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 600;
  font-style: normal;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #F1F0EB;
}

/* Lead / subtitle */
.article__lead {
  margin: 0 0 28px;
  max-width: 780px;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0;
  color: #F1F0EB;
}

/* Body */
.article__content {
  max-width: 780px;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0;
  color: #000000;
}

.article__content p {
  margin: 0 0 1.2em;
}

.article__content p:last-child {
  margin-bottom: 0;
}

/* Quote */
.article__quote {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  margin: 36px 0;
  padding: 0;
  border: 0;
  color: #000000;
  font-size: 18px;
  line-height: 1.4;
}

.article__quote-mark {
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.article__quote p {
  margin: 0;
}

/* Tags */
.article__tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  height: 14px;
  margin: 56px 0 48px;
  font-family: var(--font, "Onest", system-ui, sans-serif);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.article__tags-label {
  color: #F1F0EB;
}

.article__tags-sep,
.article__tags-item {
  color: #000000;
}

/* Footer */
.article__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: none;
  padding-top: 20px;
  min-height: 100px;
}

.article__up {
  position: fixed;
  left: calc(var(--sidebar-w, 50px) + 20px);
  bottom: 55px;
  z-index: 30;
  width: 62.23px;
  height: 84.36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.article__up img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.article__socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* On article page social icons should stay readable on colored bg */
.article .footer__social--tg {
  background: #000000;
}

.article .footer__social:not(.footer__social--tg) img {
  /* vk.png keeps its colors */
}

@media (max-width: 1100px) {
  .article__inner {
    padding: 0 0 48px;
  }

  .article__media {
    width: 100%;
    height: auto;
    aspect-ratio: 780 / 480;
  }

  .article__tags {
    flex-wrap: wrap;
    height: auto;
    gap: 10px 16px;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .article__inner {
    padding: 0 0 40px;
  }

  .article__title {
    font-size: 20px;
  }

  .article__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .article__date {
    text-align: left;
  }

  .article__lead,
  .article__content,
  .article__quote {
    font-size: 16px;
  }

  .article__footer {
    justify-content: center;
  }

  .article__socials {
    justify-content: center;
  }
}
