/* ============================================================
   ASCLEPIOS EDITION – Haupt-Stylesheet
   Fonts: Playfair Display (Überschriften) + Inter (UI/Text)
   Icons: Bootstrap Icons (lokal)
   ============================================================ */

/* ── @font-face ── */
@font-face {
    font-family: 'Playfair Display';
    src: url('/assets/fonts/playfair-display-v40-latin_latin-ext-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Playfair Display';
    src: url('/assets/fonts/playfair-display-v40-latin_latin-ext-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Playfair Display';
    src: url('/assets/fonts/playfair-display-v40-latin_latin-ext-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ── CSS-Variablen ── */
:root {
    /* Light – akademisch: weiß/warmes Beige, Tinte dunkelblau */
    --bg:          #ffffff;
    --bg-card:     #ffffff;
    --bg-alt:      #f7f5f0;
    --bg-subtle:   #eeeae2;
    --text:        #1a1814;
    --text-muted:  #5a5450;
    --accent:      #1e3a5f;
    --accent-hover:#2a4f80;
    --accent-light:#e8eef5;
    --border:      #e0dbd0;
    --nav-bg:      #1a1814;
    --nav-text:    #f7f5f0;
    --nav-active:  #1e3a5f;
    --shadow:      0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
    --shadow-lg:   0 4px 24px rgba(0,0,0,.10);

    /* Typografie */
    --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Abstände */
    --space-xs:  .375rem;
    --space-sm:  .75rem;
    --space-md:  1.25rem;
    --space-lg:  2rem;
    --space-xl:  3.5rem;
    --space-2xl: 6rem;

    /* Layout */
    --max-w:   1100px;
    --radius:  .4rem;
    --radius-lg: .875rem;
    --transition: .18s ease;
}

/* Dark Mode – kühles Blau/Slate, keine Rottöne */
[data-theme="dark"] {
    --bg:          #0d0d12;
    --bg-card:     #15151e;
    --bg-alt:      #1c1c28;
    --bg-subtle:   #23232f;
    --text:        #e4e0d4;
    --text-muted:  #8a8880;
    --accent:      #6aaad4;
    --accent-hover:#82bde0;
    --accent-light:#0e1e30;
    --border:      #28283a;
    --nav-bg:      #0a0a10;
    --nav-text:    #e4e0d4;
    --nav-active:  #6aaad4;
    --shadow:      0 1px 4px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg:   0 4px 24px rgba(0,0,0,.45);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.25;
    color: var(--text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem);   font-weight: 700; }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem);  font-weight: 700; }

p + p { margin-top: .875rem; }
ul, ol { padding-left: 1.5rem; }

/* ── Skip-Link ── */
.skip-link {
    position: absolute; top: -100%; left: 1rem;
    background: var(--accent); color: #fff;
    padding: .5rem 1rem; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .875rem;
    z-index: 9999; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ── Container ── */
.container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

/* ── Site Header ── */
.site-header {
    background: var(--nav-bg);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-block: .75rem;
}

.logo-link { flex-shrink: 0; line-height: 0; text-decoration: none; }
.logo-link img { height: 42px; width: auto; }

/* ── Hauptnavigation ── */
.main-nav { margin-left: auto; }

.main-nav ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: .1rem;
}

.main-nav a {
    display: block;
    padding: .4rem .75rem;
    color: var(--nav-text);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .025em;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    background: var(--nav-active);
    color: #fff;
}

/* ── Theme Toggle ── */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    color: var(--nav-text);
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: border-color var(--transition), background var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }

[data-theme="light"] .icon-moon { display: inline; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="dark"]  .icon-sun  { display: inline; }
[data-theme="dark"]  .icon-moon { display: none; }

/* ── Hamburger ── */
.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 36px; height: 36px;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    margin-left: auto;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--nav-text); border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.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-alt);
    border-bottom: 1px solid var(--border);
    padding: var(--space-2xl) 0;
    text-align: center;
}

[data-theme="dark"] .hero {
    background: var(--bg-alt);
    border-bottom-color: var(--border);
}

.hero-logo {
    margin: 0 auto var(--space-lg);
    height: 70px;
    width: auto;
    /* kein filter – Logo in Originalfarben */
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 580px;
    margin-inline: auto;
    font-weight: 400;
}

/* ── Section-Cards (Startseite) ── */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
}

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    text-decoration: none; color: inherit;
}

.section-card-icon {
    font-size: 1.6rem;
    color: var(--accent);
    line-height: 1;
}

.section-card h2 {
    font-size: 1.15rem;
    color: var(--text);
    font-weight: 700;
}

.section-card p {
    font-size: .875rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
}

.card-arrow {
    margin-top: auto;
    font-size: .8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .03em;
    font-family: var(--font-sans);
}

/* ── Autor-Box ── */
.author-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    margin: 0 0 var(--space-xl);
}

.author-box img {
    width: 110px; height: 147px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.author-box h2 {
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
}

.author-box p {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.65;
}

/* ── Seitenheader (Unterseiten) ── */
.page-hero {
    background: var(--nav-bg);
    color: var(--nav-text);
    padding: var(--space-xl) 0;
    border-bottom: 3px solid var(--accent);
}

.page-hero h1 { color: #fff; margin-bottom: var(--space-xs); font-size: clamp(1.5rem, 4vw, 2.4rem); }
.page-hero p  { opacity: .75; font-size: 1rem; margin: 0; }

/* ── Inhaltsbereich ── */
.content-section { padding: var(--space-xl) 0; }
.content-section + .content-section { border-top: 1px solid var(--border); }

.section-intro {
    max-width: 780px;
    margin-bottom: var(--space-lg);
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.75;
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: clamp(1.15rem, 2.5vw, 1.6rem);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── PDF-Liste ── */
.pdf-list {
    list-style: none; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: .5rem;
}

.pdf-list li {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: .6rem .9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.pdf-list li:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.pdf-link {
    display: flex;
    align-items: center;
    gap: .45rem;
    text-decoration: none;
    color: var(--text);
    font-size: .85rem;
    flex: 1;
    min-width: 0;
}

.pdf-link:hover { color: var(--accent); }

.pdf-icon {
    flex-shrink: 0;
    color: var(--accent);
    font-size: 1rem;
}

.pdf-size {
    font-size: .75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.no-files { color: var(--text-muted); font-style: italic; font-size: .9rem; }

/* ── Info-Box ── */
.info-box {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    font-size: .95rem;
    line-height: 1.65;
}

/* ── Zwei-Spalten-Layout ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.two-col p {
    font-size: .95rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    padding: 0 0 var(--space-sm);
    font-family: var(--font-sans);
}
.breadcrumb a { color: rgba(255,255,255,.55); text-decoration: none; }
.breadcrumb a:hover { color: rgba(255,255,255,.9); }
.breadcrumb span { margin-inline: .35rem; }

/* ── Footer ── */
.site-footer { background: var(--nav-bg); color: var(--nav-text); margin-top: auto; }

.footer-inner {
    display: flex;
    gap: var(--space-xl);
    padding-block: var(--space-xl);
    flex-wrap: wrap;
    align-items: flex-start;
}

.footer-brand p { font-size: .85rem; opacity: .6; margin-top: var(--space-sm); line-height: 1.5; }
.footer-brand img { height: 38px; width: auto; }

.footer-nav { display: flex; gap: var(--space-xl); flex-wrap: wrap; margin-left: auto; }
.footer-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer-nav a {
    color: var(--nav-text); text-decoration: none;
    font-size: .85rem; opacity: .65;
    transition: opacity var(--transition);
}
.footer-nav a:hover { opacity: 1; color: var(--accent); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    padding-block: var(--space-md);
    font-size: .78rem;
    opacity: .5;
    font-family: var(--font-sans);
}

/* ── Legal ── */
.legal-content { max-width: 780px; padding-block: var(--space-xl); }
.legal-content h2 { margin-top: var(--space-lg); margin-bottom: var(--space-sm); }
.legal-content h3 { margin-top: var(--space-md); margin-bottom: .4rem; font-size: 1rem; }
.legal-content p, .legal-content ul { color: var(--text-muted); font-size: .95rem; line-height: 1.75; }
.legal-content ul { margin-top: .5rem; }

/* ── Fokus (Barrierefreiheit) ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Responsiv ── */
@media (max-width: 900px) {
    .two-col        { grid-template-columns: 1fr; }
    .author-box     { flex-direction: column; gap: var(--space-lg); }
    .footer-inner   { flex-direction: column; gap: var(--space-lg); }
    .footer-nav     { margin-left: 0; }
}

@media (max-width: 720px) {
    .nav-toggle  { display: flex; }
    .theme-toggle { order: 3; }

    .main-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--nav-bg);
        box-shadow: var(--shadow-lg);
        padding: var(--space-md);
        z-index: 99;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: .25rem; }
    .main-nav a  { font-size: .95rem; padding: .65rem 1rem; }

    .hero          { padding: var(--space-xl) 0; }
    .hero-logo     { height: 50px; }
    .sections-grid { grid-template-columns: 1fr; }
    .pdf-list      { grid-template-columns: 1fr; }
    .author-box    { padding: var(--space-lg); }
}

/* ── Print ── */
@media print {
    .site-header, .site-footer, .theme-toggle, .nav-toggle { display: none; }
    body { background: #fff; color: #000; }
    a { color: #000; }
}
