/* ========================================================================
   ÜYE ALANI ÜST MENÜSÜ (ortak)
   Kullanan sayfalar: dashboard.html (Hesabım), materyaller.html, destek.html,
   videolar.html, sepet.html, akademi-giris.html. Ana sayfanın menüsü ayrıdır.
   Davranış (aktif bağlantı, sepet sayısı, giriş yoksa "Giriş Yap"):
   assets/js/uye-menu.js
======================================================================== */
.um {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 9, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .9);
  font-family: 'Poppins', sans-serif;
}

/* her sayfa box-sizing'i ayarlamıyor; menü kendi içinde tutarlı olsun */
.um,
.um *,
.um *::before,
.um *::after {
  box-sizing: border-box;
}

.um::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 201, 14, .45), transparent);
  pointer-events: none;
}

.um-in {
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 1320px;
  height: 80px;
  margin: 0 auto;
  padding: 0 24px;
}

.um-brand {
  display: flex;
  align-items: center;
  flex: none;
}

.um-brand img {
  display: block;
  height: 40px;
  width: auto;
}

.um svg {
  flex: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- bağlantılar ---------- */
.um-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  padding-left: 26px;
  border-left: 1px solid rgba(255, 255, 255, .08);
}

.um-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.um-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.um-nav a.is-active {
  color: #fff;
  background: rgba(246, 201, 14, .1);
  box-shadow: inset 0 0 0 1px rgba(246, 201, 14, .3);
}

.um-nav a.is-active svg {
  color: #f6c90e;
}

/* ---------- sağ taraf ---------- */
.um-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.um-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.um-icon:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .07);
}

.um-icon.is-active {
  color: #f6c90e;
  border-color: rgba(246, 201, 14, .45);
}

/* sepet: ikon + "Sepet" yazısı */
.um-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 0 18px 0 15px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.um-logout:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .1);
}

.um-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: none;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f6c90e;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #080809;
}

.um-badge.is-on {
  display: block;
}

.um-account {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 22px 0 17px;
  border-radius: 999px;
  background: #f6c90e;
  color: #0a0a0a;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(246, 201, 14, .8);
  transition: transform .2s, background .2s;
}

.um-account:hover {
  transform: translateY(-1px);
  background: #e5b800;
  color: #0a0a0a;
}

.um-account.is-active {
  box-shadow: 0 0 0 3px rgba(246, 201, 14, .25), 0 10px 24px -12px rgba(246, 201, 14, .8);
}

/* giriş yoksa çıkış butonu gizli (uye-menu.js) */
.um.is-guest .um-logout {
  display: none;
}

/* ---------- hamburger (yalnızca dar ekranda görünür) ---------- */
.um-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
}

.um-burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .25s, opacity .25s;
}

.um.is-open .um-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.um.is-open .um-burger span:nth-child(2) {
  opacity: 0;
}

.um.is-open .um-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- duyarlı ---------- */
/* orta genişlik: bağlantılar yalnızca ikon (yazı title/aria-label'da) */
@media (max-width: 1260px) {
  .um-nav a span {
    display: none;
  }

  .um-nav a {
    width: 46px;
    padding: 0;
    justify-content: center;
  }
}

/* dar ekran: hamburger menü */
@media (max-width: 900px) {
  .um-in {
    position: relative;
    height: 66px;
    gap: 10px;
    padding: 0 16px;
  }

  .um-brand {
    margin-right: auto;
  }

  .um-brand img {
    height: 32px;
  }

  .um-burger {
    display: flex;
  }

  .um-right {
    gap: 8px;
  }

  .um-icon,
  .um-account,
  .um-burger {
    height: 42px;
  }

  .um-icon {
    width: 42px;
  }

  .um-cart {
    width: auto;
    padding: 0 14px 0 12px;
    font-size: 14px;
  }

  .um-account {
    padding: 0 16px 0 13px;
    font-size: 14px;
  }

  /* açılır panel */
  .um-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    background: rgba(16, 16, 18, .98);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
  }

  .um.is-open .um-nav {
    display: flex;
  }

  .um-nav a {
    width: auto;
    height: 50px;
    padding: 0 16px;
    justify-content: flex-start;
    border-radius: 12px;
    font-size: 15px;
  }

  .um-nav a span {
    display: inline;
  }
}

@media (max-width: 520px) {
  .um-in {
    height: 60px;
    padding: 0 12px;
    gap: 6px;
  }

  .um-brand img {
    height: 28px;
  }

  .um-right {
    gap: 6px;
  }

  .um-icon,
  .um-account,
  .um-burger {
    height: 40px;
  }

  .um-icon,
  .um-burger {
    width: 40px;
  }

  .um-cart {
    width: auto;
    padding: 0 12px 0 10px;
    font-size: 13px;
    gap: 6px;
  }

  .um-account {
    padding: 0 13px 0 11px;
    font-size: 13px;
  }
}

/* dar telefon: hesap butonu yalnızca ikon ("Sepet" yazısı kalır) */
@media (max-width: 420px) {
  .um-account span {
    display: none;
  }

  .um-account {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
}

/* çok dar ekran: sepet de yalnızca ikon */
@media (max-width: 370px) {
  .um-cart-txt {
    display: none;
  }

  .um-cart {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
}
