/* =========================================================
   EDUES — GLOBAL STABLE STYLE (CLEAN)
   - Single main scroll (body)
   - Mobile safe
   - Tailwind friendly
========================================================= */

/* 1) RESET & BOX MODEL */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  /* ✅ keep only body scrolling */
  overflow-y: auto;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  background-color: #f8fafc; /* slate-50 */
}

/* 2) MEDIA — NEVER OVERFLOW */
img,
video,
svg,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

iframe { border: 0; }

/* 3) TYPOGRAPHY (IMPORTANT FIX)
   ❌ kaldırdım: overflow-wrap:anywhere + word-break:break-word (harf harf kırıyordu)
   ✅ normal akış: sadece uzun linkler taşarsa kır
*/
p, li, a {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Headings & generic blocks default kalsın */
h1, h2, h3, h4, h5, h6,
div, span {
  word-break: normal;
}

/* 4) FORMS — MOBILE SAFE */
input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
  max-width: 100%;
}

textarea { resize: vertical; }

/* 5) ACCESSIBILITY */
:focus-visible {
  outline: 3px solid rgba(219, 39, 119, 0.35);
  outline-offset: 2px;
}

/* 6) LAYOUT GUARD
   ❌ kaldırdım: main/section/header/footer/container overflow-x:hidden (bazı bileşenlerde iç scroll hissi yaratabiliyor)
   ✅ sadece yatay taşmayı engelleyen güvenli yaklaşım
*/
main { width: 100%; }

/* 7) GRID & FLEX FIX (SAFE) */
.grid,
.flex {
  min-width: 0;
}
.grid > *,
.flex > * {
  min-width: 0;
}

/* 8) TABLE SAFETY (MOBILE)
   ✅ tablo metinlerinin harf harf bölünmesini engeller
*/
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  word-break: normal;
  overflow-wrap: normal;
}

/* 9) MOBILE TYPO SCALE (SAFE) */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(2rem, 7vw, 2.75rem);
    line-height: 1.15;
  }
  h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

/* 10) TAP FIX */
a,
button {
  -webkit-tap-highlight-color: transparent;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
