/* ── KAYNAK AKADEMİ · ORTAK SİTE MENÜSÜ ──────────────────────────────
   Tüm public sayfalarda aynı başlık kullanılır. Sınıf adları "sh-" ön
   ekiyle yazıldı; sayfaların kendi eski nav stilleriyle çakışmaz.
   ------------------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(122, 32, 53, .08);
}

.sh-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 14px;
  height: 68px;
}

/* ── Logo ─────────────────────────────────────────────────────────── */
.sh-logo {
  display: flex; align-items: center; gap: 9px;
  flex: 0 0 auto; white-space: nowrap;
  font-weight: 800; font-size: 1.1rem; color: #7A2035;
  text-decoration: none;
}
.sh-logo img { width: 52px; height: 52px; object-fit: contain; display: block; }
.sh-logo span { color: #C98792; }

/* ── Masaüstü menü ────────────────────────────────────────────────── */
.sh-nav {
  display: flex; align-items: center; gap: 1px;
  flex: 1 1 auto; min-width: 0; justify-content: center;
}
/* Menü dokuz kalem taşır; yatay sığması için ölçüler ölçülerek daraltıldı
   (bkz. aşağıdaki 1280px eşiği — altında hamburger devreye girer). */
.sh-nav > a,
.sh-drop > button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 8px; border-radius: 8px;
  font-family: inherit; font-size: .83rem; font-weight: 500;
  color: #2F343D; white-space: nowrap; text-decoration: none;
  background: none; border: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.sh-nav > a:hover,
.sh-drop > button:hover { background: #FAF7F5; color: #7A2035; }
.sh-nav > a.sh-active { color: #7A2035; font-weight: 700; }

/* ── "Araçlar" açılır menüsü ──────────────────────────────────────── */
.sh-drop { position: relative; }
.sh-drop > button::after {
  content: ''; width: 5px; height: 5px; margin-left: 1px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .2s;
}
.sh-drop.sh-open > button { background: #FAF7F5; color: #7A2035; }
.sh-drop.sh-open > button::after { transform: rotate(-135deg) translateY(-1px); }
.sh-drop.sh-has-active > button { color: #7A2035; font-weight: 700; }

.sh-drop-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 218px; padding: 8px;
  background: #fff; border: 1px solid rgba(122, 32, 53, .10);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(122, 32, 53, .16);
}
.sh-drop.sh-open .sh-drop-menu { display: block; }
.sh-drop-menu a {
  display: block; padding: 10px 12px; border-radius: 9px;
  font-size: .87rem; font-weight: 500; color: #2F343D;
  white-space: nowrap; text-decoration: none;
  transition: background .2s, color .2s;
}
.sh-drop-menu a:hover { background: #FAF7F5; color: #7A2035; }
.sh-drop-menu a.sh-active { color: #7A2035; font-weight: 700; background: #FAF7F5; }

/* ── Sağdaki aksiyon butonları ────────────────────────────────────── */
.sh-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.sh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 50px;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: all .22s;
}
.sh-btn-outline { color: #7A2035; border-color: #7A2035; background: transparent; }
.sh-btn-outline:hover { background: #7A2035; color: #fff; }
.sh-btn-primary { background: #7A2035; color: #fff; }
.sh-btn-primary:hover { background: #C98792; }

/* ── Hamburger ────────────────────────────────────────────────────── */
.sh-burger {
  display: none; flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  padding: 8px; margin-left: auto; border-radius: 8px;
}
.sh-burger span {
  display: block; width: 24px; height: 2px; background: #7A2035;
  border-radius: 2px; transition: transform .28s, opacity .2s;
}
.sh-burger span + span { margin-top: 5px; }
.sh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobil çekmece ────────────────────────────────────────────────── */
/* NOT: .site-header'da backdrop-filter var; bu, sabit (fixed) konumlu
   çocuklar için içeren blok oluşturur. Bu yüzden çekmece absolute. */
.sh-drawer {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0; z-index: 199;
  background: #fff;
  border-top: 1px solid rgba(122, 32, 53, .08);
  box-shadow: 0 18px 40px rgba(122, 32, 53, .14);
  padding: 18px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  max-height: calc(100vh - 68px);
  max-height: calc(100dvh - 68px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex-direction: column; gap: 4px;
}
.sh-drawer.sh-open { display: flex; }
.sh-drawer a {
  padding: 13px 14px; border-radius: 11px;
  font-size: 1rem; font-weight: 600; color: #2F343D; text-decoration: none;
}
.sh-drawer a:active { background: #FAF7F5; }
.sh-drawer a.sh-active { color: #7A2035; background: #FAF7F5; }
.sh-drawer-label {
  padding: 16px 14px 6px; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: #7C7883;
}
.sh-drawer-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid rgba(122, 32, 53, .10);
}
.sh-drawer-actions .sh-btn { padding: 13px 20px; font-size: .92rem; }
body.sh-lock { overflow: hidden; }

/* ── Kırılma noktaları ────────────────────────────────────────────── */
@media (max-width: 1279px) {
  .sh-nav, .sh-actions { display: none; }
  .sh-burger { display: block; }
}
@media (min-width: 1280px) {
  .sh-drawer { display: none !important; }
}
@media (max-width: 400px) {
  .sh-logo { font-size: 1rem; }
  .sh-logo img { width: 44px; height: 44px; }
}

@media print {
  .site-header, .sh-drawer { display: none !important; }
}
