/* Manning Vakfı — alt sayfalarda kullanılan ortak üst menü
   Ana sayfadaki (index.html) menünün birebir aynısıdır. */

:root {
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'Source Sans 3', Helvetica, Arial, sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --parchment: #ffffff;
  --wine: #0f1d3a;
}

body { padding-top: 70px; }
[id] { scroll-margin-top: 90px; }

nav.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem max(2.5rem, calc((100% - 1200px) / 2));
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: all 0.35s ease;
}
nav.topbar.scrolled {
  border-bottom-color: var(--line);
  padding: 0.6rem max(2.5rem, calc((100% - 1200px) / 2));
}
nav.topbar .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo { height: 44px; width: auto; display: block; }
nav.topbar.scrolled .brand-logo { height: 38px; }
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links > li { position: relative; }
.nav-links .mobile-only { display: none; }
.sub-toggle { display: none; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 0.6rem 0;
  display: inline-block;
  transition: color 0.25s;
}
.has-sub > a::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  margin-left: 0.45rem;
}
.sub {
  list-style: none;
  position: absolute;
  top: 100%; left: -1rem;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  box-shadow: 0 8px 20px rgba(15, 29, 58, 0.08);
  padding: 0.4rem 0;
  z-index: 110;
  overflow: hidden;
  border-radius: var(--r-md);
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}
.sub-inner { list-style: none; }
.sub li a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink-soft);
  white-space: nowrap;
}
.sub li a:hover { background: var(--stone-deep); color: var(--ink); }
.sub li a::after { display: none; }
.nav-links > li > a:hover { color: var(--gold); }
.nav-cta {
  padding: 0.55rem 1.1rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: background 0.25s;
}
.nav-cta:hover { background: #06122a; }
.nav-right {
  position: relative;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.mobile-toggle { display: none; }

@media (max-width: 1100px) {
  body { padding-top: 64px; }
  .nav-links { display: none; }
  .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 0 10px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    margin-left: 0.75rem;
  }
  .mobile-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
  .mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: block;
    position: fixed;
    top: 62px; left: 0; right: 0; bottom: 0;
    background: #fff;
    overflow-y: auto;
    padding: 0.5rem 1.5rem 3rem;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
  }
  .nav-links > li { border-bottom: 1px solid var(--line); }
  .nav-links > li > a { display: block; padding: 0.95rem 2.5rem 0.95rem 0; font-size: 0.9rem; }
  .has-sub { position: relative; }
  .has-sub > a::after { display: none; }
  .sub-toggle {
    position: absolute;
    top: 0.35rem; right: 0;
    width: 44px; height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sub-toggle::before {
    content: '';
    width: 8px; height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s ease;
  }
  .has-sub.expanded .sub-toggle::before { transform: rotate(225deg) translateY(-2px); }
  .nav-links .sub {
    position: static;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    background: transparent;
    border-radius: 0;
    transition: grid-template-rows 0.3s ease;
  }
  .nav-links .sub > .sub-inner { overflow: hidden; }
  .nav-links .sub-inner { min-height: 0; }
  .has-sub.expanded .sub { grid-template-rows: 1fr; padding-bottom: 0.6rem; }
  .nav-links .sub li a { padding: 0.55rem 0 0.55rem 1rem; font-size: 0.95rem; white-space: normal; }
  .nav-links .sub li a:hover { background: transparent; }
  .nav-links .mobile-only { display: block; border-bottom: none; padding-top: 1.25rem; }
  .nav-links .mobile-only a.nav-cta { display: block; text-align: center; padding: 0.9rem; font-size: 0.95rem; text-transform: none; letter-spacing: 0; color: #fff; }
  body.menu-open { overflow: hidden; }
  .nav-right .nav-cta { display: none; }
}
@media (max-width: 640px) {
  nav.topbar { padding: 0.7rem 1.5rem; }
  nav.topbar.scrolled { padding: 0.55rem 1.5rem; }
  .brand-logo { height: 36px; }
  nav.topbar.scrolled .brand-logo { height: 32px; }
}
