/* İletişim hero: a bird's-eye Bursa map (OpenStreetMap roads) with the three branches.
   Labels are HTML at fixed pixel sizes so they stay legible however small the map gets;
   their positions below are generated from the map projection. */

.contact-map {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #eef0f3;
  isolation: isolate;
  container-type: inline-size;
}

.contact-map-base {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* labels */
.cm-district,
.cm-road,
.cm-pin {
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
}

.cm-district {
  transform: translate(-50%, -50%);
  color: #9aa1ab;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.cm-road {
  color: #858c96;
  font-size: 10.5px;
  font-weight: 500;
  text-shadow: 0 0 3px #eef0f3, 0 0 3px #eef0f3, 0 0 2px #eef0f3;
}

/* branch marker: a map pin whose tip sits on the address, with a photo card of the branch */
.cm-pin {
  z-index: 2;
  width: 0;
  height: 0;
  color: #111316;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

.cm-pin-mark {
  position: absolute;
  left: -12px;
  bottom: 0;
  display: block;
  width: 24px;
  height: 32px;
  filter: drop-shadow(0 1px 1px rgba(17, 19, 22, 0.18));
}

.cm-pin-card {
  position: absolute;
  left: 18px;
  top: -17px;
  display: grid;
  grid-template-columns: 96px auto;
  align-items: center;
  gap: 14px;
  padding: 8px 18px 8px 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(17, 19, 22, 0.14), 0 1px 2px rgba(17, 19, 22, 0.1);
  transform: translateY(-50%);
  transition: box-shadow 0.2s ease;
}

.cm-pin-card picture {
  display: block;
  width: 96px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: #e4e7eb;
}

.cm-pin-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-pin-text {
  display: grid;
  gap: 4px;
}

.cm-pin-card strong {
  color: #111316;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.cm-pin-sub {
  color: #5f6368;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
}

.cm-pin:hover .cm-pin-card,
.cm-pin:focus-visible .cm-pin-card {
  box-shadow: 0 10px 26px rgba(17, 19, 22, 0.2), 0 1px 2px rgba(17, 19, 22, 0.1);
}

.cm-pin:hover .cm-pin-card strong,
.cm-pin:focus-visible .cm-pin-card strong {
  color: #c2410c;
}

.cm-pin:focus-visible {
  outline: none;
}

.cm-pin:focus-visible .cm-pin-card {
  outline: 3px solid #0b1f3a;
  outline-offset: 3px;
}

/* Küçük Sanayi and FSM sit close together: the western card goes above its pin */
.cm-pin--ks .cm-pin-card {
  left: 0;
  top: -40px;
  transform: translate(-50%, -100%);
}

/* the eastern branch sits near the right edge: its card goes to the left */
.cm-pin--yyy .cm-pin-card {
  right: 18px;
  left: auto;
}

.cm-attr {
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: #8a919b;
  font-size: 10px;
  text-shadow: 0 0 3px #eef0f3, 0 0 3px #eef0f3;
}

/* mid-sized map: the same card, one step smaller, so neighbouring cards keep clear of each other */
@container (max-width: 760px) {
  .cm-pin-card {
    grid-template-columns: 72px auto;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 10px;
  }

  .cm-pin-card picture {
    width: 72px;
    height: 54px;
    border-radius: 6px;
  }

  .cm-pin-card strong {
    font-size: 13.5px;
  }

  .cm-pin-sub {
    font-size: 11.5px;
  }
}

/* phone-sized map: a smaller square photo and the name only */
@container (max-width: 520px) {
  .cm-road {
    display: none;
  }

  .cm-district {
    font-size: 9.5px;
  }

  .cm-pin-card {
    grid-template-columns: 42px auto;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    border-radius: 9px;
  }

  .cm-pin-card picture {
    width: 42px;
    height: 42px;
    border-radius: 6px;
  }

  .cm-pin-card strong {
    font-size: 12.5px;
  }

  .cm-pin-sub {
    display: none;
  }

  /* centred on its pin the western card would run off the map's left edge */
  .cm-pin--ks .cm-pin-card {
    left: -22px;
    top: -36px;
    transform: translateY(-100%);
  }

  .cm-pin--yyy .cm-pin-card {
    top: -36px;
    transform: translateY(-100%);
  }
}

/* the narrowest phones: the cards step down once more so the two Nilüfer cards stay apart */
@container (max-width: 320px) {
  .cm-pin-card {
    grid-template-columns: 34px auto;
    gap: 8px;
    padding: 4px 10px 4px 4px;
  }

  .cm-pin-card picture {
    width: 34px;
    height: 34px;
  }

  .cm-pin-card strong {
    font-size: 11.5px;
  }
}

/* ---- generated positions (map units → percent) ---- */

.cm-district--nilufer {
  left: 20.87%;
  top: 54.94%;
}

.cm-district--osmangazi {
  left: 68.70%;
  top: 55.32%;
}

.cm-district--yildirim {
  left: 90.43%;
  top: 93.27%;
}

.cm-road--0 {
  left: 74.68%;
  top: 26.78%;
  transform: translate(-50%, -50%) rotate(68.9deg);
}

.cm-road--1 {
  left: 62.68%;
  top: 73.63%;
  transform: translate(-50%, -50%) rotate(47.4deg);
}

.cm-road--2 {
  left: 89.54%;
  top: 84.53%;
  transform: translate(-50%, -50%) rotate(-0.0deg);
}

.cm-road--3 {
  left: 83.97%;
  top: 13.55%;
  transform: translate(-50%, -50%) rotate(24.8deg);
}

.cm-road--4 {
  left: 90.89%;
  top: 36.40%;
  transform: translate(-50%, -50%) rotate(-53.3deg);
}

.cm-pin--ks {
  left: 23.02%;
  top: 70.54%;
}

.cm-pin--fsm {
  left: 46.29%;
  top: 72.58%;
}

.cm-pin--yyy {
  left: 77.74%;
  top: 40.33%;
}
