.article-template-section-wrapper {
  max-width: none;
  padding: 0;
}

.article-template-section.block {
  background: var(--secondary-gray-20);
  padding: var(--space-20px);

  /* ── Layout grid ─────────────────────────────────────── */

  .article-template-section__layout {
    display: grid;
    gap: var(--space-20px);
    grid-template-columns: 1fr;
    margin: 0 auto;
    max-width: 100%;

    @media (min-width: 1024px) {
      max-width: calc(100% - 56px);
    }
  }

  .article-template-section__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-20px);
    min-width: 0;
  }

  .article-detail-section__card {
    background: var(--tertiary-white);
    padding: var(--space-20px);
  }

  .article-template-section__sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-20px);
  }

  /* ── Article detail ──────────────────────────────────── */

  .article-detail-section__meta {
    align-items: center;
    display: flex;
    gap: var(--space-8px);
    justify-content: center;
    margin-bottom: var(--space-12px);
  }

  .article-detail-section__category,
  .article-detail-section__date {
    color: var(--inactive-content);
    font-family: var(--body-font-arena);
    font-size: 15px;
    font-weight: var(--fw-400);
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .article-detail-section__meta-separator {
    color: var(--inactive-content);
    font-size: 15px;
    font-weight: var(--fw-400);
    line-height: 1;
  }

  .article-detail-section__title {
    color: var(--neutrals-headings);
    font-family: var(--body-font-arena);
    font-size: var(--heading-font-size-s);
    font-weight: var(--fw-700);
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0 0 var(--space-16px);
    text-align: center;
    text-transform: uppercase;
  }

  .article-detail-section__media {
    aspect-ratio: 16 / 9;
    margin-bottom: var(--space-16px);
    overflow: hidden;
    position: relative;
    width: 100%;

    iframe,
    video,
    picture,
    img {
      border: 0;
      display: block;
      height: 100%;
      left: 0;
      position: absolute;
      top: 0;
      width: 100%;
    }
  }

  .article-detail-section__description {
    p {
      color: var(--neutrals-headings);
      font-family: var(--body-font-arena);
      font-size: var(--body-font-size-xxs);
      font-weight: var(--fw-400);
      line-height: 1.5;
      margin: 0 0 var(--space-15px);
    }
  }

  .article-detail-section__nav {
    margin-top: var(--space-16px);
  }

  .article-detail-section__back {
    align-items: center;
    transition: color 0.2s ease;
    width: 200px;
    background: var(--primary-black);
    margin: 0 10px;
    color: var(--tertiary-white);
    line-height: 50px;
    text-transform: uppercase;
    display: block;
    text-decoration: none;
    font-size: 15px;
    font-weight: var(--fw-500);
    position: relative;
    text-align: center;
    &:hover {
      &::before {
        content: "";
        display: inline-block;
        position: absolute;
        left: -30px;
        top: 8px;
        border: 15px solid transparent;
        border-right: 15px solid var(--primary-black);
      }
    }
  }

  /* ── Categories ──────────────────────────────────────── */

  .article-category-listing__container {
    background: var(--tertiary-white);
    border: 1px solid var(--secondary-gray-200);
  }

  .article-category-listing__title {
    color: var(--neutrals-headings);
    font-family: var(--body-font-arena);
    font-size: var(--heading-font-size-regular);
    font-weight: var(--fw-400);
    line-height: var(--heading-lh-50-des);
    padding: 0 var(--space-16px);
    margin: 0;
    text-transform: uppercase;
  }

  .article-category-listing__list {
    border-top: 1px solid var(--secondary-gray-200);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .article-category-listing__item {
    align-items: center;
    border-bottom: 1px solid var(--secondary-gray-200);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: 0;
    position: relative;

    &::after {
      background: var(--primary-red);
      bottom: -1px;
      content: '';
      height: 2px;
      left: 0;
      position: absolute;
      transition: width 0.4s ease;
      width: 0;
    }

    &:hover::after {
      width: 100%;
    }
  }

  .article-category-listing__link {
    align-items: center;
    color: inherit;
    display: flex;
    justify-content: space-between;
    padding: var(--space-12px) var(--space-16px);
    text-decoration: none;
    width: 100%;
  }

  .article-category-listing__label {
    color: var(--neutrals-headings);
    font-family: var(--body-font-arena);
    font-size: var(--body-font-size-xs);
    font-weight: var(--fw-400);
    letter-spacing: 0.02em;
    line-height: 1.25rem;
    text-transform: uppercase;
  }

  .article-category-listing__count {
    background: var(--primary-red);
    border-radius: var(--space-8px);
    color: var(--tertiary-white);
    font-family: var(--body-font-arena);
    font-size: 15px;
    font-weight: var(--fw-700);
    min-width: 32px;
    padding: var(--space-4px) var(--space-8px);
    text-align: center;
  }

  /* ── Latest post ─────────────────────────────────────── */

  .article-latest-post__container {
    background: var(--tertiary-white);
    border: 1px solid var(--secondary-gray-200);
    padding: 0;
  }

  .article-latest-post__section-title {
    color: var(--neutrals-headings);
    font-family: var(--body-font-arena);
    font-size: var(--heading-font-size-regular);
    font-weight: var(--fw-400);
    line-height: var(--heading-lh-50-des);
    padding: 0 var(--space-16px);
    margin: 0;
    text-transform: uppercase;
  }

  .article-latest-post__list {
    border-top: 1px solid var(--secondary-gray-200);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .article-latest-post__item {
    border-bottom: 1px solid var(--secondary-gray-200);
  }

  .article-latest-post__link {
    box-shadow: none;
    color: inherit;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: box-shadow 0.2s ease;
    padding-left: 15px;
    &:hover {
      box-shadow: 0 4px 16px 0 rgb(0 0 0 / 15%);
    }
  }

  .article-latest-post__thumbnail {
    picture,
    img {
      width: 100px;
    }
  }

  .article-latest-post__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6px);
    padding: var(--space-12px) var(--space-16px);
  }

  .article-latest-post__title {
    color: var(--neutrals-headings);
    font-family: var(--body-font-arena);
    font-size: var(--body-font-size-xs);
    font-weight: var(--fw-400);
    margin: 0;
  }

  .article-latest-post__date {
    color: var(--tertiary-deep-Grey);
    font-family: var(--body-font-arena);
    font-size: var(--body-font-size-xxs);
    font-weight: var(--fw-400);
    line-height: 1.4;
  }

  /* ── Desktop: 2-column layout ────────────────────────── */

  @media (width >= 1024px) {
    padding: var(--space-32px);

    .article-template-section__layout {
      align-items: start;
      gap: var(--space-24px);
      grid-template-columns: 1fr var(--article-template-section-sidebar-width);
    }

    .article-template-section__main {
      gap: var(--space-24px);
    }

    .article-detail-section__card {
      padding: var(--space-32px);
    }

    .article-similar-posts {
      padding: var(--space-32px);
    }

    .article-detail-section__meta {
      gap: var(--space-10px);
      margin-bottom: var(--space-16px);
    }

    .article-detail-section__title {
      font-size: var(--heading-font-size-regular);
      line-height: 2.5rem;
      margin-bottom: var(--space-24px);
    }

    .article-detail-section__media {
      margin-bottom: var(--space-24px);
    }

    .article-detail-section__description {
      p {
        font-size: var(--body-font-size-xs);
        line-height: 1.5;
      }
    }
  }

  /* ── Similar posts ───────────────────────────────────────── */

  .article-similar-posts {
    background: var(--tertiary-white);
    padding: var(--space-20px);
  }

  .article-similar-posts__title {
    color: var(--neutrals-headings);
    font-family: var(--body-font-arena);
    font-size: var(--heading-font-size-regular);
    font-weight: var(--fw-500);
    line-height: 1.2;
    margin: 0 0 var(--space-16px);
    text-transform: uppercase;
  }

  .article-similar-posts__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-24px);
  }

  .article-similar-posts__item {
    .article-similar-posts__link {
      color: inherit;
      display: block;
      text-decoration: none;
    }

    picture,
    img {
      display: block;
      height: auto;
      width: 100%;
    }

    .article-similar-posts__content {
      padding: var(--space-12px) 0 0;
    }

    .article-similar-posts__description {
      color: var(--neutrals-headings);
      font-family: var(--body-font-arena);
      font-size: var(--body-font-size-xs);
      font-weight: var(--fw-400);
      line-height: 1.5;
      margin: 0 0 var(--space-8px);
    }

    .article-similar-posts__date {
      color: var(--color-link, #1a73e8);
      display: block;
      font-family: var(--body-font-arena);
      font-size: var(--body-font-size-xxs);
      font-weight: var(--fw-400);
      line-height: 1.4;
    }
  }
}
