/*
 * Тема stm2026 — страницы раздела «О компании» и контакты: фотогалерея (список альбомов, альбом), партнёры (список,
 * страница партнёра), контакты (горячая линия, площадки, карта). Раскладка страницы с меню раздела (.page-cols) — content.css.
 */

/* ========================= Фотогалерея ========================= */

.gallery {
  padding: 36px 0 72px;
  background: #fff;
}
.gallery-none {
  color: var(--text-2);
  font-size: 17px;
}
/* --- Карточка альбома: обложка 4:3 с числом фото и название --- */
.ga-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
}
/* пока скрипт не разложил список, лишние карточки скрыты правилом — страница не «прыгает» */
.js .ga-grid[data-list]:not([data-ready]) > .ga:nth-child(n + 25) {
  display: none;
}
.ga {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--h);
}
.ga:hover {
  box-shadow: none;
  color: var(--h);
  text-decoration: none;
  transform: none;
}
.ga-img {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-14);
  aspect-ratio: 4 / 3;
  background: var(--bg-sec);
}
.ga-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.ga:hover .ga-img img {
  transform: scale(1.04);
}
.ga-count {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--r-6);
  background: rgba(15, 42, 68, .8);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.ga-count .ic {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}
.ga .pt {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.35;
}
.ga:hover .pt {
  color: var(--link);
}
/* --- Альбом: число фото под заголовком, сетка превью, другие альбомы --- */
.pagehead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14.5px;
}
.pagehead-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gp {
  display: block;
  overflow: hidden;
  border-radius: var(--r-12);
  aspect-ratio: 4 / 3;
  background: var(--bg-sec);
}
.gp img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.gp:hover img {
  transform: scale(1.04);
}
.gallery-more {
  padding: 48px 0 72px;
  background: var(--bg-sec);
}

/* ========================= Партнёры ========================= */

/* --- Список: логотип серый, при наведении — цветной; логотипа нет — название в плашке --- */
.pl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.plcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-14);
  box-shadow: none;
  color: var(--h);
}
.plcard:hover {
  color: var(--h);
  text-decoration: none;
}
.plcard-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}
.plcard-logo img {
  max-width: 70%;
  max-height: 56px;
  object-fit: contain;
}
/* серый логотип, цветной при наведении, — только там, где есть мышь (то же правило, что у ленты партнёров на главной) */
@media (hover: hover) and (pointer: fine) {
  .plcard-logo img {
    filter: grayscale(1);
    opacity: .75;
    transition: filter var(--t), opacity var(--t);
  }
  .plcard:hover .plcard-logo img,
  .plcard:focus-visible .plcard-logo img {
    filter: none;
    opacity: 1;
  }
}
.plcard-name {
  padding: 0 12px;
  color: #8a97a3;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
}
.plcard .pt {
  padding: 10px 14px 12px;
  border-top: 1px solid #f0f3f7;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}
/* --- Страница партнёра: логотип в карточке и текст. Текст обтекает логотип и ниже него идёт на всю ширину:
   под логотипом не остаётся пустой колонки, какой бы длины ни был текст. Короткий текст стоит справа от логотипа --- */
.partner {
  display: flow-root;
  min-width: 0;
}
.partner-logo {
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 220px;
  margin: 4px 36px 20px 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  background: #fff;
}
.partner-logo img {
  max-width: 60%;
  max-height: 90px;
  object-fit: contain;
}
.partner-text {
  min-width: 0;
}
/* текст — обычный блок, а не отдельная область обтекания (как .rich на остальных страницах): иначе он целиком
   встал бы справа от логотипа; блоки с обтеканием из самого текста удерживает .partner */
.partner .rich {
  display: block;
}
/* список рядом с логотипом встаёт сбоку от него своей колонкой: маркеры не попадают под логотип */
.partner .rich ul,
.partner .rich ol {
  overflow: hidden;
}
/* низ страницы партнёра (ссылка «Все партнеры») — под логотипом и текстом */
.partner-foot {
  clear: both;
  padding-top: 8px;
}
.partner-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-size: 15px;
  font-weight: 600;
}
.partner-text > .partner-foot:first-child .partner-back {
  margin-top: 0;
}
.partner-back .ic {
  stroke-width: 2;
}

/* ========================= Контакты ========================= */

.contacts {
  padding: 36px 0 80px;
  background: var(--bg-sec);
}
/* --- Горячая линия --- */
.hotline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 36px;
  border-radius: var(--r-20);
  background-color: var(--brand);
  background-image: var(--grid-on-brand);
  background-size: 28px 28px;
  color: #fff;
}
.hotline-main {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hotline-ic {
  display: flex;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: var(--r-14);
  background: rgba(255, 255, 255, .12);
}
.hotline-ic .ic {
  width: 26px;
  height: 26px;
  stroke-width: 1.9;
}
.hotline-text {
  display: flex;
  flex-direction: column;
}
.hotline-cap {
  color: var(--on-blue);
  font-size: 14px;
}
.hotline-tel + .hotline-cap {
  font-size: 13px;
}
.hotline .hotline-tel {
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.hotline .btn {
  height: 50px;
  padding: 0 22px;
  color: #fff;
}
/* --- Площадки: три в ряд; две и четыре — по две --- */
.sites {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin: 28px 0 40px;
}
.sites-1,
.sites-2,
.sites-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.site {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: var(--r-18);
  background: #fff;
  transition: border-color var(--t), box-shadow var(--t);
}
/* площадка, чья карта показана */
.site:has(.site-map[aria-pressed="true"]) {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}
.site h2 {
  font-size: 21px;
  font-weight: 700;
}
.site-addr {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
  color: var(--text-body);
  font-size: 15.5px;
  line-height: 1.45;
}
.site-addr .ic {
  width: 19px;
  height: 19px;
  color: var(--link);
  stroke-width: 2;
}
.site-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
}
.site-ic {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-tint);
  color: var(--link);
}
.site-ic .ic {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}
.site-val {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.site-cap {
  color: var(--muted);
  font-size: 12.5px;
}
.site-val a,
.site-val span + span {
  color: var(--h);
  font-size: 15.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.site-val a:hover {
  color: var(--link);
}
.site-map {
  width: 100%;
  height: 46px;
  margin-top: auto;
}
.site-row + .site-map,
.site-addr + .site-map {
  margin-top: auto;
}
.site-map .ic {
  stroke-width: 2;
}
/* --- Карта: виджет 2ГИС площадки --- */
.findus h2 {
  margin-bottom: 16px;
  font-size: 28px;
  font-weight: 700;
}
.findus-tabs {
  margin-bottom: 14px;
}
.findus-map + .findus-map {
  margin-top: 24px;
}
.findus-name {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
}
/* со скриптом карту выбирают вкладки — название над картой не нужно */
.is-switch .findus-name {
  display: none;
}
.findus-map iframe {
  display: block;
  width: 100%;
  height: 440px;
  border: 0;
  border-radius: var(--r-18);
  background: #e9eef3;
}

@media (max-width: 1199px) {
  .pl-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* рядом с меню раздела колонка содержимого здесь узкая: логотип меньше, тексту рядом с ним остаётся около 420 px */
@media (min-width: 1024px) and (max-width: 1199px) {
  .partner-logo {
    width: 240px;
    height: 180px;
    margin-right: 28px;
  }
}
@media (max-width: 1023px) {
  /* площадки — одна под другой */
  .sites,
  .sites-1,
  .sites-2,
  .sites-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .ga-grid,
  .gp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ga-grid {
    gap: 24px 20px;
  }
}
@media (max-width: 767px) {
  .gallery {
    padding: 20px 0 40px;
  }
  .ga-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .ga {
    gap: 8px;
  }
  .ga-img {
    border-radius: var(--r-12);
  }
  .ga-count {
    bottom: 8px;
    left: 8px;
    font-size: 12px;
  }
  .ga .pt {
    font-size: 14.5px;
  }
  .pagehead-meta {
    font-size: 13.5px;
  }
  /* превью альбома — плотной сеткой квадратов */
  .gp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .gp {
    border-radius: 4px;
    aspect-ratio: 1;
  }
  .gallery-more {
    padding: 32px 0 40px;
  }
  .pl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .contacts {
    padding: 20px 0 40px;
  }
  .hotline {
    gap: 16px;
    padding: 20px;
    border-radius: var(--r-16);
  }
  .hotline-ic {
    flex-basis: 48px;
    height: 48px;
  }
  .hotline .hotline-tel {
    font-size: 26px;
  }
  .hotline .btn {
    width: 100%;
  }
  .sites {
    gap: 12px;
    margin: 16px 0 28px;
  }
  .site {
    padding: 18px;
    border-radius: var(--r-16);
  }
  .site h2 {
    font-size: 19px;
  }
  .site-addr {
    margin: 6px 0 8px;
    font-size: 15px;
    line-height: 1.5;
  }
  .site-addr .ic {
    width: 18px;
    height: 18px;
  }
  .site-map {
    margin-top: 10px;
  }
  .findus h2 {
    font-size: 22px;
  }
  .findus-tabs {
    flex-wrap: nowrap;
    margin: 0 calc(-1 * var(--gutter)) 12px;
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
  }
  .findus-map iframe {
    height: 260px;
    border-radius: var(--r-14);
  }
  .plcard-logo {
    height: 96px;
  }
  .plcard .pt {
    font-size: 13.5px;
  }
  /* на телефоне логотип стоит над текстом */
  .partner-logo {
    float: none;
    width: auto;
    height: 150px;
    margin: 0 0 20px;
  }
}
