/* ==========================================================================
   TEFAŞ — Bölüme özel stiller
   ========================================================================== */

/* --- Hero --------------------------------------------------------------- */
.tf-hero {
  position: relative;
  background: var(--tf-bg-alt);
}
/* Fotoğraf: sola doğru beyazlaşan pres hattı görseli.
   Sola sabitlenir; ekran daraldıkça SAĞDAN kırpılır, böylece metnin
   üzerindeki beyaz alan her boyutta korunur. */
.tf-hero__bg {
  position: absolute;
  inset: 0;
  background-color: #fff;
  background-image: url('../img/banner.jpg');
  background-image: -webkit-image-set(
    url('../img/banner.webp') type('image/webp'),
    url('../img/banner.jpg') type('image/jpeg'));
  background-image: image-set(
    url('../img/banner.webp') type('image/webp'),
    url('../img/banner.jpg') type('image/jpeg'));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
}

/* Metnin durduğu sol tarafı beyaz tutan koruma katmanı.
   Fotoğrafın kendi beyazlığına ek güvence — okuma zorluğu olmasın. */
.tf-hero__scrim {
  position: absolute;
  inset: 0;
  /* Beyazlık, metin sütununun bittiği yere (~%58) kadar güçlü tutuluyor;
     sonra formun arkasında fotoğrafı açığa çıkaracak şekilde sönüyor. */
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.88) 58%,
    rgba(255, 255, 255, 0.40) 69%,
    rgba(255, 255, 255, 0) 80%);
}

/* Çizgi deseni — fotoğrafın üzerinde ince bir doku olarak durur.
   Maske ile sağdan sola doğru söner: fotoğrafın üstünde belirgin,
   metnin durduğu sol tarafta tamamen kaybolur. */
.tf-hero__pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg,
    rgba(27, 69, 134, 0.11) 0 1px,
    transparent 1px 12px);
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 30%,
    rgba(0, 0, 0, 0.5) 50%,
    #000 72%);
  mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 30%,
    rgba(0, 0, 0, 0.5) 50%,
    #000 72%);
}
.tf-hero__inner {
  position: relative;
  max-width: var(--tf-container);
  margin: 0 auto;
  padding: 72px var(--tf-gutter) 60px;
  /* Solda mesaj, sağda dar teklif formu */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: center;
}
.tf-hero__title { margin: 0; }
.tf-hero__lead  { margin-top: 20px; }

.tf-hero__form { min-width: 0; }

@media (max-width: 1080px) {
  .tf-hero__inner { grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; }
}

/* Dar ekranda form metnin altına iner */
@media (max-width: 900px) {
  .tf-hero__inner {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
  }
  .tf-hero__form { max-width: 460px; }
}

@media (max-width: 720px) {
  .tf-hero__inner { padding: 52px var(--tf-gutter) 44px; }
  .tf-hero__scrim {
    background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.88) 60%,
      rgba(255, 255, 255, 0.72) 100%);
  }
}

/* --- İstatistik bandı (mavi) ------------------------------------------- */
.tf-statband > .tf-container {
  padding-top: 0;
  padding-bottom: 0;
}
@media (max-width: 620px) {
  .tf-stat {
    gap: 10px;
    padding: 24px 16px;
  }
  .tf-stat:first-child { padding-left: 16px; }
  .tf-stat:last-child { padding-right: 16px; }
  .tf-stat__value { font-size: 28px; }
  .tf-stat__icon { width: 34px; height: 34px; }
}

/* --- Elektrifikasyon bölümü -------------------------------------------- */
/* --- Elektrifikasyon: iki sütun aynı yükseklikte biter --------------- */
.tf-ev__text {
  display: flex;
  flex-direction: column;
}
/* Metin ile akordiyon arası en az 32px; artan boşluk akordiyonu dibe iter */
.tf-ev__text .tf-text { margin-bottom: 32px; }
.tf-ev__text .tf-acc { margin-top: auto; }

.tf-ev__visual { display: flex; }

/* height:100% gerilen sütunda oranı geçersiz kılar; sütunlar alt alta
   indiğinde (mobil) yükseklik belirsiz kalır ve 1:1 oranı devreye girer. */
.tf-ev__media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.tf-proof {
  margin-top: 24px;
  background: var(--tf-blue);
  color: #fff;
  padding: 28px;
}

/* Görselin içinde, alta yapışık sürüm */
.tf-proof--overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin-top: 0;
  padding: 22px 24px;
  /* Üst kenarda kısa bir geçiş: render kutuya kesilmiş gibi değil,
     içine girmiş gibi dursun */
  background:
    linear-gradient(180deg, rgba(27, 69, 134, 0) 0, rgba(27, 69, 134, 0.96) 26px),
    rgba(27, 69, 134, 0.96);
  padding-top: 34px;
  /* .tf-media ortalı hizalıyor; kutu metni sola dönmeli */
  text-align: left;
}
/* Üstünde etiket yoksa başlık kutunun kendi boşluğuyla yetinir */
.tf-proof__title:first-child { margin-top: 0; }
.tf-proof__title {
  margin-top: 12px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tf-proof__text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Yetkinlikler başlığı ---------------------------------------------- */
.tf-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}

/* --- Müşteri logo duvarı ------------------------------------------------ */
.tf-customers__intro {
  font-size: 16px;
  font-weight: 600;
  color: var(--tf-muted);
  text-align: center;
}

/* Canlı sitedeki gibi 5'li dizilim (10 logo → 2 tam satır) */
.tf-refs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.tf-ref {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  padding: 22px 24px;
  background: #fff;
  /* Zeminden bir ton koyu çerçeve */
  border: 1px solid var(--tf-line);
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

/* Hover: çerçeve kırmızıya döner (kalınlık 1px kalır, yerleşim oynamaz) */
.tf-ref:hover {
  border-color: var(--tf-red);
  background: var(--tf-bg-soft);
  transform: translateY(-2px);
}

.tf-ref__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--logo-h, 48px);
  object-fit: contain;
}

/* Logo dosyası yoksa marka adı yazıyla düşer */
.tf-ref__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--tf-navy);
  opacity: 0.55;
  text-align: center;
}

.tf-customers__note {
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 1000px) {
  .tf-refs { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .tf-refs {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .tf-ref {
    min-height: 100px;
    padding: 16px 18px;
  }
  .tf-ref__img { max-height: calc(var(--logo-h, 48px) * 0.78); }
}

/* Dokunmatik cihazda hover yok — çerçeve boşuna kırmızıya dönmesin */
@media (hover: none) {
  .tf-ref:hover {
    border-color: var(--tf-line);
    background: #fff;
    transform: none;
  }
}

/* --- 05 Lojistik: nokta harita + sevkiyat listesi ---------------------- */
.tf-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: start;
}

/* Oran SVG penceresiyle birebir aynı olmalı — işaretler yüzdeyle
   konumlandığı için görselin kutuyu tam doldurması şart. */
.tf-map__canvas {
  position: relative;
  aspect-ratio: 819.4 / 366.7;
}
.tf-map__base {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- İşaret noktaları --------------------------------------------------- */
.tf-map__pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tf-map__dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tf-red);
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* Sırası gelen ya da üstüne gelinen nokta büyür, halka atar */
.tf-map__pin.is-active .tf-map__dot {
  transform: scale(1.75);
  box-shadow: 0 0 0 6px rgba(216, 32, 58, 0.16);
}

.tf-map__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translate(-50%, 4px);
  padding: 4px 9px;
  background: var(--tf-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.tf-map__pin.is-active .tf-map__label {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Kenardaki işaretlerde etiket çerçeve içinde kalsın */
.tf-map__pin--start .tf-map__label { transform: translate(-14px, 4px); }
.tf-map__pin--start.is-active .tf-map__label { transform: translate(-14px, 0); }
.tf-map__pin--end .tf-map__label { transform: translate(calc(-100% + 14px), 4px); }
.tf-map__pin--end.is-active .tf-map__label { transform: translate(calc(-100% + 14px), 0); }

/* Üst banttaki işaretlerde etiket aşağı açılır — yukarıda yer yok */
.tf-map__pin--below .tf-map__label {
  bottom: auto;
  top: calc(100% + 9px);
}

/* --- Sağdaki liste ------------------------------------------------------ */
/* 17 ülke tek sütunda haritadan çok daha uzun kalıyordu — ikiye bölündü */
.tf-map__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 22px;
  border-top: 1px solid var(--tf-line);
}

.tf-map__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 2px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--tf-line);
  text-align: left;
  cursor: pointer;
}
.tf-map__name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--tf-red);
  transition: color 0.18s ease, transform 0.18s ease;
}
.tf-map__item.is-active .tf-map__name {
  color: var(--tf-navy);
  transform: translateX(4px);
}

.tf-map__badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  /* Bölüm zemini gri olduğu için rozet beyaz kalıyor */
  background: #fff;
  border: 1px solid var(--tf-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tf-muted);
}

@media (max-width: 900px) {
  .tf-map {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .tf-map__list { column-gap: 20px; }
}

@media (max-width: 560px) {
  .tf-map__list { grid-template-columns: 1fr; }
  .tf-map__label { font-size: 11px; padding: 3px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .tf-map__dot,
  .tf-map__label,
  .tf-map__name { transition: none; }
}

/* --- Teklif bölümü ------------------------------------------------------ */
.tf-rfq > .tf-container { padding-bottom: 104px; }

@media (max-width: 720px) {
  .tf-rfq > .tf-container { padding-bottom: 72px; }
}

/* --- Mühendislik: solda bento, sağda görsel; ikisi aynı yükseklikte ----- */
.tf-eng__tests {
  display: flex;
  flex-direction: column;
}
.tf-eng__tests .tf-bento { flex: 1; }

.tf-eng__visual { display: flex; }

/* Görsel kutunun yüksekliği SOL sütundan gelir. Görselin kendisi mutlak
   konumlandırıldığı için kendi (kare) oranını sütuna dayatmıyor. */
.tf-eng__media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
}
.tf-eng__media img {
  position: absolute;
  inset: 0;
}
