/* Блок ленты новостей */
.news-feed__container {
  display: grid;
  gap: 40px;
  align-items: start;
}

.news-feed__container--with-sidebar {
  grid-template-columns: 1fr 320px;
}

.news-feed__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.news-feed__title {
  margin: 0;
}

/* Календарь */
.news-calendar {
  position: relative;
  width: 300px;
}

.news-calendar__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.news-calendar__header:hover {
  border-color: var(--primary);
}

.news-calendar__input-wrapper {
  flex: 1;
  position: relative;
}

.news-calendar__input {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.news-calendar__input::placeholder {
  color: var(--text);
}

.news-calendar__icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.news-calendar__clear {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7d7d7d;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.news-calendar__clear:hover {
  background: var(--grey-light);
  color: var(--primary);
  border-color: var(--primary);
}

.news-calendar__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 20px rgba(0, 19, 43, 0.1);
  z-index: 1000;
}

.news-calendar__month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--grey-light);
}

.news-calendar__nav-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #232323;
  transition: color 0.3s ease;
}

.news-calendar__nav-btn:hover {
  color: var(--primary);
}

.news-calendar__nav-btn:disabled {
  color: #cccccc;
  cursor: not-allowed;
}

.news-calendar__month-year {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.news-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  gap: 0;
  padding: 10px 10px 0;
}

.news-calendar__weekday {
  font-size: 14px;
  text-align: center;
  color: var(--grey);
  width: 40px;
}

.news-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  gap: 0;
  padding: 10px;
}

.news-calendar__day {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  color: #232323;
  transition: all 0.3s ease;
}

.news-calendar__day--clickable {
  cursor: pointer;
}

.news-calendar__day--clickable:hover {
  background: var(--primary);
  color: white;
}

.news-calendar__day--selected {
  background: var(--primary);
  color: white;
}

.news-calendar__day--today {
  background: rgba(147, 69, 216, 0.1);
  color: var(--primary);
  font-weight: 700;
}
.news-calendar--active .news-calendar__header {
  border-radius: 10px 10px 0 0;
}
/* Список новостей */
.news-feed__news-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Сайдбар */
.news-feed__sidebar {
  position: sticky;
  top: 20px;
}

.interesting-news__title {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  color: var(--text);
  margin: 0 0 24px 0;
}

.interesting-news__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.interesting-news-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}

.interesting-news-card:hover {
  transform: translateY(-4px);
}

.interesting-news-card__image {
  width: 100%;
  aspect-ratio: 20/9;
  border-radius: 14px;
  overflow: hidden;
}

.interesting-news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interesting-news-card__content {
  flex: 1;
  min-width: 0;
}

.interesting-news-card__title {
  font-size: 16px;
  line-height: 1.27;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  transition: all 0.2s;
}

.interesting-news-card__title:hover {
  color: var(--primary);
}

.interesting-news-card__title a {
  color: inherit;
  text-decoration: none;
}

.interesting-news-card__title a:hover {
  color: var(--primary);
}

.interesting-news-card__meta {
  display: flex;
  gap: 15px;
  align-items: center;
}

.interesting-news-card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.27;
  color: var(--grey);
}

/* Группа новостей по дате */
.news-date-group {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
}

.news-date-group__header {
  padding: 20px;
  border-bottom: 1px solid var(--grey-light);
}

.news-date-group__date {
  font-size: 16px;
  color: var(--primary);
  margin: 0;
}

.news-date-group__posts {
  padding: 0;
}

/* Отдельная новость */
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--grey-light);
  transition: background-color 0.3s ease;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background-color: rgba(147, 69, 216, 0.02);
}

.news-item__time {
  flex-shrink: 0;
  width: 100px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.news-item__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-item__title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.275;
  margin: 0;
  color: var(--text);
}

.news-item__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-item__title a:hover {
  color: var(--primary);
}

.news-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.news-item__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--grey);
  font-size: 14px;
  line-height: 1.275;
}

.news-item__meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Пагинация */
.news-feed__pagination .page-numbers {
  margin: 0;
}
/* Кнопка "Показать еще" */
.news-feed__load-more {
  text-align: center;
}
.news-load-more-btn {
  width: 100%;
  margin: 0;
}
/* Пустые состояния */
.news-feed__empty {
  text-align: center;
  padding: 60px 20px;
}

.news-feed__empty-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #666666;
  margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
  .news-feed__title {
    font-size: 24px;
  }

  .calendar-form {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .calendar-form__submit,
  .calendar-form__reset {
    align-self: flex-start;
  }

  .news-date-group__header {
    padding: 16px;
  }

  .news-date-group__date {
    font-size: 14px;
  }

  .news-item {
    padding: 16px;
    gap: 8px;
  }

  .news-item__time {
    width: 80px;
    font-size: 14px;
  }

  .news-item__title {
    font-size: 14px;
  }

  .news-item__meta-item {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .news-calendar {
    width: 100%;
  }

  .news-calendar__header {
    padding: 16px;
  }

  .news-calendar__month-header {
    padding: 12px 16px 8px;
  }

  .news-calendar__weekdays {
    padding: 8px 16px;
  }

  .news-calendar__days {
    padding: 8px 16px;
  }

  .news-date-group__header {
    padding: 14px;
  }

  .news-date-group__date {
    font-size: 14px;
  }

  .news-item {
    padding: 16px;
    gap: 8px;
  }

  .news-item__time {
    width: 80px;
    font-size: 14px;
  }

  .news-item__title {
    font-size: 14px;
  }

  .news-item {
    flex-direction: column;
  }
  .news-item__content {
    gap: 0;
  }
}

@media (max-width: 480px) {
  .news-calendar__header {
    padding: 12px;
  }

  .news-calendar__dropdown {
    box-shadow: 0 4px 12px rgba(0, 19, 43, 0.15);
  }

  .news-calendar__month-header {
    padding: 10px 12px 6px;
  }

  .news-calendar__month-year {
    font-size: 14px;
  }

  .news-calendar__nav-btn {
    width: 20px;
    height: 20px;
  }

  .news-calendar__weekdays {
    padding: 6px 12px;
  }

  .news-calendar__days {
    padding: 6px 12px;
  }

  .news-calendar__day {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .news-item {
    padding: 14px;
    gap: 6px;
  }
  div.related__header {
    padding: 14px;
  }

  .news-load-more-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .news-calendar__clear {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Адаптивность для сайдбара */
@media (max-width: 1024px) {
  .news-feed__container--with-sidebar {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .news-feed__sidebar {
    position: static;
    order: 2;
  }

  .interesting-news__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .news-feed__sidebar {
    order: 1;
  }

  .interesting-news__title {
    font-size: 20px;
  }

  .interesting-news__list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .interesting-news-card__title {
    font-size: 14px;
  }

  .interesting-news-card__meta {
    gap: 12px;
  }

  .interesting-news-card__meta-item {
    font-size: 12px;
  }
}
