/* Главная — первый экран (inc/home-page.php) по макету Figma «Первый экран · C v2»:
 * ≥1024 — десктоп 165:119 (контент 1160 px по центру, как шапка сайта, фото 21:9 во всю ширину);
 * 640–1023 — планшет 169:2; <640 — телефон 169:78 (свой кадр фото, кнопки во всю ширину).
 * Лента «быстрого перехода» стоит после шапки и НЕ закреплена — уезжает при прокрутке. */

.ptvh {
  --dark: #294345; --ink: #1e1e1e; --slate: #2f4344; --muted: #857a70; --line: #e5e5e3; --cream: #fcf8e6; --green: #0ab088; --wa: #25d366; --wa-ink: #0b2416;
  font-family: 'Scada', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ptvh *, .ptvh *::before, .ptvh *::after { box-sizing: border-box; }
.ptvh a { text-decoration: none; }
:where(.ptvh) :where(h1, p) { margin: 0; padding: 0; }
.ptvh img { display: block; max-width: 100%; }
.ptvh-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ptvh-short { display: none; }

/* лента быстрого перехода */
.ptvh-quick { background: #fff; }
.ptvh-quick__in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; padding-top: 4px; padding-bottom: 14px; }
.ptvh-q { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 14px 6px 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--slate); transition: border-color .15s ease, background-color .15s ease; }
.ptvh-q:hover { border-color: #c9d6d2; background: #fafcfb; }
.ptvh-q:focus-visible { outline: 3px solid #204547; outline-offset: 2px; }
.ptvh-q__m { flex: none; width: 56px; height: 48px; border-radius: 8px; background: var(--cream); display: flex; align-items: center; justify-content: center; }
.ptvh-q__m img { width: 50px; height: 42px; object-fit: contain; mix-blend-mode: multiply; }
.ptvh-q__b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptvh-q__t { font-weight: 700; font-size: 16px; line-height: 20px; color: var(--slate); }
.ptvh-q__n { font-size: 14px; line-height: 18px; color: var(--muted); }

/* первый экран */
.ptvh-hero { background: var(--dark); color: #fff; }
.ptvh-hero__in { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 80px; align-items: start; padding-top: 72px; padding-bottom: 24px; position: relative; z-index: 1; }
.ptvh-hero h1 { font-weight: 700; font-size: 44px; line-height: 50px; color: #fff; letter-spacing: 0; }
.ptvh-over { margin-top: 22px !important; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; line-height: 16px; letter-spacing: 1.2px; text-transform: uppercase; color: #7fd9bf; }
.ptvh-over::before { content: ''; flex: none; width: 28px; height: 3px; background: var(--green); }
.ptvh-hero__r { padding-top: 8px; }
.ptvh-lead { font-family: 'Open Sans', Arial, sans-serif; font-size: 17px; line-height: 26px; color: #d7e2e1; }
.ptvh-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ptvh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 28px; border-radius: 30px;
  font: 700 17px/1.2 'Scada', Arial, sans-serif; text-align: center; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, filter .15s ease;
}
.ptvh-btn svg { flex: none; }
.ptvh-btn--wa { background: var(--wa); color: var(--wa-ink) !important; padding-left: 24px; box-shadow: 0 10px 24px -6px rgba(31, 170, 82, .45); }
.ptvh-btn--wa:hover { filter: brightness(1.04); transform: translateY(-1px); }
.ptvh-btn--ghost { border: 2px solid #fff; color: #fff !important; padding: 12px 28px 12px 24px; }
.ptvh-btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.ptvh-btn:focus-visible { outline: 3px solid #eadf8c; outline-offset: 3px; }

/* фото: сверху переходит из фона, снизу затемнено */
.ptvh-photo { position: relative; overflow: hidden; background: var(--dark); }
.ptvh-photo img { width: 100%; height: auto; aspect-ratio: 2000 / 857; max-height: 760px; object-fit: cover; }
.ptvh-photo::before, .ptvh-photo::after { content: ''; position: absolute; left: 0; right: 0; pointer-events: none; }
.ptvh-photo::before { top: 0; height: 30%; background: linear-gradient(var(--dark), rgba(41, 67, 69, 0)); }
.ptvh-photo::after { bottom: 0; height: 33%; background: linear-gradient(rgba(10, 18, 18, 0), rgba(10, 18, 18, .85)); }

@media (max-width: 1199px) {
  .ptvh-hero__in { gap: 56px; }
  .ptvh-hero h1 { font-size: 40px; line-height: 46px; }
}

/* планшет */
@media (max-width: 1023px) {
  .ptvh-wrap { padding: 0 var(--ptv-g, 15px); }   /* края — как у шапки (site-ui.css) */
  .ptvh-quick__in { gap: 8px; padding-bottom: 12px; }
  .ptvh-q { gap: 7px; padding: 5px 6px 5px 5px; }
  .ptvh-q__m { width: 40px; height: 36px; }
  .ptvh-q__m img { width: 38px; height: 32px; }
  .ptvh-q__t { font-size: 13px; line-height: 15px; }
  .ptvh-q__n { font-size: 12px; line-height: 15px; }
  .ptvh-q--more { padding-right: 10px; }
  .ptvh-q--more .ptvh-q__m svg { width: 20px; height: 20px; }
  .ptvh-q--more .ptvh-q__n { display: none; }

  .ptvh-hero__in { display: block; padding-top: 56px; padding-bottom: 8px; }
  .ptvh-hero h1 { font-size: 38px; line-height: 44px; max-width: 620px; }
  .ptvh-lead { max-width: 640px; }
  .ptvh-over { margin-top: 16px !important; }
  .ptvh-hero__r { padding-top: 20px; }
  .ptvh-btns { margin-top: 24px; }
  .ptvh-photo img { aspect-ratio: 768 / 440; max-height: none; }
  .ptvh-photo::before { height: 32%; }
  .ptvh-photo::after { height: 32%; background: linear-gradient(rgba(41, 67, 69, 0), var(--dark)); }
}

/* лента — плитками «фото над подписью» */
@media (max-width: 767px) {
  .ptvh-long { display: none; }
  .ptvh-short { display: inline; }
  .ptvh-quick__in { grid-template-columns: repeat(4, minmax(0, 1fr)) 52px; gap: 6px; padding-top: 4px; padding-bottom: 12px; }
  .ptvh-q { flex-direction: column; align-items: stretch; gap: 4px; padding: 0; border: 0; border-radius: 0; background: none; text-align: center; }
  .ptvh-q:hover { background: none; }
  .ptvh-q__m { width: 100%; height: 44px; border-radius: 10px; }
  .ptvh-q__m img { width: calc(100% - 8px); max-width: 58px; height: 38px; }
  .ptvh-q__t { font-size: 11.5px; line-height: 14px; overflow-wrap: break-word; hyphens: auto; }
  .ptvh-q__n { display: none; }
  .ptvh-q--more { padding: 0; }
}
@media (min-width: 640px) and (max-width: 767px) {
  .ptvh-quick__in { grid-template-columns: repeat(4, minmax(0, 1fr)) 64px; gap: 10px; }
  .ptvh-q__m { height: 52px; }
  .ptvh-q__m img { max-width: 70px; height: 44px; }
  .ptvh-q__t { font-size: 13px; line-height: 16px; }
}

/* телефон */
@media (max-width: 639px) {
  .ptvh-hero__in { padding-top: 40px; padding-bottom: 4px; }
  .ptvh-hero h1 { font-size: 29px; line-height: 34px; }
  .ptvh-over { margin-top: 14px !important; gap: 8px; font-size: 12px; line-height: 15px; letter-spacing: 1px; }
  .ptvh-over::before { width: 20px; }
  .ptvh-hero__r { padding-top: 16px; }
  .ptvh-lead { font-size: 15px; line-height: 22px; }
  .ptvh-btns { flex-direction: column; gap: 10px; margin-top: 20px; }
  .ptvh-btn { width: 100%; }
  .ptvh-photo img { aspect-ratio: 375 / 300; }
  .ptvh-photo::before, .ptvh-photo::after { height: 30%; }
}

@media (prefers-reduced-motion: reduce) {
  .ptvh-btn, .ptvh-q { transition: none; }
}
