.blog {
  background: linear-gradient(180deg, #F4F9FF 0%, #FFFFFF 65.38%);
  padding: 80px 60px 42px;
}

.blog__wrapper {
  max-width: 1200px;
  margin: auto;
  position: relative;
}

.blog__title_wrapper {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 42px;
}

.blog__title {
  font-size: 48px;
  font-weight: 700;
}

.blog__nav_buttons {
  display: flex;
  gap: 30px;
  width: 100%;
  margin-bottom: 28px;
}

.blog__nav_button {
  padding: 15px 30px;
  background-color: white;
  border-radius: 25px;
  border: 1px solid #E3F1FF;
  font-size: 16px;
  font-weight: 600;
}

.blog__nav_button.active {
  background-color: #559bed;
  color: white;
}

.blog__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(290px, 1fr)); /* 3 колонки, гибкие */
  gap: 30px;
}

@media (max-width: 900px) {
  .blog__list {
    grid-template-columns: repeat(2, minmax(250px, 1fr)); /* 2 колонки */
  }
}

@media (max-width: 600px) {
  .blog__list {
    grid-template-columns: 1fr; /* 1 колонка */
  }
}

.blog__card_image {
  position: relative;
  width: 100%;
}

.blog__card_image-img {
  width: 100%;
  height: auto; /* Сохраняет пропорции */
  display: block; /* Устраняет лишние отступы */
  max-width: 100%; /* Запрещает превышать ширину контейнера */
  object-fit: cover;
  border-radius: 20px;
}

.blog__card_image-date {
  position: absolute;
  bottom: 0;
  background-color: white;
  padding: 10px 20px;
  border-radius: 16px;
  font-size: 14px;
  color: #5b5b5b;
  bottom: 7px;
  right: 8px;
}

.blog__card_title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 16px;
}

.blog__card_desc {
  font-size: 16px;
  margin-top: 16px;
  font-weight: 200;
  margin-bottom: 12px;
}

.blog__card_link {
  color: #559bed !important;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
}

.blog__card_link:visited {
  color: #559bed;
  text-decoration: none;
}

.blog__card_link:hover {
  color: #3576c2 !important;
}

.blog__card_arrow {
  width: 20px;
}

.blog__header {
  margin-bottom: 0;
}

.post__wrapper {
  background-color: #f4f9ff;
}

.background__wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 230px;
  overflow: hidden; /* Обрезает размытые края */
  z-index: -1;
}

.background_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  filter: blur(10px);
  transform: scale(1.05);
}

.post__card {
  max-width: 1000px;
  margin: auto;
  background-color: white;
  border-radius: 20px;
  padding: 30px 44px;
  margin-top: 14px;
}

.post {
  position: relative;
  max-width: 1182px;
  margin: 150px auto;
  margin-bottom: 30px;
  padding: 0 30px;
}

.post__card_back {
  position: absolute;
}

.post__card_image {
  width: 100%;
}

.post__card_about {
  white-space: pre-line; /* Сохраняет переносы строк */
  word-wrap: break-word; /* Переносит длинные слова */
  overflow-wrap: break-word; /* Альтернатива для word-wrap */
  font-size: 14px;
  color: #353535;
}

.post__card_info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 16px;
  color: #5b5b5b;
  font-weight: 500;
}

.post__card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 26px;
}

.another-articles-list {
  width: 90%;
  margin: auto;
}

.articles_title {
  font-size: 18px;
  margin-bottom: 16px;
  color: #353535;
  font-weight: 600;
}

.post__list {
  display: flex;
  gap: 30px;
  overflow-x: scroll;
}

.small-card {
  background-color: white;
  border-radius: 20px;
  min-width: 300px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.small-card_title {
  font-size: 16px;
  color: #353535;
  font-weight: 600;
  margin-bottom: 16px;
}

.small-card_desc {
  font-size: 14px;
  color: #353535;
  font-weight: 400;
}

.small-card_link {
  /* padding-top: 43px; */
  /* margin-top: auto; */
  font-size: 14px;
  color: #559bed !important;
  width: fit-content;
  font-weight: 400;
  line-height: 1.6;
}

.small-card_link:visited {
  color: #559bed;
  text-decoration: none;
}

.small-card_link:hover {
  color: #3576c2 !important;
  transition: color 0.3s;
}

.link-blog {
  font-size: 18px !important;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 auto;
}

.blog__body {
  background-color: #f4f9ff;
}

.blog__nav_input-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 15px 30px;
  width: 232px;
  transition: all 0.3s ease;
  margin-left: auto;
  font-size: 16px;
}

.blog__nav_input-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}
/* 
.blog__nav_input:focus + .blog__nav_input-icon {
    background-image: url('../img/lucide/search-active/lucide/Vector.svg');
} */

.blog__nav_input {
  border: none;
  outline: none;
  font-size: 16px;
  width: 142px;
  color: #5b5b5b;
  background: transparent;
}

/* Стили при фокусе */
.blog__nav_input-container:focus-within {
  width: 300px; /* Ширина при фокусе */
  border-color: #559bed;
}

.blog__nav_input:focus::placeholder {
  color: #353535;
}

.blog__nav_input:focus {
  color: #353535;
}

@media screen and (max-width: 1180px) {
  .post__card_back {
    position: relative;
  }

  .post {
    min-width: 80%;
    margin-top: 100px;
  }

  .post__card {
    width: 100%;
    max-width: 100%;
  }

  .another-articles-list {
    width: 100%;
    padding: 0 30px;
  }
}

@media screen and (max-width: 750px) {
  .blog {
    padding: 60px 16px 40px;
  }
  
  .blog__title_wrapper {
    margin-bottom: 28px;
  }

  .blog__title {
    font-size: 28px;
  }

  .blog__nav {
    margin-bottom: 18px;
    gap: 14px;
  }

  .blog__card_image-date {
    font-size: 12px;
  }

  .blog__card_title {
    font-size: 16px;
  }

  .blog__card_desc {
    font-size: 14px;
  }

  .blog__card_link {
    font-size: 14px;
  }
}

@media screen and (max-width: 750px) {
  .post {
    padding: 0 14px;
  }

  .post__card {
    padding: 16px 19px;
  }

  .post__card_info-author {
    font-size: 14px;
  }

  .post__card_info-date {
    font-size: 14px;
  }

  .post__card-title {
    font-size: 18px;
  }

  .another-articles-list {
    padding: 0 14px;
  }
}

@media (max-width: 768px) {
  .blog__nav {
    display: grid;
    grid-template-areas:
      "search"
      "buttons";
    gap: 15px;
    overflow-x: visible;
  }

  .blog__nav_buttons {
    display: flex;
    font-size: 14px;
    gap: 14px;
    overflow-x: scroll;
  }

  .blog__nav_input-container {
    grid-area: search;
    width: 100%;
    margin-left: 0;
    margin-top: 28px;
  }

  /* Группируем кнопки */
  .blog__nav_button {
    grid-area: buttons;
  }

  .link-blog {
    font-size: 16px;
  }
}
