/* Стили для панели фильтров */
.articles-controls {
  margin: 20px 0;
  text-align: center;
}
.filter-button {
  margin: 0 10px;
  padding: 10px 20px;
  background-color: #006b82; /* Цвет, как у логотипа "Cred" */
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}
.filter-button:hover {
  background-color: #004555;
  transform: scale(1.05);
}

/* Обёртка для трехколоночного макета */
.content-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  align-items: start;
}

/* Левая колонка: Инструменты */
.tools-column {
  background: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  height: fit-content;
}
.tool-box h2 {
  margin-bottom: 10px;
  font-size: 20px;
}


#calc-result {
  font-weight: bold;
  margin-top: 10px;
}

/* Центральная колонка: Статьи */
.articles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  background: none;
  padding: 0;
  width: 100%;
  justify-items: center;
  justify-self: center;
}
.article-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.article-date {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 12px;
  color: #444;
  font-weight: bold;
  background: #f0f0f0;
  padding: 3px 8px;
  border-radius: 5px;
}
/* Текст статьи */
.article-text, .full-text {
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #006b82;
  line-height: 1.5;
}
.full-text {
  display: none;
}
/* Изображения в статьях затемнены на 20% */
.article-card img {
  margin-top: 22px;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  filter: brightness(80%);
  transition: filter 0.3s;
}
.article-card img:hover {
  filter: brightness(70%);
}

/* Стили для рейтинга в виде звезд */
.article-rating {
  margin: 10px 0;
}
.star {
  font-size: 20px;
  color: #ccc;
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
  margin-right: 2px;
}
.star.filled {
  color: #ffcc00;
  transform: scale(1.1);
}

/* Правая колонка: Реклама */
.ads-column {
  background: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  height: fit-content;
}


/* Стили для кредитного калькулятора с ползунками */
.tool-box form {
  display: flex;
  flex-direction: column;
}
.tool-box label {
  margin: 10px 0 5px;
  font-size: 14px;
}
.tool-box input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  margin-bottom: 10px;
  transition: background 0.3s;
}

/* Стилизация ползунка для Webkit-браузеров */
.tool-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #006b82;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.tool-box input[type="range"]::-webkit-slider-thumb:hover {
  background: #004c5d;
  transform: scale(1.1);
}

/* Стилизация ползунка для Firefox */
.tool-box input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #006b82;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.tool-box input[type="range"]::-moz-range-thumb:hover {
  background: #004e60;
  transform: scale(1.1);
}

/* Стилизация кнопки калькулятора */
.tool-box button {
  padding: 10px;
  background-color: #006b82;
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
}
.tool-box button:hover {
  background-color: #006b82;
}

/* При наведении увеличиваем блок */
.article:hover {
  transform: translateY(-10px);
}

/* Стили для изображения */


/* Стили для рейтинга */
.article p strong {
  font-weight: bold;
}


/* Стили для рейтинга в виде звезд */
.article p span.star {
  color: gold;
  font-size: 18px;
}

/* Для текста, который скрывается при клике на "Читать полностью" */
.full-text {
  display: none;
  font-size: 14px;
  color: #333;
  margin-top: 10px;
}

/* Для кнопки "Сховати" */
.read-more {
  font-size: 14px;
  color: #007BFF;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 */

/* Контейнер для статей */
.articles-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Два столбца с одинаковой шириной */
  gap: 20px; /* Отступы между статьями */
  margin: 20px;
}

/* Статья */
.article {
  background-color: #f9f9f9; /* Цвет фона статьи */
  border-radius: 8px; /* Скругление углов */
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Тень для эффекта подъема */
}

/* Изображение */
.article img {
  max-width: 100%;
  border-radius: 8px; /* Скругление углов у изображений */
  height: auto;
}

/* Заголовок статьи */
.article h2 {
  font-size: 1.5rem;
  margin: 10px 0;
  color: #006b82;
}

/* Превью текста статьи */
.article p {
  font-size: 1rem;
  color: #006b82;
}

/* Кнопка "Читать полностью" */
.article button {
  padding: 8px 15px;
  background-color: #006b82;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

 .article button:hover {
  background-color: #004352; /* Темнее на hover */
} 

/* Для маленьких экранов: 1 колонка */
@media (max-width: 1200px) {
  .content-wrapper {
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    max-width: 1000px;
  }
}

@media (max-width: 968px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    padding: 0 15px;
    box-sizing: border-box;
    justify-items: center;
  }

  .articles-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    justify-items: center;
  }

  .article-card, .article {
    max-width: 600px;
    width: 100%;
  }

  .tools-column, .ads-column {
    order: 2;
    width: 100%;
    max-width: 600px;
  }

  .articles-container {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 0 10px;
  }

  .articles-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .article-card, .article {
    padding: 20px;
  }
}

/* --------------------------------------- */

.full-screen-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
}

.full-screen-content {
  background: white;
  padding: 30px;
  max-width: 800px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: default;
  position: relative;
}

.full-screen-content h2 {
  color: #006b82;
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.full-screen-content p {
  color: #006b82;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  text-align: left;
}

.full-screen-image {
  max-width: 300px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.article-date {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
}

.close-full-screen,
.next-article {
  background-color: #006b82;
  color: white;
  border: none;
  padding: 12px 25px;
  cursor: pointer;
  border-radius: 30px;
  margin: 10px;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
}

.close-full-screen:hover,
.next-article:hover {
  background-color: #004555;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 107, 130, 0.3);
}
