/* Paylaşılan üst gezinme — koyu cam + zümrüt/camgöbeği vurgu.
   Masaüstü: yatay menü. Mobil: hamburger menü + dikey çekmece. */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(6, 10, 18, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; color: #e8eef6; }
.nav-brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #2dd4bf 0%, #34d399 48%, #22d3ee 100%);
  color: #04110d;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.45);
}
.brand-text { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; line-height: 1.15; color: #e8eef6; }
.brand-text small { display: block; font-weight: 500; font-size: 11.5px; color: #8fa0b5; }
.brand-logo { overflow: hidden; background: #0b1b14; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #8fa0b5;
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: #e8eef6; background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.nav-links a.is-active { color: #e8eef6; background: rgba(255, 255, 255, 0.06); }
.nav-links a.nav-cta {
  margin-left: 8px;
  color: #04110d;
  font-weight: 700;
  background: linear-gradient(135deg, #2dd4bf 0%, #34d399 48%, #22d3ee 100%);
}
.nav-links a.nav-cta:hover { color: #04110d; filter: brightness(1.08); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }

/* Nav içindeki tema düğmesini koyu nav ile eşitle (her temada tutarlı görünüm) */
.topnav .theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e8eef6;
}
.topnav .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: none;
}

/* ---------- Alt menüler (dropdown) ---------- */
.nav-item.has-sub { position: relative; }
.nav-toggle {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #8fa0b5;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: color .18s, background .18s;
}
.nav-toggle:hover { color: #e8eef6; background: rgba(255, 255, 255, 0.05); }
.nav-toggle svg { transition: transform .18s; }
.nav-sub {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: rgba(10, 16, 28, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  display: flex;
  flex-direction: column;
}
.nav-item.has-sub:hover .nav-sub,
.nav-item.has-sub:focus-within .nav-sub,
.nav-item.has-sub.open .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-item.has-sub[data-yon="sol"] .nav-sub { left: auto; right: 0; }
.nav-item.has-sub:hover .nav-toggle svg,
.nav-item.has-sub.open .nav-toggle svg { transform: rotate(180deg); }
.nav-sub a {
  padding: 9px 12px;
  border-radius: 9px;
  color: #b9c6d8;
  font-size: 13.5px;
}
.nav-sub a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); text-decoration: none; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }
  .nav-brand { margin-right: auto; }
  /* Mobilde sloganı gizle -> tek satır, kompakt başlık */
  .brand-text small { display: none; }
  .brand-text { font-size: 15px; line-height: 1.2; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 16px; }
  .nav-actions { order: 2; }
  .nav-burger {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: transparent;
    color: #e8eef6;
    cursor: pointer;
  }
  .nav-links {
    display: none;
    flex-basis: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-inner.nav-open .nav-links { display: flex; }
  .nav-links a, .nav-toggle {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 10px 12px;
    font-size: 14px;
  }
  .nav-links a.nav-cta { margin-left: 0; }
  .nav-item.has-sub { width: 100%; }
  .nav-sub {
    position: static;
    display: none;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 2px 0 0 14px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-item.has-sub.open .nav-sub { display: flex; }
  .nav-item.has-sub[data-yon="sol"] .nav-sub { right: auto; }
}
