/* ============================================================================
   Geburtshaus Münster — Anchor-Page (shared)
   --------------------------------------------------------------------------
   Wiederverwendbar für Behandlungen, Hebammenarbeit, etc.
   2-Spalten-Layout: Inhalts-Blöcke links, Sticky-Anker-Navigation rechts.
   Mobile: Inhalt full-width, Floating-Hamburger oben rechts mit Overlay.
   ========================================================================= */

/* The7 setzt auf #main / .wf-wrap / .wf-container-main / #content teils
   overflow:hidden — das killt position:sticky. Override für jede Seite,
   die das Anchorpage-Modul nutzt: */
body.ghm-has-anchorpage #main,
body.ghm-has-anchorpage .wf-wrap,
body.ghm-has-anchorpage .wf-container-main,
body.ghm-has-anchorpage #content,
body.ghm-has-anchorpage .post-content-wrapper,
body.ghm-has-anchorpage .entry-content {
    overflow: visible !important;
}

/* Custom-CSS-JS-Pro Snippet „GANZE SEITE CSS" hat overflow-x: hidden auf
   body/html. Mit clip statt hidden bleibt Sticky funktional. */
html, body {
    overflow-x: clip !important;
}

.ghm-anchorpage {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "nav"
        "main";
    gap: 20px;
    margin: 0 0 48px 0;
}
.ghm-anchorpage__main { grid-area: main; min-width: 0; }
.ghm-anchorpage__nav  { grid-area: nav; position: relative; }

@media (min-width: 900px) {
    .ghm-anchorpage {
        grid-template-columns: 1fr 260px;
        grid-template-areas: "main nav";
        gap: 48px;
    }
    .ghm-anchorpage__nav {
        height: 100%;
    }
}

/* --- Main: Blöcke ------------------------------------------------------- */
.ghm-anchorpage__block {
    margin-bottom: 36px;
    scroll-margin-top: 100px;
}
.ghm-anchorpage__block-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #829995;
    line-height: 1.3;
}
.ghm-anchorpage__block-content {
    color: #484848;
    line-height: 1.6;
    font-size: 15px;
}
.ghm-anchorpage__block-content ul { margin: 8px 0 12px 22px; }
.ghm-anchorpage__block-content li { margin-bottom: 4px; }
.ghm-anchorpage__block-content p  { margin: 0 0 12px 0; }
.ghm-anchorpage__block-content p:last-child { margin-bottom: 0; }

/* --- Sidebar-Nav (Desktop, JS-Sticky) ----------------------------------- */
.ghm-anchorpage__nav-inner {
    background: #fafbfa;
    border: 1px solid #e2e6e3;
    border-radius: 8px;
    padding: 16px 18px;
}

@media (min-width: 900px) {
    .ghm-anchorpage__nav-inner {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

.ghm-anchorpage__nav-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5a6967;
    border-bottom: 1px solid #c7d3c5;
    padding-bottom: 8px;
}

.ghm-anchorpage__nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.ghm-anchorpage__nav li { list-style: none !important; margin: 0; padding: 0; }
.ghm-anchorpage__nav li::marker { content: none; display: none; }

.ghm-anchorpage__nav a {
    display: block;
    padding: 7px 10px;
    color: #5a6967;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    border-radius: 0 4px 4px 0;
}
.ghm-anchorpage__nav a:hover {
    background: #f0f4f1;
    color: #2d3635;
    border-left-color: #c7d3c5;
}
.ghm-anchorpage__nav a.is-active {
    background: #e6ede8;
    color: #2d3635;
    border-left-color: #829995;
    font-weight: 600;
}

/* --- Mobile: Inline-Nav weg, Floating-Hamburger + Overlay --- */
@media (max-width: 899px) {
    .ghm-anchorpage__nav { display: none; }
}

.ghm-ap-fab {
    position: fixed;
    top: 100px;
    right: 16px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #829995;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}
.ghm-ap-fab:hover, .ghm-ap-fab:focus {
    background: #6b7e7a;
    transform: scale(1.05);
}
.ghm-ap-fab svg { width: 22px; height: 22px; stroke: currentColor; }

.ghm-ap-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(45, 54, 53, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.ghm-ap-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ghm-ap-overlay-panel {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 160px;
    max-height: calc(100vh - 180px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    padding: 16px 18px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.ghm-ap-overlay.is-open .ghm-ap-overlay-panel {
    transform: translateY(0);
    opacity: 1;
}

.ghm-ap-overlay-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5a6967;
    border-bottom: 1px solid #c7d3c5;
    padding-bottom: 8px;
}

.ghm-ap-overlay ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.ghm-ap-overlay li { list-style: none !important; margin: 0; padding: 0; }
.ghm-ap-overlay a {
    display: block;
    padding: 10px 12px;
    color: #2d3635;
    text-decoration: none;
    font-size: 15px;
    border-radius: 6px;
    border-left: 3px solid transparent;
}
.ghm-ap-overlay a:hover, .ghm-ap-overlay a:active {
    background: #f0f4f1;
    border-left-color: #829995;
}
.ghm-ap-overlay a.is-active {
    background: #e6ede8;
    border-left-color: #829995;
    font-weight: 600;
}

body.ghm-ap-noscroll { overflow: hidden; }
