:root {
  --glc-shell: #ffffff;
  --glc-navy: #0c2f67;
  --glc-green: #147e6f;
  --glc-green-dark: #0e7666;
  --glc-text: #17385a;
  --glc-border: #d8e3ea;
  --glc-shadow: 0 12px 36px rgba(17, 49, 78, 0.08);
}

section#link-contacts.gl-contacts {
  width: 100%;
  padding: 30px 0 28px !important;
  background: transparent;
}
.gl-contacts * { box-sizing: border-box; }
.glc-shell {
  width: min(100%, 1068px);
  margin: 0 auto;
  padding: 26px 18px 18px;
  border: 1px solid #d9e2e8;
  border-radius: 24px;
  background: var(--glc-shell);
  box-shadow: 0 6px 18px rgba(17,49,78,.04);
}
.glc-header { text-align: center; margin-bottom: 16px; }
h2.title.glc-title {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--glc-navy) !important;
  text-align: center;
}
h2.title.glc-title span { color: inherit; }
h2.title.glc-title::after {
  content: '';
  display: block;
  width: 5.2em;
  height: .15em;
  margin: .55em auto .75em;
  background: var(--glc-green);
}
.glc-subtitle {
  margin: 0 auto;
  max-width: 620px;
  color: var(--glc-text);
  font-size: 16px;
  line-height: 1.45;
}

.glc-map-panel,
.glc-offices-panel,
.glc-channels,
.glc-security {
  border: 1px solid var(--glc-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  box-shadow: 0 4px 14px rgba(17,49,78,.045);
}
.glc-map-panel { position: relative; z-index: 0; isolation: isolate; overflow: hidden; }
.glc-map-wrap {
  position: relative;
  overflow: hidden;
  contain: paint;
  isolation: isolate;
  height: 380px;
  border-radius: 18px;
  background: #e7eef3;
  z-index: 0;
}
.glc-map-wrap > .glc-map-canvas { border-radius: inherit; overflow: hidden; }
.glc-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.glc-map-canvas .maplibregl-canvas { outline: none; }
.glc-map-canvas .maplibregl-control-container { position: relative; z-index: 2; }
.glc-map-canvas .maplibregl-ctrl-top-right { top: 14px; right: 12px; }
.glc-map-canvas .maplibregl-ctrl-group {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(16,46,74,.14);
}
.glc-map-canvas .maplibregl-ctrl-group button {
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,.98);
}
.glc-map-canvas .maplibregl-ctrl-attrib {
  font-size: 10px;
}
.glc-map-canvas .maplibregl-ctrl-attrib.maplibregl-compact {
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
}
.glc-marker {
  width: 30px;
  height: 38px;
  background: transparent;
}
.glc-marker svg {
  display: block;
  width: 30px;
  height: 38px;
}
.glc-marker-pin {
  filter: drop-shadow(0 6px 10px rgba(15,110,97,.22));
}

.glc-office-card {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  width: min(382px, calc(100% - 24px));
  padding: 15px 16px 14px;
  border: 1px solid rgba(217,225,231,.98);
  border-radius: 18px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 12px 30px rgba(17,49,78,.14);
  color: var(--glc-text);
  pointer-events: auto;
  transform: translateZ(0);
}
.glc-office-heading-row { display: flex; align-items: center; gap: 10px; }
.glc-office-flag { font-size: 21px; line-height: 1; flex: 0 0 auto; }
.glc-office-name {
  margin: 0;
  color: var(--glc-navy);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
  font-family: inherit;
}
.glc-card-rule {
  height: 1px;
  margin: 13px 0 11px;
  background: #e3e8ec;
}
.glc-office-detail {
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: start;
  gap: 9px;
  margin-top: 9px;
  color: var(--glc-text);
  font-size: 14px;
  line-height: 1.43;
}
.glc-office-detail:first-of-type { margin-top: 0; }
.glc-office-detail a { color: inherit; text-decoration: none; }
.glc-detail-icon { width: 21px; height: 21px; color: var(--glc-green-dark); display: inline-flex; align-items: center; justify-content: center; }
.glc-detail-icon svg { width: 21px; height: 21px; stroke-linecap: round; stroke-linejoin: round; }
.glc-detail-icon .glc-icon-pin { fill: none; stroke: currentColor; stroke-width: 1.8; }
.glc-detail-icon .glc-icon-phone { fill: currentColor; stroke: none; width: 19px; height: 19px; }
.glc-directions {
  margin-top: 14px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 10px 18px;
  border: 1.5px solid var(--glc-green);
  border-radius: 999px;
  background: #fff;
  color: var(--glc-green-dark);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.glc-directions:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(20,126,111,.13); background: rgba(20,126,111,.05); }
.glc-directions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.glc-map-dots { display: none; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding-top: 8px; }
.glc-map-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #cfd8df; cursor: pointer; transition: .2s ease; }
.glc-map-dot.is-active { background: var(--glc-green); transform: scale(1.17); }

.glc-offices-panel { margin-top: 12px; padding: 16px; }
.glc-panel-heading { display: flex; align-items: center; gap: 11px; margin: 0 0 12px 3px; }
.glc-panel-heading h3 { margin: 0; color: var(--glc-navy); font-size: 16px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: .015em; }
.glc-panel-icon { width: 29px; height: 29px; color: var(--glc-navy); display: inline-flex; }
.glc-panel-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

/* 12-column grid lets the last desktop row always fill the full width symmetrically. */
.glc-office-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 10px 12px; }
.glc-office-button { grid-column: span 3; min-width: 0; min-height: 54px; display: grid; grid-template-columns: 34px minmax(0,1fr) 25px; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--glc-border); border-radius: 13px; background: #fff; color: var(--glc-navy); cursor: pointer; text-align: left; box-shadow: 0 2px 8px rgba(18,53,82,.025); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease; }
.glc-office-button:hover,
.glc-office-button.is-active { border-color: rgba(20,126,111,.48); box-shadow: 0 5px 14px rgba(20,126,111,.09); transform: translateY(-1px); }
.glc-office-button.is-active { background: linear-gradient(180deg, rgba(20,126,111,.06), rgba(20,126,111,.03)); }
.glc-office-grid.glc-rem-1 .glc-office-button:last-child { grid-column: 1 / -1; }
.glc-office-grid.glc-rem-2 .glc-office-button:nth-last-child(-n+2) { grid-column: span 6; }
.glc-office-grid.glc-rem-3 .glc-office-button:nth-last-child(-n+3) { grid-column: span 4; }
.glc-button-flag { font-size: 24px; }
.glc-button-name { min-width: 0; font-size: 15px; line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.glc-button-arrow { width: 23px; height: 23px; color: var(--glc-green); }
.glc-button-arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.glc-channels { margin-top: 14px; padding: 20px 25px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.glc-channel { min-width: 0; display: grid; grid-template-columns: 62px minmax(0,1fr) 20px; align-items: center; gap: 15px; padding: 3px 25px; color: var(--glc-navy); text-decoration: none; border-right: 1px solid #d8e1e8; }
.glc-channel:first-child { padding-left: 10px; }
.glc-channel:last-child { border-right: 0; padding-right: 10px; }
.glc-channel-icon { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 58px; }
.glc-channel-icon img { display: block; width: 58px; height: 58px; object-fit: contain; max-width: none; image-rendering: auto; }
.glc-channel-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.glc-channel-copy strong { font-size: 16px; line-height: 1.2; }
.glc-channel-copy span { color: var(--glc-green-dark); font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.glc-channel-arrow { display: none; width: 20px; height: 20px; color: var(--glc-green-dark); }
.glc-channel-arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.glc-security { margin-top: 14px; min-height: 57px; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 10px 20px; background: linear-gradient(90deg, rgba(248,250,251,.65), rgba(244,248,249,.95), rgba(248,250,251,.65)); color: var(--glc-text); font-size: 15px; }
.glc-security-icon { width: 34px; height: 34px; color: var(--glc-green-dark); display: inline-flex; }
.glc-security-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 980px) {
  .glc-office-card { width: min(350px, calc(100% - 24px)); }
  .glc-shell { max-width: 900px; }
  .glc-office-grid .glc-office-button { grid-column: span 6; }
  .glc-office-grid.glc-mobile-odd .glc-office-button:last-child { grid-column: 1 / -1; }
  .glc-map-wrap { height: 430px; }
}

@media (max-width: 700px) {
  section#link-contacts.gl-contacts { padding: 12px 0 18px !important; }
  .glc-shell { width: calc(100% - 20px); padding: 22px 10px 14px; border-radius: 17px; }
  .glc-header { margin-bottom: 13px; padding: 0 10px; }
  h2.title.glc-title::after { width: 4.8em; margin-top: .55em; margin-bottom: .7em; }
  .glc-subtitle { max-width: 380px; margin: 0 auto; font-size: 16px; line-height: 1.45; }

  .glc-map-panel { border: 0; box-shadow: none; background: transparent; }
  .glc-map-wrap { height: 505px; border: 1px solid var(--glc-border); box-shadow: 0 7px 20px rgba(18,53,82,.06); }
  .glc-map-canvas .maplibregl-ctrl-top-right { top: 12px; right: 8px; }
  .glc-map-canvas .maplibregl-ctrl-group button { width: 40px; height: 40px; }
  .glc-office-card { top: auto; bottom: 36px; left: 11px; right: 11px; width: auto; max-width: none; padding: 13px 14px 12px; }
  .glc-office-flag { font-size: 22px; }
  .glc-office-name { font-size: 17px; font-weight: 600; }
  .glc-card-rule { margin: 9px 0 8px; }
  .glc-office-detail { margin-top: 7px; font-size: 13.5px; line-height: 1.36; }
  .glc-directions { margin-top: 10px; min-height: 41px; font-size: 13.5px; }
  .glc-map-dots { display: flex; }

  .glc-offices-panel { margin-top: 8px; padding: 13px 10px 14px; }
  .glc-panel-heading { margin-left: 3px; }
  .glc-office-grid { gap: 8px; }
  .glc-office-grid .glc-office-button { grid-column: span 6; }
  .glc-office-grid.glc-mobile-odd .glc-office-button:last-child { grid-column: 1 / -1; }
  .glc-office-button { min-height: 51px; grid-template-columns: 30px minmax(0,1fr) 22px; padding: 7px 10px; }
  .glc-button-flag { font-size: 21px; }
  .glc-button-name { font-size: 14px; }

  .glc-channels { margin-top: 10px; padding: 0 13px; grid-template-columns: 1fr; }
  .glc-channel { min-height: 82px; grid-template-columns: 56px minmax(0,1fr) 22px; gap: 14px; padding: 11px 4px; border-right: 0; border-bottom: 1px solid #dbe3e9; }
  .glc-channel:first-child, .glc-channel:last-child { padding-left: 4px; padding-right: 4px; }
  .glc-channel:last-child { border-bottom: 0; }
  .glc-channel-icon { width: 54px; height: 54px; flex-basis: 54px; }
  .glc-channel-icon img { width: 54px; height: 54px; }
  .glc-channel-copy strong { font-size: 16px; }
  .glc-channel-copy span { font-size: 15px; }
  .glc-channel-arrow { display: inline-flex; }

  .glc-security { margin-top: 10px; min-height: 55px; padding: 10px 12px; font-size: 14px; text-align: center; }
  .glc-security-icon { width: 31px; height: 31px; flex: 0 0 31px; }
}

@media (max-width: 430px) {
  .glc-map-wrap { height: 495px; }
  .glc-office-card { left: 9px; right: 9px; bottom: 34px; padding: 12px 12px 11px; }
  .glc-office-name { font-size: 16.5px; }
  .glc-office-detail { grid-template-columns: 22px 1fr; gap: 7px; font-size: 13px; }
  .glc-office-button { grid-template-columns: 27px minmax(0,1fr) 19px; gap: 6px; min-height: 49px; padding-left: 8px; padding-right: 8px; }
  .glc-button-name { font-size: 13px; }
}
