/* Секция каталога */
.catalog-section {
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.catalog-section__wrapper {
  max-width: 1290px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Основной grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.4rem;
}

/* Колонки каталога */
.catalog-column {
  display: flex;
  flex-direction: column;
  gap: 3.4rem;
}

/* Карточки каталога */
.catalog-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-header__body {
  margin-top: 3rem;
}

.page-header {
  margin-bottom: 3rem;
}

/* Карточки услуг */
.catalog-card--service {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem;
  color: #fff;
  height: 286px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-card--service .catalog-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.catalog-card--service .catalog-card__title {
  font-size: 18px;
  max-width: 230px;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.catalog-card--service .catalog-card__tag {
  color: #E2E2E2;
  font-size: 12px;
  font-weight: 400;
}

.catalog-card--service .catalog-card__image {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 100%;
  height: auto;
  z-index: 1;
  display: flex;
  align-items: stretch;
}

.catalog-card--service .catalog-card__image img {
  width: 100%;
  height: auto;
}

.catalog-card--service.black-bg {
    background: #212324;
}

.catalog-card--service.blue-bg {
    background: #00B7F4;
    .catalog-card__tag {
        color: #F2F2F2;
    }
}

.catalog-card--service.red-bg {
    background: #f24841;
    .catalog-card__tag {
        color: #F2F2F2;
    }
}

.catalog-card--service .catalog-card__image .desktop {
    display: block;
}
.catalog-card--service .catalog-card__image .mobile {
    display: none;
}

/* Карточки категорий */
.catalog-card--category {
  padding: 2rem 2.5rem;
  position: relative;
}

.catalog-card--category .catalog-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #E2E2E2;
  gap: 13px;
}

.catalog-card--category .catalog-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  max-width: 206px;
  color: #000;
}

.catalog-card--category .catalog-card__count {
  font-size: 12px;
  color: #858687;
  font-weight: 400;
  text-wrap: nowrap;
}

.catalog-card--category .catalog-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.catalog-card--category .catalog-card__list-item {
  position: relative;
}

.catalog-card--category .catalog-card__list-item:last-child {
  border-bottom: none;
}

.catalog-card__list-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 2rem;
  padding-left: 2rem;
  transition: color 0.2s ease;
}

.catalog-card__list-link:hover {
  color: #00B7F4 !important;
}

.catalog-card__list-text:hover {
  color: #00B7F4 !important;
}

.catalog-card__list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #00B7F4;
  border-radius: 2px;
}

.catalog-card--category .catalog-card__list-text {
  font-size: 15px;
  font-weight: 400;
  color: #000;
  flex: 1;
}

.catalog-card--category .catalog-card__list-link:hover .catalog-card__list-arrow {
  color: #00B7F4;
}

/* Кнопка "Показать еще" */
.catalog-show-more {
  display: none;
  text-align: center;
  margin-top: 2rem;
}

.catalog-show-more__button {
  background: transparent;
  border: .2rem #e2e2e2 solid;
  padding: .8rem 2rem;
  color: #000;
  font-weight: 600;
  font-size: 1.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease;
}

.catalog-show-more__button:hover {
  color: #0099d4;
}

.catalog-card-title-wrapp {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.catalog-card-title-wrapp:hover h3{
  color: #00b7f4;
}

.catalog-card-title-wrapp img {
  width: 50px;
  height: auto;
}

/* Адаптивность */
@media (max-width: 768px) {
  .catalog-card--service .catalog-card__image {
    height: 90%;
    right: -30px;
    bottom: -25px;
    width: auto;
  }

  .catalog-card--service .catalog-card__image .desktop {
    display: none;
  }

  .catalog-card--service .catalog-card__image .mobile {
    display: block;
  }

  .catalog-card--category .catalog-card__title {
    max-width: unset !important;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .catalog-column {
    gap: 2rem;
  }

  .catalog-show-more {
    display: block;
  }

  .catalog-card__tag {
    display: none;
  }

  .catalog-column:nth-child(n+2) {
    display: none;
  }

  .catalog-card--service {
    height: 176px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .catalog-column:nth-child(3) {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1rem;
  }

  .catalog-column:nth-child(3) .catalog-card--service .catalog-card__image {
    width: 100%;
    height: auto;
  }

  .catalog-column:nth-child(3) .catalog-card--service .catalog-card__image img {
    width: 100%;
    height: auto;
  }

  .catalog-column:nth-child(3) .catalog-card--service {
    height: auto;
    min-height: 286px;
  }

  .catalog-show-more {
    display: none;
  }
}

@media (max-width: 480px) {
  .catalog-section__wrapper {
    padding: 0 2rem;
  }

  .catalog-card--service {
    height: 100px;
  }

  .catalog-card--category .catalog-card__title, .catalog-card--service .catalog-card__title {
    font-size: 15px;
    line-height: 28px;
  }

  .catalog-card--service {
    padding: 25px 20px;
  }

  .catalog-card--category .catalog-card__list-text {
    font-size: 14px;
  }
}
