@charset "UTF-8";
/*
 * Блог: список і стаття. Еталони — Blog.dc.html, Article.dc.html.
 */

/* --------------------------------------------------------------- список -- */

/* Перемикач рубрик — сегментований контрол із макета. */

.blog-cats {
  display: flex;
  justify-content: center;
}

.blog-cats__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 4px;
  border-radius: 43px;
  background: #e9e9e9;
}

.blog-cats a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 14px 16px;
  border-radius: 38px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.13;
  letter-spacing: 0.09em;
  text-align: center;
  color: var(--c-muted);
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease;
}

.blog-cats a:hover {
  color: var(--c-ink);
}

.blog-cats a[aria-current="page"] {
  background: #fff;
  color: var(--c-ink);
  box-shadow: 0 1.5px 4px -1px rgba(10, 9, 11, 0.07), 0 1px 2px -1px rgba(10, 9, 11, 0.12);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 24px;
}

/* Картка статті у списку */

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 31px;
  background: var(--c-bg);
  box-shadow: 0 2.4px 2.4px rgba(0, 0, 0, 0.09), 0 5.6px 3.2px rgba(0, 0, 0, 0.05), 0 9.7px 4px rgba(0, 0, 0, 0.01);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.blog-card__media {
  position: relative;
  display: block;
  aspect-ratio: 405 / 257;
  overflow: hidden;
  border-radius: 31px;
  background: var(--c-line);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  height: 80px;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card__overlay,
.blog-card:focus-within .blog-card__overlay {
  opacity: 1;
}

.blog-card__overlay span:first-child {
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.014em;
  color: #fff;
}

.blog-card__overlay-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #fff;
}

.blog-card__overlay-arrow svg {
  width: 18px;
  height: 12px;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  flex: 1 1 auto;
  padding: 24px;
}

.blog-card__cat {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: #272323;
}

.blog-card__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.3;
  color: var(--c-navy);
}

.blog-card__date {
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.5;
  color: #272323;
}

@media (max-width: 1023px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-cats__inner {
    border-radius: 24px;
  }
}

/* --------------------------------------------------------------- стаття -- */

.article {
  display: grid;
  grid-template-columns: minmax(0, 452fr) minmax(0, 908fr);
  align-items: start;
  column-gap: 40px;
}

.article__head {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
}

.article__hero {
  grid-column: 2;
  grid-row: 1;
  padding: 24px 0;
}

.article__hero img {
  width: 100%;
  aspect-ratio: 828 / 450;
  border-radius: 31px;
  object-fit: cover;
}

.article__aside {
  grid-column: 1;
  grid-row: 2;
  padding: 24px 0;
}

.article__body {
  grid-column: 2;
  grid-row: 2;
  padding: 24px 0;
}

.article__title {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 28px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #212121;
}

.article__date {
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-ink);
}

.article__share-label {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.5;
  color: var(--c-ink);
}

.article__share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article__share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--c-ink);
  transition: opacity 0.25s ease;
}

.article__share a:hover {
  opacity: 0.7;
}

.article__share svg {
  width: 18px;
  height: 18px;
}

/* Зміст статті */

.toc {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
}

.toc__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 0 20px;
  border: 0;
  background: none;
  font-weight: 700;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.5;
  color: var(--c-ink);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.toc__head svg {
  width: 17px;
  height: 10px;
  flex: 0 0 auto;
  transition: transform 0.25s ease;
}

.toc__head[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

.toc__list {
  display: flex;
  flex-direction: column;
  padding: 25px 16px 12px;
  border: 1px solid #fff;
}

.toc__item {
  position: relative;
  display: flex;
  padding: 12px 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  color: var(--c-ink);
  transition: color 0.2s ease;
}

.toc__item--sub {
  margin-left: 28px;
  padding: 0 0 6px;
  font-weight: 400;
  font-size: 16px;
}

.toc__item:hover,
.toc__item.is-active {
  color: #825a2c;
}

/* Позначка активного пункту — риска ліворуч, як у макеті. */
.toc__item.is-active::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 18px;
  height: 2px;
  background: #825a2c;
}

/* Типографіка тіла статті */

.article__body .prose {
  max-width: none;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-ink);
}

.article__body .prose h2 {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  color: var(--c-ink);
  margin-top: 1.6em;
  scroll-margin-top: 100px;
}

.article__body .prose h3 {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: var(--c-ink);
  margin-top: 1.4em;
  scroll-margin-top: 100px;
}

@media (max-width: 1023px) {
  .article {
    grid-template-columns: minmax(0, 1fr);
  }

  .article__head,
  .article__hero,
  .article__aside,
  .article__body {
    grid-column: 1;
  }

  .article__head {
    grid-row: 1;
  }

  .article__hero {
    grid-row: 2;
  }

  .article__aside {
    grid-row: 3;
  }

  .article__body {
    grid-row: 4;
  }

  .toc {
    position: static;
  }
}
