/* ============================================================
   css/ptt-catalog.css — стили для каталога услуг
   ============================================================ */

/* ========== Заголовок страницы ========== */
.page-hero{
  padding: calc(var(--header-height) + var(--sp-2xl)) 0 var(--sp-xl);
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.page-hero__title{
  font-size: clamp(1.75rem, 4.6vw, 4rem);
  margin: 0 0 var(--sp-s);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  color: #070807;
}
.page-hero__sub{
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: #47494e;
  max-width: 42em;
  margin: 0;
}

.breadcrumbs{
  display: flex;
  gap: var(--sp-2xs);
  align-items: center;
  font-size: calc(var(--fs-n1) * .975);
  color: #70727d;
  margin-bottom: var(--sp-s);
}
.breadcrumbs a{
  color: #70727d;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .2em;
  transition: text-decoration-color .3s ease, color .3s ease;
}
.breadcrumbs a:hover{
  color: var(--orange);
  text-decoration-color: currentColor;
}

/* ========== Каталог услуг — карточки направлений ========== */
.catalog-page{
  padding: var(--sp-2xl) 0;
  background: #fff;
}

.cat-grid{
  display: grid;
  gap: var(--gutter);
  grid-template-columns: 1fr;
}
@media (min-width: 640px){
  .cat-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px){
  .cat-grid{ grid-template-columns: repeat(3, 1fr); }
}

.cat-card{
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-m);
  background: #fff;
  border: 1px solid var(--border-strong);
  color: #070807;
  transition: border-color .35s ease;
}
.cat-card:hover{
  border-color: var(--orange);
}

.cat-card__num{
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: #eaeaea;
  margin-bottom: var(--sp-m);
  transition: color .35s ease;
  pointer-events: none;
}
.cat-card:hover .cat-card__num{ color: var(--orange-light); }

.cat-card__title{
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: calc(var(--fs-2) * 1.05);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 var(--sp-s);
  color: currentColor;
  pointer-events: none;
}

.cat-card__list{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cat-card__list li a{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-2xs);
  padding: var(--sp-2xs) 0;
  font-family: var(--font-head);
  font-size: calc(var(--fs-n2) * 1.08);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.35;
  color: #70727d;
  text-decoration: none;
  transition: color .3s ease;
}
.cat-card__list li a:hover{ color: var(--orange); }
.cat-card__list svg{
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  opacity: .5;
  margin-top: .2em;
  transition: opacity .3s ease, transform .3s ease;
}
.cat-card__list li a:hover svg{
  opacity: 1;
  transform: rotate(45deg);
}

.cat-card__link{
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ========== Страница направления — карточки услуг ========== */
.service-grid{
  display: grid;
  gap: var(--gutter);
  grid-template-columns: 1fr;
}
@media (min-width: 640px){
  .service-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px){
  .service-grid{ grid-template-columns: repeat(3, 1fr); }
}

.service-card{
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-strong);
  color: #070807;
  text-decoration: none;
  transition: border-color .35s ease, color .35s ease;
  overflow: hidden;
}
.service-card:hover{
  border-color: var(--orange);
}

.service-card__pic{
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f4f4f4;
  overflow: hidden;
}
.service-card__img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: filter .5s ease, transform .5s ease;
}
.service-card:hover .service-card__img{
  filter: grayscale(0);
  transform: scale(1.03);
}

.service-card__body{
  padding: var(--sp-m);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-s);
  flex: 1;
}
.service-card__title{
  font-family: var(--font-head);
  font-size: calc(var(--fs-1) * 1.05);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
  color: currentColor;
  transition: color .3s ease;
}
.service-card:hover .service-card__title{ color: var(--orange); }

.service-card__arrow{
  width: 1.4em;
  height: 1.4em;
  flex-shrink: 0;
  opacity: .5;
  transition: opacity .3s ease, transform .3s ease;
}
.service-card:hover .service-card__arrow{
  opacity: 1;
  transform: rotate(45deg);
}

/* ========== Пагинация ========== */
.catalog-pagination{
  margin-top: var(--sp-xl);
  display: flex;
  justify-content: center;
  gap: var(--sp-2xs);
}
.catalog-pagination .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  padding: .5em .75em;
  border: 1px solid var(--border-strong);
  color: #171719;
  font-family: var(--font-head);
  font-size: calc(var(--fs-n2) * 1.08);
  font-weight: 600;
  text-decoration: none;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.catalog-pagination .page-numbers:hover{
  background: var(--grad-orange);
  color: #fff;
  border-color: transparent;
}
.catalog-pagination .page-numbers.current{
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
/* Шапка на светлых страницах каталога — всегда «прилипшая» светлая */
body.page-ptt-landing .header{
  background: #fff;
  color: #171719;
  border-bottom-color: var(--border);
}
/* Шапка на белых страницах каталога — светлая по умолчанию */
body.page-ptt-landing .header{
  background: #fff;
  color: #171719;
  border-bottom-color: var(--border);
}

/* Кнопка «Заказать звонок» на белой шапке каталога — чёрный текст */
body.page-ptt-landing .header .btn-header--red{
  color: #171719;
}
body.page-ptt-landing .header .btn-header--red:hover{
  color: #fff;
  background: transparent;
}
body.page-ptt-landing .header .btn-header--red::after{
  opacity: 0;
}
body.page-ptt-landing .header .btn-header--red:hover::after{
  opacity: 1;
}

/* Обводка кнопки «Заказать звонок» на белой шапке каталога */
body.page-ptt-landing .header .btn-header--red{
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: none;
  padding: 0 var(--sp-m);
  margin: 0;
}
body.page-ptt-landing .header .btn-header--red:hover{
  border-color: transparent;
}

.cta__icon{transition:transform .3s ease}
.cta__link:hover .cta__icon{transform:rotate(45deg) !important}

.megamenu__title a,
.megamenu__col-title a{
  color: inherit;
  text-decoration: none;
  transition: color .3s ease;
}
.megamenu__title a:hover,
.megamenu__col-title a:hover{
  color: var(--orange);
}
.megamenu__loading{
  padding: var(--sp-l) 0;
  color: #70727d;
  font-family: var(--font-head);
  font-size: calc(var(--fs-n1) * .975);
}

/* ========== Bento Grid для каталога продукции ========== */
@media (min-width: 640px) {
  .cat-grid--bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-grid--bento .cat-card:nth-child(1) { grid-column: span 1; }
  .cat-grid--bento .cat-card:nth-child(2) { grid-column: span 1; }
  .cat-grid--bento .cat-card:nth-child(3) { grid-column: span 2; } /* Широкая карточка */
  .cat-grid--bento .cat-card:nth-child(4) { grid-column: span 1; }
  .cat-grid--bento .cat-card:nth-child(5) { grid-column: span 1; }
}

@media (min-width: 1024px) {
  .cat-grid--bento {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(250px, auto);
  }
  
  .cat-grid--bento .cat-card:nth-child(1) { grid-column: span 2; }
  .cat-grid--bento .cat-card:nth-child(2) { grid-column: span 1; }
  .cat-grid--bento .cat-card:nth-child(3) { grid-column: span 1; }
  .cat-grid--bento .cat-card:nth-child(4),
  .cat-grid--bento .cat-card:nth-child(5) { grid-column: span 1; }

  .cat-grid--bento .cat-card {
    display: flex;
    flex-direction: column;
  }
  .cat-grid--bento .cat-card__list {
    flex-grow: 1;
    justify-content: flex-start;
  }
}