/* CTB Bonn – clean static styles
   Brand: navy #1b1464 · brown #8c6239 · red #c0392b */

:root {
  --navy: #1b1464;
  --navy-dark: #120d47;
  --brown: #8c6239;
  --red: #c0392b;
  --ink: #23262f;
  --muted: #5b6070;
  --line: #e6e7ee;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --maxw: 1160px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(27, 20, 100, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover, a:focus-visible { color: var(--brown); text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #fff; font-size: .875rem; }
.topbar-inner { display: flex; gap: 24px; justify-content: flex-start; align-items: center; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: #d7d4f2; text-decoration: none; }
.topbar .ico { opacity: .8; }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; }
.logo img { width: 150px; height: auto; }

.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex; align-items: center; gap: 6px; padding: 10px 13px;
  font-weight: 600; color: var(--ink); border-radius: 8px; white-space: nowrap;
}
.nav-list > li > a:hover, .nav-list > li > a[aria-current="page"] { color: var(--navy); background: var(--bg-soft); text-decoration: none; }
.nav-label { display: inline; }
.nav-list strong { color: var(--brown); }

.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; }

.sub {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
  min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: .95rem; }
.sub a:hover, .sub a[aria-current="page"] { background: var(--bg-soft); color: var(--navy); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 40px; padding: 9px; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nav-toggle span { height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (Startseite) ---------- */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: center; padding-block: 44px; }
.hero-kicker { color: var(--brown); text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; font-weight: 700; margin: 0 0 .3em; }
.hero-text h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; color: var(--navy); margin: 0 0 .35em; }
.hero-lead { font-size: 1.12rem; color: var(--ink); max-width: 56ch; margin: 0 0 1.4em; }
.hero-media { display: flex; justify-content: center; }
.hero-media img { width: auto; max-width: 100%; max-height: 380px; border-radius: var(--radius); box-shadow: var(--shadow); }

.btn {
  display: inline-block; background: var(--navy); color: #fff; padding: 12px 24px;
  border-radius: 8px; font-weight: 600; border-bottom: 0;
}
.btn:hover, .btn:focus-visible { background: var(--brown); color: #fff; text-decoration: none; }

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; gap: 26px; padding-block: 32px; }
  .hero-media { order: -1; justify-content: flex-start; }
  .hero-media img { max-height: 320px; }
}

/* ---------- Main ---------- */
.site-main { padding: 32px 0 56px; }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brown); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Two-column pages use flex; text-only pages read as a single prose column */
.page-content.layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.page-content.layout > .col-main { flex: 1 1 58%; min-width: 0; }
.page-content.layout > .col-aside { flex: 1 1 26%; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.page-content.layout > .col-half { flex: 1 1 calc(50% - 20px); min-width: 0; }
.page-content.layout > hr { flex-basis: 100%; width: 100%; }
.page-content.layout > h1:first-child,
.page-content.layout > h2:first-child { flex-basis: 100%; }

.page-content.prose { max-width: 74ch; }

.page-content h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.2; color: var(--navy); margin: 0 0 .5em; }
.page-content h2 { font-size: 1.5rem; color: var(--navy); margin: 1.4em 0 .5em; }
.page-content h3 { font-size: 1.2rem; color: var(--brown); margin: 1.3em 0 .4em; }
.page-content h4 { font-size: 1.05rem; margin: 1.2em 0 .3em; }
.page-content p { margin: 0 0 1em; }
.page-content ul { margin: .4em 0 1.2em; padding-left: 1.2em; }
.page-content li { margin-bottom: .35em; }
.page-content li::marker { color: var(--brown); }
.page-content a { color: var(--navy); border-bottom: 1px solid rgba(27,20,100,.25); }
.page-content a:hover { color: var(--brown); border-color: var(--brown); text-decoration: none; }
.page-content strong { color: inherit; }
.page-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.1em 0; }
.page-content img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0; max-width: 100%; }
.col-aside { align-items: flex-start; }
.col-aside img { width: 100%; max-width: 440px; }

/* Home aside: controlled image gallery (right-floating on desktop, 2-up on mobile) */
.aside-media { width: 100%; display: flex; flex-direction: column; align-items: flex-end; gap: 20px; }
.aside-media a, .aside-media > img { display: block; width: 100%; max-width: 300px; margin: 0; }
.aside-media a img { display: block; width: 100%; height: auto; }
.col-main img { max-width: 460px; }

/* ---------- Profile (Über mich) ---------- */
.profile-hero {
  display: grid; grid-template-columns: 170px 1fr; gap: 30px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 28px; margin-bottom: 30px;
}
.profile-hero img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-hero__intro h1 { margin: 0 0 .2em; }
.profile-hero__role { font-size: 1.1rem; color: var(--ink); margin: 0 0 .35em; }
.profile-hero__meta { color: var(--muted); margin: 0; }

.prose-section { max-width: 74ch; margin-bottom: 30px; }
.prose-section .lead { font-size: 1.15rem; color: var(--ink); }

.credentials { display: flex; flex-wrap: wrap; gap: 20px; margin: .6em 0 0; }
.credentials .credential {
  display: flex; align-items: center; gap: 16px; flex: 1 1 calc(50% - 10px); min-width: 260px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); border-bottom: 1px solid var(--line);
}
.credentials .credential:hover { border-color: var(--brown); text-decoration: none; }
.credentials .credential img { width: 96px; height: auto; flex: none; box-shadow: none; border-radius: 6px; }
.credentials .credential span { font-size: .95rem; color: var(--muted); }

@media (max-width: 560px) {
  .profile-hero { grid-template-columns: 1fr; justify-items: start; text-align: left; padding: 22px 20px; }
  .profile-hero img { max-width: 200px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfd0e6; margin-top: 40px; }
.site-footer .container { padding-block: 44px 0; }

.partners { text-align: center; padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.12); }
.partners-title { color: #fff; font-size: 1.15rem; margin: 0 0 22px; font-weight: 600; }
.partner-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px; }
.partner-grid li { display: flex; align-items: center; }
.partner-grid img {
  height: 46px; width: auto; max-width: 150px; object-fit: contain;
  background: #fff; padding: 8px 12px; border-radius: 8px;
  filter: grayscale(1); opacity: .78; transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}
.partner-grid a:hover img { filter: grayscale(0); opacity: 1; transform: translateY(-2px); }

.footer-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 34px 0; }
.footer-col h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #cfd0e6; font-size: .95rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.copyright { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.copyright p { margin: 0; }
.legal-inline a { color: #cfd0e6; margin-left: 18px; }
.legal-inline a:first-child { margin-left: 0; }
.legal-inline a:hover { color: #fff; text-decoration: none; }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; z-index: 40;
  display: grid; place-items: center; background: var(--navy); color: #fff; border-radius: 50%;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s; font-size: 1.2rem;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--brown); color: #fff; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .page-content.layout { gap: 28px; }
  .page-content.layout > .col-main,
  .page-content.layout > .col-aside,
  .page-content.layout > .col-half { flex-basis: 100%; }
  .aside-media { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  .aside-media a, .aside-media > img { flex: 1 1 calc(50% - 8px); max-width: calc(50% - 8px); width: auto; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 82vw); background: #fff;
    transform: translateX(100%); transition: transform .25s ease; padding: 84px 18px 24px;
    box-shadow: -12px 0 34px rgba(0,0,0,.14); overflow-y: auto;
  }
  .site-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 2px; }
  .nav-list > li > a { padding: 12px 10px; }
  .sub {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 2px 0 6px 12px;
    padding: 2px 0 2px 8px; display: none;
  }
  .has-sub.expanded .sub { display: block; }
  .caret { margin-left: auto; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .topbar-inner { justify-content: center; gap: 16px; }
  .copyright { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
