.columns {
  width: 100%;
  padding: 15px 10px 15px 10px;
  display: inline-flex;
  transform: translateY(50px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.column {
  display: flex;
  align-items: center;
  padding: 10px;
}

.image-container {
  position: relative;
  width: fit-content;
  margin: 2rem auto;
  top: -5%;
}

.image-container img {
  width: 100%;
}

.newspaper-column {
  width: 30%;
  background-color: var(--news-list-background);
  display: flex;
  flex-direction: column;
  justify-content: start;
  height: max-content;
  gap: 10px;
}

.newspaper-column img {
  width: 100%;
}

h2 {
  font-size: 1.3rem;
}

.column-left {
    display: flex;
    flex-direction: column;
    width: 70%;
    align-items: start;
}

.news-article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}

.news-header-columns .column-right a {
  color: var(--primary-text);
}

/* Заголовок секції */
.newspaper-article-header {
  font-family: "e-UkraineHead-Bold", sans-serif;
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--primary-text);
  text-decoration: underline;
}

.news-article-header {
  font-family: "e-UkraineHead-Bold", sans-serif;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--primary-text);
  text-decoration: underline;
}

.newspaper-article-header:hover {
  color: var(--accent-color);
}

.date {
  color: var(--secondary-text);
}

.big-image {
  max-width: 100%;
  height: auto;
  width: auto;
  display: block;
  margin: 0 auto;
  padding: 1rem 0;
  aspect-ratio: 2/1;
  object-fit: contain; /* гарантує, що зображення не обріжеться */
}

.small-image {
    width: calc((100% - 4rem) / 6);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    box-sizing: border-box;
}

.small-image.active {
    opacity: 0.5;
    border: solid var(--accent-color);
}

.news-gallery {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1rem 0;
    flex-direction: row;
}

.news-columns .column-right {
    display: flex;
    flex-direction: column;
}

.small-news-block-wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-top: 10px;
  border-bottom: 1px solid var(--accent-background);
}

.small-news-block-wrapper img {
  width: calc(30% - 2rem);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
}

.small-news-block {
  width: 70%;
  padding: 1rem 0;
}

.small-news-block:last-child {
  border-bottom: none;
}

.small-news-block h2 {
  font-family: "e-UkraineHead-Bold", sans-serif;
  font-size: 1.3rem;
  line-height: 1.3;
  text-decoration: underline;
  margin-bottom: 0.4rem;
  color: var(--primary-text);
}

.small-news-block p {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--primary-text);
}

.small-news-block small {
  font-size: 0.8rem;
  color: var(--secondary-text);
}

.small-news-block a {
  color: var(--primary-text);
}

.small-news-block a:hover {
  color: var(--accent-color);
}

.archive-button {
  background-color: var(--accent-color);
}

/* Дата та категорія */
small a {
  color: var(--accent-color);
  text-decoration: none;
}

small a:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.page-link {
  border: none;
}

.news-list-header {
  width: 100%;
  display: flex;
  flex-direction: row;
  padding: 10px 0;
}

.news-list-header h2 {
  width: 80%;
  margin: 0;
}

.news-list-header img {
  max-width: 20%;
  height: 1.3rem;
  width: auto;
  align-self: center;
  margin-left: auto;
}

.filters {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  padding: 10px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}

.filters.show {
  display: grid;
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 750px) {
  .columns {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100vw;
  }

  .column {
    width: 100%;
    margin-bottom: 3%;
  }
  
  .column-left {
    width: 100%;
  }
  
  .image-container {
    top: 0;
    margin: 0.5rem auto;
  }
  
  .news-gallery {
    padding: 1rem 1rem;
  }
  
  .news-article {
    padding: 0;
  }
  
  .small-image {
    width: calc((100% - 4rem) / 5);
  }
  
  .big-image {
    aspect-ratio: 1 / 1;
  }
  
  .news-columns {
    width: 100vw;
    padding: 0.5rem 8vw;
  }
  
  .big-news-block {
    border-bottom: 1px solid var(--accent-background);
    padding: 0 0 1rem 0;
  }
  
  .news-header-columns .column-right {
    justify-content: start;
  }
  
  .small-news-block-wrapper {
    flex-direction: column;
    gap: 0;
  }
  
  .small-news-block-wrapper img {
    height: 200px;
    width: auto;
    display: none;
  }
  
  .small-news-block {
    width: 100%;
  }
}
