/*!
 * Unser Oberberg Theme – media-line (https://media-line.de)
 * Design angelehnt an Handwerker-Oberberg.de
 * Schriften lokal eingebunden (DSGVO): Merriweather (OFL), Inter (OFL)
 */

/* ============ Schriften ============ */
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 400; font-display: swap; src: url("../Fonts/merriweather-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-style: italic; font-weight: 400; font-display: swap; src: url("../Fonts/merriweather-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 700; font-display: swap; src: url("../Fonts/merriweather-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-style: italic; font-weight: 700; font-display: swap; src: url("../Fonts/merriweather-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../Fonts/inter-latin-wght-normal.woff2") format("woff2"); }

/* ============ Design-Tokens ============ */
:root {
    --uo-primary: #815f40;
    --uo-primary-dark: #5e4528;
    --uo-accent: #c8804a;
    --uo-tan: #a78258;

    --uo-text: #1a1a1a;
    --uo-muted: #5b5148;
    --uo-bg: #ffffff;
    --uo-surface: #ffffff;
    --uo-cream: #faf6f1;
    --uo-cream-2: #f5efe8;
    --uo-border: #e7ddd0;
    --uo-border-strong: #d6c6b1;
    --uo-link: var(--uo-primary);
    --uo-on-primary: #ffffff;
    --uo-footer-bg: #1a1a1a;
    --uo-footer-text: rgba(255, 255, 255, .78);
    --uo-shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 6px 24px rgba(60, 40, 20, .07);
    --uo-shadow-lg: 0 2px 6px rgba(60, 40, 20, .06), 0 18px 48px rgba(60, 40, 20, .12);

    --uo-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --uo-font-serif: "Merriweather", Georgia, "Times New Roman", serif;

    --uo-container: 1200px;
    --uo-gutter: clamp(16px, 4vw, 32px);
    --uo-radius: 12px;
    --uo-radius-sm: 8px;
    --uo-header-h: 72px;
    --uo-section-y: clamp(56px, 8vw, 96px);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --uo-text: #f2ebe3;
    --uo-muted: #c3b5a6;
    --uo-bg: #15110e;
    --uo-surface: #1e1915;
    --uo-cream: #1b1612;
    --uo-cream-2: #221b16;
    --uo-border: #362c24;
    --uo-border-strong: #4a3d31;
    --uo-link: #dcb487;
    --uo-footer-bg: #0e0b09;
    --uo-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --uo-shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 48px rgba(0, 0, 0, .4);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --uo-text: #f2ebe3;
        --uo-muted: #c3b5a6;
        --uo-bg: #15110e;
        --uo-surface: #1e1915;
        --uo-cream: #1b1612;
        --uo-cream-2: #221b16;
        --uo-border: #362c24;
        --uo-border-strong: #4a3d31;
        --uo-link: #dcb487;
        --uo-footer-bg: #0e0b09;
        --uo-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        --uo-shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 48px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }
}

/* ============ Basis ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--uo-header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
    margin: 0;
    font-family: var(--uo-font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--uo-text);
    background: var(--uo-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.uo-site { min-height: 100vh; display: flex; flex-direction: column; background: var(--uo-bg); color: var(--uo-text); }
.site-main { flex: 1 0 auto; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--uo-link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--uo-primary-dark); }
:root[data-theme="dark"] a:hover { color: #f0cfa6; }
:focus-visible { outline: 3px solid var(--uo-accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--uo-font-serif); font-weight: 700; line-height: 1.22; margin: 0 0 .6em; color: var(--uo-text); letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.3rem); }
h4 { font-size: 1.1rem; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--uo-border); margin: 2.5rem 0; }
blockquote { border-left: 4px solid var(--uo-accent); padding: .4em 0 .4em 1.2em; font-family: var(--uo-font-serif); font-style: italic; color: var(--uo-muted); }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--uo-primary); color: #fff; padding: 10px 16px; border-radius: var(--uo-radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: calc(var(--uo-container) + 2 * var(--uo-gutter)); margin-inline: auto; padding-inline: var(--uo-gutter); }

/* ============ Buttons ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    padding: .72em 1.35em; border-radius: var(--uo-radius-sm);
    font: 600 1rem/1.2 var(--uo-font-sans); text-decoration: none; cursor: pointer;
    border: 2px solid transparent; transition: background-color .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: .95em 1.8em; font-size: 1.05rem; }
.btn-sm { padding: .5em .95em; font-size: .9rem; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--uo-primary-dark); color: #fff; }
.btn-primary:hover { background: var(--uo-primary); color: #fff; box-shadow: 0 6px 18px rgba(94, 69, 40, .28); }
.btn-accent { background: var(--uo-accent); color: #fff; }
.btn-accent:hover { background: #b46f3c; color: #fff; box-shadow: 0 6px 18px rgba(200, 128, 74, .32); }
.btn-outline { background: transparent; color: var(--uo-text); border-color: var(--uo-primary-dark); }
.btn-outline:hover { background: var(--uo-primary-dark); color: #fff; }
:root[data-theme="dark"] .btn-outline { border-color: var(--uo-link); color: var(--uo-text); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: inherit; }

/* ============ Kopfzeile ============ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--uo-bg) 96%, transparent);
    border-bottom: 1px solid var(--uo-border);
    transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 24px rgba(40, 25, 10, .08); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--uo-header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--uo-primary-dark); margin-right: auto; flex: none; }
.brand:hover { color: var(--uo-primary); }
:root[data-theme="dark"] .brand { color: var(--uo-link); }
.brand-mark { display: inline-flex; color: var(--uo-primary); }
:root[data-theme="dark"] .brand-mark { color: var(--uo-link); }
.brand-text { font-family: var(--uo-font-serif); font-style: italic; font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-logo { max-height: 52px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 20px; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link { display: block; padding: 10px 12px; font-weight: 600; font-size: .96rem; color: var(--uo-text); text-decoration: none; border-radius: 6px; }
.nav-link:hover, .nav-item.is-active > .nav-link { color: var(--uo-primary); }
:root[data-theme="dark"] .nav-link:hover, :root[data-theme="dark"] .nav-item.is-active > .nav-link { color: var(--uo-link); }
.nav-item.is-active > .nav-link { box-shadow: inset 0 -2px 0 var(--uo-accent); border-radius: 0; }
.sub-toggle { display: none; }
.sub-nav {
    position: absolute; top: 100%; left: 0; min-width: 240px; list-style: none; margin: 0; padding: 8px;
    background: var(--uo-surface); border: 1px solid var(--uo-border); border-radius: var(--uo-radius); box-shadow: var(--uo-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-item:hover > .sub-nav, .nav-item:focus-within > .sub-nav { opacity: 1; visibility: visible; transform: none; }
.sub-nav a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--uo-text); text-decoration: none; font-size: .95rem; }
.sub-nav a:hover, .sub-nav .is-active > a { background: var(--uo-cream-2); color: var(--uo-primary); }
.header-cta { padding: .62em 1.15em; font-size: .95rem; }

.mode-toggle, .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none;
    border-radius: 50%; border: 1px solid var(--uo-border-strong); background: var(--uo-cream); color: var(--uo-text); cursor: pointer;
}
.mode-toggle:hover, .nav-toggle:hover { border-color: var(--uo-primary); color: var(--uo-primary); }
.mode-icon-light { display: none; }
:root[data-theme="dark"] .mode-icon-light { display: inline-flex; }
:root[data-theme="dark"] .mode-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mode-icon-light { display: inline-flex; }
    :root:not([data-theme="light"]) .mode-icon-dark { display: none; }
}
.nav-toggle { display: none; border-radius: 10px; }
.nav-toggle-close { display: none; }

@media (max-width: 1023.98px) {
    .nav-toggle { display: inline-flex; order: 3; }
    .mode-toggle { order: 2; }
    .nav-open .nav-toggle-open { display: none; }
    .nav-open .nav-toggle-close { display: inline-flex; }
    .site-nav {
        position: fixed; inset: var(--uo-header-h) 0 0 0; z-index: 99;
        flex-direction: column; align-items: stretch; gap: 16px;
        padding: 16px var(--uo-gutter) 32px; background: var(--uo-bg); overflow-y: auto;
        border-top: 1px solid var(--uo-border);
        visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .18s, transform .18s, visibility .18s;
    }
    .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
    .nav-open { overflow: hidden; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--uo-border); }
    .nav-link { flex: 1; padding: 14px 4px; font-size: 1.05rem; }
    .nav-item.is-active > .nav-link { box-shadow: none; }
    .sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--uo-text); cursor: pointer; }
    .sub-toggle .icon { transition: transform .18s; }
    .nav-item.is-open > .sub-toggle .icon { transform: rotate(90deg); }
    .sub-nav { position: static; flex-basis: 100%; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px 12px; background: transparent; min-width: 0; }
    .nav-item.is-open > .sub-nav { display: block; }
    .header-cta { width: 100%; padding: .9em 1.2em; }
}

/* ============ Hero ============ */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 112px);
    background:
        radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--uo-accent) 14%, transparent), transparent 60%),
        linear-gradient(180deg, var(--uo-cream) 0%, var(--uo-cream-2) 100%);
    border-bottom: 1px solid var(--uo-border);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-tagline {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px;
    padding: 7px 16px; border: 1px solid var(--uo-tan); border-radius: 50px;
    background: color-mix(in srgb, var(--uo-cream-2) 70%, var(--uo-bg)); color: var(--uo-primary-dark); font-size: .88rem; font-weight: 600;
}
:root[data-theme="dark"] .hero-tagline { color: var(--uo-link); }
.hero-tagline .icon { color: var(--uo-accent); }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.12; margin-bottom: 24px; }
.hero-highlight { display: block; font-style: italic; color: var(--uo-primary); }
:root[data-theme="dark"] .hero-highlight { color: var(--uo-link); }
.hero-lead { font-size: clamp(1.03rem, 1.3vw, 1.15rem); color: var(--uo-muted); max-width: 36em; }
.hero-lead p:last-child { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 0; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 20px 44px; margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--uo-border-strong); }
.hero-stat dt { font-family: var(--uo-font-serif); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--uo-primary-dark); line-height: 1.1; }
:root[data-theme="dark"] .hero-stat dt { color: var(--uo-link); }
.hero-stat dd { margin: 4px 0 0; font-size: .9rem; color: var(--uo-muted); }
.hero-image { width: 100%; border-radius: calc(var(--uo-radius) * 1.5); box-shadow: var(--uo-shadow-lg); object-fit: cover; aspect-ratio: 4 / 3; }
.hero-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 360px; margin-left: auto; }
.hero-tile {
    display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px;
    background: var(--uo-surface); border: 1px solid var(--uo-border); box-shadow: var(--uo-shadow);
    color: var(--uo-primary-dark); transition: transform .25s, color .25s;
}
:root[data-theme="dark"] .hero-tile { color: var(--uo-link); }
.hero-tile:nth-child(even) { transform: translateY(8px); }
.hero-tile:hover { transform: translateY(-4px); color: var(--uo-accent); }
.hero-tile .icon { width: 30px; height: 30px; }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-tiles { margin: 8px auto 0; max-width: 300px; }
}
@media (max-width: 560px) {
    .hero-tiles { display: none; }
    .hero-grid.has-media .hero-media { order: -1; }
    .hero-actions .btn { width: 100%; }
}

/* ============ Sektionen ============ */
.section { padding: var(--uo-section-y) 0; }
.section-alt, .frame-uo-section-alt { background: var(--uo-cream-2); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-title { position: relative; padding-bottom: 20px; margin-bottom: 18px; }
.section-title::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 3px; border-radius: 3px; background: var(--uo-accent); transform: translateX(-50%); }
.section-intro { color: var(--uo-muted); font-size: 1.06rem; }
.section-intro p:last-child { margin: 0; }

/* Feature-Kacheln */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.feature-card {
    padding: 34px 28px; text-align: center; border-radius: var(--uo-radius);
    background: var(--uo-surface); border: 1px solid var(--uo-border); box-shadow: var(--uo-shadow);
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--uo-shadow-lg); }
.feature-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 18px; border-radius: 50%; background: var(--uo-primary-dark); color: #fff; }
.feature-icon .icon { width: 26px; height: 26px; }
.feature-title { margin-bottom: 10px; }
.feature-card p { margin: 0; color: var(--uo-muted); font-size: .95rem; }

/* Branchen */
.branchen-search { position: relative; max-width: 560px; margin: 0 auto 32px; }
.branchen-search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--uo-muted); pointer-events: none; }
.branchen-input {
    width: 100%; padding: 15px 18px 15px 50px; border-radius: 50px; font: inherit; font-size: 1rem;
    border: 1px solid var(--uo-border-strong); background: var(--uo-surface); color: var(--uo-text); box-shadow: var(--uo-shadow);
}
.branchen-input:focus { outline: none; border-color: var(--uo-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--uo-accent) 22%, transparent); }
.branchen-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.branchen-grid > li[hidden] { display: none; }
.branche-link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 100%;
    padding: 14px 16px; border-radius: var(--uo-radius-sm); text-decoration: none; font-weight: 600; font-size: .96rem;
    background: var(--uo-surface); border: 1px solid var(--uo-border); color: var(--uo-text);
    transition: border-color .15s, transform .15s, color .15s, box-shadow .15s;
}
.branche-link > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.branche-link .icon { color: var(--uo-tan); transition: transform .15s; }
a.branche-link:hover { border-color: var(--uo-primary); color: var(--uo-primary); transform: translateY(-2px); box-shadow: var(--uo-shadow); }
:root[data-theme="dark"] a.branche-link:hover { color: var(--uo-link); }
a.branche-link:hover .icon { transform: translateX(3px); color: var(--uo-accent); }
.branchen-empty { text-align: center; color: var(--uo-muted); margin-top: 24px; }

/* CTA-Band */
.section-cta { background: linear-gradient(135deg, var(--uo-primary-dark) 0%, var(--uo-primary) 100%); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-text { flex: 1 1 520px; }
.cta-tagline { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: #f3d3b2; margin-bottom: 10px; }
.cta-title { color: #fff; margin-bottom: 12px; }
.cta-body { color: rgba(255, 255, 255, .86); font-size: 1.05rem; }
.cta-body p:last-child { margin: 0; }
.cta-body a { color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============ Seitentitel-Band ============ */
.page-band {
    padding: clamp(36px, 6vw, 64px) 0 clamp(30px, 5vw, 48px); text-align: center; color: #fff;
    background:
        radial-gradient(900px 300px at 50% -40%, rgba(255, 255, 255, .14), transparent 70%),
        linear-gradient(180deg, #7a5a3b 0%, var(--uo-primary-dark) 100%);
    border-bottom: 3px solid var(--uo-accent);
}
.page-band-title { color: #fff; margin: 0 0 10px; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.page-band-subtitle { color: rgba(255, 255, 255, .85); margin: 0 auto 12px; max-width: 46em; }
.page-band .breadcrumb { justify-content: center; }
.page-band .breadcrumb a, .page-band .breadcrumb li { color: rgba(255, 255, 255, .85); }
.page-band .breadcrumb li + li::before { color: rgba(255, 255, 255, .55); }

.breadcrumb ol { display: flex; flex-wrap: wrap; justify-content: inherit; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.breadcrumb { display: flex; }
.breadcrumb li { color: var(--uo-muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--uo-tan); }
.breadcrumb a { color: inherit; }
.page-plain > .breadcrumb { margin-bottom: 24px; }

/* ============ Inhalt ============ */
.page-content { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 88px); }
.page-content.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .page-content.has-sidebar { grid-template-columns: 1fr; } }
.area-main > :last-child, .area-sidebar > :last-child { margin-bottom: 0; }
.area-sidebar > .frame { margin-bottom: 24px; }
.area-sidebar > .frame-type-text, .area-sidebar > .frame-type-textmedia, .area-sidebar > .frame-type-textpic { padding: 24px; border-radius: var(--uo-radius); background: var(--uo-cream-2); border: 1px solid var(--uo-border); }
@media (min-width: 961px) { .area-sidebar { position: sticky; top: calc(var(--uo-header-h) + 20px); } }

/* Standard-Elemente (fluid_styled_content) in Vollbreiten-Bereichen */
.area-full > .frame, .area-hero > .frame { max-width: calc(var(--uo-container) + 2 * var(--uo-gutter)); margin-inline: auto; padding-inline: var(--uo-gutter); padding-block: var(--uo-section-y); }
.area-full > .frame-uo-section, .area-full > .frame-uo-section-alt { max-width: none; padding-inline: max(var(--uo-gutter), calc((100% - var(--uo-container)) / 2)); }
.area-main > .frame { margin-bottom: 2.2em; }
.frame-space-before-extra-small { margin-top: 1rem; } .frame-space-before-small { margin-top: 2rem; } .frame-space-before-medium { margin-top: 3rem; } .frame-space-before-large { margin-top: 4.5rem; } .frame-space-before-extra-large { margin-top: 6rem; }
.frame-space-after-extra-small { margin-bottom: 1rem; } .frame-space-after-small { margin-bottom: 2rem; } .frame-space-after-medium { margin-bottom: 3rem; } .frame-space-after-large { margin-bottom: 4.5rem; } .frame-space-after-extra-large { margin-bottom: 6rem; }
.space-before-small { margin-top: 2rem; } .space-before-medium { margin-top: 3rem; } .space-before-large { margin-top: 4.5rem; }
.space-after-small { margin-bottom: 2rem; } .space-after-medium { margin-bottom: 3rem; } .space-after-large { margin-bottom: 4.5rem; }
.frame-ruler-before::before { content: ""; display: block; border-top: 1px solid var(--uo-border); margin-bottom: 2em; }
.frame-ruler-after::after { content: ""; display: block; border-bottom: 1px solid var(--uo-border); margin-top: 2em; }
.frame-indent { padding-inline: clamp(0px, 8%, 80px); }

.ce-headline-center { text-align: center; } .ce-headline-right { text-align: right; }
header > h1:only-child, header > h2:only-child, header > h3:only-child { margin-bottom: .6em; }
.ce-textpic, .ce-image, .ce-nowrap .ce-bodytext, .ce-gallery, .ce-row, .ce-uploads li, .ce-uploads div { overflow: hidden; }
.ce-gallery figure { margin: 0; display: table; }
.ce-gallery img { border-radius: var(--uo-radius-sm); }
.ce-gallery figcaption { display: table-caption; caption-side: bottom; font-size: .88rem; color: var(--uo-muted); padding-top: 8px; }
.ce-gallery .ce-row { display: flex; gap: 16px; margin-bottom: 16px; }
.ce-gallery .ce-column { flex: 1 1 0; min-width: 0; }
.ce-gallery .ce-column img { width: 100%; }
.ce-left .ce-gallery, .ce-column { float: none; }
.ce-intext.ce-right .ce-gallery { float: right; margin: 0 0 16px 28px; max-width: 50%; }
.ce-intext.ce-left .ce-gallery { float: left; margin: 0 28px 16px 0; max-width: 50%; }
.ce-above .ce-gallery { margin-bottom: 20px; }
.ce-below .ce-gallery { margin-top: 20px; }
.ce-center .ce-outer { display: flex; justify-content: center; }
@media (max-width: 640px) { .ce-intext.ce-right .ce-gallery, .ce-intext.ce-left .ce-gallery { float: none; margin: 0 0 16px; max-width: 100%; } .ce-gallery .ce-row { flex-direction: column; } }
.ce-uploads { list-style: none; padding: 0; }
.ce-uploads li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--uo-border); }
.ce-table, .contenttable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ce-table th, .ce-table td, .contenttable th, .contenttable td { padding: 10px 12px; border-bottom: 1px solid var(--uo-border); text-align: left; vertical-align: top; }
.ce-table thead th, .contenttable thead th { background: var(--uo-cream-2); font-weight: 700; }
.rte ul li::marker, .ce-bodytext ul li::marker { color: var(--uo-accent); }

/* Formulare (EXT:form, Powermail) */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="password"], textarea, select {
    width: 100%; padding: 12px 14px; font: inherit; color: var(--uo-text);
    background: var(--uo-surface); border: 1px solid var(--uo-border-strong); border-radius: var(--uo-radius-sm);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--uo-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--uo-accent) 20%, transparent); }
label, .form-label { display: inline-block; font-weight: 600; margin-bottom: 6px; }
.form-group, .powermail_fieldwrap { margin-bottom: 18px; }
button[type="submit"], input[type="submit"], .powermail_submit { display: inline-flex; padding: .8em 1.5em; border: 0; border-radius: var(--uo-radius-sm); background: var(--uo-primary-dark); color: #fff; font: 600 1rem var(--uo-font-sans); cursor: pointer; }
button[type="submit"]:hover, input[type="submit"]:hover { background: var(--uo-primary); }
.notice { padding: 18px 22px; border-radius: var(--uo-radius); background: var(--uo-cream-2); border: 1px solid var(--uo-border); color: var(--uo-muted); }

/* ============ Handwerker (EXT:news) ============ */
.firm-filter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; padding: 14px 18px; border-radius: var(--uo-radius); background: var(--uo-cream-2); border: 1px solid var(--uo-border); }
.firm-filter-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.firm-filter-label .icon { color: var(--uo-accent); }
.firm-list { display: grid; gap: 20px; }
.firm-card {
    display: grid; grid-template-columns: 200px minmax(0, 1fr) 260px; gap: 24px; align-items: start;
    padding: 22px; border-radius: var(--uo-radius); background: var(--uo-surface); border: 1px solid var(--uo-border); box-shadow: var(--uo-shadow);
    transition: box-shadow .2s, border-color .2s;
}
.firm-card:hover { box-shadow: var(--uo-shadow-lg); border-color: var(--uo-border-strong); }
.firm-card.is-premium { border-color: var(--uo-accent); box-shadow: 0 0 0 1px var(--uo-accent), var(--uo-shadow); }
.firm-media a { display: block; }
.firm-logo { width: 100%; height: 150px; object-fit: contain; border-radius: var(--uo-radius-sm); background: #fff; border: 1px solid var(--uo-border); padding: 8px; }
.firm-logo-placeholder { display: grid; place-items: center; width: 100%; height: 150px; border-radius: var(--uo-radius-sm); background: linear-gradient(135deg, var(--uo-cream-2), var(--uo-cream)); border: 1px solid var(--uo-border); font: italic 700 3.2rem/1 var(--uo-font-serif); color: var(--uo-tan); text-transform: uppercase; }
.firm-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.firm-tags li, .firm-tags a { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: .78rem; font-weight: 600; background: var(--uo-cream-2); color: var(--uo-primary-dark); border: 1px solid var(--uo-border); text-decoration: none; }
:root[data-theme="dark"] .firm-tags li, :root[data-theme="dark"] .firm-tags a { color: var(--uo-link); }
.firm-tags li:has(a) { padding: 0; border: 0; background: none; }
.firm-tags a:hover { border-color: var(--uo-primary); }
.firm-title { margin-bottom: 8px; font-size: 1.25rem; }
.firm-title .firm-badge { vertical-align: -.1em; margin-left: 4px; }
.firm-title a { color: var(--uo-text); text-decoration: none; }
.firm-title a:hover { color: var(--uo-primary); }
.firm-badge { display: inline-flex; color: var(--uo-accent); }
.firm-person, .firm-address { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; font-size: .95rem; color: var(--uo-muted); }
.firm-person .icon, .firm-address .icon { margin-top: .25em; color: var(--uo-tan); }
.firm-teaser { margin-top: 10px; font-size: .95rem; }
.firm-aside { display: flex; flex-direction: column; gap: 14px; height: 100%; padding-left: 22px; border-left: 1px solid var(--uo-border); }
.firm-more { align-self: flex-start; margin-top: auto; }
.firm-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.firm-contact li { display: grid; grid-template-columns: 20px auto; column-gap: 10px; align-items: center; }
.firm-contact .icon { color: var(--uo-primary); }
:root[data-theme="dark"] .firm-contact .icon { color: var(--uo-link); }
.firm-contact-label { display: none; }
.firm-contact a { word-break: break-word; }
.firm-contact:not(.is-compact) li { grid-template-columns: 20px 74px auto; }
.firm-contact:not(.is-compact) .firm-contact-label { display: inline; color: var(--uo-muted); font-size: .85rem; }
@media (max-width: 1080px) {
    .firm-card { grid-template-columns: 160px minmax(0, 1fr); }
    .firm-aside { grid-column: 1 / -1; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--uo-border); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .firm-more { margin-top: 0; align-self: center; }
    .firm-logo, .firm-logo-placeholder { height: 120px; }
}
@media (max-width: 600px) {
    .firm-card { grid-template-columns: 1fr; padding: 18px; }
    .firm-logo, .firm-logo-placeholder { height: 140px; }
    .firm-aside { flex-direction: column; align-items: stretch; }
    .firm-more { width: 100%; }
}

/* Detail */
.firm-detail-head { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; padding-bottom: clamp(28px, 4vw, 44px); margin-bottom: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--uo-border); }
.firm-detail-logo .firm-logo, .firm-detail-logo .firm-logo-placeholder { height: 220px; }
.firm-detail-title { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 12px; }
.firm-detail-title .firm-badge { vertical-align: middle; margin-left: 6px; }
.firm-detail-title .firm-badge .icon { width: .8em; height: .8em; }
.firm-detail-teaser { font-size: 1.08rem; color: var(--uo-muted); }
.firm-detail-teaser p:last-child { margin: 0; }
.firm-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.firm-section { margin-bottom: 40px; }
.firm-section h2 { font-size: 1.45rem; padding-bottom: 12px; border-bottom: 2px solid var(--uo-border); position: relative; }
.firm-section h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--uo-accent); }
.firm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.firm-gallery figure { margin: 0; }
.firm-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--uo-radius-sm); }
.firm-gallery figcaption { font-size: .85rem; color: var(--uo-muted); margin-top: 6px; }
.link-list { list-style: none; padding: 0; }
.link-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--uo-border); }
.link-list .icon { color: var(--uo-accent); }
.link-desc { flex-basis: 100%; padding-left: 28px; font-size: .9rem; color: var(--uo-muted); }
.firm-detail-aside { position: sticky; top: calc(var(--uo-header-h) + 20px); }
.contact-card { padding: 26px; border-radius: var(--uo-radius); background: var(--uo-cream-2); border: 1px solid var(--uo-border); box-shadow: var(--uo-shadow); }
.contact-card-title { font-size: 1.3rem; margin-bottom: 16px; }
.contact-card .firm-address { color: var(--uo-text); margin-bottom: 16px; }
.contact-card .firm-contact { margin-bottom: 20px; }
.contact-card-actions { display: grid; gap: 10px; }
.contact-card .btn-ghost { color: var(--uo-text); border-color: var(--uo-border-strong); }
.contact-card .btn-ghost:hover { background: var(--uo-surface); }
.firm-detail-foot { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--uo-border); }
@media (max-width: 960px) {
    .firm-detail-grid { grid-template-columns: 1fr; }
    .firm-detail-aside { position: static; order: -1; }
}
@media (max-width: 680px) {
    .firm-detail-head { grid-template-columns: 1fr; }
    .firm-detail-logo .firm-logo, .firm-detail-logo .firm-logo-placeholder { height: 180px; }
}

/* Branchen-Menü (News-Kategorien) */
.category-menu { padding: 22px; border-radius: var(--uo-radius); background: var(--uo-cream-2); border: 1px solid var(--uo-border); }
.category-menu-title { font-size: 1.15rem; margin-bottom: 14px; }
.category-menu-search { margin-bottom: 12px; }
.category-menu .branchen-input { padding: 10px 14px; border-radius: var(--uo-radius-sm); box-shadow: none; font-size: .95rem; }
.category-menu ul { list-style: none; margin: 0; padding: 0; }
.category-menu > ul { max-height: min(60vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.category-menu ul ul { padding-left: 14px; }
.category-menu li[hidden] { display: none; }
.category-menu a { display: block; padding: 7px 0; color: var(--uo-text); text-decoration: none; border-bottom: 1px solid var(--uo-border); font-size: .95rem; }
.category-menu a:hover, .category-menu .is-active > a { color: var(--uo-primary); font-weight: 600; }
:root[data-theme="dark"] .category-menu a:hover, :root[data-theme="dark"] .category-menu .is-active > a { color: var(--uo-link); }

/* Pagination */
.pagination { margin-top: 36px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border-radius: var(--uo-radius-sm); text-decoration: none; font-weight: 600; }
.pagination a { background: var(--uo-surface); border: 1px solid var(--uo-border); color: var(--uo-text); }
.pagination a:hover { border-color: var(--uo-primary); color: var(--uo-primary); }
.pagination .is-current span { background: var(--uo-primary-dark); color: #fff; }
.pagination-gap { display: grid; place-items: center; min-width: 24px; color: var(--uo-muted); }

/* ============ Footer ============ */
.site-footer { background: var(--uo-footer-bg); color: var(--uo-footer-text); margin-top: auto; font-size: .95rem; }
.site-footer a { color: rgba(255, 255, 255, .9); text-decoration: none; }
.site-footer a:hover { color: #f0c79d; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-top: clamp(48px, 7vw, 72px); padding-bottom: clamp(36px, 5vw, 56px); }
.brand-footer { color: #fff; margin-bottom: 14px; }
.brand-footer .brand-mark, .site-footer .brand-text { color: #f0d2b3; }
.brand-footer .brand-mark circle { fill: var(--uo-footer-bg); }
.footer-claim { font-family: var(--uo-font-serif); font-style: italic; color: #fff; }
.footer-title { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { color: var(--uo-accent); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .86rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 18px; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-credit { color: rgba(255, 255, 255, .6); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Nach-oben-Button */
.to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    background: var(--uo-primary-dark); color: #fff; box-shadow: var(--uo-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--uo-primary); color: #fff; }

@media print {
    .site-header, .site-footer, .to-top, .hero-media, .firm-detail-foot { display: none !important; }
    .page-band { background: none; color: #000; border: 0; }
    .page-band-title { color: #000; }
}
