.section-title {
  font-size: 36px;
  padding: 30px 0 0 60px;
  margin: 0;
}

.section-description {
  font-size: 12px;
  color: #555;
  padding-left: 60px;
  max-width: 60%;
  margin: 0;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 24px;
    padding: 20px 16px 0 16px;
  }

  .section-description {
    font-size: 12px;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }
}



/* === Форма фильтрации === */
.filter-form {
  --primary-color: black;
  --danger-color: #f44336;
  --border-color: #ddd;
  --text-muted: #777;
  --text-light: #999;
  --card-radius: 12px;
  --transition: 0.3s ease;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.1);

  font-family: 'Inter', sans-serif;
  background: #fff;
  padding: 20px 24px;
  padding-top: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.06);

  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;

  width: fit-content;
  margin: 16px auto 20px auto;
}

.filter-form label {
  font-weight: 500;
  margin-right: 6px;
}

.filter-form select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #f9f9f9;
  font-size: 14px;
}

.filter-form button,
.filter-form .reset-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-form button {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.filter-form .reset-link {
  text-decoration: none;
  color: #0088cc; /* перекрывает muted */
}

/* === Поле поиска === */
.search-input {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
  .filter-form {
    flex-direction: column;
    align-items: stretch;
    width: auto;
    padding: 16px 20px;
    margin: 16px 16px 20px 16px;
    gap: 12px;
  }

  .filter-form label {
    margin: 0 0 4px 0;
  }

  .filter-form select,
  .filter-form button,
  .filter-form .reset-link,
  .search-input {
    width: 100%;
    font-size: 15px;
  }

  .filter-form .reset-link {
    text-align: center;
  }
}


/* === Модальное окно возрастного ограничения === */
.age-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  text-align: center;
  padding-top: 150px;
}

.modal-content {
  background: #222;
  padding: 20px;
  display: inline-block;
  border-radius: 8px;
}

/* === Плейсхолдер премиум карточек === */
.resource-card.premium.placeholder {
  opacity: 0.3;
  border: 2px dashed #ccc;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

/* === Тексты над премиум и рекомендованными блоками === */
.premtitle {
  text-align: center;
  font-size: 10px;
  opacity: 0.4;
  margin-top: 20px;
}

.rectitle {
  text-align: center;
  font-size: 10px;
  opacity: 0.4;
  margin-top: 10px;
}

/* === Сетка каталога === */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  padding: 18px 60px 0;
}


/* === Карточка ресурса === */
.resource-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
  height: 120px;
  gap: 10px;
}

.resource-card:hover {
  transform: translateY(-3px);
}

/* === Обёртка изображения === */
.resource-image-wrapper {
  flex: 0 0 120px;
  height: 100%;
}

.image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.resource-thumb-rect {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === Оверлей рейтинга === */
.rating-overlay {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-star {
  width: 12px;
  height: 12px;
}

@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .resource-card {
    height: 100px; /* Немного меньше для мобильных */
    flex-direction: row; /* Горизонтально, как и было */
  }

  .resource-image-wrapper {
    flex: 0 0 100px;
    height: 100%;
  }

  .resource-thumb-rect {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .resource-content {
    padding: 6px 8px;
  }

  .titleprem {
    font-size: 14px;
  }

  .meta,
  .description {
    font-size: 11px;
  }

  .category-badge {
    font-size: 12px;
  }
}



/* === Контент ресурса === */
.resource-content {
  padding: 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* === Заголовок ресурса === */
.titleprem {
  margin: 0;
  font-size: 16px;
}

/* === Метаданные (подписи) === */
.meta {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 4px;
}

.icon {
  width: 18px !important;
  height: 18px !important;
  vertical-align: text-bottom;
}

/* === Блюр при ограничении видимости === */
.blurred {
  filter: blur(4px);
  transition: filter 0.3s;
}

/* === Бейдж категории === */
.category-badge {
  background-color: #ddfcdc;
  font-size: 13px;
  padding: 2px 6px;
  border-left: 4px solid #000000;
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  margin: 4px 0;
  width: max-content;
}

.catprem {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

/* === Описание ресурса === */
.description {
  margin: 0;
  font-size: 12px;
  color: #333;
  line-height: 1.5;
}

/* === Невидимая ссылка поверх всей карточки === */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
}

/* === Стили для имени пользователя === */
.username a {
  text-decoration: none;
  color: inherit;
}




















/* === Пагинация === */
.pagination {
  margin: 16px 0;
  text-align: center;
}

.pagination a,
.pagination span.current {
  display: inline-block;
  margin: 0 4px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.pagination span.current {
  background-color: black;
  color: #fff;
  font-weight: bold;
}

.pagination .disabled {
  color: #aaa;
  pointer-events: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  margin: 0 2px;
  border-radius: 4px;
}

/* === Сводка по просмотрам категории === */
.category-views-summary {
  text-align: center;
  margin: 0;
  padding-bottom: 20px;
}

.category-views-summary span {
  display: inline-block;
  margin: 0 4px;
  font-weight: bold;
  opacity: 0.4;
  font-size: 10px;
}

/* === Tooltip центрированный заголовок === */
.tooltip-header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* === Tooltip оболочка === */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

/* === Вопросительный кружок === */
.tooltip-circle {
  display: inline-block;
  margin-left: 6px;
  width: 16px;
  height: 16px;
  line-height: 18px;
  border-radius: 50%;
  border: solid 1px black;
  color: black;
  text-align: center;
  font-size: 12px;
  cursor: help;
  font-weight: bold;
  background: white;
  opacity: 0.4;
}

/* === Всплывающая подсказка === */
.tooltip-text {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  font-size: 12px;
  border-radius: 6px;
  padding: 5px 8px;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 9999; /* Поверх всего */
  opacity: 1;     /* Не наследует opacity */
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
}


