/* ============================================================
   KDRK Nav + Footer + Drawer
   ============================================================ */

/* ---------- Top Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color 250ms ease, backdrop-filter 250ms ease, border-color 250ms ease, color 200ms ease;
  color: #F4F6FA;
  border-bottom: 1px solid transparent;
}
/* Fotoğraf üstünde okunurluk: menü, sayfa üstteyken kendi koyu perdesini taşır.
   Hero görseli ne kadar açık olursa olsun beyaz menü metni zeminden ayrışır (WCAG 1.4.3).
   Perde aşağı doğru kaybolur; kayınca dolu zemine, açık üstlü sayfada (nav-on-light) hiç perdeye geçilmez. */
.nav::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px; /* hero sayacının (top: 100px) üstüne inmez; menü sabit olduğu için altındaki metni karartırdı */
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.8) 0%, rgba(11, 18, 32, 0.55) 55%, rgba(11, 18, 32, 0) 100%);
  transition: opacity 250ms ease;
}
@media (max-width: 1023px) { .nav::before { height: 84px; } }
.nav.is-scrolled::before,
.nav.nav-on-light::before { opacity: 0; }
.nav:not(.is-scrolled):not(.nav-on-light) :is(.nav-link, .brand-name, .brand) { text-shadow: 0 1px 2px rgba(11, 18, 32, 0.5); }
.nav.is-scrolled {
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="light"] .nav.is-scrolled {
  background: rgba(244, 246, 250, 0.85);
  border-bottom-color: rgba(11,18,32,0.06);
  color: #0B1220;
}
[data-theme="light"] .nav { color: #0B1220; }
/* But on hero (always-dark), keep nav text light when not scrolled */
[data-theme="light"] .nav:not(.is-scrolled) {
  color: #F4F6FA;
}
/* Açık-üstlü sayfalar (koyu hero yok): nav metni üstteyken de koyu kalsın */
[data-theme="light"] .nav.nav-on-light:not(.is-scrolled) {
  color: #0B1220;
}
[data-theme="light"] .nav.nav-on-light:not(.is-scrolled) .theme-toggle { border-color: rgba(11,18,32,0.18); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 24px;
}
.brand {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 22px;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; display: block; }
.brand-logo-light { display: none; }
.brand-logo-dark { display: block; }
/* Açık tema + scroll edilmiş nav: siyah logo göster */
[data-theme="light"] .nav.is-scrolled .brand-logo-dark { display: none; }
[data-theme="light"] .nav.is-scrolled .brand-logo-light { display: block; }

/* KDRK amblem — beyaz yuvarlak çip (her zeminde net) */
.kdrk-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 4px 14px rgba(0,0,0,0.18);
}
.kdrk-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav .kdrk-mark, .drawer .kdrk-mark { width: 64px; height: 64px; }
@media (max-width: 600px) { .nav .kdrk-mark { width: 54px; height: 54px; } }

/* Anasayfa: sayfa üstteyken amblem büyür ve menü çizgisinin altına sarkarak slaytın üstünde rozet gibi durur.
   Yalnız transform kullanılır; yerleşim (menü genişliği, tek satır kuralı) değişmez. Amblemde "KDRK" yazdığı için
   yanındaki yazı bu sırada söner ve amblem onun boşluğuna büyür. Kaydırınca normal boyuta döner. */
.nav .kdrk-mark { transform-origin: 0 0; transition: transform 320ms ease, box-shadow 320ms ease; }
.nav .brand-name { transition: opacity 200ms ease; }
.nav.nav-home:not(.is-scrolled) .kdrk-mark {
  transform: translateY(6px) scale(1.75);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 14px 34px rgba(11, 18, 32, 0.45);
}
.nav.nav-home:not(.is-scrolled) .brand-name { opacity: 0; }
@media (max-width: 1023px) { .nav.nav-home:not(.is-scrolled) .kdrk-mark { transform: translateY(4px) scale(1.4); } }
@media (max-width: 600px) { .nav.nav-home:not(.is-scrolled) .kdrk-mark { transform: translateY(4px) scale(1.35); } }
.footer-brand .kdrk-mark { width: 44px; height: 44px; margin-right: 12px; }

/* TDF federasyon logosu — nav üst */
.nav-tdf { height: 40px; width: auto; object-fit: contain; flex-shrink: 0; }
@media (max-width: 600px) { .nav-tdf { display: none; } }
/* Marka kümesi: TDF logosu + KDRK amblem/wordmark */
.brand-cluster { display: inline-flex; align-items: center; gap: 14px; }
.brand-cluster .nav-tdf { height: 44px; }
/* Footer tam ad */
.footer-fullname {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin: 14px 0 0;
  line-height: 1.5;
  max-width: 280px;
}
.brand .brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: inline-block;
  margin-right: 4px;
  align-self: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li { position: relative; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: inherit;
  padding: 8px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link .chev {
  transition: transform 180ms ease;
}
[data-dropdown].is-open .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: -16px;
  min-width: 240px;
  background: rgba(17, 27, 44, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
  color: #F4F6FA;
}
[data-theme="light"] .nav.is-scrolled .dropdown {
  background: rgba(255,255,255,0.98);
  color: #0B1220;
  border-color: rgba(11,18,32,0.08);
  box-shadow: 0 16px 40px -12px rgba(11,18,32,0.18);
}
[data-dropdown].is-open .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  transition: background-color 150ms ease, color 150ms ease;
}
.dropdown a:hover {
  background: rgba(249,115,22,0.12);
  color: var(--accent-primary);
}
.dropdown .sub-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 12px 12px 4px;
  color: var(--text-secondary);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: inherit;
  transition: background-color 200ms ease, transform 200ms ease, border-color 200ms ease;
}
[data-theme="light"] .nav.is-scrolled .theme-toggle { border-color: rgba(11,18,32,0.18); }
.theme-toggle:hover {
  background: rgba(255,255,255,0.08);
  transform: rotate(15deg);
}
[data-theme="light"] .nav.is-scrolled .theme-toggle:hover { background: rgba(11,18,32,0.06); }
.theme-toggle svg { width: 18px; height: 18px; }

.nav-cta {
  height: 44px; /* dokunma alanı ≥ 44px (§6) */
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent-primary);
  color: var(--on-accent);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 180ms ease, transform 180ms ease;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: inherit;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
}
.burger svg { width: 20px; height: 20px; }

/* ---------- Drawer ---------- */
.drawer {
  position: fixed;
  inset: 0;
  background: #0B1220;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 280ms ease;
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter);
  overflow-y: auto;
  color: #F4F6FA;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.drawer-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #1F2A3D;
  margin-bottom: 16px;
}
.drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.drawer nav a, .drawer .drawer-section-title {
  padding: 14px 0;
  border-bottom: 1px solid #1F2A3D;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
}
.drawer .drawer-cta {
  margin-top: 24px;
  height: 52px;
  background: var(--accent-primary);
  color: var(--on-accent);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

@media (max-width: 1179px) {
  .nav-menu { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 599px) { .nav-cta-text { display: none; } }

/* ---------- Footer ---------- */
.footer {
  background: #0B1220;
  color: #F4F6FA;
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
}
.footer .topo-watermark { opacity: 0.03; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  position: relative;
}
.footer-col .footer-title { /* h2: sayfadaki başlık sırası atlanmaz (§19) */
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #94A3B8;
  margin: 0 0 18px;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.footer-col .footer-title::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent-primary);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.footer-col a {
  font-size: 14px;
  color: #F4F6FA;
  opacity: 0.85;
  transition: color 180ms ease, opacity 180ms ease;
}
.footer-col a:hover { color: var(--accent-primary); opacity: 1; }
.footer-mission {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.7;
  max-width: 280px;
  margin-top: 12px;
}
.footer-brand {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-brand .brand-logo { width: 32px; height: 32px; }
.tdf-badge {
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-socials a {
  width: 44px;
  height: 44px;
  border: 1px solid #1F2A3D;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}
.footer-socials a:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(249,115,22,0.06);
}
.footer-contact {
  font-size: 14px;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-contact strong { color: #F4F6FA; font-weight: 600; }
.footer-contact .map-pin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent-primary);
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #1F2A3D;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94A3B8;
  font-family: 'JetBrains Mono', monospace;
}
.footer-legal { display: flex; flex-direction: column; gap: 2px; }
.footer-credit { letter-spacing: 0.04em; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom .badges {
  display: flex;
  gap: 16px;
  align-items: center;
}
.footer-bottom .badge {
  padding: 6px 10px;
  border: 1px solid #1F2A3D;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
}
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Aktif menü ---------- */
.nav-link.is-current::after { transform: scaleX(1); height: 2px; background: var(--accent-primary); }
.dropdown a[aria-current="page"] { color: #FB923C; background: rgba(249,115,22,0.1); }
[data-theme="light"] .nav.is-scrolled .dropdown a[aria-current="page"] { color: var(--accent-primary); }
/* ---------- Drawer grupları ---------- */
.drawer-label { font-size: 14px; color: #94A3B8; letter-spacing: 0.08em; text-transform: uppercase; }
.drawer nav details { border-bottom: 1px solid #1F2A3D; }
.drawer nav summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 18px; font-weight: 600; font-family: 'Manrope', sans-serif; cursor: pointer; }
.drawer nav summary::-webkit-details-marker { display: none; }
.drawer nav summary .chev { width: 14px; height: 14px; transition: transform 180ms ease; }
.drawer nav details[open] summary .chev { transform: rotate(180deg); }
.drawer-sub { display: flex; flex-direction: column; padding: 0 0 12px 12px; border-left: 2px solid #1F2A3D; margin-bottom: 8px; }
.drawer nav .drawer-sub a { border-bottom: none; font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 500; padding: 11px 0; color: #CBD5E1; }
.drawer-sub .sub-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #94A3B8; padding: 12px 0 4px; }
.drawer nav a { min-height: 52px; display: flex; align-items: center; }
/* ---------- Alt menü simgeleri: sakin, yalnız üzerine gelince/aktifken belirgin ---------- */
.dropdown a, .drawer nav .drawer-sub a { display: flex; align-items: center; gap: 10px; }
.dropdown { min-width: 268px; }
.dropdown a { white-space: nowrap; }
.drawer nav .drawer-sub a { gap: 12px; }
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.5; transition: opacity 160ms ease; }
.drawer-sub .nav-ico { width: 18px; height: 18px; }
.dropdown a:hover .nav-ico, .dropdown a[aria-current="page"] .nav-ico, .drawer-sub a[aria-current="page"] .nav-ico { opacity: 1; }
.drawer nav a[aria-current="page"] { color: #FB923C; }
/* ---------- Footer dokunma alanları ---------- */
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact a { color: #F4F6FA; opacity: 0.85; min-height: 44px; display: inline-flex; align-items: center; }
.footer-contact a:hover { color: var(--accent-primary); opacity: 1; }
.footer-socials a { width: 44px; height: 44px; }

/* Bakım modu önizleme çubuğu (yalnız yönetici önizlemesinde) */
.preview-bar{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:200;display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center;max-width:calc(100% - 24px);padding:10px 16px;border-radius:999px;background:var(--accent-primary);color:var(--on-accent);font-family:'JetBrains Mono',monospace;font-size:12px;letter-spacing:.08em;box-shadow:0 10px 30px rgba(0,0,0,.3)}
.preview-bar a{color:var(--on-accent);text-decoration:underline;text-underline-offset:3px;font-weight:600}
.preview-bar a:hover{color:var(--on-accent);opacity:.85}

/* Breadcrumb: öğeler ve › ayracı arasında eşit boşluk (işaretlemedeki boşluk karakterine bağlı kalmaz) */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; }
.breadcrumb .sep { opacity: 0.5; }

/* Mobil dokunma alanı (CLAUDE.md §6a): breadcrumb linkleri parmakla rahat seçilsin */
@media (max-width: 600px) {
  .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Menü öğeleri tek satırda kalır; dar masaüstünde (1180–1365px) aralıklar sıkışır */
.nav-link, .nav-cta { white-space: nowrap; }
@media (min-width: 1180px) and (max-width: 1365px) {
  .nav-inner { gap: 16px; }
  .nav-menu { gap: 18px; }
  .nav-cta { padding: 0 14px; }
}
.brand-cluster { flex-shrink: 0; }
@media (min-width: 1180px) and (max-width: 1279px) {
  .nav-inner { gap: 12px; }
  .nav-menu { gap: 13px; }
  .nav-cta { padding: 0 12px; }
}
