/* İçerik alanı tam genişlikte; şeffaf bg'de hafif cam efekti */
.main-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.main-wrap[style*="background-color"] {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Arka plan görseli ayrı katman; filter ve opacity admin'den (inline style) gelir */
.main-wrap__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* Mobilde bg kesilmesin diye tekrarlansın */
@media (max-width: 768px) {
  .main-wrap__bg {
    background-repeat: repeat;
    background-size: auto;
    background-position: 0 0;
  }
}

.main-wrap .main {
  position: relative;
  z-index: 1;
}

body.tek-ekran .main-wrap {
  overflow: hidden;
}

/* Ana sayfa: masaüstünde içerik sığar (scroll yok), sadece mobilde scroll */
body.ana-sayfa .main-wrap {
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

@media (min-width: 769px) {
  body.ana-sayfa {
    height: 100vh;
    overflow: hidden;
  }
  body.ana-sayfa .main-wrap {
    overflow: hidden;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
  }
  body.ana-sayfa .main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    flex: 1 1 0;
  }
  body.ana-sayfa .ana-sayfa__container {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.2vh, 1rem);
  }
  /* Normal laptoptan kısa ekranlarda: hero ve container'da scrollbar çıksın */
  @media (min-width: 769px) and (max-height: 700px) {
    body.ana-sayfa .ana-sayfa__container {
      overflow-y: auto;
      overflow-x: hidden;
    }
    body.ana-sayfa .hero {
      overflow-y: auto;
      overflow-x: hidden;
    }
  }
  body.ana-sayfa .hero {
    flex: 7 0 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.ana-sayfa .blog-kutusu {
    flex: 3 0 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.ana-sayfa .blog-kutusu__baslik {
    flex-shrink: 0;
  }
  body.ana-sayfa .blog-kutusu__track {
    flex: 1 1 0;
  }
  body.ana-sayfa .blog-kutusu__dots {
    flex-shrink: 0;
  }
  body.ana-sayfa .hero--split .hero-split {
    flex: 1 1 0;
    min-height: 0;
  }
  body.ana-sayfa .calisma-slider {
    flex: 1 1 0;
    min-height: 0;
  }
  body.ana-sayfa .calisma-slider__track {
    min-height: 0;
    max-height: none;
  }
  body.ana-sayfa .nasil-calisiyoruz {
    flex: 2 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.ana-sayfa .nasil-calisiyoruz__grid {
    flex: 1 1 0;
    min-height: 0;
    align-content: stretch;
  }
  body.ana-sayfa .nasil-calisiyoruz__kart {
    min-height: 0;
  }
}

/* Yüksekliği dar ekranlar: Blog başlığını gizle, track kartların ezilmesin diye makul kalsın */
@media (max-height: 600px) {
  /* Kısa ekran: blog kutusu biraz daha pay alır, kartlar kutuya sığacak kadar küçülür (altı kesilmez) */
  body.ana-sayfa .blog-kutusu {
    flex: 4 0 0 !important;
  }
  .blog-kutusu__kart {
    min-height: 0 !important;
  }
  .blog-kutusu__baslik {
    display: none !important;
  }
  .blog-kutusu {
    padding: 0.4rem 0.65rem 0.5rem !important;
  }
  .blog-kutusu__track {
    min-height: 0 !important;
    padding: 0 !important;
  }
  .blog-kutusu__slide {
    padding: 0 4px !important;
  }
  .blog-kutusu__kart {
    padding: 0.45rem 0.55rem !important;
    gap: 0.3rem !important;
  }
  .blog-kutusu__kart-baslik {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2 !important;
  }
  .blog-kutusu__kart-ozet {
    font-size: 0.76rem !important;
    -webkit-line-clamp: 2 !important;
    min-height: 2.2em !important;
  }
  .blog-kutusu__kart-tarih {
    font-size: 0.7rem !important;
  }
  .blog-kutusu__dots {
    margin-top: 0.4rem !important;
    gap: 0.35rem !important;
    min-height: 24px !important;
  }
  .blog-kutusu__dot {
    width: 8px !important;
    height: 8px !important;
  }
  .blog-kutusu__dot--active {
    width: 22px !important;
  }
}

/* Çok dar yükseklik: track çok küçülmesin, kartlar bozulmasın */
@media (max-height: 550px) {
  .blog-kutusu {
    padding: 0.3rem 0.5rem 0.4rem !important;
  }
  .blog-kutusu__track {
    min-height: 0 !important;
    padding: 0 !important;
  }
  .blog-kutusu__kart {
    padding: 0.35rem 0.45rem !important;
    gap: 0.25rem !important;
  }
  .blog-kutusu__kart-baslik {
    font-size: 0.78rem !important;
    -webkit-line-clamp: 1 !important;
  }
  .blog-kutusu__kart-ozet {
    font-size: 0.72rem !important;
    -webkit-line-clamp: 1 !important;
    min-height: 1.3em !important;
  }
  .blog-kutusu__kart-tarih {
    font-size: 0.66rem !important;
  }
  .blog-kutusu__dots {
    margin-top: 0.3rem !important;
    min-height: 20px !important;
  }
  .blog-kutusu__dot {
    width: 6px !important;
    height: 6px !important;
  }
  .blog-kutusu__dot--active {
    width: 18px !important;
  }
}

@media (min-width: 769px) and (max-height: 720px) {
  body.ana-sayfa .ana-sayfa__container {
    gap: clamp(0.35rem, 0.9vh, 0.6rem);
  }
}

/* Tablet ve dar laptop (853x1280 Zenbook vb.): hero + blog tek sütun, scroll ile */
@media (max-width: 880px) {
  body.ana-sayfa {
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.ana-sayfa .main-wrap {
    overflow-y: auto;
    display: block !important;
    flex: none !important;
  }
  body.ana-sayfa .main {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    flex: none !important;
  }
  body.ana-sayfa .ana-sayfa__container {
    padding: 1rem;
    gap: 1.5rem;
    display: block !important;
    height: auto !important;
    flex: none !important;
  }
  body.ana-sayfa .hero,
  body.ana-sayfa .blog-kutusu {
    border-radius: 16px;
  }
  body.ana-sayfa .hero {
    padding: 1.5rem 1.25rem !important;
    margin-bottom: 1.5rem;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    display: block !important;
    flex: none !important;
    overflow: visible !important;
  }
  body.ana-sayfa .hero--split .hero-split {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    flex: none !important;
  }
  .hero--split .hero-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    display: block !important;
    height: auto !important;
  }
  .hero-split__sol {
    margin: 0 auto 1.5rem;
    max-width: 300px;
    display: block !important;
  }
  .hero-split__sol .kisi-karti__card--hero {
    text-align: center;
    display: flex !important;
    margin-bottom: 1.5rem;
  }
  .hero-split__sag {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    flex: none !important;
  }
  .hero-split__baslik {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    text-align: center;
    flex-shrink: 1 !important;
  }
  .hero-split__metin {
    font-size: clamp(1rem, 3.8vw, 1.15rem);
    text-align: center;
    margin-bottom: 1.25rem;
    flex-shrink: 1 !important;
  }
  body.ana-sayfa .blog-kutusu {
    height: auto !important;
    min-height: auto !important;
    flex: none !important;
    overflow: visible !important;
  }
  body.ana-sayfa .blog-kutusu__track {
    flex: 1 1 0 !important;   /* yatay satırda kalan genişliği alsın; içerik kadar genişlemesin */
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.ana-sayfa .calisma-slider {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    flex: none !important;
  }
  .calisma-slider__label {
    text-align: center;
    font-size: 1.4rem;
  }
  .calisma-slider__track {
    gap: 0.75rem;
    display: grid !important;
    height: auto !important;
    flex: none !important;
  }
  .calisma-slider__slide {
    padding: 0.85rem 1.25rem !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .calisma-slider__dots {
    display: none !important;
  }
  body.ana-sayfa .nasil-calisiyoruz {
    padding: 1.25rem 1rem !important;
    border-radius: 16px;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    display: block !important;
    flex: none !important;
  }
  .nasil-calisiyoruz__baslik {
    font-size: 1.35rem;
  }
  .nasil-calisiyoruz__grid {
    gap: 1rem;
    display: grid !important;
    height: auto !important;
    flex: none !important;
  }
  .nasil-calisiyoruz__kart {
    padding: 1rem 1.15rem;
  }
}

.main {
  flex: 1 1 0;
  width: 100%;
  max-width: min(1200px, 94vw);
  margin: 0 auto;
  min-width: 0;
  padding: 2rem 1.25rem;
  box-sizing: border-box;
}

/* Tek ekran sayfalar: içerik ekrana sığar */
body.tek-ekran .main {
  min-height: 0;
  padding: clamp(0.75rem, 1.5vh, 1.25rem) clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Ana sayfa: dikey akış, hero üstte icerik altta */
body.ana-sayfa .main {
  padding: 0;
  min-height: 0;
}

/* Ana sayfa: hero + alt bölüm aynı genişlikte */
.ana-sayfa__container {
  width: 100%;
  max-width: min(1200px, 94vw);
  margin: 0 auto;
  padding: clamp(0.5rem, 1.2vh, 0.8rem) clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.2vh, 0.8rem);
  box-sizing: border-box;
}

body.tek-ekran .page-title {
  margin: 0 0 clamp(0.5rem, 1.2vh, 0.9rem);
  font-size: clamp(1.15rem, 2.1vh, 1.4rem);
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  flex-wrap: wrap;
}
.page-title__icon {
  display: inline-flex;
  color: inherit;
  opacity: 0.92;
}
.page-title__icon svg {
  display: block;
}

body.tek-ekran .section {
  padding: clamp(0.75rem, 1.6vh, 1.1rem);
  margin-bottom: clamp(0.55rem, 1.2vh, 0.9rem);
}

body.tek-ekran .section h2 {
  margin: 0 0 clamp(0.35rem, 0.9vh, 0.65rem);
  font-size: clamp(1.05rem, 1.8vh, 1.2rem);
}

body.tek-ekran .section p {
  font-size: clamp(0.9rem, 1.4vh, 0.98rem);
}
