/* ============================================================
   Партнёры и сертификаты — /partners (functions/partners.js).
   Подключается после catalog.css и берёт оттуда крошки, .cat-head,
   .pd-section, сетку сертификатов .pd-cert*, окно .cert-box и .pd-consult.
   Токены — из styles.css: --ink, --paper, --yellow, --yellow-soft,
   --gold-ink, --r, --display. Без рамок: только заливки и мягкие тени.
   ============================================================ */

/* у заголовков и абзацев отступы браузера — убираем, ниже задаём свои (:where не спорит с классами) */
:where(.pt-brand, .pt-final) :where(h2, h3, p) { margin: 0; }

.pt-head { padding-bottom: 64px; }
.pt-head .cat-lead { max-width: 720px; }

/* полоса логотипов — переход к разделу бренда */
.pt-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.pt-strip a { display: flex; flex-direction: column; gap: 10px; color: #59605f; font-size: 12px; font-weight: 700; transition: color .2s var(--ease); }
.pt-strip a:hover { color: var(--ink); }
.pt-strip-logo { display: grid; place-items: center; aspect-ratio: 12 / 7; padding: 14px 16px; border-radius: var(--r); background: #fff; box-shadow: 0 8px 24px rgba(16, 17, 17, .05); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.pt-strip-logo img { width: 100%; height: 100%; object-fit: contain; }
.pt-strip a:hover .pt-strip-logo { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(16, 17, 17, .1); }
.pt-strip a:focus-visible { outline: none; }
.pt-strip a:focus-visible .pt-strip-logo { box-shadow: 0 0 0 2px var(--yellow); }
.pt-strip small { padding-left: 2px; font-size: inherit; }

/* раздел бренда: белый и бумажный фон чередуются */
.pt-brand { background: #fff; scroll-margin-top: 64px; }
.pt-brand.is-paper { background: var(--paper); }
.pt-brand-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.pt-logo { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 7%; border-radius: var(--r); background: var(--paper); }
.is-paper .pt-logo { background: #fff; }
.pt-logo img { width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.pt-type { margin-top: 12px; color: var(--ink); font-size: 17px; font-weight: 600; line-height: 1.4; }
.pt-origin { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #6b7270; font-size: 14px; line-height: 1.4; }
.pt-origin svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--gold-ink); stroke-width: 1.8; }
.pt-desc { max-width: 660px; margin-top: 20px; color: #3a4140; font-size: 15.5px; line-height: 1.65; }
.pt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; }
.pt-facts div { padding: 14px 16px; border-radius: var(--r-sm); background: var(--paper); }
.is-paper .pt-facts div { background: #fff; }
.pt-facts dt { color: #6b7270; font-size: 12px; line-height: 1.4; }
.pt-facts dd { margin: 6px 0 0; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.4; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pt-soft { background: var(--paper); color: var(--ink); }
.is-paper .pt-soft { background: #fff; }
.pt-soft:hover { background: var(--yellow-soft); }

/* документы бренда */
.pt-docs { margin-top: 56px; }
.pt-docs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.pt-docs h3 { font-family: var(--display); font-size: clamp(20px, 1.8vw, 26px); line-height: 1.15; letter-spacing: -.01em; }
.pt-docs-head h3 span { margin-left: 4px; color: var(--gold-ink); }
.pt-docs-head p { color: #6b7270; font-size: 14px; line-height: 1.5; }
.pt-nodocs { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 30px; border-radius: var(--r); background: var(--paper); }
.is-paper .pt-nodocs { background: #fff; }
.pt-nodocs p { margin-top: 6px; color: #6b7270; font-size: 14px; line-height: 1.55; }
.pt-nodocs-actions { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 18px; }
.pt-tel { color: var(--ink); font-size: 13px; font-weight: 800; white-space: nowrap; transition: color .2s var(--ease); }
.pt-tel:hover { color: var(--gold-ink); }

/* финальный блок: после белого раздела бренда нужен отступ сверху */
.pt-final { padding-top: 88px; }
.pt-final-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.pt-final .pt-tel { color: #fff; }
.pt-final .pt-tel:hover { color: var(--yellow-soft); }

@media (max-width: 980px) {
  /* полоса логотипов листается пальцем, до краёв экрана */
  .pt-strip { display: flex; gap: 10px; margin: 32px -16px 0; padding: 4px 16px 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .pt-strip::-webkit-scrollbar { display: none; }
  .pt-strip a { flex: 0 0 136px; scroll-snap-align: start; }
  .pt-brand-grid { grid-template-columns: 1fr; gap: 28px; }
  .pt-logo { aspect-ratio: 16 / 7; padding: 7% 20%; }
}

@media (max-width: 680px) {
  .pt-head { padding-bottom: 40px; }
  .pt-type { font-size: 16px; }
  .pt-desc { font-size: 15px; }
  .pt-facts { grid-template-columns: 1fr; }
  .pt-actions .button { flex: 1 1 auto; }
  .pt-docs { margin-top: 40px; }
  .pt-docs-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 18px; }
  .pt-nodocs { flex-direction: column; align-items: flex-start; padding: 22px; }
  .pt-final { padding-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-strip-logo, .pt-strip a:hover .pt-strip-logo { transition: none; transform: none; }
}
