/* ============================================================
   Internistische Hausarztpraxis dr. med. univ. Albrecht Wenzel
   Bordeaux Apple-Inspired Design System — internist-wenzel.de
   ============================================================ */

/* ========== SELF-HOSTED INTER VARIABLE (DSGVO-konform) ========== */
/* Variable Font — ersetzt 12 statische Files mit einem File.
   Gewichtsbereich 100-900 stufenlos, modernes Optical Sizing.
   Statische Inter-Files bleiben als Fallback für ältere Browser. */
@font-face {
    font-family: 'InterVar';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-variable.woff2') format('woff2-variations'),
         url('fonts/inter-variable.woff2') format('woff2');
}

/* ========== STATISCHE INTER FALLBACKS (für Browser ohne variable font support) ========== */
/* latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/inter-300-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/inter-300-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-500-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/inter-800-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/inter-800-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Screen reader only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

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

:root {
    /* === LEGACY HEX-WERTE (bleiben für Backwards-Compat & Browser ohne OKLCH) === */
    --bordeaux: #7A1B2E;
    --bordeaux-light: #9B2545;
    --bordeaux-dark: #5A1020;
    --bordeaux-subtle: rgba(122,27,46,0.06);
    --text-primary: #1D1D1F;
    --text-secondary: #515154;
    --text-tertiary: #6E6E73;
    --bg-white: #F5F0E8;   /* softes warmes Elfenbein — Standard-Hintergrund (vorher #FFFFFF) */
    --bg-alt: #EFE8DC;     /* minimal tieferes Elfenbein für alternierende Sektionen (vorher #F5F5F7) */
    --bg-card: #FCFAF6;    /* warmes Off-White für Karten, hebt sich vom Hintergrund ab */
    --bg-dark: #161617;
    --card-border: rgba(0,0,0,0.06);
    --radius: 20px;
    --radius-sm: 14px;
    --radius-pill: 980px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
    --shadow-md: 0 8px 30px rgba(0,0,0,.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.1);
    --transition: .4s cubic-bezier(.25,.46,.45,.94);
    --transition-bounce: .5s cubic-bezier(.34,1.56,.64,1);
    /* Legacy aliases (used in some inline styles) */
    --primary: #7A1B2E;
    --gray-50: #F9FAFB;
    --gray-200: #E5E7EB;
    --gray-600: #4B5563;
}

/* === MODERNE OKLCH-PALETTE (additiv, Browser mit @supports) ===
   Bordeaux-Skala mit 8 mathematisch berechneten Lightness-Stufen.
   Chroma 0.10-0.16 sorgt für satte aber nicht aufdringliche Farbe.
   Hue 12° entspricht dem bestehenden Bordeaux-Ton. */
@supports (color: oklch(0% 0 0)) {
    :root {
        --bdx-900: oklch(28% 0.10 12);   /* sehr dunkel — Buttons hover */
        --bdx-800: oklch(34% 0.12 12);   /* dunkel — bordeaux-dark Ersatz */
        --bdx-700: oklch(40% 0.14 12);   /* primary dunkel */
        --bdx-600: oklch(46% 0.15 12);   /* primary — Bordeaux-Mitte */
        --bdx-500: oklch(52% 0.16 12);   /* hell für Hover-Highlights */
        --bdx-400: oklch(64% 0.14 12);   /* heller — Akzente */
        --bdx-300: oklch(76% 0.10 12);   /* helle Tints */
        --bdx-200: oklch(86% 0.06 12);   /* Hintergrund-Akzente */
        --bdx-100: oklch(94% 0.03 12);   /* sehr subtil — Badge-Backgrounds */
        --bdx-50:  oklch(98% 0.01 12);   /* whisper — Hover-Backgrounds */

        /* Neutrale Graustufen, ebenfalls OKLCH-konsistent */
        --neutral-900: oklch(22% 0.005 250);
        --neutral-700: oklch(40% 0.005 250);
        --neutral-500: oklch(60% 0.005 250);
        --neutral-300: oklch(85% 0.005 250);
        --neutral-100: oklch(96% 0.003 250);
        --neutral-50:  oklch(98% 0.002 250);
    }
}

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

body {
    font-family: 'InterVar', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-feature-settings: 'cv11', 'ss01'; /* alternate digits + single-story a (subtil moderner) */
    color: var(--text-primary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.7;
    letter-spacing: -0.005em; /* minimal tighter, professioneller */
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Body text links should be visible */
.content-main a:not(.btn):not(.sidebar-link) {
    color: var(--bordeaux); font-weight: 400;
    text-decoration: underline; text-decoration-color: rgba(122,27,46,.3);
    text-underline-offset: 2px; transition: text-decoration-color .2s;
}
.content-main a:not(.btn):not(.sidebar-link):hover {
    text-decoration-color: var(--bordeaux);
}

/* --- Apple Typography --- */
h1, h2, h3, h4 {
    line-height: 1.12;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.03em;
    /* Deutsche Bandwurm-Wörter sauber umbrechen (Körperzusammensetzungsanalyse, GLP-1-Rezeptoragonisten, etc.) */
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    -webkit-hyphenate-limit-chars: 8 3 3;
    hyphenate-limit-chars: 8 3 3;
}
h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.06;
}
h1 em { font-style: normal; color: var(--bordeaux); }
h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    margin-bottom: 1.2rem;
}
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; letter-spacing: -.01em; }
p  { margin-bottom: 1rem; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 3rem; }

/* ========== OVERLINE (section label) ========== */
.section-overline {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .12em; color: var(--bordeaux); margin-bottom: 1.2rem;
}

/* ========== INFO-BANNER (Urlaub, Umzug, etc.) ========== */
.info-banner {
    position: fixed; top: 56px; left: 0; width: 100%; z-index: 999;
    background: var(--bordeaux);
    color: #fff; text-align: center;
    padding: .5rem 1rem;
    font-size: .78rem; font-weight: 400; line-height: 1.5;
    letter-spacing: .01em;
}
.info-banner strong { font-weight: 600; }
.info-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.info-banner a:hover { opacity: .85; }
/* Wenn kein Banner aktiv: display:none setzen oder das Element entfernen */
/* .info-banner { display: none; } */

/* Banner vorhanden → Hero weiter nach unten */
.info-banner + section.hero,
.info-banner ~ section.hero { padding-top: 110px; }

/* ========== NAVIGATION (frosted glass) ========== */
.site-nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(251,243,232,.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: .5px solid rgba(0,0,0,.08);
    transition: background .3s;
}
.site-nav.scrolled {
    background: rgba(251,243,232,.92);
}

.nav-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 3rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}

.nav-logo { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.nav-ekg { flex-shrink: 0; transition: transform .3s; }
.nav-logo:hover .nav-ekg { transform: scale(1.08); }
.nav-logo span {
    font-weight: 700; font-size: 1.1rem; color: var(--bordeaux);
    letter-spacing: -.02em;
}
.nav-logo .nav-subtitle {
    font-weight: 300; font-size: .85rem; color: var(--text-secondary);
    margin-left: .4rem;
}

/* Footer logo */
.footer-logo { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.footer-logo img { height: 44px; width: auto; border-radius: 8px; }

.nav-links { display: flex; gap: .25rem; list-style: none; }
.nav-links a {
    padding: .4rem .85rem; border-radius: var(--radius-pill);
    font-size: .84rem; font-weight: 400; color: var(--text-secondary);
    transition: all .2s; position: relative; text-decoration: none;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); font-weight: 500; }

.nav-cta {
    background: var(--bordeaux); color: white !important; text-decoration: none;
    font-size: .8rem; font-weight: 500; padding: .5rem 1.2rem;
    border-radius: var(--radius-pill); transition: all .2s;
    display: inline-flex; align-items: center; gap: .4rem;
}
.nav-cta:hover { background: var(--bordeaux-light); transform: scale(1.02); }

/* Language Switch — mit echter SVG-Flagge */
.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .55rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    transition: all .2s ease;
    text-decoration: none;
    background: transparent;
}
.lang-switch:hover {
    border-color: var(--bordeaux);
    background: rgba(122, 27, 46, 0.03);
}
.lang-switch .flag {
    display: block;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: fill;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
    transition: transform .2s ease;
}
.lang-switch:hover .flag {
    transform: scale(1.08);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > 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); margin-left: 4px; margin-bottom: 2px; opacity: .4;
}
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
    background: rgba(251,243,232,.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: var(--radius-sm); border: 1px solid var(--card-border);
    box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: .5rem;
    min-width: 220px; opacity: 0; visibility: hidden;
    transition: all .25s cubic-bezier(.16,1,.3,1);
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu a {
    display: block; padding: .55rem 1rem; font-size: .82rem;
    border-radius: 10px; color: var(--text-secondary);
}
.dropdown-menu a:hover { background: var(--bordeaux-subtle); color: var(--bordeaux); }

/* Mobile toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .75rem; min-width: 44px; min-height: 44px; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text-primary); margin: 5px auto; transition: var(--transition); border-radius: 2px; }

/* ========== BUTTONS (Apple pill-style) ========== */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .95rem; font-weight: 500; font-family: inherit;
    cursor: pointer; border: none;
    transition: all .3s; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--bordeaux); color: white;
    padding: .9rem 2rem; border-radius: var(--radius-pill);
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute; top: -50%; left: -60%; width: 40%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transform: skewX(-20deg); transition: left .6s ease;
    pointer-events: none;
}
.btn-primary:hover::after { left: 120%; }
.btn-primary:hover {
    background: var(--bordeaux-light);
    transform: translateY(-1px); box-shadow: 0 4px 20px rgba(122,27,46,.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: transparent; color: var(--bordeaux);
    padding: .9rem 2rem; border-radius: var(--radius-pill);
    border: 1.5px solid rgba(122,27,46,.3); transition: all .3s;
}
.btn-outline:hover { border-color: var(--bordeaux); background: var(--bordeaux-subtle); }

.btn-ghost {
    background: none; color: var(--bordeaux);
    padding: .5rem 0; font-weight: 500; position: relative;
}
.btn-ghost::after {
    content: ''; position: absolute; bottom: 2px; left: 0;
    width: 0; height: 1.5px; background: var(--bordeaux);
    transition: width .3s;
}
.btn-ghost:hover::after { width: 100%; }

/* Arrow animation */
.btn .arrow { transition: transform var(--transition-bounce); display: inline-block; }
.btn:hover .arrow { transform: translateX(5px); }

/* ========== HERO (Full-width split) ========== */
/* ========== HERO (typographic) ========== */
.hero {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    text-align: center; padding: 80px 2rem 3rem;
    position: relative; overflow: hidden;
}
.hero-light {
    background: var(--bg-white);
}
.hero-light::before {
    content: ''; position: absolute;
    top: 38%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 500px;
    background: radial-gradient(ellipse, rgba(122,27,46,.04) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content {
    position: relative; z-index: 1; max-width: 800px;
}

/* EKG decorative element */
.hero-ekg {
    width: 160px; height: 44px;
    margin: 0 auto 2rem;
    opacity: 0; animation: fadeUp .6s .1s forwards;
}
.hero-ekg svg { width: 100%; height: 100%; overflow: visible; }
.ekg-trace {
    fill: none; stroke: var(--bordeaux);
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 300; stroke-dashoffset: 300;
    animation: ekgDraw 1.6s .3s cubic-bezier(.4,0,.2,1) forwards;
}
.ekg-glow {
    fill: none; stroke: var(--bordeaux);
    stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
    opacity: .12; filter: blur(3px);
    stroke-dasharray: 300; stroke-dashoffset: 300;
    animation: ekgDraw 1.6s .3s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes ekgDraw { to { stroke-dashoffset: 0; } }

/* Practice name */
.hero-practice {
    font-size: clamp(.72rem, 1.2vw, .88rem);
    font-weight: 500; text-transform: uppercase;
    letter-spacing: .28em; color: var(--text-tertiary);
    margin-bottom: 1.8rem;
    opacity: 0; transform: translateY(16px); animation: fadeUp .7s .2s forwards;
}

/* Doctor name */
.hero-name {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 200; letter-spacing: .04em;
    line-height: 1.25; color: var(--text-secondary);
    margin-bottom: .6rem;
    opacity: 0; transform: translateY(20px); animation: fadeUp .7s .35s forwards;
}
.hero-name strong { font-weight: 600; color: var(--text-primary); }

/* Location */
.hero-location {
    font-size: .82rem; font-weight: 400;
    letter-spacing: .06em; color: var(--text-tertiary);
    margin-bottom: 3rem;
    opacity: 0; transform: translateY(16px); animation: fadeUp .7s .45s forwards;
}

/* Vertical separator */
.hero-separator {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, rgba(122,27,46,.4), transparent);
    margin: 0 auto 2.5rem;
    opacity: 0; animation: fadeUp .7s .5s forwards;
}

/* Badges */
.hero-light .hero-badges {
    display: flex; flex-wrap: wrap; gap: .5rem;
    justify-content: center; margin-bottom: 2.8rem;
    opacity: 0; transform: translateY(16px); animation: fadeUp .7s .6s forwards;
}
.hero-light .hero-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .9rem; border-radius: var(--radius-pill);
    font-size: .72rem; font-weight: 500;
    background: var(--bordeaux-subtle); color: var(--bordeaux);
    border: 1px solid transparent; transition: all .3s;
}
.hero-light .hero-badge:hover {
    background: var(--bordeaux); color: white;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(122,27,46,.2);
}
.hero-light .hero-badge .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--bordeaux-light);
    animation: pulse 2.5s ease-in-out infinite;
}

/* CTAs */
.hero-ctas {
    display: flex; gap: 1rem; justify-content: center;
    opacity: 0; transform: translateY(16px); animation: fadeUp .7s .75s forwards;
}

/* Legacy hero-image (for subpages if needed) */
.hero-image {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #E8D5D9 0%, #D4B5BC 100%);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ========== STATS BAR (dark) ========== */
.stats-bar {
    background: var(--bg-dark); padding: 3rem 0;
}
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 2rem; text-align: center;
}
.stat-item { text-align: center; }
.stat-number {
    font-size: 2.2rem; font-weight: 700; color: white;
    letter-spacing: -.03em;
}
.stat-number span { color: var(--bordeaux-light); }
.stat-label { font-size: .82rem; color: rgba(255,255,255,.5); font-weight: 300; margin-top: .3rem; }

/* ========== SECTION DEFAULTS ========== */
section { padding: 7rem 0; }
.section-header {
    max-width: 600px; margin-bottom: 3.5rem;
}
.section-header.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-header h2 { margin-bottom: .5rem; }
.section-header p { color: var(--text-secondary); font-size: .95rem; font-weight: 400; line-height: 1.6; }

/* ========== SERVICE CARDS (expandable) ========== */
.services-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.service-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 2.25rem;
    cursor: pointer; transition: all .4s cubic-bezier(.25,.46,.45,.94);
    position: relative; overflow: hidden;
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.04);
    text-decoration: none; display: block; color: inherit;
}
.service-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--bordeaux); transform: scaleX(0); transition: transform .4s;
    transform-origin: left;
}
.service-card:hover::after { transform: scaleX(1); }
.service-card:hover {
    background: rgba(122,27,46,.03); border-color: rgba(122,27,46,.12);
    box-shadow: 0 20px 50px rgba(122,27,46,.10), 0 8px 20px rgba(0,0,0,.05);
    transform: translateY(-5px);
}

.card-icon-wrap {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--bordeaux-subtle); display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.2rem; transition: all .3s;
}
.card-icon-wrap svg { width: 24px; height: 24px; stroke: var(--bordeaux); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card:hover .card-icon-wrap {
    background: var(--bordeaux);
}
.service-card:hover .card-icon-wrap svg { stroke: white; }

/* Legacy icon support */
.service-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--bordeaux-subtle); display: flex;
    align-items: center; justify-content: center;
    margin-bottom: 1.2rem; color: var(--bordeaux);
    transition: all .3s;
}
.service-card:hover .service-icon {
    background: var(--bordeaux); color: white;
}
.service-card:hover .service-icon svg { stroke: white; }

.service-card h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.service-card p, .service-card .card-short {
    font-size: .88rem; color: var(--text-secondary); line-height: 1.55; font-weight: 400;
}

.expand-link, .service-link {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; font-weight: 500; color: var(--bordeaux);
    margin-top: 1rem; transition: gap .3s; cursor: pointer;
}
.service-card:hover .expand-link,
.service-card:hover .service-link { gap: .6rem; }

.igel-badge {
    display: inline-block; padding: .2rem .6rem; border-radius: var(--radius-pill);
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    background: rgba(122,27,46,.08); color: var(--bordeaux);
    letter-spacing: .5px; margin-top: .5rem;
}

/* ========== CONNECTIONS / NETWORK (dark section) ========== */
.connections-section {
    background: var(--bg-dark);
    color: white; overflow: hidden; position: relative;
}
.connections-section::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(122,27,46,.1) 0%, transparent 60%);
    pointer-events: none;
}
.connections-section h2 { color: white; }
.connections-section p { color: rgba(255,255,255,.55); }
.connections-section .section-overline { color: rgba(255,255,255,.4); }

.connection-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.connection-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius-sm); padding: 1.5rem;
    transition: all .3s; backdrop-filter: blur(8px);
    text-decoration: none; display: block;
}
/* Nur Partner-Karten (mit Logo) zentrieren — Themen-Karten bleiben links-bündig */
.connection-card:has(.connection-logo) {
    text-align: center;
}
.connection-card:hover {
    background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12);
    transform: translateY(-3px); box-shadow: 0 20px 40px rgba(0,0,0,.2);
}
/* Partner-Logo oben in der Karte — weiße Fläche, damit das Logo lesbar bleibt */
.connection-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    height: 60px;
    margin-bottom: 0.75rem;
}
.connection-logo img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.connection-card h3 { color: var(--bordeaux-light); font-size: 1rem; margin-bottom: .5rem; }
.connection-card p { font-size: .85rem; color: rgba(255,255,255,.45); line-height: 1.6; font-weight: 400; }
.connection-arrow {
    color: var(--bordeaux-light); font-size: .78rem; font-weight: 500;
    margin-top: 1rem; display: inline-flex; align-items: center; gap: .3rem;
}

/* ========== APPROACH / TIMELINE ========== */
.approach-timeline {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    position: relative; margin-top: 3rem;
}
.approach-timeline::before {
    content: ''; position: absolute;
    top: 28px; left: 5%; right: 5%;
    height: 2px;
    background: linear-gradient(90deg, var(--bordeaux), rgba(122,27,46,.1));
}
.timeline-step { text-align: center; position: relative; padding: 0 1.5rem; }
.step-dot, .step-number {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--bordeaux), var(--bordeaux-light));
    color: white; font-size: 1.2rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(122,27,46,.2);
    position: relative; z-index: 1;
    transition: all var(--transition-bounce);
}
.timeline-step:hover .step-dot,
.timeline-step:hover .step-number {
    transform: scale(1.12); box-shadow: 0 8px 30px rgba(122,27,46,.35);
}
.timeline-step h3, .timeline-step h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.timeline-step p { font-size: .85rem; color: var(--text-secondary); font-weight: 400; line-height: 1.5; }

/* ========== QUALIFICATIONS (dark section) ========== */
.qual-section { background: var(--bg-dark); padding: 7rem 0; overflow: hidden; }
.qual-inner {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 5rem; align-items: center;
}
.qual-text h2 { color: white; }
.qual-text p { font-size: 1rem; font-weight: 300; line-height: 1.7; color: rgba(255,255,255,.55); max-width: 500px; }

.qual-badges-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 2.5rem;
}
.qual-badge {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius-sm); padding: 1.2rem 1rem;
    transition: all .3s;
}
.qual-badge:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); transform: translateY(-2px); }
.badge-year {
    font-size: .68rem; font-weight: 600; color: var(--bordeaux-light);
    background: rgba(155,37,69,.12); display: inline-block;
    padding: .15rem .5rem; border-radius: var(--radius-pill); margin-bottom: .4rem;
}
.badge-title { font-size: .9rem; font-weight: 600; color: white; margin-bottom: .15rem; }
.badge-source { font-size: .72rem; color: rgba(255,255,255,.35); font-weight: 300; }

/* ========== FEATURE HIGHLIGHT (Samsung V5 etc.) ========== */
.feature-highlight {
    background: var(--bg-alt); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--card-border);
}
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; }
.feature-image {
    background: linear-gradient(135deg, #E8D5D9, #D4B5BC);
    display: flex; align-items: center; justify-content: center;
    min-height: 400px; padding: 2rem; position: relative;
}
.feature-image .device-label {
    position: absolute; bottom: 1rem; right: 1rem;
    background: rgba(0,0,0,.6); color: white;
    padding: .4rem 1rem; border-radius: var(--radius-pill);
    font-size: .68rem; font-weight: 600;
    backdrop-filter: blur(8px);
}
.feature-content { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.feature-content h2 { margin-bottom: .75rem; }
.feature-content p { color: var(--text-secondary); font-weight: 400; margin-bottom: 1.5rem; }

.feature-specs {
    display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
}
.spec-item {
    background: white; border-radius: var(--radius-sm);
    padding: 1rem; border: 1px solid var(--card-border);
    transition: all .3s;
}
.spec-item:hover { border-color: var(--bordeaux); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.spec-item strong { font-size: .78rem; color: var(--bordeaux); display: block; margin-bottom: .2rem; }
.spec-item span { font-size: .73rem; color: var(--text-secondary); line-height: 1.4; }

/* --- Samsung Feature Blocks --- */
.samsung-feature-block { transition: box-shadow .25s ease, transform .25s ease; }
.samsung-feature-block:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.samsung-feature-block h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.samsung-feature-block p { font-size: .88rem; color: var(--text-secondary); line-height: 1.65; }
.samsung-feature-block img { box-shadow: 0 2px 12px rgba(0,0,0,.12); transition: transform .3s ease; }
.samsung-feature-block img:hover { transform: scale(1.03); }

/* --- seca BIA Gallery --- */
.seca-device-showcase { transition: box-shadow .25s ease; }
.seca-device-showcase:hover { box-shadow: var(--shadow-md); }
.bia-tab { transition: all .2s ease !important; }
.bia-tab:hover:not(.active) { border-color: var(--bordeaux, #7A1B2E) !important; color: var(--bordeaux, #7A1B2E) !important; }
.bia-tab-content { transition: min-height .3s ease; }
.bia-tab-content img { transition: transform .3s ease; }
.bia-tab-content img:hover { transform: scale(1.03); }
.seca-verlauf-block { transition: box-shadow .25s ease, transform .25s ease; }
.seca-verlauf-block:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.seca-dashboard-block img { transition: transform .4s ease; }
.seca-dashboard-block:hover img { transform: scale(1.02); }

/* ========== SUBPAGE HERO ========== */
.page-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-white) 100%);
    border-bottom: 1px solid var(--card-border);
}
.page-hero .breadcrumb {
    font-size: .82rem; color: var(--text-tertiary); margin-bottom: 1.25rem;
}
.page-hero .breadcrumb a {
    color: var(--bordeaux); font-weight: 500;
    padding: .25rem .1rem; /* tap target padding */
}
.page-hero .breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 { margin-bottom: 1.25rem; }
.page-hero .lead { font-size: 1.1rem; color: var(--text-secondary); max-width: 720px; line-height: 1.85; font-weight: 400; }

/* ========== SUBPAGE CONTENT ========== */
.content-section { padding: 3.5rem 0; }
.content-section + .content-section { border-top: 1px solid var(--card-border); }

.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; align-items: start; }
.content-main h2 { margin-top: 2.5rem; }
.content-main h2:first-child { margin-top: 0; }
.content-main p { font-weight: 400; color: var(--text-secondary); line-height: 1.7; }
.content-main ul, .content-main ol { margin: 1rem 0 1.5rem 1.5rem; }
.content-main li { margin-bottom: .6rem; font-size: .93rem; color: var(--text-secondary); line-height: 1.6; font-weight: 400; }
.content-main li strong { color: var(--text-primary); font-weight: 600; }

/* Sidebar */
.content-sidebar { position: sticky; top: 80px; }
.sidebar-card {
    background: var(--bg-card); border-radius: 16px;
    padding: 1.5rem 1.6rem; margin-bottom: 1.2rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 10px 28px rgba(0,0,0,.05);
    transition: var(--transition);
}
/* Eyebrow-Label mit Trennlinie darunter */
.sidebar-card h4 {
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .15em;
    color: var(--bordeaux); margin: 0; padding-bottom: .55rem;
    border-bottom: 1px solid var(--card-border);
}
.sidebar-card p { font-size: .82rem; color: var(--text-secondary); font-weight: 300; margin-top: .7rem; }
/* Verwandte Links als saubere, einzeln tappbare Zeilen */
.sidebar-link {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .85rem 0; border-bottom: 1px solid var(--card-border);
    font-size: .9rem; font-weight: 500; color: var(--text-primary);
    transition: color .25s, padding-left .3s; text-decoration: none;
    min-height: 44px;
}
.sidebar-card h4 + .sidebar-link { padding-top: .65rem; }
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { color: var(--bordeaux); padding-left: .35rem; }
.sidebar-link .arrow { margin-left: auto; flex: none; color: var(--bordeaux); font-size: .8rem; transition: transform .3s; }
.sidebar-link:hover .arrow { transform: translateX(5px); }

/* ---------- Glasfenster-Karten (z. B. Qualifikationen auf „Über mich") ---------- */
.qual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 2rem 0; }
.qual-card {
    padding: 1.5rem 1.6rem; border-radius: 16px;
    background: rgba(255,255,255,.45);
    -webkit-backdrop-filter: saturate(150%) blur(16px);
    backdrop-filter: saturate(150%) blur(16px);
    border: 1px solid rgba(255,255,255,.55);
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 34px rgba(0,0,0,.06);
}
.qual-card h4 {
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .15em;
    color: var(--bordeaux); margin: 0; padding-bottom: .55rem; border-bottom: 1px solid var(--card-border);
}
.qual-card ul { list-style: none; padding: 0; margin: 0; }
.qual-card li { font-size: .9rem; color: var(--text-secondary); line-height: 1.4; padding: .65rem 0; border-bottom: 1px solid var(--card-border); }
.qual-card li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 600px) { .qual-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* Info Box */
.info-box {
    background: var(--bordeaux-subtle); border-left: 3px solid var(--bordeaux);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.info-box.igel {
    background: rgba(122,27,46,.04); border-color: var(--bordeaux-dark);
}
.info-box strong { display: block; font-size: .85rem; margin-bottom: .3rem; color: var(--text-primary); }
.info-box p { font-size: .85rem; color: var(--text-secondary); margin: 0; font-weight: 400; }

/* ========== CONTACT ========== */
.contact-section { background: var(--bg-alt); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-card {
    background: white; border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow-sm);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-card h3 { margin-bottom: 1.5rem; }
.contact-row { display: flex; gap: 1rem; margin-bottom: 1.2rem; align-items: start; }
.contact-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--bordeaux-subtle); display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--bordeaux);
}
.contact-icon svg { width: 16px; height: 16px; }
.contact-detail strong { display: block; font-size: .85rem; color: var(--text-primary); }
.contact-detail span, .contact-detail a { font-size: .85rem; color: var(--text-secondary); font-weight: 400; }
.contact-detail a:hover { color: var(--bordeaux); }

.hours-table { width: 100%; margin-top: .75rem; }
.hours-table tr td { padding: .4rem 0; font-size: .85rem; color: var(--text-secondary); font-weight: 400; }
.hours-table tr td:first-child { font-weight: 500; color: var(--text-primary); width: 45%; }
.hours-table tr th { padding: .4rem 0; font-size: .85rem; font-weight: 500; color: var(--text-primary); width: 45%; text-align: left; vertical-align: top; }

/* Compact contact bar (subpages) */
.compact-contact {
    background: var(--bg-dark); padding: 2rem 0; margin-top: 2rem;
}
.compact-contact-inner {
    display: flex; justify-content: center; gap: 3rem;
    flex-wrap: wrap; align-items: center;
}
.compact-contact-item {
    display: flex; align-items: center; gap: .75rem;
    color: rgba(255,255,255,.6); font-size: .85rem; font-weight: 300;
}
.compact-contact-item svg { width: 16px; height: 16px; stroke: var(--bordeaux-light); fill: none; stroke-width: 1.8; }
.compact-contact-item a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
.compact-contact-item a:hover { color: white; }

/* Emergency */
.emergency-bar {
    background: var(--bordeaux-dark); color: white;
    padding: 1rem 0; text-align: center; font-size: .85rem; font-weight: 300;
}
.emergency-bar strong { font-weight: 600; }
.emergency-bar a { color: white; font-weight: 600; text-decoration: underline; }

/* ========== FOOTER ========== */
.site-footer {
    background: var(--bg-dark); color: rgba(255,255,255,.4);
    padding: 3rem 0;
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
    color: rgba(255,255,255,.5); font-size: .82rem;
    text-decoration: none; transition: color .2s;
    padding: .4rem .25rem; /* tap target */
}
.footer-links a:hover { color: rgba(251,243,232,.8); }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.35); font-weight: 300; }

/* --- Quellenangaben / References --- */
.references-section {
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}
.references-section h3 {
    font-size: .85rem; font-weight: 600; color: var(--text-secondary);
    letter-spacing: .03em; text-transform: uppercase; margin-bottom: 1rem;
}
.references-section ol {
    list-style: decimal; padding-left: 1.5rem; margin: 0;
}
.references-section li {
    font-size: .78rem; color: var(--text-tertiary); line-height: 1.7;
    margin-bottom: .5rem; font-weight: 300;
}
.references-section li a {
    color: var(--primary); text-decoration: none;
}
.references-section li a:hover { text-decoration: underline; }
sup.ref { font-size: .75em; color: var(--primary); font-weight: 600; cursor: default; }

/* Extended footer (homepage) */
.footer-extended .footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 3rem;
    margin-bottom: 2rem; padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-brand strong { color: white; font-size: .95rem; }
.footer-brand p { font-size: .8rem; line-height: 1.7; margin-top: .75rem; max-width: 320px; }
.footer-col h4, .footer-col .footer-h { color: rgba(255,255,255,.7); font-size: .82rem; font-weight: 600; margin-bottom: 1rem; letter-spacing: .02em; }
.footer-col a {
    display: block; font-size: .8rem; padding: .3rem 0;
    color: rgba(255,255,255,.4); transition: all .2s; text-decoration: none;
}
.footer-col a:hover { color: var(--bordeaux-light); transform: translateX(3px); }
.footer-hours-item {
    display: block; font-size: .8rem; padding: .25rem 0;
    color: rgba(255,255,255,.4); line-height: 1.5;
}
/* Höhere Spezifität als .footer-col a, sonst wird display:block und padding:.3rem 0 ererbt */
.footer-col a.footer-doctolib-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    margin-top: 1.25rem; background: var(--bordeaux); color: white !important;
    font-size: .78rem; font-weight: 600; padding: .6rem 1.15rem;
    border-radius: var(--radius-pill); text-decoration: none;
    transition: all .2s; transform: none !important;
    width: auto; align-self: flex-start;
}
.footer-col a.footer-doctolib-btn:hover {
    background: var(--bordeaux-light); opacity: 1; transform: none !important;
}

/* ========== ANIMATIONS ========== */
.reveal {
    opacity: 0; transform: translateY(35px);
    transition: all .7s cubic-bezier(.25,.46,.45,.94);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-scale {
    opacity: 0; transform: scale(.95);
    transition: all .7s cubic-bezier(.25,.46,.45,.94);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

.reveal-left {
    opacity: 0; transform: translateX(-30px);
    transition: all .7s cubic-bezier(.25,.46,.45,.94);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
    opacity: 0; transform: translateX(30px);
    transition: all .7s cubic-bezier(.25,.46,.45,.94);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Staggered delays */
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }
.reveal-d5 { transition-delay: .5s; }

/* ========== RESPONSIVE — TABLET (max 1024px) ========== */
@media (max-width: 1024px) {
    .hero-name { font-size: 2.2rem; }
    .hero-image { min-height: 50vh; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .qual-inner { grid-template-columns: 1fr; }
    .qual-badges-row { grid-template-columns: repeat(2, 1fr); }
    .approach-timeline { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .approach-timeline::before { display: none; }
    .connection-cards { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .content-sidebar { position: static; }
    .footer-extended .footer-grid { grid-template-columns: 1fr 1fr; }
    .container { padding: 0 2rem; }
    /* nav-inner padding wird ab 1150px vom Hamburger-Block übernommen */
    section { padding: 5rem 0; }
}

/* ========== RESPONSIVE — DESKTOP-NAV KOMPAKTER (1025-1100px) ========== */
/*
   Bei knapper Desktop-Breite die Nav-Links kompakter machen, damit sie ohne Hamburger passen.
*/
@media (max-width: 1100px) and (min-width: 1025px) {
    .nav-inner { padding: 0 1rem; }
    .nav-links { gap: .1rem; }
    .nav-links a { padding: .45rem .55rem; font-size: .85rem; }
    .nav-logo span { font-size: .9rem; }
    .nav-cta { font-size: .78rem; padding: .42rem 1rem; }
}

/* ========== RESPONSIVE — HAMBURGER NAV (max 1024px) ========== */
/*
   Hamburger-Menü greift ab iPad-quer (1024) abwärts. Größere Tablets (iPad Pro 1180px) und
   alle Laptops (1280+) behalten die Desktop-Nav. Alle Hamburger-Styles (Hide, Toggle, Overlay)
   leben in DIESEM Block.
*/
@media (max-width: 1024px) {
    /* --- Nav-Bar kompakt --- */
    .nav-inner {
        height: 52px; padding: 0 1.5rem;
        /* Neues Layout: logo [links] | doctolib-btn | hamburger [rechts] */
    }
    .nav-ekg { width: 30px; height: 12px; }
    .nav-logo span { font-size: .95rem; }

    /* Nav-Links verstecken */
    .nav-links { display: none; }

    /* Lang-Switch verstecken (weniger Gedränge) */
    .lang-switch { display: none; }

    /* Doctolib-Button + Toggle: per order & margin-left auto → [logo] [gap] [btn] [☰] */
    .nav-cta {
        order: 2;
        margin-left: auto;
        margin-right: .75rem;
        font-size: .75rem;
        padding: .42rem 1rem;
    }

    /* Hamburger-Toggle ganz rechts */
    .nav-toggle { order: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; }

    /* --- Aufgeklapptes Menü-Overlay --- */
    .nav-links.open {
        display: flex !important;
        flex-direction: column;
        gap: .25rem;
        position: fixed;
        top: 52px; left: 0; right: 0;
        background: rgba(251,243,232,.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: 0 12px 40px rgba(0,0,0,.12);
        border-top: .5px solid rgba(0,0,0,.08);
        max-height: calc(100vh - 52px);
        overflow-y: auto;
        z-index: 1001;
    }
    .nav-links.open a {
        padding: .75rem 1rem;
        font-size: .95rem;
        border-radius: 12px;
        color: var(--text-primary);
    }
    .nav-links.open a:hover,
    .nav-links.open a.active {
        background: var(--bordeaux-subtle);
        color: var(--bordeaux);
    }
    /* --- Accordion-Dropdowns im Hamburger-Menü --- */
    /* Chevron-Pfeil am Ende jedes Eltern-Links */
    .nav-links.open .nav-dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    /* Desktop-Chevron-Stil komplett überschreiben */
    .nav-links.open .nav-dropdown > a::after {
        content: '';
        display: block;
        width: 7px; height: 7px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg) translateY(-2px);
        transition: transform .22s ease;
        margin-left: .6rem;
        flex-shrink: 0;
        opacity: .6;
    }
    /* Chevron dreht sich beim Öffnen */
    .nav-links.open .nav-dropdown.dropdown-open > a::after {
        transform: rotate(-135deg) translateY(-2px);
    }
    /* Untermenü standardmäßig versteckt */
    .nav-links.open .nav-dropdown .dropdown-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        padding-left: .5rem;
        background: transparent;
        border-left: 2px solid var(--bordeaux-subtle);
        margin: .25rem 0 .5rem 1rem;
        /* Absolute-Positionierung des Desktop-Dropdowns aufheben */
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        width: auto;
    }
    /* Untermenü sichtbar wenn .dropdown-open */
    .nav-links.open .nav-dropdown.dropdown-open .dropdown-menu {
        display: flex;
    }
    /* Desktop-Hover-Dropdown im Hamburger-Modus deaktivieren */
    .nav-dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-50%) translateY(8px);
    }
    .nav-links.open .nav-dropdown .dropdown-menu a {
        padding: .55rem .85rem;
        font-size: .88rem;
        color: var(--text-secondary);
        min-height: 44px;
        display: flex; align-items: center;
        border-radius: 10px;
    }
    .nav-links.open .nav-dropdown .dropdown-menu a:hover {
        background: var(--bordeaux-subtle);
        color: var(--bordeaux);
    }
}

/* ========== RESPONSIVE — MOBILE (max 768px) ========== */
@media (max-width: 768px) {
    /* --- Mobile Nav (verfeinert gegenüber 1260px-Block) --- */
    .nav-inner { padding: 0 1.25rem; }
    .nav-cta { font-size: .72rem; padding: .38rem .85rem; margin-right: .5rem; }

    /* --- Mobile Info-Banner --- */
    .info-banner { top: 52px; font-size: .72rem; padding: .45rem 1rem; }
    .info-banner + section.hero,
    .info-banner ~ section.hero { padding-top: 95px; }

    .nav-links.open { padding: 1rem 1.25rem 1.5rem; top: 52px; }

    /* --- Mobile Hero (dark) --- */
    .hero { min-height: 100svh; padding: 60px 1.25rem 2rem; }
    .hero-ekg { width: 120px; margin-bottom: 1.5rem; }
    .hero-practice { font-size: .75rem; letter-spacing: .2em; margin-bottom: 1.4rem; }
    .hero-name { font-size: 1.55rem; letter-spacing: .02em; }
    .hero-location { font-size: .72rem; margin-bottom: 2rem; }
    .hero-separator { height: 28px; margin-bottom: 2rem; }
    .hero-light .hero-badges { gap: .35rem; margin-bottom: 2.2rem; }
    .hero-light .hero-badge { font-size: .75rem; padding: .38rem .75rem; }
    .hero-ctas { flex-direction: column; gap: .75rem; }
    .hero-ctas .btn-primary,
    .hero-ctas .btn-outline { width: 100%; justify-content: center; text-align: center; }
    .hero-image { min-height: 280px; }

    /* --- Mobile Spacing --- */
    .container { padding: 0 1.25rem; }
    section { padding: 3.5rem 0; }

    /* --- Mobile Typography --- */
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1rem; }
    .section-header { margin-bottom: 2.5rem; }
    .section-overline { font-size: .75rem; margin-bottom: .8rem; }

    /* --- Mobile Stats --- */
    .stats-bar { padding: 2rem 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .stat-number { font-size: 1.8rem; }
    .stat-label { font-size: .72rem; }

    /* --- Mobile Service Cards --- */
    .services-grid { grid-template-columns: 1fr; gap: 1rem; }
    .service-card { padding: 1.5rem; }
    .service-card h3 { font-size: 1rem; }
    .service-card p, .service-card .card-short { font-size: .85rem; }
    .card-icon-wrap { width: 40px; height: 40px; margin-bottom: 1rem; }

    /* --- Mobile Connections (dark section) --- */
    .connection-cards { grid-template-columns: 1fr; gap: 1rem; }
    .connection-card { padding: 1.5rem; }
    .connection-card p { font-size: .82rem; }

    /* --- Mobile Timeline --- */
    .approach-timeline { grid-template-columns: 1fr; gap: 0; position: relative; padding-left: 2rem; }
    .approach-timeline::before {
        display: block !important;
        top: 28px; bottom: 28px; left: 24px; right: auto;
        width: 2px; height: auto;
        background: linear-gradient(180deg, var(--bordeaux), rgba(122,27,46,.1));
    }
    .timeline-step { text-align: left; padding: 1.5rem 0 1.5rem 2rem; }
    .step-dot, .step-number { width: 48px; height: 48px; font-size: 1rem; margin: 0 0 1rem; }
    .timeline-step h3, .timeline-step h4 { font-size: .95rem; }
    .timeline-step p { font-size: .82rem; }

    /* --- Mobile Qualifications --- */
    .qual-section { padding: 4rem 0; }
    .qual-inner { gap: 2.5rem; }
    .qual-badges-row { grid-template-columns: 1fr; gap: .6rem; }
    .qual-badge { padding: 1rem; }
    .badge-title { font-size: .85rem; }

    /* --- Mobile Feature Highlight --- */
    .feature-grid { grid-template-columns: 1fr; }
    .feature-image { min-height: 250px; }
    .feature-content { padding: 2rem 1.25rem; }
    .feature-specs { grid-template-columns: 1fr; }
    .spec-item { padding: .85rem; }

    /* --- Mobile Samsung Feature Blocks --- */
    .samsung-feature-block { padding: 1rem !important; }
    .samsung-feature-block h4 { font-size: .92rem; }
    .samsung-feature-block p { font-size: .82rem; }

    /* --- Mobile seca BIA Gallery --- */
    .seca-device-showcase { grid-template-columns: 1fr !important; text-align: center; padding: 1.2rem !important; }
    .seca-device-showcase img:first-of-type { max-height: 260px !important; }
    .bia-tabs { gap: .35rem !important; }
    .bia-tab { padding: .4rem .7rem !important; font-size: .75rem !important; }
    .bia-panel > div { grid-template-columns: 1fr !important; }
    .bia-tab-content { padding: 1rem !important; min-height: auto !important; }
    .seca-verlauf-block { grid-template-columns: 1fr !important; }
    .seca-dashboard-block { padding: 1.2rem !important; }
    .seca-dashboard-block img { max-width: 100% !important; }

    /* --- Mobile Content (subpages) --- */
    .page-hero { padding: 6rem 0 2.5rem; }
    .page-hero .lead { font-size: 1rem; line-height: 1.7; }
    .content-section { padding: 2.5rem 0; }
    .content-grid { grid-template-columns: 1fr; gap: 2rem; }
    .content-sidebar { position: static; }
    .sidebar-card { padding: 1.25rem; }
    .content-main p { font-size: .92rem; }
    .content-main li { font-size: .88rem; }

    /* --- Mobile Contact --- */
    .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact-card { padding: 1.5rem; }
    .contact-row { gap: .75rem; }
    .contact-icon { width: 32px; height: 32px; border-radius: 8px; }
    .hours-table tr td, .hours-table tr th { font-size: .82rem; padding: .35rem 0; }

    /* --- Mobile Compact Contact (subpages) --- */
    .compact-contact { padding: 1.5rem 0; }
    .compact-contact-inner { flex-direction: column; gap: .75rem; text-align: center; }

    /* --- Mobile Footer --- */
    .footer-extended .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 1.25rem; }

    /* --- Mobile Buttons (touch-friendly) --- */
    .btn-primary, .btn-outline { padding: 1rem 2rem; font-size: .95rem; }
    .btn-primary { min-height: 48px; } /* iOS touch target minimum */

    /* --- Mobile Info Boxes --- */
    .info-box { padding: 1rem 1.25rem; }
    .info-box strong { font-size: .82rem; }
    .info-box p { font-size: .82rem; }

    /* --- Mobile Emergency Bar --- */
    .emergency-bar { font-size: .8rem; padding: .85rem 1rem; }
}

/* ========== TABLET-OVERRIDE (601-768px): 2-Spalten-Grids beibehalten ========== */
/*
   Der 768px-Block oben kollabiert alle Grids auf 1-Spalte. Bei iPad-hochkant (768) und
   ähnlichen Tablet-Breiten ist 2-Spalten lesbarer. Override greift bei 601-768.
*/
@media (min-width: 601px) and (max-width: 768px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .connection-cards { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .footer-extended .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .approach-timeline { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .qual-badges-row { grid-template-columns: repeat(2, 1fr); }
    .feature-specs { grid-template-columns: repeat(2, 1fr); }
}

/* ========== RESPONSIVE — SMALL MOBILE (max 400px) ========== */
@media (max-width: 400px) {
    .container { padding: 0 1rem; }
    .hero-name { font-size: 1.3rem; }
    .hero-practice { font-size: .68rem; letter-spacing: .16em; }
    .hero-ekg { width: 100px; }
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.35rem; }
    .hero-light .hero-badge { font-size: .75rem; padding: .35rem .7rem; }
    .stats-grid { gap: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .service-card { padding: 1.25rem; }
    .qual-badge { padding: .85rem; }
    .badge-title { font-size: .82rem; }
    /* Nav-Crowding: nav-cta auf Sehr-Klein-Mobile ausblenden — mobile-cta-bar unten reicht */
    .nav-cta { display: none; }
}

/* ========== STICKY MOBILE CTA ========== */
.mobile-cta-bar {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: rgba(251,243,232,.95);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: .5px solid rgba(0,0,0,.08);
    padding: .75rem 1.25rem;
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
}
.mobile-cta-bar .btn-primary {
    width: 100%; justify-content: center; text-align: center;
    padding: .85rem 2rem; font-size: .92rem;
}
@media (max-width: 768px) {
    .mobile-cta-bar { display: block; }
    /* Add bottom padding to body so content isn't hidden behind sticky CTA */
    body { padding-bottom: 72px; }
}

/* ========== SAFE AREA (iPhone notch etc.) ========== */
@supports (padding: max(0px)) {
    .site-nav { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
    .mobile-cta-bar { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
}

/* ========== ACCESSIBILITY: Focus Styles ========== */
:focus-visible {
    outline: 2px solid var(--bordeaux);
    outline-offset: 2px;
}
.btn-primary:focus-visible {
    outline-color: var(--bordeaux-dark);
    box-shadow: 0 0 0 4px rgba(122,27,46,.25);
}
.btn-outline:focus-visible {
    outline-color: var(--bordeaux);
    box-shadow: 0 0 0 4px rgba(122,27,46,.15);
}
.nav-links a:focus-visible {
    outline: 2px solid var(--bordeaux);
    outline-offset: 2px;
    border-radius: var(--radius-pill);
}
.nav-cta:focus-visible {
    outline-color: white;
    box-shadow: 0 0 0 4px rgba(122,27,46,.3);
}
.service-card:focus-visible {
    outline: 2px solid var(--bordeaux);
    outline-offset: 2px;
    box-shadow: var(--shadow-md);
}
.connection-card:focus-visible {
    outline: 2px solid var(--bordeaux-light);
    outline-offset: 2px;
}

/* Skip-to-content link */
.skip-link {
    position: absolute; top: -100%; left: 1rem;
    background: var(--bordeaux); color: white;
    padding: .75rem 1.5rem; border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 500;
    z-index: 10000; text-decoration: none;
    transition: top .2s;
}
.skip-link:focus {
    top: .5rem;
}

/* ========== UTILITY CLASSES (replacing inline styles) ========== */
.section-compact { padding: 3rem 0; }
.qualifications-bar {
    background: var(--bg-dark); padding: 2.2rem 0;
}
.qualifications-bar p {
    color: rgba(255,255,255,.65); font-size: .92rem; line-height: 1.7;
    text-align: center; max-width: 720px; margin: 0 auto;
}
.hausarzt-hinweis {
    margin-top: 2.5rem; padding: 1.5rem 2rem;
    background: var(--bg-alt); border-radius: 12px; text-align: center;
}
.hausarzt-hinweis p {
    font-size: .88rem; color: var(--text-secondary); margin: 0; line-height: 1.6;
}
.hausarzt-hinweis strong { color: var(--text-primary); }
.contact-grid-3 {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem; text-align: center;
}
@media (max-width: 768px) {
    .contact-grid-3 { grid-template-columns: 1fr; }
}
.leitlinien-box {
    margin-top: 2rem; padding: 1.5rem;
    background: var(--bg-alt); border-radius: var(--radius-sm);
    border-left: 4px solid var(--bordeaux);
}
.leitlinien-box p {
    font-size: .88rem; color: var(--text-secondary); line-height: 1.6; margin: 0;
}
.leitlinien-box strong { color: var(--text-primary); }
.hint-text {
    font-size: .8rem; color: var(--text-tertiary); margin-top: 1rem; font-weight: 300;
}
.hint-text strong { font-weight: 500; }
.hint-text a { color: var(--bordeaux); }
.contact-grid-3 h3 {
    font-size: 1rem; margin-bottom: .5rem;
}

/* ========== GOOGLE MAPS EMBED ========== */
.map-wrapper {
    margin-top: 2rem; border-radius: var(--radius-sm); overflow: hidden;
    border: 1px solid var(--card-border);
    min-height: 280px;
}
.map-wrapper iframe {
    display: block; width: 100%; height: 280px; border: 0;
}
/* DSGVO 2-Click Map Placeholder */
.map-placeholder {
    display: flex; align-items: center; justify-content: center;
    min-height: 280px; cursor: pointer;
    background: var(--bg-alt);
    transition: background var(--transition);
}
.map-placeholder:hover { background: #EDEDF0; }
.map-placeholder:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: -2px; }
.map-placeholder-inner { text-align: center; padding: 2rem 1.5rem; }

/* ========== CHECKLIST (Neupatienten etc.) ========== */
.checklist {
    list-style: none; padding: 0;
}
.checklist li {
    padding: .75rem 0 .75rem 2rem; position: relative;
    border-bottom: 1px solid var(--card-border);
    font-size: .92rem; line-height: 1.6;
}
.checklist li::before {
    content: '✓'; position: absolute; left: 0; top: .75rem;
    color: var(--bordeaux); font-weight: 700; font-size: 1rem;
}
.checklist li:last-child { border-bottom: none; }

/* ========== MOBILE LANGUAGE SWITCH ========== */
@media (max-width: 768px) {
    .lang-switch {
        position: absolute; top: 50%; right: 4rem;
        transform: translateY(-50%);
        display: inline-flex !important;
        min-width: 36px; min-height: 36px;
        align-items: center; justify-content: center;
    }
}

/* ========== INFO-BANNER SUBPAGE FIX ========== */
.info-banner ~ .page-hero {
    padding-top: calc(8rem + 32px);
}
@media (max-width: 768px) {
    .info-banner ~ .page-hero {
        padding-top: calc(6rem + 32px);
    }
}

/* ========== SUBPAGE HERO ACCENTS ========== */
.page-hero { position: relative; }
.page-hero::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 60px; height: 3px; background: var(--bordeaux);
    margin-left: 3rem;
}
@media (max-width: 768px) {
    .page-hero::after { margin-left: 1.25rem; }
}

/* ========== ALTERNATING SECTION BACKGROUNDS ========== */
#leistungen { background: var(--bg-white); }
#leistungen + .connections-section + section { background: var(--bg-alt); }

/* ========== MOBILE SIDEBAR QUICK-NAV ========== */
@media (max-width: 1024px) {
    .content-sidebar .sidebar-card:first-child {
        order: -1;
    }
    .sidebar-card h4 { font-size: .82rem; }
}

/* ========== SERVICE CARDS: PRIMARY vs SECONDARY ========== */
.services-grid .service-card.service-primary {
    grid-column: span 1;
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.04);
}
.services-grid .service-card.service-primary .card-icon-wrap {
    width: 52px; height: 52px; border-radius: 14px;
}
.services-grid .service-card.service-primary h3 {
    font-size: 1.15rem;
}
@media (min-width: 769px) {
    .services-grid.services-tiered {
        grid-template-columns: repeat(3, 1fr);
    }
    .services-grid.services-tiered .service-secondary-row {
        grid-column: 1 / -1;
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
    }
}

/* ========== MOBILE: Inline grid overrides (BIA, Liver, etc.) ========== */
@media (max-width: 768px) {
    /* Hours table — stack on very small screens */
    .hours-table tr {
        display: flex; flex-wrap: wrap; padding: .5rem 0;
        border-bottom: 1px solid var(--card-border);
    }
    .hours-table tr:last-child { border-bottom: none; }
    .hours-table tr td { padding: .15rem 0; width: auto; }
    .hours-table tr td:first-child { width: 100%; font-weight: 600; }
    .hours-table tr th { padding: .15rem 0; width: 100%; font-weight: 600; display: block; }

    /* Inline grids in BIA/liver pages — force single column */
    [style*="grid-template-columns: 1fr 1.2fr"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1fr 1.3fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Checklist mobile refinement */
    .checklist li { font-size: .88rem; padding-left: 1.75rem; }
    .checklist li::before { font-size: .92rem; }

    /* Sidebar links — ensure tap target */
    .sidebar-link { min-height: 44px; padding: .75rem .5rem; }

    /* Footer links — larger tap targets */
    .footer-links { gap: .5rem; }
    .footer-links a { padding: .5rem .5rem; min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================================================
   MODERN WEB ENHANCEMENTS — 2026
   Progressive Enhancement: Browser ohne Support nutzen Fallbacks.
   ============================================================ */

/* === 1. VIEW TRANSITIONS API ===
   Sanfte Cross-Fades zwischen Seitenwechseln statt hartem Weiß-Flackern.
   Browser-Support: Chrome 126+, Edge 126+, Safari 18+, Firefox folgt.
   Browser ohne Support: ignorieren die Regel, kein Bruch. */
@view-transition {
    navigation: auto;
}

/* === 1b. SCROLL-PROGRESS-INDICATOR ===
   Dünne Bordeaux-Linie oben am Bildschirm, wächst mit Scroll-Position.
   CSS-nativ via animation-timeline: scroll(). Kein JS, kein HTML-Eingriff.
   Browser ohne Support: kein Bar (kein Bruch). */
@supports (animation-timeline: scroll()) {
    html::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        height: 3px;
        width: 100%;
        background: linear-gradient(90deg, var(--bordeaux), var(--bordeaux-light));
        transform-origin: 0 50%;
        transform: scaleX(0);
        z-index: 9999;
        animation: scroll-progress linear;
        animation-timeline: scroll(root);
        pointer-events: none;
    }
    @keyframes scroll-progress {
        to { transform: scaleX(1); }
    }
}

/* Bei reduced-motion: Progress-Bar abschalten */
@media (prefers-reduced-motion: reduce) {
    html::before { animation: none; transform: scaleX(0); }
}

/* Custom cross-fade Animation für die Transition */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(.25,.46,.45,.94);
}

/* === 2. SCROLL-DRIVEN ANIMATIONS ===
   CSS-natives Einblenden statt IntersectionObserver-JS.
   JS bleibt als Fallback aktiv (script.js Zeile 7-16).
   Browser-Support: Chrome 115+, Edge 115+. Safari/FF: nutzen JS-Fallback. */
@supports (animation-timeline: view()) {
    /* Reset: Klassen sind initial sichtbar (kein opacity:0-Flicker bevor JS lädt) */
    .reveal,
    .reveal-scale,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
        animation: scroll-reveal-up linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }
    .reveal-scale { animation-name: scroll-reveal-scale; }
    .reveal-left  { animation-name: scroll-reveal-left; }
    .reveal-right { animation-name: scroll-reveal-right; }

    @keyframes scroll-reveal-up {
        from { opacity: 0; transform: translateY(35px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes scroll-reveal-scale {
        from { opacity: 0; transform: scale(0.95); }
        to   { opacity: 1; transform: scale(1); }
    }
    @keyframes scroll-reveal-left {
        from { opacity: 0; transform: translateX(-30px); }
        to   { opacity: 1; transform: translateX(0); }
    }
    @keyframes scroll-reveal-right {
        from { opacity: 0; transform: translateX(30px); }
        to   { opacity: 1; transform: translateX(0); }
    }
}

/* Accessibility — niemals animieren wenn User reduced-motion will */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-scale,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
    }
}

/* === 3. CONTAINER QUERIES ===
   Service-Cards reagieren auf Container-Breite, nicht auf Viewport.
   Sinnvoll wenn Cards in unterschiedlich breiten Spalten landen. */
@supports (container-type: inline-size) {
    .services-grid {
        container-type: inline-size;
        container-name: services;
    }
    /* Wenn die Grid-Spalte schmal wird, Card kompakter rendern */
    @container services (max-width: 320px) {
        .service-card { padding: 1.25rem; }
        .service-card h3 { font-size: 1rem; }
        .service-card p,
        .service-card .card-short { font-size: 0.85rem; }
    }
}

/* === 4. MODERNE FOCUS-STATES ===
   :focus-visible mit OKLCH-Outline — nur Tastatur, nicht Maus. */
@supports (color: oklch(0% 0 0)) {
    *:focus-visible {
        outline: 2px solid oklch(52% 0.16 12);
        outline-offset: 3px;
        border-radius: 4px;
    }
}

/* === 5. TYPOGRAFIE-FEINHEITEN für Variable Font ===
   Sobald InterVar geladen ist: feinere Gewichte für Headings.
   Statische Inter würde diese Werte auf 600/700 runden. */
h1, h2, h3, h4 {
    font-weight: 640;       /* zwischen 600 und 700 — moderner, weniger plakativ */
    letter-spacing: -0.022em;
    text-wrap: balance;     /* moderne CSS-Eigenschaft: bessere Zeilenumbrüche in Headings */
}
p, li {
    text-wrap: pretty;      /* verhindert hängende Wörter am Zeilenende */
}

/* === 7. KLICKBARE QUELLENANGABEN ===
   sup.ref wird zur Laufzeit in <a class="ref-link"> umgewandelt.
   Klick → Sprung zum entsprechenden <li id="ref-X"> in .references-section.
   Smooth scroll greift bereits über html { scroll-behavior: smooth }. */
sup.ref { font-size: 0.7em; vertical-align: super; line-height: 0; margin-left: 1px; }
a.ref-link {
    color: var(--bordeaux);
    text-decoration: none;
    font-weight: 500;
    padding: 0 1px;
    border-radius: 2px;
    transition: color 0.15s, background 0.15s;
}
a.ref-link:hover,
a.ref-link:focus-visible {
    color: var(--bordeaux-light);
    background: var(--bordeaux-subtle);
    outline: none;
}

/* Visuelles Highlight am Ziel, wenn die URL einen #ref-X Anker hat */
.references-section li:target {
    background: var(--bordeaux-subtle);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    margin: 0.1rem 0;
    transition: background 1.2s ease-out;
    animation: ref-highlight 2.5s ease-out;
}
@keyframes ref-highlight {
    0%   { background: rgba(122, 27, 46, 0.18); }
    100% { background: var(--bordeaux-subtle); }
}
/* OKLCH-Variante für moderne Browser */
@supports (color: oklch(0% 0 0)) {
    .references-section li:target {
        background: oklch(94% 0.03 12);
    }
    @keyframes ref-highlight {
        0%   { background: oklch(86% 0.08 12); }
        100% { background: oklch(94% 0.03 12); }
    }
}
@media (prefers-reduced-motion: reduce) {
    .references-section li:target { animation: none; }
}

/* === 6. GLOSSAR-HOVER FÜR FACHBEGRIFFE ===
   Begriffe werden zur Laufzeit in <button class="gloss"> gewrappt.
   Dezenter dotted underline statt Box — Patient erkennt: hier gibt's mehr Info. */
button.gloss {
    /* Reset Button-Defaults */
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: help;

    /* Visueller Hinweis: gestrichelte Unterlinie in Bordeaux */
    text-decoration: underline dotted var(--bordeaux);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
button.gloss:hover,
button.gloss:focus-visible {
    color: var(--bordeaux);
    text-decoration-color: var(--bordeaux-light);
    text-decoration-style: solid;
    outline: none;
}

/* OKLCH-Variante für moderne Browser (etwas wärmer) */
@supports (color: oklch(0% 0 0)) {
    button.gloss {
        text-decoration-color: var(--bdx-400);
    }
    button.gloss:hover,
    button.gloss:focus-visible {
        color: var(--bdx-700);
        text-decoration-color: var(--bdx-600);
    }
}

/* === TOOLTIP-BOX === */
#gloss-tooltip {
    position: absolute;
    z-index: 10000;
    max-width: 320px;
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06);
    padding: 14px 16px;
    font-size: 0.88rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(4px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    /* Akzentlinie links als Bordeaux-Streifen */
    border-left: 3px solid var(--bordeaux);
}
#gloss-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
#gloss-tooltip .gloss-tip-title {
    display: block;
    font-weight: 600;
    color: var(--bordeaux-dark);
    margin-bottom: 4px;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}
#gloss-tooltip .gloss-tip-def {
    display: block;
    color: var(--text-secondary);
}

/* Mobile: Tooltip etwas mehr Raum */
@media (max-width: 640px) {
    #gloss-tooltip {
        max-width: calc(100vw - 32px);
        font-size: 0.85rem;
    }
}

/* Reduced motion: keine Slide-Animation */
@media (prefers-reduced-motion: reduce) {
    #gloss-tooltip { transition: opacity 0.1s; transform: none; }
    #gloss-tooltip.visible { transform: none; }
}

/* ============================================================
   IMMERSIVE LAYER (anime.js v4, js/immersive.js)
   Klasse .anim-js am <html> = JS-Choreografie aktiv.
   Ohne JS / bei reduced-motion fehlt die Klasse → CSS-Fallbacks.
   ============================================================ */

/* --- Hero-Takeover: CSS-Keyframes aus, anime.js übernimmt --- */
.anim-js .hero-ekg,
.anim-js .hero-practice,
.anim-js .hero-name,
.anim-js .hero-location,
.anim-js .hero-separator,
.anim-js .hero-ctas { animation: none; opacity: 0; }
.anim-js .hero-light .hero-badges { animation: none; opacity: 1; transform: none; }
.anim-js .hero-light .hero-badge { opacity: 0; }
.anim-js .ekg-trace,
.anim-js .ekg-glow { animation: none; }
.anim-js .hero-separator { transform-origin: top center; }
.ekg-dot { fill: var(--bordeaux-light); opacity: 0; pointer-events: none; }

/* --- Magnetic Buttons: transform gehört anime.js, Rest bleibt CSS --- */
.magnetic { transition-property: background, box-shadow, color, border-color !important; will-change: transform; }

/* --- Card-Tilt: view()-Reveal-Animation abkoppeln, kurze Transform-Transition --- */
.tilt-live {
    animation: none !important;
    transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .4s, background .4s, border-color .4s !important;
    will-change: transform;
}

/* --- Nav: animierte Underline (nur Desktop mit echtem Hover) --- */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .nav-links > li > a { position: relative; }
    .nav-links > li > a::after {
        content: ""; position: absolute; left: .65rem; right: .65rem; bottom: .1rem;
        height: 1.5px; background: var(--bordeaux); border-radius: 1px;
        transform: scaleX(0); transform-origin: right;
        transition: transform .35s cubic-bezier(.22,1,.36,1);
    }
    .nav-links > li > a:hover::after,
    .nav-links > li > a.active::after { transform: scaleX(1); transform-origin: left; }
}

/* ============================================================
   TEUFELSKREIS — Scroll-Storytelling (Schlaf ↔ Gewicht)
   ============================================================ */
.cycle-section { background: var(--bg-alt); }
.cycle-layout {
    display: grid; grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 4rem; margin-top: 3rem;
}
.cycle-visual { position: relative; }
.cycle-visual-inner { position: sticky; top: 120px; max-width: 400px; margin: 0 auto; }
.cycle-svg { width: 100%; height: auto; display: block; }
.cycle-ring-track { fill: none; stroke: rgba(122,27,46,.12); stroke-width: 2; }
.cycle-ring-progress {
    fill: none; stroke: var(--bordeaux); stroke-width: 3.5; stroke-linecap: round;
    transform: rotate(-90deg); transform-origin: center;
}
.anim-js .cycle-ring-progress { stroke-dasharray: 817; stroke-dashoffset: 817; }
.cycle-node-dot { fill: #fff; stroke: rgba(122,27,46,.35); stroke-width: 2; transition: fill .4s, stroke .4s; }
.cycle-node-halo { fill: var(--bordeaux); opacity: 0; transform-box: fill-box; transform-origin: center; }
.cycle-node.lit .cycle-node-dot { fill: var(--bordeaux); stroke: var(--bordeaux); }
.cycle-center {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; pointer-events: none;
}
.cycle-center-label {
    font-size: 1rem; font-weight: 500; letter-spacing: .14em;
    text-transform: uppercase; color: var(--bordeaux); max-width: 60%;
}
.cycle-steps { display: flex; flex-direction: column; gap: 1rem; }
.cycle-step {
    padding: 1.6rem 1.75rem; border-left: 2px solid rgba(122,27,46,.15);
    transition: opacity .5s, border-color .5s, transform .5s;
}
.anim-js .cycle-step { opacity: .35; }
.anim-js .cycle-step.active { opacity: 1; border-color: var(--bordeaux); transform: translateX(6px); }
.cycle-step-num {
    font-size: .78rem; font-weight: 600; letter-spacing: .18em; color: var(--bordeaux);
}
.cycle-step h3 { margin: .45rem 0 .55rem; font-size: 1.12rem; }
.cycle-step p { font-size: .95rem; line-height: 1.7; color: var(--text-secondary); font-weight: 400; }
.cycle-step p + p { margin-top: .65rem; }
.cycle-step-exit {
    background: var(--bg-white); border-left: 3px solid var(--bordeaux);
    border-radius: 0 var(--radius, 16px) var(--radius, 16px) 0;
    box-shadow: 0 8px 30px rgba(122,27,46,.08);
    margin-top: 1rem;
}
.cycle-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
@media (max-width: 900px) {
    .cycle-layout { grid-template-columns: 1fr; gap: 2rem; }
    .cycle-visual-inner { position: relative; top: 0; max-width: 260px; }
    .cycle-step { padding: 1.25rem 1.25rem; }
}

/* ============================================================
   STOFFWECHSEL-NETZWERK (dunkle Sektion „Vernetztes Denken")
   ============================================================ */
.metabolic-net { max-width: 760px; margin: 3rem auto 0; }
.net-svg { width: 100%; height: auto; display: block; overflow: visible; }
.net-edge {
    fill: none; stroke: rgba(255,255,255,.16); stroke-width: 1.5;
    transition: stroke .35s, stroke-width .35s, opacity .35s;
}
.net-node { transform-box: fill-box; transform-origin: center; transition: opacity .35s; }
.net-node a { cursor: pointer; outline: none; }
.net-node-core {
    fill: #1F1F21; stroke: rgba(155,37,69,.55); stroke-width: 1.5;
    transition: fill .35s, stroke .35s;
}
.net-node-halo {
    fill: none; stroke: rgba(155,37,69,.3); stroke-width: 1;
    transform-box: fill-box; transform-origin: center;
    animation: netBreath 4.5s ease-in-out infinite;
}
.net-node:nth-of-type(odd) .net-node-halo { animation-delay: -2.2s; }
@keyframes netBreath {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.09); opacity: .45; }
}
.net-node text {
    fill: rgba(255,255,255,.88); font-size: 16px; font-weight: 500;
    text-anchor: middle; letter-spacing: .02em; font-family: inherit;
}
.net-hub-label { font-size: 14.5px; }
.net-node .net-label-sm { font-size: 14px; }
.net-icon { stroke: var(--bordeaux-light); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s; }
.net-node:hover .net-node-core,
.net-node.focus .net-node-core { fill: var(--bordeaux); stroke: var(--bordeaux-light); }
.net-node:hover .net-icon,
.net-node.focus .net-icon { stroke: #fff; }
.net-node a:focus-visible .net-node-core { stroke: #fff; stroke-width: 2.5; }
.metabolic-net.net-focus .net-edge { opacity: .25; }
.metabolic-net.net-focus .net-edge.hot { opacity: 1; stroke: var(--bordeaux-light); stroke-width: 2; }
.metabolic-net.net-focus .net-node:not(.focus) { opacity: .45; }
.net-pulse { fill: var(--bordeaux-light); opacity: 0; pointer-events: none; }
.net-info {
    text-align: center; margin: 1.75rem auto 0; max-width: 580px; min-height: 3.2em;
    font-size: .9rem; line-height: 1.6; color: rgba(255,255,255,.55); font-weight: 400;
}
/* Intro-Reveal nur wenn JS choreografiert */
.anim-js .net-node:not(.in) { opacity: 0; }
.anim-js .net-edge:not(.in) { opacity: 0; }
@media (max-width: 640px) {
    .net-node text { font-size: 19px; }
    .net-hub-label { font-size: 17px; }
}

/* ============================================================
   AWARD-LAYER 2: Typo-Reveals, Hero-Exit, Aurora, Marquee, Cursor
   ============================================================ */

/* --- Split-Text-Reveals (Wörter sliden maskiert hoch) --- */
.anim-js .st-word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.anim-js .st-inner { display: inline-block; transform: translateY(115%); will-change: transform; }

/* --- Cinematic Hero-Exit (scrollgesteuert via JS) --- */
.anim-js .hero-content { will-change: transform, opacity; }

/* --- Aurora-Gradients in dunklen Sektionen --- */
.connections-section { position: relative; overflow: hidden; }
.connections-section > .container { position: relative; z-index: 1; }
.aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.aurora span {
    position: absolute; width: 55vw; height: 55vw; max-width: 720px; max-height: 720px;
    border-radius: 50%; filter: blur(90px); opacity: .4;
    background: radial-gradient(circle, rgba(155,37,69,.5) 0%, transparent 65%);
}
.aurora span:nth-child(1) { top: -22%; left: -12%; animation: auroraDrift1 26s ease-in-out infinite alternate; }
.aurora span:nth-child(2) {
    bottom: -28%; right: -14%;
    background: radial-gradient(circle, rgba(122,27,46,.45) 0%, transparent 65%);
    animation: auroraDrift2 34s ease-in-out infinite alternate;
}
@keyframes auroraDrift1 { to { transform: translate(16vw, 10vh) scale(1.18); } }
@keyframes auroraDrift2 { to { transform: translate(-14vw, -9vh) scale(.88); } }

/* --- Qualifikationen-Marquee (editorialer Typo-Trenner) --- */
.type-marquee { overflow: hidden; padding: 2.4rem 0; background: var(--bg-white); }
.type-marquee-track {
    display: flex; width: max-content;
    animation: marqueeScroll 55s linear infinite;
}
.type-marquee-track span {
    display: block; white-space: nowrap; padding-right: .5em;
    font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 200;
    letter-spacing: .01em; color: rgba(29,29,31,.13);
}
.type-marquee-track .tm-dot { color: rgba(122,27,46,.3); }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* --- Custom Cursor (Akzent-Punkt, nativer Cursor bleibt) --- */
#cursor {
    position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--bordeaux); border: 1.5px solid transparent;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: width .35s cubic-bezier(.22,1,.36,1), height .35s cubic-bezier(.22,1,.36,1),
                background .3s, border-color .3s, opacity .25s;
}
#cursor .cursor-label {
    font-size: 11px; font-weight: 500; letter-spacing: .06em; color: #fff;
    opacity: 0; transition: opacity .2s; user-select: none; white-space: nowrap;
}
#cursor.cursor-link { width: 42px; height: 42px; background: rgba(122,27,46,.08); border-color: var(--bordeaux); }
#cursor.cursor-card { width: 64px; height: 64px; background: rgba(122,27,46,.92); }
#cursor.cursor-card .cursor-label { opacity: 1; }

/* --- Reduced motion: neue Dauer-Animationen abschalten --- */
@media (prefers-reduced-motion: reduce) {
    .net-node-halo { animation: none; }
    .ekg-dot, .net-pulse { display: none; }
    .cycle-step, .cycle-ring-progress, .net-edge, .net-node { transition: none; }
    .aurora span { animation: none; }
    .type-marquee-track { animation: none; }
    #cursor { display: none; }
}

