/* ==================================================================
   KüPuzzle — Ana sayfa "Küp Seçenekleri" kartları
   Büyük görsel alanlı ızgara: kullanıcı ne tasarlayacağını görsün diye
   fotoğraf alanı kare ve geniş tutulur. Kart tıklanınca doğrudan
   tasarım sayfasına gider (ozellistir.html?template=<id>).
   Kart üretimi: assets/js/home-templates.js
   ================================================================== */

.home-tpl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  /* Kartlar IntersectionObserver ile tembel basılıyor. Izgara boşken
     yüksekliği 0 olursa gözlemci (threshold 0.1) hiç tetiklenmez ve
     kartlar yüklenmez — bu yüzden taban yükseklik şart. */
  min-height: 280px;
}

@media (min-width: 640px) {
  .home-tpl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .home-tpl-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

/* Büyük kare görsel alanı — kartın ağırlık merkezi burası */
.home-tpl-media {
  aspect-ratio: 1 / 1;
}

/* aspect-ratio desteklemeyen eski tarayıcılar için emniyet */
@supports not (aspect-ratio: 1 / 1) {
  .home-tpl-media {
    height: 340px;
  }
}

.home-tpl-img {
  transition: transform 0.5s ease;
}

.home-tpl-card:hover .home-tpl-img {
  transform: scale(1.05);
}

.home-tpl-cta {
  display: inline-block;
  transition: transform 0.2s ease;
}

.home-tpl-card:hover .home-tpl-cta {
  transform: translateX(4px);
}

/* ==================================================================
   Ana sayfa — Neden KüPuzzle + güven şeritleri
   Kartlar masaüstünde 4, tablette ve mobilde 2×2.
   Görseller native loading="lazy" + 3:2 alan baştan ayrılır (CLS yok).
   ================================================================== */
.why-section {
  padding: 72px 20px 80px;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 74, 198, 0.07), transparent 34%),
    #f7f9fc;
}

.why-section__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.why-trust-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 18px 12px;
  list-style: none;
  border: 1px solid #e1e7f0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.why-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 18px;
  color: #0b1c30;
}

.why-trust-item + .why-trust-item {
  border-left: 1px solid #e5eaf2;
}

.why-trust-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f0ff;
  color: #004ac6;
  font-size: 22px;
  font-variation-settings: 'FILL' 1;
}

.why-trust-item > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.why-trust-item strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.why-trust-item small {
  margin-top: 3px;
  color: #68748a;
  font-size: 11px;
  line-height: 1.3;
}

.why-heading {
  max-width: 760px;
  margin: 72px auto 42px;
  text-align: center;
}

.why-heading h2 {
  margin: 0 0 14px;
  color: #0b1c30;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.why-heading p {
  margin: 0;
  color: #56617a;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
}

.why-heading strong {
  color: #004ac6;
  font-weight: 700;
}

.why-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.why-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e1e7f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.why-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: linear-gradient(145deg, #e9eef6, #f7f9fc);
}

.why-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.why-card:hover .why-card__image {
  transform: scale(1.035);
}

.why-card__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: -29px auto 0;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #004ac6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 74, 198, 0.25);
  z-index: 1;
}

.why-card__icon .material-symbols-outlined {
  font-size: 25px;
  font-variation-settings: 'FILL' 1;
}

.why-card__body {
  padding: 14px 20px 24px;
  text-align: center;
}

.why-card__body h3 {
  margin: 0 0 9px;
  color: #0b1c30;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.why-card__body p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.why-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.why-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 34px;
  border-radius: 14px;
  background: #004ac6;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 74, 198, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.why-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 74, 198, 0.32);
}

.why-cta span {
  font-size: 20px;
  line-height: 1;
}

.why-trust-list--bottom {
  margin-top: 46px;
}

@media (max-width: 900px) {
  .why-trust-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 0;
  }
  .why-trust-item:nth-child(odd) {
    border-left: 0;
  }
  .why-trust-item:nth-child(n + 3) {
    border-top: 1px solid #e5eaf2;
    padding-top: 16px;
  }
  .why-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .why-section {
    padding: 44px 12px 54px;
  }
  .why-trust-list {
    padding: 14px 6px;
    border-radius: 16px;
  }
  .why-trust-item {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 2px 8px;
  }
  .why-trust-item__icon {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
    font-size: 18px;
  }
  .why-trust-item strong {
    font-size: 11px;
  }
  .why-trust-item small {
    font-size: 9.5px;
  }
  .why-heading {
    margin: 48px auto 28px;
  }
  .why-heading h2 {
    font-size: 28px;
  }
  .why-heading p {
    font-size: 14px;
  }
  .why-card-grid {
    gap: 10px;
  }
  .why-card {
    border-radius: 15px;
  }
  .why-card__icon {
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-width: 4px;
  }
  .why-card__icon .material-symbols-outlined {
    font-size: 20px;
  }
  .why-card__body {
    padding: 10px 9px 16px;
  }
  .why-card__body h3 {
    min-height: 34px;
    margin-bottom: 6px;
    font-size: 13px;
  }
  .why-card__body p {
    font-size: 10.5px;
    line-height: 1.45;
  }
  .why-cta-wrap {
    margin-top: 28px;
  }
  .why-cta {
    min-height: 48px;
    padding: 12px 28px;
    font-size: 14px;
  }
  .why-trust-list--bottom {
    margin-top: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .why-card,
  .why-card__image,
  .why-cta {
    transition: none;
  }
}
