:root {
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Film Gibi Matematik Kurumsal Renk Skalası */
  --brand-primary: #294f82; /* Film Gibi Lacivert */
  --brand-primary-dark: #1e3a61;
  --brand-accent: #e78a36; /* Sıcak Turuncu Vurgu */
  --brand-accent-dark: #d27424;
  --brand-pink: #bf4d79;

  /* Temel Yüzeyler */
  --site-bg: #f8f9fa;
  --site-card: #ffffff;
  --site-ink: #1f2d27;
  --site-muted: #5f6a63;
  --site-line: #e6dccb;

  /* Sınıf Seviye Renkleri (MEB Maarif Modeli) */
  --g5: #bf4d79; --g5s: #f8e6ee;
  --g6: #4a8068; --g6s: #e3eee8;
  --g7: #3d7398; --g7s: #e2edf4;
  --g8: #d27a2c; --g8s: #fbead9;

  /* Standart Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* Navigasyon aktif durum stilleri */
.navigation a.on,
.navigation a[aria-current="page"] {
  color: var(--brand-accent, #e78a36);
  font-weight: 700;
}

/* ==========================================================================
   Mobil Navigasyon & Responsive Header Standardı (<= 850px / <= 1180px)
   Film Gibi Matematik · Dokunmatik cihazlarda (375px/414px) sıfır yatay taşma,
   akıcı momentum kaydırma (-webkit-overflow-scrolling: touch) ve tek sıra düzen.
   ========================================================================== */

/* Modern scrollbar gizleme & yatay kaydırma yardımcıları */
.navigation,
.site-header .navigation,
.hdr .menu {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.navigation::-webkit-scrollbar,
.site-header .navigation::-webkit-scrollbar,
.hdr .menu::-webkit-scrollbar {
  display: none;
}

/* 850px ve altı: .site-header (.navigation) mobil yatay kaydırma */
@media (max-width: 850px) {
  .site-header .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 0.5rem;
    padding-block: 0.65rem;
  }

  .site-header .navigation,
  .navigation {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px 8px;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-block: 4px 6px;
    padding-inline: 2px;
    margin: 0;
    touch-action: pan-x;
  }

  .site-header .navigation a,
  .navigation a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: var(--site-muted, #5f6a63);
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .site-header .navigation a:hover,
  .navigation a:hover {
    color: var(--site-ink, #1f2d27);
    background: rgba(0, 0, 0, 0.05);
  }

  .site-header .navigation a.on,
  .site-header .navigation a[aria-current="page"],
  .navigation a.on,
  .navigation a[aria-current="page"] {
    background: rgba(231, 138, 54, 0.12) !important;
    color: var(--brand-accent, #e78a36) !important;
    font-weight: 700;
  }

  /* Mobil sayfa genişlik koruması: kod blokları ve grid çocukları min-width: 0 */
  .code-block,
  .feature-case,
  .feature-case > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* 1180px ve altı: .hdr (.menu) - index.html / ogretmen.html */
@media (max-width: 1180px) {
  .hdr .menu {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-block: 4px;
    padding-inline: 4px;
    touch-action: pan-x;
  }

  .hdr .menu .it {
    flex: 0 0 auto !important;
  }

  .hdr .menu .it > a {
    white-space: nowrap !important;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }
}

/* 480px ve altı (dar mobil): Başlıkta metin sıkışmasını önleme */
@media (max-width: 480px) {
  .hdr .brand b span {
    display: none !important;
  }
  .hdr .wrap {
    padding-inline: 12px;
  }
}
