/* Сторінка «Офіси» (service-ofisy.php). Усі класи з префіксом .pg-ofisy, щоб не зачепити інші сторінки.
   Тон один: графіт. Розміри шрифтів беремо зі змінних теми, з запасним значенням. */

.pg-ofisy {
  --of-text: #e8ebec;
  --of-glass: #aab2b5;
  --of-wall: #4c5256;
  --of-maybe: #6e2222;
  font-size: var(--fs-body, 18px);
  line-height: 1.6;
}
.pg-ofisy p + p { margin-top: 14px; }

.pg-ofisy-sec { padding: clamp(56px, 7vw, 104px) 0; }
.pg-ofisy-h2 {
  font-size: var(--fs-h2, clamp(30px, 3.4vw, 48px));
  line-height: 1.1; font-weight: 700; letter-spacing: -.015em;
  max-width: 20ch; margin-bottom: 20px; text-wrap: balance; color: var(--ink, #fff);
}
.pg-ofisy-h3 {
  font-size: var(--fs-h3, clamp(21px, 1.7vw, 26px));
  line-height: 1.2; font-weight: 600; color: var(--ink, #fff);
}
.pg-ofisy-lead {
  font-size: var(--fs-lead, clamp(20px, 1.6vw, 23px));
  line-height: 1.45; color: var(--ink, #fff); max-width: 46ch;
}

/* ---------- калькулятор строків ---------- */
.pg-ofisy-calc {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 5vw, 80px);
  background: var(--bg2, #262a2d); border-radius: 4px;
  padding: clamp(22px, 4vw, 56px);
}
.pg-ofisy-calc .pg-ofisy-h2 { margin-bottom: 32px; }
.pg-ofisy-calc__area { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.pg-ofisy-calc__label { display: block; font-size: var(--fs-body, 18px); font-weight: 600; color: var(--ink, #fff); }
.pg-ofisy-calc__val { font-size: var(--fs-h2, clamp(30px, 3.4vw, 48px)); font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink, #fff); white-space: nowrap; }

.pg-ofisy-rangebox { --p: .29; position: relative; height: 44px; margin: 14px 0 2px; }
.pg-ofisy-rangebox::before,
.pg-ofisy-rangebox__fill { content: ""; position: absolute; left: 0; top: 50%; height: 10px; margin-top: -5px; border-radius: 5px; pointer-events: none; }
.pg-ofisy-rangebox::before { right: 0; background: var(--bg3, #303538); }
.pg-ofisy-rangebox__fill { width: calc(16px + (100% - 32px) * var(--p)); background: var(--acc, #c71313); }
.pg-ofisy-range {
  -webkit-appearance: none; appearance: none;
  position: relative; z-index: 1;
  display: block; width: 100%; height: 44px; margin: 0; padding: 0;
  background: transparent; cursor: pointer;
}
.pg-ofisy-range:focus { outline: none; }
.pg-ofisy-range:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.pg-ofisy-range::-webkit-slider-runnable-track { height: 10px; background: transparent; }
.pg-ofisy-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; margin-top: -11px; border-radius: 50%;
  background: var(--acc, #c71313); border: 4px solid #fff;
}
.pg-ofisy-range::-moz-range-track { height: 10px; background: transparent; }
.pg-ofisy-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--acc, #c71313); border: 4px solid #fff; }
.pg-ofisy-range__ends { display: flex; justify-content: space-between; font-size: var(--fs-small, 15px); color: var(--muted, #c4c9cc); }

.pg-ofisy-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 32px; }
.pg-ofisy-presets button,
.pg-ofisy-mode button {
  min-height: 44px; padding: 0 16px; border: 2px solid var(--bg3, #303538); border-radius: 4px;
  background: transparent; color: var(--ink, #fff); font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background-color .2s var(--ease, ease), border-color .2s var(--ease, ease);
}
.pg-ofisy-presets button:hover,
.pg-ofisy-mode button:hover { border-color: var(--acc, #c71313); }
.pg-ofisy-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pg-ofisy-mode button { min-height: 56px; font-weight: 600; }
.pg-ofisy-mode button[aria-pressed="true"] { background: var(--acc, #c71313); border-color: var(--acc, #c71313); }

.pg-ofisy-calc__res { display: flex; flex-direction: column; align-items: flex-start; }
.pg-ofisy-calc__big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 0; font-size: clamp(48px, 5.4vw, 80px); line-height: 1; font-weight: 700; letter-spacing: -.03em; color: var(--ink, #fff); }
.pg-ofisy-calc__unit { display: inline-block; font-size: var(--fs-h3, clamp(21px, 1.7vw, 26px)); letter-spacing: -.01em; font-weight: 600; }
.pg-ofisy-calc__sub { margin-top: 14px !important; font-size: var(--fs-lead, clamp(20px, 1.6vw, 23px)); line-height: 1.4; color: var(--ink, #fff); max-width: 34ch; }

.pg-ofisy-week { width: 100%; max-width: 440px; margin-top: 26px; }
.pg-ofisy-week__head, .pg-ofisy-week__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pg-ofisy-week__head span { font-size: var(--fs-small, 15px); color: var(--muted, #c4c9cc); text-align: center; padding-bottom: 6px; }
.pg-ofisy-cell { position: relative; display: block; height: 30px; border-radius: 3px; background: var(--bg, #1f2325); overflow: hidden; }
.pg-ofisy-cell--on { background: var(--acc, #c71313); }
.pg-ofisy-cell--maybe { background: var(--of-maybe); }
.pg-ofisy-cell--eve::after,
.pg-ofisy-cell--eve-maybe::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: var(--acc, #c71313); }
.pg-ofisy-cell--eve-maybe::after { background: var(--of-maybe); }
.pg-ofisy-cell--pad { background: transparent; }
html.js .pg-ofisy-week__grid .pg-ofisy-cell { animation: pg-ofisy-cell .32s var(--ease, ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes pg-ofisy-cell { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.pg-ofisy-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: var(--fs-small, 15px); color: var(--of-text); }
.pg-ofisy-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pg-ofisy-legend .pg-ofisy-cell { width: 18px; height: 14px; flex: none; }
.pg-ofisy-calc__how { margin-top: 22px !important; font-size: var(--fs-small, 15px); line-height: 1.5; color: var(--of-text); max-width: 52ch; }
.pg-ofisy-calc__note { margin-top: 8px !important; font-size: var(--fs-small, 15px); line-height: 1.5; color: var(--ink, #fff); font-weight: 600; max-width: 52ch; }
.pg-ofisy-calc__res .btn { margin-top: 24px; }

@media (max-width: 899px) {
  .pg-ofisy-calc { grid-template-columns: 1fr; gap: 32px; padding: 22px 18px 26px; }
  .pg-ofisy-calc .pg-ofisy-h2 { margin-bottom: 22px; }
  .pg-ofisy-presets { margin: 14px 0 24px; }
  .pg-ofisy-presets button { padding: 0 12px; font-size: 15px; }
  .pg-ofisy-mode button { font-size: 16px; padding: 0 10px; line-height: 1.2; }
  .pg-ofisy-week { max-width: none; }
  .pg-ofisy-cell { height: 26px; }
  .pg-ofisy-calc__res .btn { width: 100%; }
}

/* ---------- план офісу ---------- */
.pg-ofisy-plan__lead { margin-bottom: 36px; }
.pg-ofisy-plan { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px); align-items: center; }
.pg-ofisy-plan__map svg { display: block; width: 100%; height: auto; }
.pg-ofisy-plan .pz-floor { fill: var(--bg2, #262a2d); }
.pg-ofisy-plan .pz-walls { fill: none; stroke: var(--of-wall); stroke-width: 8; }
.pg-ofisy-plan .pz-desks { fill: var(--bg3, #303538); }
.pg-ofisy-plan .pz-labels { fill: var(--muted, #c4c9cc); font-family: inherit; font-size: 17px; font-weight: 500; text-anchor: middle; }
.pg-ofisy-plan .pz { stroke: var(--of-glass); stroke-width: 7; fill: none; cursor: pointer; transition: stroke .25s var(--ease, ease), stroke-width .25s var(--ease, ease); }
.pg-ofisy-plan .pz .pz-arc { stroke-width: 3; stroke-dasharray: 6 6; }
.pg-ofisy-plan .pz:hover { stroke: #d5dadc; }
.pg-ofisy-plan .pz.is-active { stroke: var(--acc, #c71313); stroke-width: 12; }
.pg-ofisy-plan .pz.is-active .pz-arc { stroke-width: 4; }
html.js .pg-ofisy-plan .pz.is-active { animation: pg-ofisy-blink 1.6s var(--ease, ease) 1; }
@keyframes pg-ofisy-blink { 0%, 100% { opacity: 1; } 30% { opacity: .35; } }

.pg-ofisy-zones { display: grid; gap: 6px; }
.pg-ofisy-zone { position: relative; padding: 14px 0 14px 22px; }
.pg-ofisy-zone::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 2px; background: var(--bg3, #303538); transition: background-color .25s var(--ease, ease); }
.pg-ofisy-zone.is-active::before { background: var(--acc, #c71313); }
.pg-ofisy-zone__btn {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font-size: var(--fs-h3, clamp(21px, 1.7vw, 26px)); line-height: 1.25; font-weight: 600; color: var(--ink, #fff);
}
.pg-ofisy-zone__text { margin-top: 8px; color: var(--of-text); max-width: 44ch; }
html.js .pg-ofisy-zone:not(.is-active) .pg-ofisy-zone__text { display: none; }
html.js .pg-ofisy-zone:not(.is-active) .pg-ofisy-zone__btn { color: var(--muted, #c4c9cc); }
html.js .pg-ofisy-zone:not(.is-active) .pg-ofisy-zone__btn:hover { color: var(--ink, #fff); }

@media (max-width: 899px) {
  .pg-ofisy-plan { grid-template-columns: 1fr; gap: 16px; }
  .pg-ofisy-plan__lead { margin-bottom: 20px; }
  .pg-ofisy-plan .pz-labels { display: none; }
  .pg-ofisy-zone { padding: 10px 0 10px 18px; }
}

/* ---------- як працюємо ---------- */
.pg-ofisy-work { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 40px clamp(32px, 6vw, 104px); align-items: start; }
.pg-ofisy-work__side { position: sticky; top: calc(var(--hdr, 72px) + 24px); }
.pg-ofisy-work__clean { font-size: var(--fs-lead, clamp(20px, 1.6vw, 23px)); line-height: 1.45; color: var(--ink, #fff); max-width: 30ch; margin-bottom: 32px; }
.pg-ofisy-ticks { display: grid; gap: 12px; margin-top: 16px; }
.pg-ofisy-ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--of-text); }
.pg-ofisy-ticks .ic { width: 22px; height: 22px; color: var(--acc, #c71313); margin-top: 3px; flex: none; }
.pg-ofisy-work__rows { display: grid; gap: clamp(40px, 5vw, 64px); }
.pg-ofisy-row__title { font-size: var(--fs-h3, clamp(21px, 1.7vw, 26px)); line-height: 1.12; font-weight: 700; letter-spacing: -.015em; margin-bottom: 14px; max-width: 22ch; }
.pg-ofisy-row__body { color: var(--of-text); max-width: 56ch; }
.pg-ofisy-row__body p:first-child { color: var(--ink, #fff); }
.pg-ofisy-row__img { margin-top: 20px; }
.pg-ofisy-work__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 60% 50%; border-radius: 4px; }
.pg-ofisy-row__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
@media (max-width: 899px) {
  .pg-ofisy-work { grid-template-columns: 1fr; }
  .pg-ofisy-work__side { position: static; }
  .pg-ofisy-work__clean { margin-bottom: 24px; }
}

/* ---------- доказ і чесні межі ---------- */
.pg-ofisy-proof { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; }
.pg-ofisy-proof--noimg { grid-template-columns: 1fr; }
.pg-ofisy-proof__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; border-radius: 4px; }
.pg-ofisy-proof__text .pg-ofisy-lead { max-width: 44ch; }
.pg-ofisy-proof__honest { margin-top: 28px !important; padding: 20px 24px; background: var(--bg2, #262a2d); border-radius: 4px; color: var(--of-text); max-width: 56ch; }
.pg-ofisy-proof__honest strong { color: var(--ink, #fff); }
@media (max-width: 899px) {
  .pg-ofisy-proof { grid-template-columns: 1fr; gap: 24px; }
  .pg-ofisy-proof__img { order: 2; }
  .pg-ofisy-proof__img img { aspect-ratio: 4 / 3; }
  .pg-ofisy-proof__honest { padding: 18px; }
}

/* ---------- FAQ ---------- */
.pg-ofisy-faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 24px clamp(32px, 5vw, 80px); align-items: start; }
.pg-ofisy-faq .faq__list { display: grid; gap: 8px; }
.pg-ofisy-faq .faq__item { background: var(--bg2, #262a2d); border-radius: 4px; }
.pg-ofisy-faq .faq__q { font-size: var(--fs-lead, clamp(20px, 1.6vw, 23px)); line-height: 1.3; font-weight: 600; color: var(--ink, #fff); }
.pg-ofisy-faq .faq__a { font-size: var(--fs-body, 18px); line-height: 1.6; color: var(--of-text); }
@media (max-width: 899px) { .pg-ofisy-faq { grid-template-columns: 1fr; } }

/* ---------- фінальна заявка ---------- */
.pg-ofisy-final__box {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px clamp(32px, 6vw, 96px); align-items: start;
  background: var(--bg2, #262a2d); border-radius: 4px; padding: clamp(22px, 4vw, 56px);
}
.pg-ofisy-final .pg-ofisy-lead { margin-bottom: 30px; }
.pg-ofisy-factors { display: grid; gap: 10px; margin-top: 14px; }
.pg-ofisy-factors li { position: relative; padding-left: 22px; color: var(--ink, #fff); font-weight: 500; }
.pg-ofisy-factors li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; border-radius: 2px; background: var(--acc, #c71313); }
.pg-ofisy-final__note { margin-top: 20px !important; color: var(--of-text); max-width: 52ch; }
.pg-ofisy-final__area { margin-top: 20px !important; font-size: var(--fs-small, 15px); color: var(--of-text); max-width: 52ch; }
.pg-ofisy-final__call { margin-top: 20px !important; font-size: var(--fs-lead, clamp(20px, 1.6vw, 23px)); }
.pg-ofisy-final__call a { font-weight: 700; white-space: nowrap; }
.pg-ofisy-final__form { background: var(--bg, #1f2325); border-radius: 4px; padding: clamp(20px, 3vw, 32px); }
.pg-ofisy-final__ftitle { font-size: var(--fs-h3, clamp(21px, 1.7vw, 26px)); line-height: 1.25; font-weight: 600; margin-bottom: 8px; }
.pg-ofisy-final__hours { color: var(--of-text); font-size: var(--fs-small, 15px); margin-bottom: 18px; }
@media (max-width: 899px) {
  .pg-ofisy-final__box { grid-template-columns: 1fr; padding: 22px 18px; }
  .pg-ofisy-final__form { padding: 18px; }
}

/* ---------- інші об'єкти ---------- */
.pg-ofisy-others { padding-top: 0; }
.pg-ofisy-others__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pg-ofisy-others__list a {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "img name arrow" "img text arrow";
  gap: 4px 16px; align-items: center; padding: 12px 16px 12px 12px;
  background: var(--bg2, #262a2d); border-radius: 4px; text-decoration: none; color: inherit;
  transition: background-color .2s var(--ease, ease);
}
.pg-ofisy-others__list a:hover { background: var(--bg3, #303538); }
.pg-ofisy-others__img { grid-area: img; display: block; border-radius: 3px; overflow: hidden; }
.pg-ofisy-others__img img { width: 88px; height: 88px; object-fit: cover; }
.pg-ofisy-others__name { grid-area: name; align-self: end; font-size: var(--fs-body, 18px); font-weight: 600; line-height: 1.2; }
.pg-ofisy-others__text { grid-area: text; align-self: start; font-size: var(--fs-small, 15px); line-height: 1.4; color: var(--of-text); }
.pg-ofisy-others__arrow { grid-area: arrow; width: 22px; height: 22px; color: var(--acc, #c71313); transition: transform .2s var(--ease, ease); }
.pg-ofisy-others__list a:hover .pg-ofisy-others__arrow { transform: translateX(4px); }
@media (max-width: 1099px) { .pg-ofisy-others__list { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html.js .pg-ofisy-week__grid .pg-ofisy-cell,
  html.js .pg-ofisy-plan .pz.is-active { animation: none; }
  .pg-ofisy-plan .pz, .pg-ofisy-zone::before, .pg-ofisy-presets button, .pg-ofisy-mode button, .pg-ofisy-others__arrow { transition: none; }
}
