/*
 * Страница «Контакты» — все стили скоупированы под .contacts-page
 * Исходник: data/page/contacts-layout/index.html
 * Шапка и подвал предоставляются base.html / header.css / site-footer.css
 * (topbar/nav/logo/phone-top/head-icon/cart исходника намеренно не переносятся).
 *
 * Ширина оболочки футера — на body.footer-contacts (contacts-shell-*).
 * Контентная обложка .contacts-page — PVC-like surface (как home/about/categories).
 */

body.footer-contacts {
  --contacts-shell-width: 70vw;
  --contacts-shell-max: var(--storefront-content-max, 1248px);
  --contacts-section-x: clamp(20px, 3.2vw, 52px);
  /* PVC-like page backdrop (same contract as homepage /categories/ /about/). */
  background-color: #f3f8fe;
  background-image: linear-gradient(135deg, #fbfdff 0%, #edf5ff 48%, #f7fbff 100%);
}

.contacts-page {
  --blue: #002f70;
  --deep: #001d47;
  --line: #cfd9e7;
  --text: #061c44;
  --muted: #56657b;
  --paper: #f8fafc;
  --white: #fff;
  --contacts-shell-radius: 12px;
  position: relative;
  isolation: isolate;
  width: min(var(--storefront-content-max, 1248px), calc(100% - 32px));
  max-width: var(--storefront-content-max, 1248px);
  margin: 18px auto 36px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.55;
  background: #fff;
  border: 1px solid rgba(116, 156, 204, 0.28);
  border-radius: var(--contacts-shell-radius);
  box-shadow: 0 18px 48px rgba(23, 73, 130, 0.08);
}

.contacts-page > .hero {
  border-top-left-radius: var(--contacts-shell-radius);
  border-top-right-radius: var(--contacts-shell-radius);
}

.contacts-page > :last-child {
  border-bottom-left-radius: var(--contacts-shell-radius);
  border-bottom-right-radius: var(--contacts-shell-radius);
}

.contacts-page *,
.contacts-page *::before,
.contacts-page *::after {
  box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.contacts-page .hero {
  min-height: 444px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  position: relative;
  background: #07336f;
  color: #fff;
}

.contacts-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
    radial-gradient(circle at 25% 60%, rgba(255, 255, 255, .08), transparent 34%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  pointer-events: none;
}

.contacts-page .hero-left {
  position: relative;
  padding: 32px var(--contacts-section-x) 36px;
  display: grid;
  grid-template-columns: minmax(290px, 420px) 1fr;
  gap: 26px;
  align-items: center;
}

.contacts-page .hero-copy {
  align-self: start;
  padding-top: 14px;
}

.contacts-page .eyebrow {
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.contacts-page .hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 48px);
  line-height: .95;
  margin: 0 0 20px;
  font-weight: var(--fw-display);
  color: #fff;
}

.contacts-page .title-line {
  width: 28px;
  height: 2px;
  background: #fff;
  margin: 0 0 20px;
}

.contacts-page .hero p {
  font-size: var(--text-lg);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 400px;
}

.contacts-page .contact-list {
  display: grid;
  gap: 22px;
}

.contacts-page .contact-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  align-items: start;
}

.contacts-page .contact-item svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
}

.contacts-page .contact-item b {
  display: block;
  font-size: var(--text-2xl);
  margin-bottom: 5px;
}

.contacts-page .contact-item span {
  display: block;
  font-size: var(--text-md);
  line-height: 1.5;
  color: #d9e5f5;
}

.contacts-page .blueprint-door {
  position: relative;
  height: 376px;
  align-self: end;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .78;
}

.contacts-page .hero-photo {
  position: relative;
  min-height: 444px;
  overflow: hidden;
  background: #07336f;
}

.contacts-page .hero-photo picture,
.contacts-page .hero-photo__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 444px;
  object-fit: cover;
  object-position: center;
}

.contacts-page .hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #07336f 0%, rgba(7, 51, 111, .72) 5%, rgba(7, 51, 111, .08) 28%, rgba(0, 0, 0, 0) 100%);
}

/* ── Форма ────────────────────────────────────────────────────────────── */
.contacts-page .form-card {
  position: absolute;
  right: clamp(24px, 6vw, 156px);
  top: 22px;
  width: min(430px, 42vw);
  background: #fff;
  color: var(--text);
  padding: 30px 34px 28px;
  border-radius: 2px;
  border: 1px solid #d9e0eb;
  box-shadow: 0 18px 45px rgba(0, 21, 57, .20);
  z-index: 2;
}

.contacts-page .form-card h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 400;
  margin: 0 0 10px;
}

.contacts-page .form-card p {
  color: #5f6b7d;
  font-size: var(--text-md);
  line-height: 1.5;
  margin: 0 0 20px;
}

.contacts-page .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contacts-page .form-grid .full {
  grid-column: 1 / -1;
}

.contacts-page .input,
.contacts-page select,
.contacts-page textarea {
  width: 100%;
  border: 1px solid #cbd4e1;
  background: #fbfcfe;
  color: #33435b;
  height: 40px;
  padding: 0 14px;
  font-size: var(--text-md);
  border-radius: 2px;
  font-family: var(--font-sans);
}

.contacts-page textarea {
  height: 96px;
  resize: none;
  padding-top: 12px;
}

.contacts-page .check {
  margin: 14px 0 16px;
  font-size: var(--text-small);
  line-height: 1.45;
  color: #596779;
  display: flex;
  gap: 10px;
  align-items: center;
}

.contacts-page .check input {
  width: 15px;
  height: 15px;
}

.contacts-page .form-card button,
.contacts-page .blue-btn {
  border: 0;
  background: linear-gradient(180deg, #063b86, #002c6f);
  color: #fff;
  height: 44px;
  font-weight: 800;
  font-size: var(--text-body);
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: 3px;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  cursor: pointer;
}

.contacts-page .safe {
  font-size: var(--text-small);
  line-height: 1.45;
  color: #7b8594;
  text-align: center;
  margin-top: 14px;
}

.contacts-page .safe::before {
  content: "▣";
  font-size: var(--text-small);
  margin-right: 8px;
  color: #657287;
}

/* ── Контент: инфо-карточки ───────────────────────────────────────────── */
.contacts-page .content {
  padding: 28px var(--contacts-section-x) 0;
}

.contacts-page .contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.contacts-page .info-card {
  background: rgba(255, 255, 255, .82);
  border: 1px solid #cad4e3;
  border-radius: 3px;
  padding: 26px 24px 22px;
  min-height: 168px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
}

.contacts-page .info-card svg {
  width: 34px;
  height: 34px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.7;
}

.contacts-page .info-card h3 {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--blue);
}

.contacts-page .info-card p {
  font-size: var(--text-md);
  line-height: 1.55;
  color: #4f5d72;
  margin: 0 0 14px;
}

.contacts-page .info-card b {
  font-size: var(--text-xl);
  display: block;
  margin-bottom: 6px;
}

.contacts-page .arrow {
  font-size: var(--text-body);
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

/* ── Середина: «Как нас найти» full-width, затем FAQ full-width ────────── */
.contacts-page .middle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  border-top: 1px solid #d5ddea;
  padding-top: 28px;
  margin-bottom: 12px;
}

.contacts-page .find-us,
.contacts-page .faq {
  min-width: 0;
  width: 100%;
}

.contacts-page .faq h2,
.contacts-page .map-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 400;
  color: var(--blue);
  margin: 0 0 16px;
}

.contacts-page .faq-list {
  display: grid;
  gap: 12px;
}

.contacts-page .faq-row {
  min-height: 44px;
  height: auto;
  border: 1px solid #d2dbe8;
  background: #fff;
  border-radius: 2px;
  padding: 0;
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
  color: #18345f;
  display: block;
}

.contacts-page .faq-row > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  min-height: 44px;
}

.contacts-page .faq-row > summary::-webkit-details-marker {
  display: none;
}

.contacts-page .faq-row__toggle {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.contacts-page .faq-row__toggle::before,
.contacts-page .faq-row__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #18345f;
  transform: translate(-50%, -50%);
}

.contacts-page .faq-row__toggle::before {
  width: 14px;
  height: 2px;
}

.contacts-page .faq-row__toggle::after {
  width: 2px;
  height: 14px;
}

.contacts-page .faq-row[open] .faq-row__toggle::after {
  display: none;
}

.contacts-page .faq-row__answer {
  padding: 0 18px 14px;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.5;
  color: #3a4d6b;
}

.contacts-page .faq-row__answer p {
  margin: 0 0 0.6em;
}

.contacts-page .faq-row__answer p:last-child {
  margin-bottom: 0;
}

.contacts-page .faq-row__answer a {
  color: #07336f;
  text-decoration: underline;
}

.contacts-page .map-panel {
  display: grid;
  grid-template-columns: 1.35fr minmax(220px, 0.85fr) minmax(200px, 0.75fr);
  border: 1px solid #d2dbe8;
  background: #fff;
  min-height: 260px;
  width: 100%;
}

.contacts-page .map-image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  min-height: 260px;
}

.contacts-page .map-image--live {
  background-image: none !important;
  overflow: hidden;
}

.contacts-page .map-image__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contacts-page .pin {
  position: absolute;
  left: 49%;
  top: 44%;
  width: 28px;
  height: 28px;
  background: #07336f;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
}

.contacts-page .pin::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  left: 9px;
  top: 9px;
}

.contacts-page .office-info {
  padding: 24px 28px;
}

.contacts-page .office-info h3 {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--blue);
}

.contacts-page .office-info p {
  font-size: var(--text-md);
  line-height: 1.6;
  margin: 0 0 18px;
}

.contacts-page .outline-btn {
  height: 42px;
  padding: 0 24px;
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  font-size: var(--text-body);
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.contacts-page .office-photo {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 260px;
}

/* ── Соцсети ──────────────────────────────────────────────────────────── */
.contacts-page .social {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  border-top: 1px solid #d8e0ec;
  border-bottom: 1px solid #d8e0ec;
  margin-top: 12px;
  background: rgba(255, 255, 255, .9);
  font-family: var(--font-sans);
  color: var(--blue);
  font-size: var(--text-xl);
}

.contacts-page .social-icons {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 0 22px;
  border-left: 1px solid #d8e0ec;
  border-right: 1px solid #d8e0ec;
}

.contacts-page .social-icons a {
  width: 30px;
  height: 30px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--text-small);
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
}

/* ── CTA ──────────────────────────────────────────────────────────────── */
.contacts-page .cta {
  min-height: 132px;
  background: #07336f;
  color: #fff;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  padding: 18px var(--contacts-section-x);
  gap: 34px;
  position: relative;
  overflow: hidden;
}

.contacts-page .cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 32px 32px;
}

.contacts-page .cta::after {
  content: "";
  position: absolute;
  left: -28px;
  bottom: -30px;
  width: 260px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, .3);
  transform: skew(-20deg);
  opacity: .6;
}

.contacts-page .cta h2 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 12px;
}

.contacts-page .cta p {
  position: relative;
  font-size: var(--text-lg);
  line-height: 1.55;
  margin: 0;
}

.contacts-page .cta-actions {
  position: relative;
  display: flex;
  gap: 20px;
  justify-content: flex-end;
}

.contacts-page .cta-actions .consult {
  width: 220px;
  background: #fff;
  color: var(--blue);
  height: 48px;
  border: 0;
  border-radius: 3px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: var(--text-body);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contacts-page .cta-actions .call {
  width: 200px;
  height: 48px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 3px;
  font-weight: 800;
  font-size: var(--text-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Адаптив ──────────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
  body.footer-contacts {
    --contacts-shell-width: 88vw;
    --contacts-section-x: clamp(18px, 3.5vw, 42px);
  }
}

@media (max-width: 1100px) {
  body.footer-contacts {
    --contacts-shell-width: 94vw;
  }

  .contacts-page .hero {
    grid-template-columns: 1fr;
  }

  .contacts-page .hero-photo {
    min-height: 360px;
  }

  .contacts-page .form-card {
    right: 22px;
    top: 22px;
    width: min(430px, 90vw);
  }

  .contacts-page .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts-page .middle {
    grid-template-columns: 1fr;
  }

  .contacts-page .map-panel {
    grid-template-columns: 1fr 1fr;
  }

  .contacts-page .office-photo {
    min-height: 190px;
  }

  .contacts-page .cta {
    grid-template-columns: 1fr;
    padding: 24px 28px;
    height: auto;
  }

  .contacts-page .cta-actions {
    justify-content: flex-start;
  }

  .contacts-page .hero-left {
    grid-template-columns: 1fr .8fr;
  }
}

@media (max-width: 720px) {
  body.footer-contacts {
    --contacts-shell-width: 100%;
    --contacts-section-x: 14px;
  }

  .contacts-page {
    width: 100%;
  }

  .contacts-page .hero-left {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .contacts-page .blueprint-door {
    height: 220px;
  }

  .contacts-page .form-card {
    position: relative;
    right: auto;
    top: auto;
    width: auto;
    margin: 18px;
    background: #fff;
  }

  .contacts-page .hero-photo {
    min-height: auto;
    background-position: center;
    display: flex;
    align-items: center;
  }

  .contacts-page .hero {
    display: block;
  }

  .contacts-page .contact-cards {
    grid-template-columns: 1fr;
  }

  .contacts-page .info-card {
    min-height: auto;
  }

  .contacts-page .map-panel {
    grid-template-columns: 1fr;
  }

  .contacts-page .map-image {
    min-height: 190px;
  }

  .contacts-page .office-photo {
    min-height: 190px;
  }

  .contacts-page .social {
    height: auto;
    flex-wrap: wrap;
    padding: 18px;
    gap: 14px;
    text-align: center;
  }

  .contacts-page .cta-actions {
    flex-direction: column;
  }

  .contacts-page .cta-actions .consult,
  .contacts-page .cta-actions .call {
    width: 100%;
  }

  .contacts-page .form-grid {
    grid-template-columns: 1fr;
  }

  .contacts-page .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .contacts-page .hero h1 {
    font-size: clamp(36px, 4.5vw, 48px);
  }
}

@media (max-width: 640px) {
  .contacts-page {
    --contacts-shell-radius: 8px;
    width: calc(100% - 16px);
    margin: 8px auto 16px;
  }
}

/* Mobile Hero: notebook stack. Desktop/tablet ≥768 keep the navy split. */
@media (max-width: 767px) {
  .contacts-page .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: #f3f8fe;
    background-image:
      linear-gradient(rgba(18, 60, 134, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(18, 60, 134, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    color: #0e3477;
  }

  .contacts-page .hero::before,
  .contacts-page .hero-photo::before {
    display: none;
  }

  .contacts-page .hero-left {
    display: block;
    order: 1;
    padding: 24px 16px 8px;
    grid-template-columns: minmax(0, 1fr);
  }

  .contacts-page .blueprint-door {
    display: none;
  }

  .contacts-page .hero-copy {
    padding-top: 0;
  }

  .contacts-page .eyebrow {
    color: #49618d;
  }

  .contacts-page .hero h1 {
    color: #0e3477;
    font-size: clamp(36px, 4.5vw, 48px);
    line-height: 1.08;
  }

  .contacts-page .title-line {
    background: #153d7b;
  }

  .contacts-page .hero p {
    color: #49618d;
    max-width: none;
    margin-bottom: 20px;
  }

  .contacts-page .contact-item svg {
    stroke: #0e3477;
  }

  .contacts-page .contact-item b {
    color: #0e3477;
  }

  .contacts-page .contact-item span {
    color: #49618d;
  }

  .contacts-page .hero-photo {
    order: 2;
    min-height: 0;
    margin: 8px 8px 0;
    background: transparent;
  }

  .contacts-page .hero-photo picture,
  .contacts-page .hero-photo__image {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: center top;
  }

  .contacts-page .form-card {
    order: 3;
    position: relative;
    right: auto;
    top: auto;
    width: auto;
    margin: 16px 16px 20px;
    background: #fff;
  }
}

@media (max-width: 390px) {
  .contacts-page .hero h1 {
    font-size: clamp(36px, 4.5vw, 48px);
  }

  .contacts-page .form-card {
    padding: 22px 18px;
    margin: 12px;
  }

  .contacts-page .info-card {
    grid-template-columns: 34px 1fr;
    padding: 18px 14px;
  }

  .contacts-page .middle {
    gap: 16px;
  }

  .contacts-page .office-info {
    padding: 18px;
  }

  .contacts-page .cta {
    padding: 22px 16px;
  }

  .contacts-page .cta h2 {
    font-size: clamp(22px, 3vw, 28px);
  }
}
