/* ============================================
   RESPONSIVE GÖRSELLER + TAŞMA KONTROLÜ
   ============================================ */

*,
*::before,
*::after {
  min-width: 0;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Ortak çerçeve */
.media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--gray-100, #f0f0f0);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
}

.media-frame > picture {
  display: block;
  height: 100%;
}

/* Hero carousel → css/hero.css */

/* ============================================
   HİZMET KARTLARI
   ============================================ */
.media-frame--card {
  aspect-ratio: 10 / 7;
  width: 100%;
  flex-shrink: 0;
}

.service-card__visual.media-frame {
  height: auto;
  min-height: 0;
}

.service-card:hover .service-card__visual.media-frame > img {
  transform: scale(1.05);
  transition: transform 0.6s ease;
}

.services-track-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.services-track {
  max-width: none;
}

/* ============================================
   HAKKIMIZDA
   ============================================ */
.media-frame--about {
  aspect-ratio: 6 / 7;
  width: 100%;
  max-width: 100%;
}

.about__img-wrap.media-frame {
  display: block;
}

.about__media {
  width: 100%;
  min-width: 0;
}

/* ============================================
   GALERİ
   ============================================ */
.gallery {
  overflow: hidden;
  width: 100%;
}

.gallery__outer {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0 var(--gutter);
  box-sizing: border-box;
}

.gallery-swiper {
  width: 100%;
  max-width: 100%;
  overflow: hidden !important;
  padding: 0.5rem 0 3.25rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.gallery-swiper .swiper-wrapper {
  align-items: stretch;
  box-sizing: border-box;
}

.gallery-slide {
  height: auto;
  display: flex;
  box-sizing: border-box;
  max-width: 100%;
}

.gallery-slide__figure {
  width: 100%;
  margin: 0;
  border-radius: var(--radius-lg);
  display: block;
}

.media-frame--gallery {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--radius-lg);
}

.gallery-slide__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  line-height: 1.3;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  color: var(--white);
}

.gallery-slide__caption--roof {
  background: linear-gradient(transparent, rgba(107, 52, 16, 0.92));
}

.gallery-slide__caption--tile {
  background: linear-gradient(transparent, rgba(80, 80, 75, 0.92));
  color: var(--tile-white, #f8f8f5);
}

.gallery-slide__caption--parke {
  background: linear-gradient(transparent, rgba(74, 74, 74, 0.95));
}

.gallery-slide__caption--garden {
  background: linear-gradient(transparent, rgba(25, 70, 35, 0.92));
}

/* ============================================
   LOGO
   ============================================ */
.logo__placeholder {
  aspect-ratio: 1;
  width: clamp(38px, 10vw, 42px);
  height: auto;
}

.logo__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================
   GLOBAL — Yatay kaydırma engeli
   ============================================ */
main,
.hero,
.services,
.gallery,
.about,
.contact,
.regions,
.footer,
.header,
.wave-divider {
  max-width: 100%;
  box-sizing: border-box;
}

.swiper {
  max-width: 100%;
}

/* ---- Telefon (≤575px) ---- */
@media (max-width: 575px) {
  .hero-pagination-slot {
    margin-bottom: 0.7rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .media-frame--card {
    aspect-ratio: 4 / 3;
  }

  .service-card {
    flex: 0 0 min(85vw, 290px);
    max-width: 85vw;
  }

  .media-frame--about {
    aspect-ratio: 4 / 5;
    max-height: min(65vh, 460px);
  }

  .about__media {
    width: 100%;
    max-width: 100%;
  }

  .gallery__outer {
    padding: 0 var(--gutter);
  }

  .media-frame--gallery {
    aspect-ratio: 3 / 2;
  }

  .gallery-swiper .swiper-slide {
    max-width: 100%;
  }
}

/* ---- Büyük telefon / küçük tablet ---- */
@media (min-width: 576px) and (max-width: 767px) {
  .service-card {
    flex: 0 0 min(68vw, 300px);
  }

  .media-frame--gallery {
    aspect-ratio: 16 / 11;
  }
}

/* ---- Tablet ---- */
@media (min-width: 768px) and (max-width: 1024px) {
  .gallery__outer {
    max-width: 920px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-track {
    animation: none;
  }
}
