/* İletişim bölümü: konum kartı + harita */
.location {
  display: grid;
  grid-template-columns: clamp(260px, 30%, 380px) 1fr;
  width: 100%;
  min-height: 460px;
  margin-top: 30px;
  border-radius: 24px;
  overflow: hidden;
  background: #0e2c3b;
  box-shadow: 0 30px 60px -20px rgba(14, 44, 59, 0.45), 0 0 0 1px rgba(74, 138, 169, 0.15);
}

/* Kart */
.location__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 36px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(191, 227, 242, 0.28), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(145deg, #0e2c3b 0%, #1c5169 60%, #4a8aa9 100%);
  overflow: hidden;
  isolation: isolate;
}

/* Arka plandaki büyük pin silüeti */
.location__card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -30px;
  z-index: -1;
  width: 200px;
  height: 260px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-24 -70 48 70'%3E%3Cpath d='M0 0C-6-14-24-26-24-44A24 24 0 1 1 24-44C24-26 6-14 0 0Zm0-35a9 9 0 1 0 0-18a9 9 0 1 0 0 18Z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-24 -70 48 70'%3E%3Cpath d='M0 0C-6-14-24-26-24-44A24 24 0 1 1 24-44C24-26 6-14 0 0Zm0-35a9 9 0 1 0 0-18a9 9 0 1 0 0 18Z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
}

.location__title {
  margin: 0 0 14px;
  font-family: 'FuturaPT-Book', sans-serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
}

.location__address {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.location__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.location__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 140px;
  padding: 12px 18px;
  /* İki buton da normalde çerçeveli (şeffaf); üzerine gelince / dokununca beyaz dolar */
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.location__btn:hover,
.location__btn:focus-visible,
.location__btn:active {
  transform: translateY(-2px);
  background: #fff;
  border-color: #fff;
  color: #1c5169;
  outline: none;
}

/* Dokunmatik ekranlarda "hover" dokunduktan sonra takılı kalmasın; yalnızca basılıyken dolsun */
@media (hover: none) {
  .location__btn:hover {
    transform: none;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
  }

  .location__btn:active {
    transform: scale(0.97);
    background: #fff;
    border-color: #fff;
    color: #1c5169;
  }
}

/* Harita */
.location__map {
  position: relative;
  z-index: 0;
  isolation: isolate; /* Leaflet katmanlarının (z-index 400-1000) menünün üstüne çıkmasını engeller */
  min-height: 460px;
  background: #e8e8e8;
}

.location__map iframe,
.location__leaflet {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.location__leaflet iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Harita altlığını Mare mavisine yaklaştır */
.location__leaflet.leaflet-container {
  background: #dfe9ee;
  font: inherit;
}

.location__leaflet .leaflet-tile-pane {
  filter: grayscale(1) sepia(0.3) hue-rotate(160deg) saturate(1.2) brightness(1.06) contrast(0.88);
}

/* Kartın haritaya geçtiği kenarda yumuşak gölge */
.location__map::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 500;
  width: 40px;
  background: linear-gradient(90deg, rgba(14, 44, 59, 0.25), transparent);
  pointer-events: none;
}

/* Pin */
.mare-pin {
  background: none;
  border: 0;
}

.mare-pin__body {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 80px;
  overflow: visible;
  filter: drop-shadow(0 10px 12px rgba(6, 32, 44, 0.45));
  animation: marePinFloat 2.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.mare-pin__shadow {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 26px;
  height: 9px;
  margin-left: -13px;
  border-radius: 50%;
  background: rgba(6, 32, 44, 0.35);
  animation: marePinShadow 2.4s ease-in-out infinite;
}

.mare-pin__pulse {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 120px;
  height: 36px;
  margin-left: -60px;
  border: 3px solid rgb(74, 138, 169);
  border-radius: 50%;
  opacity: 0;
  animation: marePinPulse 2.4s ease-out infinite;
}

.mare-pin__pulse--late {
  animation-delay: 1.2s;
}

@keyframes marePinFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes marePinShadow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.6; }
}

@keyframes marePinPulse {
  0% { transform: scale(0.2); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}

/* Pin etiketi */
.leaflet-tooltip.mare-pin-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #333;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 12px 30px -8px rgba(14, 44, 59, 0.45);
}

.leaflet-tooltip.mare-pin-label strong {
  color: #1c5169;
  font-size: 15px;
  font-weight: 600;
}

.leaflet-tooltip.mare-pin-label::before {
  border-right-color: #fff;
}

/* Kontroller */
.location__leaflet .leaflet-bar {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px -6px rgba(14, 44, 59, 0.4);
}

.location__leaflet .leaflet-bar a {
  width: 38px;
  height: 38px;
  line-height: 38px;
  border-bottom-color: #e8e8e8;
  color: #1c5169;
  font-size: 20px;
}

.location__leaflet .leaflet-bar a:hover {
  background: #eef5f8;
  color: #0e2c3b;
}

.mare-map-recenter {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: rgb(74, 138, 169);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(14, 44, 59, 0.4);
  transition: background 0.2s, color 0.2s;
}

.mare-map-recenter:hover {
  background: rgb(74, 138, 169);
  color: #fff;
}

.location__leaflet .leaflet-control-attribution {
  border-top-left-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .mare-pin__body,
  .mare-pin__shadow,
  .mare-pin__pulse { animation: none; }
}

/* Tablet ve telefon: kart üstte, harita altta */
@media (max-width: 860px) {
  .location {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .location__card {
    padding: 22px 20px;
  }

  .location__card::after {
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 130px;
  }

  .location__title {
    margin-bottom: 8px;
    font-size: 22px;
  }

  .location__address {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
  }

  .location__actions {
    gap: 8px;
  }

  .location__btn {
    flex: 1 1 120px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .location__map {
    min-height: 340px;
  }

  /* Dar ekranda harita üstte, adres + yol tarifi kartı altta */
  .location__map {
    order: 1;
  }

  .location__card {
    order: 2;
  }

  /* Kartın haritaya birleştiği alt kenarda gölge */
  .location__map::before {
    top: auto;
    right: 0;
    bottom: 0;
    width: auto;
    height: 30px;
    background: linear-gradient(0deg, rgba(14, 44, 59, 0.25), transparent);
  }
}

/* "Teklif Alın" bağlantıları (#form): form sabit menünün altında kalmasın, yumuşak kaydırılsın */
html {
  scroll-behavior: smooth;
}

#form {
  scroll-margin-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Çok geniş ekran / tarayıcıda uzaklaştırma: iletişim bölümünü sınırla */
.contact {
  max-width: 1600px;
}

/* İletişim bölümünün telefonlardaki dar kenar boşluklarını düzelt (Contant.css'teki 50px'i ezer) */
@media (max-width: 991px) {
  .contactcontainer .contactinfo {
    margin: 40px 0;
  }
}

@media (max-width: 600px) {
  .contact {
    width: 100%;
    padding: 40px 16px;
  }
}

/* Telefon: kartın üst kısmı kompakt, harita daha baskın */
@media (max-width: 560px) {
  .location__card {
    padding: 13px 16px 12px;
  }

  .location__card::after {
    display: none;
  }

  .location__title {
    margin-bottom: 3px;
    font-size: 17px;
  }

  .location__address {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
  }

  /* "Ümraniye / İstanbul" Daire:2'nin yanında devam etsin (2 satır) */
  .location__br {
    display: none;
  }

  .location__actions {
    gap: 8px;
  }

  .location__btn {
    flex: 1 1 0;
    gap: 6px;
    padding: 7px 10px;
    border-width: 1.5px;
    font-size: 13px;
  }

  .location__map {
    min-height: 320px;
  }
}

@media (max-width: 420px) {
  .location__card {
    padding: 13px 14px 12px;
  }

  .location__map {
    min-height: 300px;
  }
}
