/* News page only */

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 670px) 220px;
  column-gap: 29px;
  width: 980px;
  margin: 0 auto;
  padding: 30px 31px 44px 30px;
}

.news-feed {
  min-width: 0;
}

.news-card {
  display: grid;
  grid-template-columns: 320px 350px;
  height: 240px;
  margin: 0 0 32px;
  overflow: hidden;
  background: #f2f2f2;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.news-card:last-child {
  margin-bottom: 0;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.13);
}

.news-card-image {
  min-width: 0;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.news-card:hover .news-card-image img,
.news-card:focus-within .news-card-image img {
  transform: scale(1.025);
}

.news-card-copy {
  padding: 24px 23px;
}

.news-card-copy h2 {
  margin: 0 0 16px;
  font-size: 25px;
  font-weight: 700;
  line-height: 31px;
}

.news-card-copy h2 a {
  color: #8b0000;
  text-decoration: none;
  transition: color 160ms ease;
}

.news-card-copy h2 a:hover,
.news-card-copy h2 a:focus-visible {
  color: #d12300;
  outline: none;
}

.news-card-copy p {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 18px;
}

/* Sidebar */

.news-sidebar {
  min-width: 0;
  padding-top: 4px;
}

.sidebar-section {
  margin: 0 0 43px;
}

.sidebar-section h2 {
  margin: 0 0 3px;
  color: #8d1700;
  font-size: 22px;
  font-weight: 700;
  line-height: 31px;
}

.sidebar-rule {
  width: 100%;
  height: 1px;
  margin-bottom: 12px;
  background: #cfcfcf;
}

.featured-post {
  display: block;
  color: #000;
  text-decoration: none;
}

.featured-post img {
  width: 220px;
  height: 124px;
  object-fit: cover;
  transition: filter 180ms ease;
}

.featured-post span {
  display: block;
  margin-top: 14px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.featured-post:hover img,
.featured-post:focus-visible img {
  filter: brightness(1.06);
}

.featured-post:focus-visible {
  outline: 2px solid #8b0000;
  outline-offset: 3px;
}

.recent-posts {
  margin-top: 105px;
}

.recent-post-list {
  display: grid;
  gap: 49px;
  padding: 14px 12px 0;
}

.recent-post {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  align-items: start;
  color: #000;
  text-decoration: none;
}

.recent-post img {
  width: 38px;
  height: 24px;
  margin-top: 3px;
  object-fit: cover;
}

.recent-post span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.recent-post:hover span,
.recent-post:focus-visible span {
  color: #8b0000;
}

.recent-post:focus-visible {
  outline: 2px solid #8b0000;
  outline-offset: 3px;
}

.sidebar-social-links {
  display: flex;
  gap: 10px;
}

.sidebar-social-links a {
  width: 23px;
  height: 23px;
  color: #000;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.sidebar-social-links a:hover,
.sidebar-social-links a:focus-visible {
  opacity: 0.65;
  transform: translateY(-1px);
  outline: none;
}

.sidebar-social-links svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: currentColor;
}

@media (max-width: 980px) {
  .news-layout {
    width: calc(100% - 32px);
    grid-template-columns: minmax(0, 1fr) 220px;
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 820px) {
  .news-layout {
    grid-template-columns: 1fr;
    row-gap: 46px;
  }

  .news-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
  }

  .sidebar-section,
  .recent-posts {
    margin: 0;
  }

  .featured-post img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 620px) {
  .news-card {
    grid-template-columns: 1fr;
    height: auto;
  }

  .news-card-image {
    aspect-ratio: 16 / 9;
  }

  .news-card-copy {
    padding: 22px;
  }

  .news-card-copy h2 {
    font-size: 22px;
    line-height: 1.25;
  }

  .news-sidebar {
    grid-template-columns: 1fr;
  }
}
