.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%;
}

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

.column-left {
    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);
}

/* Заголовок секції */
.news-list-article-header {
  font-family: "e-UkraineHead-Bold", sans-serif;
  font-size: 1rem;
  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;
}

.news-list-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% / 6 - 20px);
    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: 20px;
    padding: 1rem 0;
    flex-direction: row;
}

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

/* Маленькі новини справа */
.small-news-block {
  padding: 1rem 0;
  border-bottom: 1px solid #ccc;
}

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

.small-news-block h2 {
  font-family: "e-UkraineHead-Bold", sans-serif;
  font-size: 1rem;
  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);
}

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

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

.news-link {
  align-self: end;
  color: var(--primary-text);
  padding: 10px 0;
}

.news-link:hover {
  color: var(--accent-color);
}

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

  .column {
    width: 100%;
    margin-bottom: 3%;
    padding: 0 20px;
  }
  
  .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;
  }
}

@media (max-width: 400px) {
    .social-buttons a {
        width: 1.7rem;
        height: 1.7rem;
        border-radius: 0.85rem;
    }
    
    .social-buttons a img {
        width: 0.9rem;
        height: 0.9rem !important;
    }
    
    .news-gallery {
        padding: 10px 0;
    }
    
    .small-image {
        width: calc(100% / 3 - 0.9rem);
    }
}
