/* =========================================================
   Контакты — page styles
   Built on the shared design tokens (colors_and_type.css)
   ========================================================= */

/* ---------- Breadcrumbs + Title (shared with priem / vakansii) ---------- */
.page-head {
  padding: 14px 0 10px;
  text-align: center;
}
/* .breadcrumbs — канон в styles.css (не дублировать) */
.page-title {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

/* =========================================================
   1 · MAP  (replaces the wide banner)
   ========================================================= */
.kontakty-map {
  padding-top: 20px;
}
.kmap {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--bg-soft);
  min-height: 560px;
}
.kmap iframe {
  display: block;
  width: 100%;
  height: 560px;
  border: 0;
  filter: saturate(1.02);
}
.kmap-canvas { position: relative; }
/* Floating address card over the map */
.kmap-card {
  position: absolute;
  top: 28px;
  left: 28px;
  width: min(360px, calc(100% - 56px));
  background: #fff;
  border-radius: var(--r-xl);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-lift);
  z-index: 2;
}
.kmap-card .kmap-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 12px;
}
.kmap-card .kmap-eyebrow svg { color: var(--coral); }
.kmap-card h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 10px;
}
.kmap-card .kmap-addr {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.kmap-card .kmap-addr b { color: var(--text); font-weight: 600; }
.kmap-card .kmap-region {
  font-size: 14px;
  color: var(--text-light);
  margin: 0 0 20px;
}
.kmap-card .btn { width: 100%; height: 50px; }
.kmap-card .kmap-route-ico { margin-left: 2px; }

/* =========================================================
   2 · INFO CARDS
   ========================================================= */
.kontakty-info .section-title { text-align: center; }
.kontakty-lead {
  text-align: center;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}
.kinfo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: var(--title-gap);
}
.kinfo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 30px;
  box-shadow: var(--shadow-card);
}
.kinfo-ico {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet);
  margin-bottom: 20px;
}
.kinfo-card:nth-child(3) .kinfo-ico {
  background: var(--coral-soft);
  color: var(--coral);
}
.kinfo-card h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 14px;
}
.kinfo-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.kinfo-card p:last-child { margin-bottom: 0; }
.kinfo-card p b { color: var(--text); font-weight: 600; }

/* contact lines */
.kinfo-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}
.kinfo-line:last-child { margin-bottom: 0; }
.kinfo-line .kinfo-key {
  font-size: 13px;
  color: var(--text-light);
}
.kinfo-line a {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s ease;
  width: max-content;
}
.kinfo-line a:hover { color: var(--violet); }

/* transport pills */
.kinfo-metro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}
.metro-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 7px 14px 7px 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.metro-pill .metro-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--violet);
  flex: none;
}
.metro-pill:nth-child(2) .metro-dot { background: var(--coral); }
.kinfo-buses {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.kinfo-buses b { color: var(--text); font-weight: 600; }

/* =========================================================
   3 · PROMISE BAND (Ориентир на долгосрочный результат)
   ========================================================= */
.kontakty-promise {
  padding-bottom: 100px;
}
.kpromise {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, #F4EFFB 0%, #FCE7E1 100%);
  padding: 64px clamp(28px, 5vw, 72px);
  text-align: center;
}
.kpromise::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -140px;
  top: -180px;
  background: radial-gradient(circle, rgba(236,95,74,0.16) 0%, rgba(236,95,74,0) 70%);
  pointer-events: none;
}
.kpromise-ico {
  display: none;
}
.kpromise h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
  margin: 0 auto 16px;
  max-width: 640px;
  text-wrap: balance;
  position: relative;
}
.kpromise p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 auto 30px;
  max-width: 560px;
  text-wrap: pretty;
  position: relative;
}
.kpromise-cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  position: relative;
}
.kpromise-cta .btn-primary {
  height: 50px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
}
.kpromise-cta .kpromise-max {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(140deg, #2563EB 0%, #7C3AED 50%, #9333EA 100%);
  color: #fff;
  padding: 14px 22px;
  height: 50px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpromise-cta .kpromise-max:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.18); }
.kpromise-cta .kpromise-max .max-icon {
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  display: grid; place-items: center;
  color: #fff;
  flex: none;
}
.kpromise-cta .kpromise-max .max-icon img { width: 26px !important; height: 26px !important; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .kinfo-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 720px) {
  .kmap {
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    min-height: 0;
  }
  .kmap iframe {
    border-radius: var(--r-xl);
    height: clamp(340px, 70vw, 440px);
    order: -1;
  }
  .kmap-card {
    position: static;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 4px 0;
  }
  .kpromise { padding: 48px 24px; }
}

/* =========================================================
   ГАЛЕРЕЯ (3-up carousel) — под картой
   ========================================================= */
.kgal {
  padding-top: 28px;
}
.kgal-stage {
  position: relative;
  display: flex;
  align-items: center;
}
.kgal-viewport {
  overflow: hidden;
  border-radius: var(--r-2xl);
  width: 100%;
}
.kgal-track {
  display: flex;
  gap: 20px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.kgal-track image-slot {
  flex: 0 0 calc((100% - 40px) / 3);
  height: clamp(260px, 21vw, 360px);
  border-radius: var(--r-2xl);
  background: var(--bg-gray-card);
}
.kgal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 4;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.2s ease;
}
.kgal-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.07); }
.kgal-arrow:disabled { opacity: 0.35; cursor: default; }
.kgal-arrow:disabled:hover { transform: translateY(-50%) scale(1); background: rgba(255,255,255,0.94); }
.kgal-arrow.prev { left: -10px; }
.kgal-arrow.next { right: -10px; }

@media (max-width: 1180px) {
  .kgal-track image-slot { flex-basis: calc((100% - 20px) / 2); }
  .kgal-arrow.prev { left: 6px; }
  .kgal-arrow.next { right: 6px; }
}
@media (max-width: 720px) {
  .kgal-track image-slot { flex-basis: 100%; height: 260px; }
  .kgal-arrow { width: 44px; height: 44px; }
}

/* filled slots are clickable → open viewer */
.kgal-track image-slot[data-filled] { cursor: zoom-in; }

/* =========================================================
   ГАЛЕРЕЯ — просмотр фото (lightbox)
   ========================================================= */
.kgal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(16, 18, 30, 0.92);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.kgal-lightbox.is-open { opacity: 1; }
.kgal-lightbox[hidden] { display: none; }

.kgal-lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  max-height: 100%;
}
.kgal-lb-stage img {
  max-width: min(960px, 100%);
  max-height: calc(100vh - 140px);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.kgal-lb-stage figcaption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  text-align: center;
}

.kgal-lb-close,
.kgal-lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
  padding: 0;
}
.kgal-lb-close:hover,
.kgal-lb-nav:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.06); }
.kgal-lb-close { top: 20px; right: 20px; }
.kgal-lb-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.kgal-lb-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.kgal-lb-prev:hover,
.kgal-lb-next:hover { transform: translateY(-50%) scale(1.06); }

.kgal-lb-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .kgal-lightbox { padding: 24px 12px; }
  .kgal-lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .kgal-lb-prev  { left: 8px; width: 40px; height: 40px; }
  .kgal-lb-next  { right: 8px; width: 40px; height: 40px; }
  .kgal-lb-stage img { max-height: calc(100vh - 120px); }
}
