/**
 * Стили для страницы категории
 * URL: /metro/, /oteli/, /dostoprimechatelnosti/, ...
 */

/* header и back-link — стили в common.css */

/* ===== MAIN ===== */
.category-main {
  padding: 32px 0 60px;
  min-height: calc(100vh - 200px);
}

/* Хлебные крошки — стили в common.css */

/* ===== HERO КАТЕГОРИИ ===== */
.category-hero {
  text-align: center;
  margin-bottom: 40px;
}

.category-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 16px;
  margin-bottom: 16px;
}

.category-hero__icon i {
  width: 32px;
  height: 32px;
  color: var(--color-brand-primary);
}

.category-hero__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.category-hero__description {
  font-size: 1.0625rem;
  color: #6b7280;
  width: 100%;
  max-width: none;
  margin: 0 0 16px;
  line-height: 1.6;
}

.category-hero__count {
  font-size: 0.9375rem;
  color: #9ca3af;
}

.category-hero__count a {
  color: var(--color-brand-primary);
  font-weight: 500;
}

.category-hero__count a:hover {
  text-decoration: underline;
}

/* ===== ПУСТАЯ КАТЕГОРИЯ ===== */
.category-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.category-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: #f3f4f6;
  border-radius: 50%;
  margin-bottom: 20px;
}

.category-empty__icon i {
  width: 40px;
  height: 40px;
  color: #9ca3af;
}

.category-empty__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
}

.category-empty__text {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
}

.category-empty__text a {
  color: var(--color-brand-primary);
  font-weight: 500;
}

.category-empty__text a:hover {
  text-decoration: underline;
}

/* ===== СЕТКА КАРТОЧЕК МАРШРУТОВ ===== */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* ===== СМОТРИТЕ ТАКЖЕ (перелинковка категорий) ===== */
.category-see-also {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f3f4f6;
}

.category-see-also__title {
  font-size: 1.25rem;
  margin: 0 0 14px;
}

.category-see-also__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-see-also__link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-weight: 500;
}

.category-see-also__link:hover {
  border-color: #d1d5db;
  color: #111827;
}

/* ===== КАРТОЧКА МАРШРУТА ===== */
.route-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
  text-decoration: none;
  /* В grid-контейнере карточка должна уметь сжиматься, иначе возможен horizontal overflow на мобилках */
  min-width: 0;
  max-width: 100%;
}

.route-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--color-brand-primary);
}

.route-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 10px;
  flex-shrink: 0;
}

.route-card__icon i {
  width: 22px;
  height: 22px;
  color: var(--color-brand-primary);
}

.route-card__content {
  flex: 1;
  min-width: 0;
}

.route-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.route-card__time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.route-card__time i {
  width: 14px;
  height: 14px;
}

.route-card__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #d1d5db;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

.route-card__arrow i {
  width: 20px;
  height: 20px;
}

.route-card:hover .route-card__arrow {
  color: var(--color-brand-primary);
  transform: translateX(2px);
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
  display: flex;
  justify-content: center;
}

.pagination__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination__item {
  display: flex;
}

.pagination__ellipsis {
  padding: 8px 4px;
  color: #9ca3af;
  font-size: 0.875rem;
}

.pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4b5563;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.15s;
  text-decoration: none;
}

.pagination__link:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pagination__link--active {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: white;
  cursor: default;
}

.pagination__link--active:hover {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
}

.pagination__link--prev,
.pagination__link--next {
  padding: 0;
}

.pagination__link--prev i,
.pagination__link--next i {
  width: 20px;
  height: 20px;
}

/* Footer — унифицирован в css/common.css */

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .category-main {
    padding: 24px 0 40px;
  }
  
  .category-hero__title {
    font-size: 1.5rem;
  }
  
  .category-hero__description {
    font-size: 1rem;
  }
  
  .routes-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .route-card {
    padding: 14px 16px;
  }
  
  .route-card__icon {
    width: 40px;
    height: 40px;
  }
  
  .route-card__icon i {
    width: 20px;
    height: 20px;
  }
  
  .pagination__link {
    min-width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .category-hero__icon {
    width: 56px;
    height: 56px;
  }
  
  .category-hero__icon i {
    width: 28px;
    height: 28px;
  }
  
  .route-card__title {
    font-size: 0.9375rem;
  }
  
  .pagination__link {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.8125rem;
  }
}

