/* ==========================================================================
   MENÜ v2 (08.11.2026): açılır sol menü, hamburger grupları, mobil "Daha Fazla" bölümleri
   Markup: views/partials/header.ejs, views/partials/footer.ejs. Veri: config/sayfaKatalogu.js
   Görsel tasarım bilerek nötr: mevcut style.css değişkenleri (--primary, --gray, --border, --radius)
   kullanılıyor, yoksa yanlarındaki sabit değerler devreye giriyor. Tasarım geçişinde bu dosya yeniden ele alınacak.
   ========================================================================== */

/* ── Sol menü: kaydırılabilir gövde ── */
.student-sidebar .snav {
  overflow-y: auto;
  min-height: 0;
  gap: 2px;
  scrollbar-width: thin;
}

/* ── Grup düğmesi (sidebar-nav-item görünümüne yakın) ── */
.snav-grup { display: flex; flex-direction: column; }
.snav-grup-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 16px;
  background: none; border: 0; border-radius: var(--radius, 12px);
  color: var(--gray, #64748b); font: inherit; font-weight: 600; font-size: 0.95rem;
  text-align: left; cursor: pointer; transition: background .2s, color .2s;
}
.snav-grup-btn > i:first-child { font-size: 1.1rem; width: 20px; text-align: center; }
.snav-grup-btn span { flex: 1; min-width: 0; }
.snav-grup-btn:hover { color: var(--primary, #0284c7); background: rgba(2, 132, 199, 0.06); }
.snav-grup-btn:focus-visible, .snav-alt:focus-visible, .snav-hesap-link:focus-visible {
  outline: 2px solid var(--primary, #0284c7); outline-offset: 1px;
}
.snav-ok { font-size: .7rem; opacity: .6; transition: transform .2s; }
.snav-grup.acik .snav-ok { transform: rotate(180deg); }
.snav-grup.acik > .snav-grup-btn { color: var(--text-color, #1e293b); }

/* ── Alt bağlantılar ── */
.snav-alt-liste { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px 30px; }
.snav-grup.acik .snav-alt-liste { display: flex; }
.snav-alt {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 8px;
  color: var(--gray, #64748b); font-size: 0.86rem; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
}
.snav-alt i { width: 16px; text-align: center; font-size: .85rem; opacity: .85; }
.snav-alt span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snav-alt:hover { color: var(--primary, #0284c7); background: rgba(2, 132, 199, 0.06); }
.snav-alt.aktif { color: var(--primary, #0284c7); background: rgba(2, 132, 199, 0.1); font-weight: 700; }
.snav-alt.kilitli { opacity: .55; }
.snav-kilit { font-size: .68rem; color: #d97706; opacity: 1; }

.snav-tum { margin-top: 6px; border-top: 1px solid var(--border, #e2e8f0); border-radius: 0; padding-top: 14px !important; }

/* ── Hesap bağlantıları (menünün altı) ── */
.snav-hesap { display: flex; flex-direction: column; gap: 1px; padding: 10px 0 8px; border-top: 1px solid var(--border, #e2e8f0); }
.snav-hesap-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 8px;
  color: var(--gray, #64748b); font-size: .84rem; font-weight: 500; text-decoration: none;
}
.snav-hesap-link i { width: 18px; text-align: center; }
.snav-hesap-link:hover, .snav-hesap-link.aktif { color: var(--primary, #0284c7); background: rgba(2, 132, 199, 0.06); }

/* ── Daraltılmış menü: yalnız ikonlar, alt listeler gizli ── */
body.sidebar-collapsed .snav-grup-btn { justify-content: center; padding: 12px 0; gap: 0; }
body.sidebar-collapsed .snav-grup-btn span,
body.sidebar-collapsed .snav-ok,
body.sidebar-collapsed .snav-alt-liste,
body.sidebar-collapsed .snav-hesap-link span { display: none !important; }
body.sidebar-collapsed .snav-hesap-link { justify-content: center; padding: 9px 0; }

/* ── Koyu mod ── */
html.dark-mode .snav-grup-btn, body.dark-mode .snav-grup-btn,
html.dark-mode .snav-alt, body.dark-mode .snav-alt,
html.dark-mode .snav-hesap-link, body.dark-mode .snav-hesap-link { color: #94a3b8; }
html.dark-mode .snav-grup.acik > .snav-grup-btn, body.dark-mode .snav-grup.acik > .snav-grup-btn { color: #e2e8f0; }
html.dark-mode .snav-alt.aktif, body.dark-mode .snav-alt.aktif { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
html.dark-mode .snav-tum, body.dark-mode .snav-tum,
html.dark-mode .snav-hesap, body.dark-mode .snav-hesap { border-color: rgba(255, 255, 255, 0.06); }

/* ── Profil kapsülü: kilit ikonu ── */
.hpd-kilit { margin-left: auto; font-size: .7rem; color: #d97706; }

/* ── Hamburger menüsü (≤1366 px): grup başlıkları ── */
.hmenu-grup { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.hmenu-grup-baslik {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 2px; padding: 0 12px;
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gray, #64748b); opacity: .8;
}
@media (min-width: 1367px) { .hmenu-grup { display: none; } }

/* ── Mobil tarayıcı "Daha Fazla": bölümler ── */
.mm-bolum { padding-top: 8px; margin-bottom: 18px; scroll-margin-top: 8px; }
.mm-bolum-baslik {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; color: #94a3b8; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .04em;
}
.mm-bolum.vurgu .mm-bolum-baslik { color: var(--primary, #0284c7); }
.mobile-more-item.aktif { color: var(--primary, #0284c7); }
/* Grup renkleri (config/sayfaKatalogu.js solidColor ile aynı) */
.mm-bolum[data-grup="group-sinav"] .mobile-more-item.unlocked .mmi-icon { color: #059669; background: #d1fae5; }
.mm-bolum[data-grup="group-ai"] .mobile-more-item.unlocked .mmi-icon { color: #6366f1; background: #e0e7ff; }
.mm-bolum[data-grup="group-kutuphane"] .mobile-more-item.unlocked .mmi-icon { color: #d97706; background: #fef3c7; }
.mm-bolum[data-grup="group-planlama"] .mobile-more-item.unlocked .mmi-icon { color: #0284c7; background: #e0f2fe; }
.mm-bolum[data-grup="group-sosyal"] .mobile-more-item.unlocked .mmi-icon { color: #db2777; background: #fce7f3; }
.mm-bolum[data-grup="group-hesap"] .mobile-more-item .mmi-icon { color: #64748b; background: #f1f5f9; }
html.dark-mode .mm-bolum .mobile-more-item.unlocked .mmi-icon,
body.dark-mode .mm-bolum .mobile-more-item.unlocked .mmi-icon,
html.dark-mode .mm-bolum[data-grup="group-hesap"] .mobile-more-item .mmi-icon,
body.dark-mode .mm-bolum[data-grup="group-hesap"] .mobile-more-item .mmi-icon { background: rgba(148, 163, 184, 0.14); }

/* Mobil "Daha Fazla" ızgarası: uzun adlar sütunları genişletip ekranı taşırmasın */
.mm-bolum .mobile-more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mm-bolum .mobile-more-item { min-width: 0; overflow-wrap: anywhere; }
