/* ==========================================================
   Crone Consulting – bereinigtes Stylesheet
   Breakpoints: 960px (Navigation), 720px (Spalten)
   ========================================================== */

@font-face {
    font-family: 'Open Sans';
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    src: local('Open Sans Light'), local('OpenSans-Light'),
         url('fonts/opensans-light-webfont.woff2') format('woff2'),
         url('fonts/opensans-light-webfont.woff') format('woff'),
         url('fonts/opensans-light-webfont.ttf') format('truetype');
}
@font-face {
    font-family: 'Open Sans';
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
         url('fonts/opensans-semibold-webfont.woff2') format('woff2'),
         url('fonts/opensans-semibold-webfont.woff') format('woff'),
         url('fonts/opensans-semibold-webfont.ttf') format('truetype');
}

/* ---------- Basis ---------- */
:root {
    --navy: #263746;
    --brand: #b48b72;
    --text: #414440;
    --maxw: 960px;
    --gutter: 16px;
    --header-h: 88px;
}

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

html {
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font: 300 16px/1.5 'Open Sans', Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #fff;
    min-height: 100%;
}

img { display: block; max-width: 100%; height: auto; border: 0; }
figure { margin: 0; }
a { color: var(--brand); }
strong { font-weight: 600; }
.clear { display: none; }

:is(a, button):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

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

/* ---------- Typografie ---------- */
h1, h2 {
    font-weight: 600;
    font-size: clamp(1.25rem, 1rem + 1.6vw, 2rem);
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--navy);
    padding-bottom: .35em;
    margin-bottom: 1.2em;
    border-bottom: 2px solid var(--brand);
}
h1 b { display: none; }

p {
    margin-bottom: 1.25em;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}
p:last-child { margin-bottom: 0; }

h3 {
    font-weight: 600;
    font-size: 1.0625rem;
    line-height: 1.35;
    color: var(--navy);
    margin: 1.8em 0 .6em;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}
h3:first-child { margin-top: 0; }

#content ul {
    padding-left: 1.25em;
    margin-bottom: 1.4em;
    list-style: disc;
}
#content li {
    margin-bottom: .6em;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

/* ---------- Header & Navigation (Desktop) ---------- */
#header {
    position: sticky;
    top: 0;
    z-index: 500;
    height: var(--header-h);
    background: #fff;
    border-bottom: 1px solid #ddd;
}

#header_wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    max-width: calc(var(--maxw) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.logo { flex: none; }
.logo a { display: block; line-height: 0; }
.logo img { height: 60px; width: auto; }

.menu_button { display: none; }

.menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.navi {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
}
.navi a {
    display: block;
    padding: 8px 12px;
    font-size: .9375rem;
    color: #58585a;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}
.navi a:hover,
.navi a:focus-visible { color: var(--brand); }

#topmenu {
    order: -1;
    display: flex;
    list-style: none;
    margin: 0 0 2px;
    padding: 0 12px;
    font-size: .8125rem;
}
#topmenu li + li::before { content: "|"; margin: 0 .6em; color: #999; }
#topmenu a { color: #666; text-decoration: none; }
#topmenu a:hover { text-decoration: underline; }

/* ---------- Header & Navigation (Mobil / Tablet) ---------- */
@media (max-width: 960px) {
    :root { --header-h: 68px; }

    .logo img { height: 44px; }

    .menu_button {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--navy);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .menu_button span,
    .menu_button span::before,
    .menu_button span::after {
        display: block;
        width: 24px;
        height: 2px;
        background: currentColor;
        transition: transform .25s, top .25s, background-color .25s;
    }
    .menu_button span { position: relative; }
    .menu_button span::before,
    .menu_button span::after { content: ""; position: absolute; left: 0; }
    .menu_button span::before { top: -7px; }
    .menu_button span::after  { top: 7px; }
    .menu_enabled .menu_button span { background: transparent; }
    .menu_enabled .menu_button span::before { top: 0; transform: rotate(45deg); }
    .menu_enabled .menu_button span::after  { top: 0; transform: rotate(-45deg); }

    /* Ausklappmenü von rechts */
    .menu {
        position: fixed;
        top: var(--header-h);
        right: 0;
        bottom: 0;
        width: min(320px, 86vw);
        align-items: stretch;
        background: #fff;
        border-left: 1px solid #ddd;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .3s ease, visibility 0s linear .3s;
    }
    .menu_enabled .menu {
        transform: none;
        visibility: visible;
        transition: transform .3s ease, visibility 0s;
    }

    .navi { display: block; }
    .navi a {
        padding: 16px 24px;
        border-bottom: 1px solid #eee;
        white-space: normal;
    }

    #topmenu {
        order: 0;
        gap: 1.25rem;
        margin: auto 0 0;
        padding: 20px 24px;
    }
    #topmenu li + li::before { content: none; }

    /* Abdunkelung hinter dem Menü */
    body::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 400;
        background: rgba(0, 0, 0, .4);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s, visibility .3s;
    }
    body.menu_enabled::after { opacity: 1; visibility: visible; }

    /* Fallback ohne JavaScript: Menü bleibt sichtbar unter dem Logo */
    .no-js #header { position: static; height: auto; }
    .no-js #header_wrapper { height: auto; flex-wrap: wrap; padding-block: 8px; }
    .no-js .menu_button { display: none; }
    .no-js .menu {
        position: static;
        width: 100%;
        transform: none;
        visibility: visible;
        border: 0;
    }
}

/* ---------- Seitenabschnitte ---------- */
#header-image img {
    width: 100%;
    height: clamp(200px, 36vw, 460px);
    object-fit: cover;
    object-position: center;
}

#content > .grid_1x1 {
    padding: clamp(36px, 6vw, 64px) max(var(--gutter), calc((100% - var(--maxw)) / 2));
}

/* dunkle Abschnitte */
#content > .layout5,
#content > .frame-layout-5 {
    background: var(--navy);
    color: #fff;
}
:is(.layout5, .frame-layout-5) :is(h1, h2) { color: #fff; }
:is(.layout5, .frame-layout-5) a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .5);
    text-underline-offset: .2em;
}
:is(.layout5, .frame-layout-5) a:hover { text-decoration-color: currentColor; }
:is(.layout5, .frame-layout-5) ul { list-style: url('img/listStyle.png') disc; }

/* Leistungen-Links */
.frame-layout-7 p { font-size: 1rem; line-height: 1.9; text-transform: uppercase; }
.frame-layout-7 a { text-decoration: none; }
.frame-layout-7 a:hover { text-decoration: underline; }

/* Icons: mobil oben zentriert (Layout 12), Desktop in der Spalte (Layout 11) */
.frame-layout-11 { display: none; }
.frame-layout-12 img {
    width: 36%;
    min-width: 110px;
    max-width: 160px;
    margin: 0 auto 1.5rem;
}

/* Bild-Spalte der hellen Abschnitte (Vita, Mitgliedschaften, Kontakt) */
.frame-layout-6 .grid_2x1 > .grid_col:first-child { margin-bottom: 1.5rem; }
.frame-layout-6 .grid_2x1 > .grid_col:first-child img {
    width: 42%;
    min-width: 120px;
    max-width: 200px;
    margin: 0 auto;
}
.image-caption {
    margin-top: .6em;
    font-size: .875rem;
    text-align: center;
}

/* Mitglieds-Logos */
.frame-layout-9 { margin-top: 1.5rem; }
.frame-layout-9 .ce-gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 28px;
}
.frame-layout-9 .ce-row { display: contents; }
.frame-layout-9 img {
    width: auto;
    height: auto;
    max-height: 52px;
}

@media (max-width: 720px) {
    #content li { font-size: .9375rem; }
}

/* ---------- Zwei Spalten ab 721px ---------- */
@media (min-width: 721px) {
    .grid_2x1 { display: grid; column-gap: 4%; align-items: start; }

    .layout5 .grid_2x1,
    .frame-layout-5 .grid_2x1 { grid-template-columns: minmax(0, 1fr) minmax(120px, 25%); }

    .frame-layout-6 .grid_2x1 { grid-template-columns: minmax(120px, 25%) minmax(0, 1fr); }

    .frame-layout-12 { display: none; }
    .frame-layout-11 { display: block; }
    .frame-layout-11 img { width: 100%; max-width: 250px; margin-left: auto; }

    .frame-layout-6 .grid_2x1 > .grid_col:first-child { margin-bottom: 0; }
    .frame-layout-6 .grid_2x1 > .grid_col:first-child img {
        width: 100%;
        min-width: 0;
        max-width: 250px;
        margin: 0;
    }

    .frame-layout-7 p { font-size: 1.125rem; }
}

/* ---------- Unterseiten (Leistungen, Impressum, Datenschutz) ---------- */
#content li ul { margin: .6em 0 0; }
.subpage .frame-layout-6 .grid_2x1 { grid-template-columns: minmax(0, 1fr); }
.subpage .frame-layout-6 .grid_2x1 > .grid_col:first-child { display: none; }
.subpage #content > .grid_1x1 { min-height: 60vh; }

/* ---------- Nach-oben-Button ---------- */
#scroll_to_top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 300;
    width: 44px;
    height: 44px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
#scroll_to_top.visible,
.no-js #scroll_to_top { opacity: 1; visibility: visible; }
#scroll_to_top a {
    position: relative;
    display: block;
    height: 100%;
    background: var(--navy);
    border-radius: 50%;
}
#scroll_to_top a::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 11px;
    border: solid #fff;
    border-width: 2px 0 0 2px;
    transform: translate(-50%, -30%) rotate(45deg);
}

/* ---------- Cookie-Hinweis (externes Script) ---------- */
.cc_container { background: #fff; color: var(--text); }
.cc_container .cc_btn, .cc_container .cc_btn:visited { color: #fff; background: var(--brand); }
.cc_container a, .cc_container a:visited { color: var(--brand); }
.cc-theme-edgeless.cc-window { box-shadow: 0 0 5px rgba(0, 0, 0, .2); }
