/* ============================================
   HERO CAROUSEL — Mobil & Masaüstü ayrı
   ============================================ */

.hero {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: var(--black);
}

/* ---- Ortak görsel katmanı ---- */
.hero-swiper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.hero-swiper,
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.hero-slide {
  overflow: hidden;
  width: 100%;
  min-height: 100%;
}

.hero-slide__media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--black);
}

.hero-slide__media img,
.hero-slide__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ============================================
   MOBİL — Tam ekran carousel (≤767px)
   ============================================ */
@media (max-width: 767px) {
  .hero-swiper {
    height: 100dvh;
    height: 100svh;
    min-height: 100dvh;
    min-height: 100svh;
    max-height: none;
  }

  .hero-slide {
    align-items: flex-end;
  }

  .hero-slide__img {
    object-position: center 32%;
    transform: scale(1);
    filter: brightness(1.03) contrast(1.02);
    transition: transform 8s ease-out;
  }

  .swiper-slide-active .hero-slide__img {
    transform: scale(1.03);
  }

  .hero-slide__overlay {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.5) 28%,
      rgba(0, 0, 0, 0.15) 52%,
      transparent 78%
    ) !important;
  }

  .hero-slide__content {
    padding-bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 5rem));
  }

  .hero-slide__panel {
    max-width: 100%;
    border-radius: var(--radius);
  }

  .hero-stats {
    margin-top: 0 !important;
    padding: 1.75rem 0 2rem;
    background: var(--black);
  }
}

/* Küçük telefon ince ayar */
@media (max-width: 575px) {
  .hero-slide__content h1 {
    font-size: 1.55rem;
  }

  .hero-slide__panel {
    padding: 1rem 1.1rem;
  }
}

/* ============================================
   TABLET (768px — 1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-swiper {
    height: clamp(460px, 62vh, 640px);
    min-height: 460px;
    max-height: 640px;
  }

  .hero-slide {
    align-items: flex-end;
  }

  .hero-slide__img {
    object-position: center center;
    transform: none;
    filter: none;
  }

  .swiper-slide-active .hero-slide__img {
    transform: scale(1.015);
    transition: transform 12s ease-out;
  }

  .hero-slide__overlay {
    background: linear-gradient(
      105deg,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.42) 42%,
      rgba(0, 0, 0, 0.12) 62%,
      transparent 78%
    ) !important;
  }

  .hero-slide__content {
    padding-bottom: clamp(2rem, 5vh, 3rem);
  }

  .hero-slide__panel {
    max-width: min(520px, 55vw);
  }
}

/* ============================================
   MASAÜSTÜ (1025px — 1439px)
   ============================================ */
@media (min-width: 1025px) {
  .hero-swiper {
    height: clamp(520px, 72vh, 760px);
    min-height: 520px;
    max-height: 760px;
  }

  .hero-slide {
    align-items: flex-end;
  }

  .hero-slide__media img,
  .hero-slide__img {
    object-fit: contain;
    top: 15%;
    object-position: center center;
    transform: none;
    filter: none;
    transition: transform 14s ease-out;
  }

  .swiper-slide-active .hero-slide__img {
    transform: scale(1.02);
  }

  /* Sol metin, sağda görsel net */
  .hero-slide__overlay {
    background: linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.55) 32%,
      rgba(0, 0, 0, 0.18) 50%,
      rgba(0, 0, 0, 0.04) 65%,
      transparent 80%
    ) !important;
  }

  .hero-slide__overlay--roof {
    background: linear-gradient(
      100deg,
      rgba(55, 26, 8, 0.85) 0%,
      rgba(0, 0, 0, 0.45) 38%,
      transparent 75%
    ) !important;
  }

  .hero-slide__overlay--repair {
    background: linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.4) 40%,
      transparent 78%
    ) !important;
  }

  .hero-slide__overlay--tile,
  .hero-slide__overlay--garden {
    background: linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.38) 42%,
      transparent 78%
    ) !important;
  }

  .hero-slide__content {
    padding: 0 0 clamp(2.5rem, 5vh, 3.5rem);
  }

  .hero-slide__panel {
    max-width: min(540px, 42vw);
    margin-bottom: 0;
  }

  .hero-slide__content h1 {
    font-size: clamp(1.85rem, 2.8vw, 2.5rem);
  }

  .hero-slide__content p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .hero-prev,
  .hero-next {
    top: 50%;
    margin-top: -24px;
  }
}

/* ============================================
   BÜYÜK EKRAN (1440px — 1919px)
   ============================================ */
@media (min-width: 1440px) {
  .hero-swiper {
    height: clamp(580px, 68vh, 780px);
    max-height: 780px;
  }

  .hero-slide__panel {
    max-width: 560px;
    padding: 1.5rem 1.85rem;
  }

  /* Geniş ekranda görsel aşırı büyümesin — odak merkez */
  .hero-slide__img {
    object-position: center center;
    max-height: 100%;
  }
}

/* ============================================
   ULTRA GENİŞ (≥1920px) — 4K / geniş monitör
   ============================================ */
@media (min-width: 1920px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-swiper {
    width: 100%;
    height: clamp(600px, 65vh, 820px);
    max-height: 820px;
  }

  .hero-slide__media {
    max-width: 1920px;
    margin-inline: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(100%, 1920px);
  }

  .hero-slide__img {
    object-fit: cover;
    object-position: center center;
    transform: none !important;
  }

  .swiper-slide-active .hero-slide__img {
    transform: none !important;
  }

  .hero-slide__content .container {
    max-width: min(var(--container-max), 1320px);
  }

  .hero-slide__panel {
    max-width: 580px;
  }
}

/* Yatay mobil */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-swiper {
    height: 100dvh;
    min-height: 100dvh;
  }

  .hero-stats {
    display: none;
  }

  .hero-slide__panel {
    padding: 0.75rem 1rem;
  }

  .hero-slide__content h1 {
    font-size: 1.3rem;
  }

  .hero-slide__content p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide__img,
  .swiper-slide-active .hero-slide__img {
    transform: none !important;
    transition: none !important;
  }
}
