/* han.tayf.io — responsive override katmanı.
   Sayfalar 1440px sabit tuval + inline stil olarak üretildi; bu dosya
   tuvali akışkanlaştırır, dar ekranlarda grid'leri tek kolona indirir.
   Inline stiller [style*="…"] öznitelik seçicileriyle hedeflenir. */

div[style*="width:1440px"] { width: 100% !important; max-width: 1440px; }

img, svg { max-width: 100%; height: auto; }
[style*="display:grid"] > * { min-width: 0; }

/* ≤1100px — yan boşluklar daralır */
@media (max-width: 1100px) {
  [style*="padding:0 120px"], [style*="padding:96px 120px"],
  [style*="padding:110px 120px"], [style*="padding:100px 120px"],
  [style*="padding:90px 120px"], [style*="padding:26px 120px"],
  [style*="padding:64px 120px"], [style*="padding:56px 120px"],
  [style*="padding:80px 120px"], [style*="padding:14px 120px"] {
    padding-left: 44px !important;
    padding-right: 44px !important;
  }
}

/* ≤1040px — nav çapa menüsü sığmaz, gizlenir */
@media (max-width: 1040px) {
  [data-screen-label="Nav"] { gap: 12px !important; }
  [data-screen-label="Nav"] [style*="gap:26px"] { display: none !important; }
}

/* ≤960px — asimetrik bölüm grid'leri tek kolon, sabit bloklar akışkan */
@media (max-width: 960px) {
  /* padding'li kutular max-width:100%'ü aşmasın */
  *, *::before, *::after { box-sizing: border-box; }
  [style*="grid-template-columns:440px 1fr"],
  [style*="grid-template-columns:640px 1fr"],
  [style*="grid-template-columns:380px 1fr"],
  [style*="grid-template-columns:1fr 480px"],
  [style*="grid-template-columns:1fr 300px"] {
    grid-template-columns: 1fr !important;
    gap: 44px !important;
  }
  [style*="width:1000px"], [style*="width:760px"], [style*="width:720px"],
  [style*="width:680px"], [style*="width:560px"], [style*="width:540px"],
  [style*="width:520px"], [style*="width:420px"], [style*="width:400px"],
  [style*="width:340px"] {
    width: auto !important;
    max-width: 100%;
  }
}

/* ≤760px — telefon */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  /* anywhere: uzun mono dizgiler (hash, evt_id) min-content genişliğini şişirmesin */
  body { overflow-wrap: anywhere; }
  [style*="flex-direction:column"] > * { max-width: 100%; }
  /* nowrap+ellipsis span'lar flex içinde küçülebilsin */
  [style*="display:flex"] > * { min-width: 0; }

  [style*="padding:0 120px"], [style*="padding:96px 120px"],
  [style*="padding:110px 120px"], [style*="padding:100px 120px"],
  [style*="padding:90px 120px"], [style*="padding:26px 120px"],
  [style*="padding:64px 120px"], [style*="padding:56px 120px"],
  [style*="padding:80px 120px"], [style*="padding:14px 120px"] {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  /* dikey nefes azalır */
  [style*="padding:110px 120px"], [style*="padding:100px 120px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  [style*="padding:96px 120px"] { padding-top: 56px !important; }
  [style*="padding:90px 120px"], [style*="padding:80px 120px"] { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* kalan çok kolonlu grid'ler */
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: 1fr 1fr !important; }

  /* başlık ve büyük skor fontları */
  [style*="font:600 58px"] { font-size: 34px !important; line-height: 1.15 !important; }
  [style*="font:600 44px"] { font-size: 29px !important; line-height: 1.2 !important; }
  [style*="font:600 40px"] { font-size: 27px !important; line-height: 1.25 !important; }
  [style*="font:800 54px"], [style*="font:800 52px"] { font-size: 40px !important; }
  [style*="font:700 40px"] { font-size: 30px !important; }

  /* flex satırları gerektiğinde alt satıra kırılır (nav hariç) */
  [style*="display:flex"] { flex-wrap: wrap; }
  [data-screen-label="Nav"], [data-screen-label="Nav"] [style*="display:flex"] { flex-wrap: nowrap; }

  /* nav: alt yazı ve sayfa etiketi gizlenir, buton küçülür, hiçbir öğe kırılmaz */
  [data-screen-label="Nav"] { height: 64px !important; }
  [data-screen-label="Nav"] * { overflow-wrap: normal; white-space: nowrap; }
  [data-screen-label="Nav"] [style*="letter-spacing:0.24em"] { display: none !important; }
  [data-screen-label="Nav"] [style*="margin-left:12px"] { display: none !important; }
  [data-screen-label="Nav"] [style*="cursor:pointer"] { padding: 9px 14px !important; }
}
