/*
 * Layout Kiel-Hypnose
 * Absichtlich auf normale WordPress-Seiten begrenzt:
 * - keine Startseite / statische Front Page
 * - keine Blog-Einzelbeiträge (single-post)
 * Rufous und Kubio bleiben für Header, Footer und Inhalte zuständig.
 */

/* Nur normale WordPress-Seiten; Frontpage und Blogartikel bleiben unangetastet. */
body.page:not(.home):not(.front-page) .entry-content,
body.page:not(.home):not(.front-page) .wp-block-post-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Die globale WordPress-Constrained-Breite (im Parent standardmäßig 620 px)
   für normale Seiten auf einen lesbaren Desktopwert anheben. */
body.page:not(.home):not(.front-page) .entry-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.page:not(.home):not(.front-page) .wp-block-post-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    width: min(100% - 48px, 960px);
    max-width: 960px;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Kubio-Abschnitte: die Boxed-Container dürfen auf normalen Seiten nicht
   durch eine kleine Theme-Breite kollabieren. Die Abschnittshintergründe
   bleiben auf voller Breite. */
body.page:not(.home):not(.front-page) .h-section-boxed-container,
body.page:not(.home):not(.front-page) .h-section-grid-container,
body.page:not(.home):not(.front-page) .h-section-fluid-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

/* Kubio-Innencontainer nicht schmaler als der äußere Abschnitt halten,
   sofern kein explizites Spaltenlayout vorliegt. */
body.page:not(.home):not(.front-page) .entry-content > .wp-block-kubio-section,
body.page:not(.home):not(.front-page) .wp-block-post-content > .wp-block-kubio-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Typografie normaler Inhaltsseiten */
body.page:not(.home):not(.front-page) .entry-content p,
body.page:not(.home):not(.front-page) .wp-block-post-content p {
    font-size: clamp(1rem, 0.96rem + 0.12vw, 1.08rem);
    line-height: 1.75;
}

body.page:not(.home):not(.front-page) .entry-content h1,
body.page:not(.home):not(.front-page) .wp-block-post-content h1 {
    font-size: clamp(2rem, 1.55rem + 1.4vw, 2.75rem);
    line-height: 1.15;
    text-wrap: balance;
}

body.page:not(.home):not(.front-page) .entry-content h2,
body.page:not(.home):not(.front-page) .wp-block-post-content h2 {
    font-size: clamp(1.55rem, 1.3rem + 0.8vw, 2rem);
    line-height: 1.25;
    text-wrap: balance;
}

body.page:not(.home):not(.front-page) .entry-content h3,
body.page:not(.home):not(.front-page) .wp-block-post-content h3 {
    font-size: clamp(1.25rem, 1.12rem + 0.45vw, 1.55rem);
    line-height: 1.3;
    text-wrap: balance;
}

/* Mobil: volle Breite mit festen, moderaten Seitenabständen. */
@media (max-width: 767px) {
    body.page:not(.home):not(.front-page) .entry-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
    body.page:not(.home):not(.front-page) .wp-block-post-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
        width: calc(100% - 32px);
        max-width: 100%;
    }

    body.page:not(.home):not(.front-page) .h-section-boxed-container,
    body.page:not(.home):not(.front-page) .h-section-grid-container,
    body.page:not(.home):not(.front-page) .h-section-fluid-container {
        width: 100%;
        max-width: 100%;
    }

    body.page:not(.home):not(.front-page) .entry-content p,
    body.page:not(.home):not(.front-page) .wp-block-post-content p {
        font-size: 1rem;
        line-height: 1.7;
    }
}
