/* Страница «Контакты» gremir.ru — стили контентной части.
   Подключается из текста страницы: /wa-data/public/site/contacts/contacts.css
   Использует переменные темы gremir_2025: --primary, --inverted, --accent, --stroke, --light-bg, --secondary, --gap-*. */

.contacts-v2 { display: flex; flex-direction: column; gap: 56px; --cv2-line: var(--stroke, #E2E2E2); --cv2-muted: #6B6F76; }
.contacts-v2 *, .contacts-v2 *:before, .contacts-v2 *:after { box-sizing: border-box; }
.contacts-v2 h2, .contacts-v2 .cv2-h2 { margin: 0; }
.contacts-v2 .cv2-h2 { padding-bottom: 12px; border-bottom: 1px solid var(--inverted, #212121); }
.contacts-v2 address { font-style: normal; }
.contacts-v2 .cv2-label { font-size: 11px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--cv2-muted); }
.contacts-v2 .cv2-note { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--cv2-muted); }
.contacts-v2 .cv2-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.contacts-v2 .cv2-actions .button { min-height: 44px; gap: 8px; text-decoration: none; }
.contacts-v2 .cv2-actions .button .ico { flex-shrink: 0; }

/* 1. Быстрая связь */
.cv2-quick__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cv2-cell { border: 1px solid var(--cv2-line); margin: -1px 0 0 -1px; padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cv2-big { font-family: var(--font-family-secondary, "Inter Tight", sans-serif); font-weight: var(--bold, 500); font-size: 26px; line-height: 32px; letter-spacing: -0.01em; color: var(--primary); text-decoration: none; overflow-wrap: anywhere; }
.cv2-big:hover { color: var(--accent); }

/* 2. Адреса + фото */
.cv2-split { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.cv2-split__col { flex: 1 1 380px; min-width: 0; }
.cv2-split__col--text { flex-basis: 420px; }
.contacts-v2 table.features--contacts { margin: 0; width: 100%; }
.contacts-v2 table.features--contacts td { padding: 14px 0; vertical-align: top; width: auto; }
.contacts-v2 table.features--contacts td.name { width: 36%; padding-right: 16px; color: var(--cv2-muted); }
.contacts-v2 table.features--contacts td.value { text-align: left; line-height: 20px; }
.contacts-v2 table.features--contacts tr:last-child td { padding-bottom: 14px; }

.cv2-gallery { margin: 0; }
.cv2-gallery__main { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--cv2-line); background: var(--light-bg, #F5F6F8); }
.cv2-gallery__main img, .cv2-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cv2-gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.cv2-gallery__thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--cv2-line); background: var(--light-bg, #F5F6F8); }
.cv2-gallery__thumb:hover, .cv2-gallery__main:hover { border-color: var(--accent); }
.cv2-gallery__more { aspect-ratio: 4 / 3; border: 1px solid var(--inverted, #212121); background: #fff; color: var(--primary); cursor: pointer; padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; font-family: var(--font-family-main, "Fira Code", monospace); font-size: 11px; line-height: 15px; letter-spacing: .04em; text-transform: uppercase; }
.cv2-gallery__more:hover { border-color: var(--accent); color: var(--accent); }
.cv2-gallery__more b { font-size: 22px; line-height: 24px; font-weight: 600; letter-spacing: 0; }
.cv2-gallery__caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--cv2-muted); }

/* 3. Как проехать */
.cv2-route__grid { display: flex; flex-wrap: wrap; margin-top: 20px; border: 1px solid var(--cv2-line); }
.cv2-route__map { flex: 2 1 420px; min-height: 360px; position: relative; background: var(--light-bg, #F5F6F8); }
.cv2-route__map > * { width: 100% !important; }
.cv2-route__text { flex: 1 1 260px; padding: 24px; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--cv2-line); }
.cv2-route__text .cv2-actions { margin-top: auto; padding-top: 8px; }
.cv2-route__item > div + div { margin-top: 6px; line-height: 20px; }

/* 4. Реквизиты */
.cv2-req__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--inverted, #212121); }
.cv2-req__head .cv2-h2 { border-bottom: 0; padding-bottom: 0; }
.cv2-req__head .cv2-actions { margin-top: 0; }
.contacts-v2 table.features--req td.name { width: 30%; }
.contacts-v2 table.features--req td.cv2-copy { width: 32px; padding-left: 8px; text-align: right; vertical-align: middle; }
.cv2-copy__btn { width: 28px; height: 28px; border: 0; padding: 0; background: transparent; color: var(--secondary, #B8BCC3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 1px; }
.cv2-copy__btn:hover { color: var(--accent); }
.cv2-copy__btn.is-done { color: var(--green, #27C970); }
.cv2-copy__btn svg { width: 16px; height: 16px; }
.cv2-toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--inverted, #212121); color: #fff; padding: 10px 16px; font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: .04em; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .2s; }
.cv2-toast.is-visible { opacity: 1; }

/* Адаптив */
@media (max-width: 1100px) {
  .cv2-quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .contacts-v2 { gap: 40px; }
  .cv2-quick__grid { grid-template-columns: minmax(0, 1fr); }
  .cv2-cell { padding: 16px; }
  .cv2-big { font-size: 22px; line-height: 28px; }
  .contacts-v2 .cv2-actions .button { flex: 1 1 calc(50% - 8px); }
  .cv2-req__head .cv2-actions .button { flex-basis: 100%; }
  .contacts-v2 table.features--contacts td { display: block; width: 100% !important; padding: 0; }
  .contacts-v2 table.features--contacts td.name { padding: 12px 0 2px; }
  .contacts-v2 table.features--contacts td.value { padding: 0 0 12px; }
  .contacts-v2 table.features--req tr { position: relative; }
  .contacts-v2 table.features--req td.cv2-copy { position: absolute; right: 0; top: 10px; width: 32px; padding: 0; }
  .contacts-v2 table.features--req td.value { padding-right: 36px; }
  .cv2-gallery__thumbs { gap: 6px; }
  .cv2-route__text { border-left: 0; border-top: 1px solid var(--cv2-line); padding: 16px; }
  .cv2-route__map { min-height: 300px; }
}

/* Контакты: полный телефон, общий ряд кнопок и заполнение блока картой. */
body.contacts-page a[href^="tel:"] small { opacity: 1 !important; }
.contacts-v2 .cv2-quick__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contacts-v2 .cv2-quick__actions .button { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; justify-content: center; text-align: center; white-space: normal; }
.contacts-v2 .cv2-route__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(240px, 3fr); align-items: stretch; }
.contacts-v2 .cv2-route__map { margin: 0; min-width: 0; min-height: 420px; overflow: hidden; }
.contacts-v2 .cv2-route__map > iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; display: block; }
.contacts-v2 .cv2-route__text { min-width: 0; padding: 20px; }
@media (max-width: 1100px) {
  .contacts-v2 .cv2-route__grid { grid-template-columns: minmax(0, 1fr); }
  .contacts-v2 .cv2-route__text { border-left: 0; border-top: 1px solid var(--cv2-line); }
}
@media (max-width: 760px) {
  .contacts-v2 .cv2-quick__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts-v2 .cv2-quick__actions .button { padding-left: 8px; padding-right: 8px; }
  .contacts-v2 .cv2-route__map { min-height: 320px; }
  .contacts-v2 .cv2-route__text { padding: 16px; }
}

/* Реквизиты: половина прежнего верхнего отступа с обеих сторон строки. */
.contacts-v2 #cv2-req-table td { padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
/* Кнопка остаётся 28px, но больше не увеличивает высоту текстовой строки. */
.contacts-v2 #cv2-req-table td.cv2-copy { padding-top: 3px; padding-bottom: 3px; }
@media (max-width: 760px) {
  .contacts-v2 #cv2-req-table td.name { padding-top: 6px; padding-bottom: 2px; }
  .contacts-v2 #cv2-req-table td.value { padding-top: 0; padding-bottom: 6px; }
  .contacts-v2 #cv2-req-table td.cv2-copy { top: 4px; padding-top: 0; padding-bottom: 0; }
}
