/* Akademiker Finanzen – Farben: Dunkelblau, Sand, Gold */
:root {
  --navy: #1F3A5F;
  --navy-dark: #172c49;
  --sand: #E9DFCB;
  --sand-light: #F6F1E6;
  --gold: #B8924A;
  --gold-text: #7D5A1C;
  --text: #22304a;
  --muted: #3A4A63;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--sand-light);
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--gold-text); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.section { padding: 72px 0; }
.section--sand { background: var(--sand); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }

/* Header */
.site-header { background: var(--sand-light); border-bottom: 1px solid #ded3bb; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.logo img { display: block; height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; }

/* Buttons */
.btn { display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--navy); color: var(--sand-light); text-decoration: none; font-weight: 600; border: 2px solid var(--navy); min-height: 44px; }
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--sand-light); }
.btn--small { padding: 9px 18px; font-size: .92rem; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* Hero */
.hero { padding: 80px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero-card { background: var(--navy); color: var(--sand); border-radius: 20px; padding: 36px; }
.hero-card h2 { color: var(--sand); font-size: 1.4rem; }
.hero-card ul { margin: 0; padding: 0; list-style: none; }
.hero-card li { padding: 10px 0 10px 28px; position: relative; border-top: 1px solid rgba(233,223,203,.2); }
.hero-card li:first-child { border-top: 0; }
.hero-card li::before { content: ""; position: absolute; left: 0; top: 19px; width: 14px; height: 3px; background: #D4AF6A; border-radius: 2px; }

/* Cards */
.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border-radius: 16px; padding: 26px; border: 1px solid #e2d8c2; }
.section--sand .card { border-color: transparent; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card .tag { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--gold-text); margin-top: 14px; letter-spacing: .04em; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sand); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { background: var(--sand-light); border-radius: 16px; padding: 26px; }
.step::before { counter-increment: step; content: counter(step); display: flex; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--sand); align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; margin-bottom: 14px; }

/* Über mich */
.about { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; }
.portrait-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 20px; }
.portrait { aspect-ratio: 4 / 5; border-radius: 20px; background: var(--sand); border: 2px dashed #c9bb9a; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); font-size: .95rem; }

/* Kontakt */
.contact { background: var(--navy); color: var(--sand); border-radius: 24px; padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact h2 { color: var(--sand); }
.contact p { color: #d9ceb6; }
.contact a { color: #D4AF6A; }
.contact .btn { background: var(--sand); color: var(--navy); border-color: var(--sand); }
.contact .btn:hover { background: #fff; color: var(--navy); }
.contact dl { margin: 0; }
.contact dt { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #D4AF6A; margin-top: 14px; }
.contact dd { margin: 2px 0 0; }

/* Footer */
.site-footer { padding: 36px 0 48px; font-size: .9rem; color: var(--muted); }
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.note { font-size: .85rem; color: var(--muted); }

/* Rechtstexte */
.legal { padding: 56px 0 72px; max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.draft { background: #fff3d6; border: 1px solid #e3c675; border-radius: 12px; padding: 14px 18px; font-size: .92rem; margin-bottom: 28px; }

/* Responsive */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3, .steps { grid-template-columns: 1fr; }
  .hero-grid, .about, .contact { grid-template-columns: 1fr; }
  .about picture { max-width: 300px; }
  .contact { padding: 36px 26px; }
}
@media (max-width: 560px) {
  .grid--4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 48px 0; }
  .container { width: min(1120px, 100% - 32px); }
  body { font-size: 16px; }
  .logo img { height: 42px; width: auto; }
  .nav a:not(.btn) { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .btn { width: 100%; text-align: center; }
  .nav .btn { width: auto; }
  .btn-row { flex-direction: column; }
  .hero-card, .card, .step { padding: 22px; }
  .site-footer .links a { display: inline-block; padding: 8px 0; }
}

/* ---- Erweiterungen: Detailseiten, Blog, Barrierefreiheit ---- */
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.portrait-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 20px; }

/* Klickbare Karten */
.card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; position: relative; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(31, 58, 95, .12); color: inherit; }
.card-link h3, .card-link h3 a { color: var(--navy); text-decoration: none; }
.card-link .tag { align-self: flex-start; }
.card-link .more { margin-top: auto; padding-top: 16px; font-weight: 600; color: var(--navy); font-size: .95rem; }
.card-link .more::after { content: " \2192"; }
.card-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.stretched:focus-visible { outline: none; }
.card-link:has(.stretched:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Seitenkopf und Fließtext */
.page-head { background: var(--sand); padding: 40px 0 48px; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.prose h2 { margin-top: 1.8em; }
.prose > h2:first-child, .prose > .summary + h2 { margin-top: 1.2em; }
.prose h3 { font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .7em; }
.notice { background: #fff; border: 1px solid #e2d8c2; border-radius: 12px; padding: 14px 18px; font-size: .95rem; color: var(--muted); margin: 18px 0 0; }
.aud { background: #fff; border: 1px solid #e2d8c2; border-radius: 16px; padding: 22px 24px; margin: 0 0 16px; }
.aud h3 { margin: 0 0 .6em; }
.aud ul { margin: 0; padding-left: 1.2em; }
.aud li:last-child { margin-bottom: 0; }
details.faq { background: #fff; border: 1px solid #e2d8c2; border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--navy); min-height: 44px; }
details.faq p { margin: 0 0 16px; color: var(--muted); }
.cta-box { background: var(--navy); color: var(--sand); border-radius: 20px; padding: 32px; margin: 44px 0 24px; }
.cta-box h2 { color: var(--sand); margin-top: 0; font-size: 1.5rem; }
.cta-box p { color: #d9ceb6; }
.cta-box .btn { background: var(--sand); color: var(--navy); border-color: var(--sand); }
.cta-box .btn:hover { background: #fff; color: var(--navy); }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0 !important; }
.related li { margin: 0; }
.related a { display: block; padding: 14px 16px; background: #fff; border: 1px solid #e2d8c2; border-radius: 12px; text-decoration: none; font-weight: 600; min-height: 44px; }
.related a:hover { background: var(--sand); }

/* Blog */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--sand); color: var(--gold-text); }
.page-head .badge { background: #fff; }
.post-meta { font-size: .9rem; color: var(--muted); margin: 10px 0 8px; }
.post-card h3 { font-size: 1.2rem; }
.blog-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.post-list { display: grid; gap: 20px; }
.summary { background: var(--sand); border-radius: 16px; padding: 20px 24px; margin-bottom: 8px; }
.summary h2 { margin: 0 0 .5em; font-size: 1.2rem; }
.summary ul { margin: 0; }

@media (max-width: 960px) {
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .related { grid-template-columns: 1fr; }
  .page-head { padding: 28px 0 36px; }
  .cta-box { padding: 24px 20px; }
  .aud { padding: 18px; }
}
.post-card .badge { align-self: flex-start; }

/* ---- Popup-Fenster (Impressum, Terminbuchung) ---- */
html.modal-open { overflow: hidden; }
dialog.modal { border: 0; padding: 0; background: transparent; width: min(960px, 100% - 24px); max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; color: var(--text); overflow: visible; }
dialog.modal::backdrop { background: rgba(23, 44, 73, .62); }
.modal-box { background: var(--sand-light); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 22px; border-bottom: 1px solid #ded3bb; background: #fff; flex: none; }
.modal-title { margin: 0; font-size: 1.2rem; flex: 1; }
.modal-ext { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.modal-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sand); color: var(--navy); font-size: 1.9rem; line-height: 1; cursor: pointer; }
.modal-close:hover { background: var(--navy); color: #fff; }
.modal-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.modal-body { overflow: auto; padding: 8px 26px 28px; -webkit-overflow-scrolling: touch; }
.modal-body .legal { padding: 0; max-width: none; }
.modal-body .legal h2:first-child { margin-top: .6em; }
.modal-body--frame { padding: 0; overflow: hidden; height: min(80vh, 820px); height: min(80dvh, 820px); }
.modal-body--frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 560px) {
  dialog.modal { width: calc(100% - 16px); }
  .modal-head { padding-left: 16px; gap: 8px; }
  .modal-ext { font-size: .82rem; white-space: normal; text-align: right; }
  .modal-body { padding: 4px 18px 24px; }
  .modal-body--frame { padding: 0; height: 82vh; height: 82dvh; }
}
