:root { --breadcrumb-navbar-border: #c9dfff; }
html[data-bs-theme="dark"] { --breadcrumb-navbar-border: #2a4166; }

/* Yol çubuğu (breadcrumb): profil ve öğrenci sayfalarında aynı görünüm.
   Açık tema: navbar şeridi (.app-navbar) ile aynı zemin; kenarlık aynı mavinin biraz koyusu;
   bağlantılar header bağlantılarıyla aynı gri; yalnızca en sondaki (geçerli sayfa) öğe farklı renkte.
   Navbar zemini rgba(129,180,255,.1) (beyaz üstünde #f2f8ff); kenarlık rgba(129,180,255,.36)'nın
   bu zemin üstündeki hâli (#c9dfff). Koyu tema aşağıda. */
.breadcrumb-modern {
  --bs-breadcrumb-divider: "\203A";
  background-color: #f2f8ff;
  /* Dikey ortalama: öğeler flex ile ortalanır (ikon boyutu yazının konumunu etkilemez), dolgu simetrik;
     yazı tipinin ortalama yüksekliğe göre küçük kayması .breadcrumb-item'daki translateY ile giderilir */
  --breadcrumb-text-shift: -0.3px;
  align-items: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--breadcrumb-navbar-border);
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  margin-top: 0;
  box-shadow: none;
  font-size: 0.9rem;
}

/* Ok (›) ayrı, daha büyük puntolu bir kutuda olduğu için yazıdan ~2px aşağıda kalıyordu */
.breadcrumb-modern .breadcrumb-item + .breadcrumb-item::before {
  position: relative;
  top: -2px;
  color: #94a3b8;
  font-size: 1.05rem;
  font-weight: 600;
  padding-right: 0.6rem;
}

.breadcrumb-modern .breadcrumb-item a {
  color: #475569;
  font-weight: 500;
  text-decoration: none;
}

.breadcrumb-modern .breadcrumb-item a:hover {
  color: #1f2937;
  text-decoration: underline;
}

.breadcrumb-modern .breadcrumb-item.active,
.breadcrumb-modern .breadcrumb-item#profile-section-breadcrumb {
  color: #1e3a8a;
  font-weight: 600;
}

/* Profil sayfasında bölüm öğesi (ör. Genel Bakış) görünürken "Profil" artık sonda değildir:
   sadece en sondaki öğe farklı renkte, "Profil" diğer bağlantılar gibi gri kalır. */
.breadcrumb-modern .breadcrumb-item.active:has(~ #profile-section-breadcrumb:not(.d-none)) {
  color: #475569;
  font-weight: 500;
}

.breadcrumb-modern .breadcrumb-item {
  display: flex;
  align-items: center;
  line-height: 1.2;
  transform: translateY(var(--breadcrumb-text-shift, 0px));
}

.breadcrumb-modern .breadcrumb-item > a {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Kayma yalnızca yazı içindir: ikonlar ters kaydırılarak kutunun tam ortasında kalır */
.breadcrumb-modern .breadcrumb-item i {
  transform: translateY(calc(var(--breadcrumb-text-shift, 0px) * -1));
}

/* Telefon: yazı ve boşluklar biraz küçülür (profil ve öğrenci sayfalarında aynı) */
@media (max-width: 575.98px) {
  .breadcrumb-modern {
    --breadcrumb-text-shift: -0.5px;
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
  }

  .breadcrumb-modern .breadcrumb-item + .breadcrumb-item {
    padding-left: 0.3rem;
  }

  .breadcrumb-modern .breadcrumb-item + .breadcrumb-item::before {
    top: -1px;
    padding-right: 0.3rem;
    font-size: 0.9rem;
  }

  .breadcrumb-modern .breadcrumb-item i {
    margin-right: 0.2rem !important;
  }
}

/* Koyu tema */
html[data-bs-theme="dark"] .breadcrumb-modern {
  background-color: #172840;
  border-color: var(--breadcrumb-navbar-border);
  box-shadow: none;
  color: var(--app-text);
}

/* Koyu tema yazı renkleri açık temayla aynı mantıkta: bağlantılar header (navbar) bağlantılarıyla aynı
   renk (var(--app-text)), hover'da beyaz; yalnızca en sondaki (geçerli sayfa) öğe farklı, açık mavi. */
html[data-bs-theme="dark"] .breadcrumb-modern .breadcrumb-item + .breadcrumb-item::before {
  color: var(--app-text-muted, #aab9ce);
}

html[data-bs-theme="dark"] .breadcrumb-modern .breadcrumb-item a {
  color: var(--app-text, #edf2fa);
}

html[data-bs-theme="dark"] .breadcrumb-modern .breadcrumb-item a:hover {
  color: #ffffff;
}

html[data-bs-theme="dark"] .breadcrumb-modern .breadcrumb-item.active,
html[data-bs-theme="dark"] .breadcrumb-modern .breadcrumb-item#profile-section-breadcrumb {
  color: #8ebcf2;
}

html[data-bs-theme="dark"] .breadcrumb-modern .breadcrumb-item.active:has(~ #profile-section-breadcrumb:not(.d-none)) {
  color: var(--app-text, #edf2fa);
  font-weight: 500;
}

/* Attach every full-page breadcrumb to the navbar. */
.app-content-shell:has(nav[aria-label="breadcrumb"] .breadcrumb-modern) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.app-content-shell nav[aria-label="breadcrumb"]:has(.breadcrumb-modern) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.app-content-shell :is(.container, .container-fluid):has(> nav[aria-label="breadcrumb"] .breadcrumb-modern) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.app-navbar {
  border-bottom: 1px solid var(--breadcrumb-navbar-border) !important;
}
