@layer sections {
  .news {
    padding-block: var(--sp-120);
    background: var(--surface-primary);
  }

  .news__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-56);
    overflow: hidden;
  }

  .news__head {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-24);
    width: 100%;
    overflow: hidden;
  }

  .news__head-copy {
    display: flex;
    flex: 0 0 792px;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-16);
    max-width: 100%;
    overflow: hidden;
  }

  .news__title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-24);
    width: 100%;
  }

  .news__title { width: 100%; }
  .news__text { width: 100%; max-width: 690px; }

  .news__actions {
    display: flex;
    flex: 1 0 0;
    align-self: stretch;
    justify-content: flex-end;
    align-items: flex-end;
    min-width: 0;
  }

  .news-link {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-8);
    color: var(--label-secondary);
    font-size: var(--fs-body-2);
    line-height: 1.43;
    text-decoration: none;
  }

  .news-link__icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: translate var(--dur) var(--ease);
  }

  .news-link:hover .news-link__icon,
  .news-link:focus-visible .news-link__icon { translate: var(--sp-4) 0; }

  .news__articles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-24);
    width: 100%;
    overflow: hidden;
  }

  .card-article {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    height: 480px;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--r-12);
    background: var(--surface-glass-1);
    isolation: isolate;
  }

  .card-article::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: var(--surface-scrim);
    pointer-events: none;
  }

  .card-article__link {
    position: absolute;
    z-index: 4;
    inset: 0;
    text-decoration: none;
  }

  .card-article__media {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
  }

  .card-article__image {
    position: absolute;
    top: var(--article-img-y, 0%);
    left: var(--article-img-x, 0%);
    display: block;
    width: var(--article-img-w, 100%);
    height: var(--article-img-h, 100%);
    max-width: none;
    object-fit: cover;
    object-position: center center;
    transition: scale 600ms var(--ease);
  }

  .card-article:hover .card-article__image,
  .card-article:focus-within .card-article__image { scale: 1.025; }

  .card-article__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    height: 200px;
    padding: var(--sp-20);
    overflow: hidden;
    border: .5px solid var(--surface-separator);
    border-radius: var(--r-8);
    background: var(--surface-glass-1);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
  }

  .card-article__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-12);
    width: 100%;
    overflow: hidden;
  }

  .card-article__title {
    width: 100%;
    font-family: var(--font-body);
    font-size: var(--fs-h5);
    font-weight: 500;
    line-height: 1.32;
    letter-spacing: -.01em;
  }

  .card-article__excerpt { width: 100%; }

  .card-article__footer {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-16);
    width: 100%;
    height: 16px;
    color: var(--label-secondary);
  }

  .card-article__date { flex: 1 0 0; min-width: 0; }
  .card-article__read { flex: 0 0 auto; color: var(--label-secondary); }

  @media (max-width: 767px) {
    .news { padding-block: var(--sp-96); }

    .news__head {
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-end;
      gap: var(--sp-24);
    }

    .news__head-copy { flex: none; width: 100%; }

    .news__text {
      max-width: none;
      font-size: var(--fs-body-1);
      line-height: 1.3125;
    }

    .news__actions {
      flex: none;
      align-self: auto;
      justify-content: flex-end;
      width: 100%;
    }

    .news__actions .news-link { color: var(--label-primary); }

    .news__articles {
      grid-template-columns: 1fr;
      gap: var(--sp-24);
    }

    .card-article__image {
      top: var(--article-img-mobile-y, var(--article-img-y, 0%));
      left: var(--article-img-mobile-x, var(--article-img-x, 0%));
      width: var(--article-img-mobile-w, var(--article-img-w, 100%));
      height: var(--article-img-mobile-h, var(--article-img-h, 100%));
    }
  }
}

@layer sections {
  /* Стрілки біля «Читати» за замовчуванням немає — вона зʼявляється під
     курсором, щоб підкреслити клікабельність (дзвінок 04.09, 02:30).
     Місце під неї зарезервоване, інакше підпис смикався б убік. */
  .news-link__icon {
    opacity: 0;
    translate: -4px 0;
    transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
  }

  .card-article:hover .news-link__icon,
  .card-article:focus-within .news-link__icon {
    opacity: 1;
    translate: 0 0;
  }

  @media (prefers-reduced-motion: reduce) {
    .news-link__icon { transition: none; translate: 0 0; }
  }
}
