/* Globale Body-Farbe */
body {
    background-color: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

main {
    margin-top: 130px;
}

@media (max-width: 480px) {
    main {
        margin-top: 100px;
    }
}

/* =========================================
   SYSTEM IN BALANCE - PAGE SPECIFIC STYLES
   ========================================= */

/* Container für H1 und Subheadline - Zentriert auf der Seite */
.page-system-in-balance .headline-container {
    max-width: var(--ks-text-max-width, 800px);
    margin: var(--ks-spacing-lg) auto 0 auto;
    padding: var(--ks-spacing-md);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/* H1 Überschrift */
.page-system-in-balance .main-headline {
    color: #afa7fe;
    margin: 0;
    text-align: left;
    font-size: 5.5rem;
    line-height: 1.1;
    width: 100%;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Hero-Subheadline linksbündig unter der H1 im selben Container */
.page-system-in-balance .hero-subheadline {
    color: #333;
    font-size: 2rem;
    margin: var(--ks-spacing-sm) 0 0 0;
    padding: 0;
    text-align: left !important;
    line-height: 1.6;
    width: 100%;
}

.page-system-in-balance .hero-subheadline p {
    margin: 0;
    text-align: left !important;
}

/* H2 Zwischenüberschriften - Wortumbruch-Regeln */
.page-system-in-balance .page-content h2 {
    /* Standard-Styles von core.css werden geerbt */
    /* Nur Wortumbruch-Regeln hinzufügen für konsistentes Verhalten */
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
}

/* =========================================
   GESTALTUNGSRASTER - BÜNDIGE AUSRICHTUNG
   ========================================= */

/* Sicherstellen dass Text-Blöcke und Headlines bündig abschließen */
.page-system-in-balance .ks-block-text {
    padding-left: var(--ks-spacing-sm);
    padding-right: var(--ks-spacing-sm);
}

.page-system-in-balance .ks-block-text__content {
    padding-left: 0;
    padding-right: 0;
}

.page-system-in-balance .ks-block-headline__content {
    padding-left: 0;
    padding-right: 0;
}

.page-system-in-balance .ks-block-text__content p,
.page-system-in-balance .ks-block-text__content ul,
.page-system-in-balance .ks-block-text__content ol {
    padding-left: 0;
    padding-right: 0;
    max-width: var(--ks-text-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* H2 in Text-Blöcken: Kein zusätzliches Padding, nutzt Container-Padding */
.page-system-in-balance .ks-block-text h2 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Headline-Block: Container und H2 sollen bündig mit Text-Blöcken sein */
.page-system-in-balance .ks-block-headline__content h2 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Listen: Bullet Points leicht links eingerückt */
.page-system-in-balance .page-content ul,
.page-system-in-balance .page-content ol {
    list-style: none;
    padding-left: 0;
}

.page-system-in-balance .page-content li {
    font-size: 1rem;
    line-height: 1.7;
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
}

.page-system-in-balance .page-content li::before {
    content: '›';
    color: #afa7fe;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Listen auch in Text-Blöcken: Bullet Points leicht links eingerückt */
.page-system-in-balance .ks-block-text__content ul,
.page-system-in-balance .ks-block-text__content ol {
    list-style: none;
    padding-left: 0;
}

.page-system-in-balance .ks-block-text__content li {
    font-size: 1rem;
    line-height: 1.7;
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
}

.page-system-in-balance .ks-block-text__content li::before {
    content: '›';
    color: #afa7fe;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-system-in-balance .headline-container {
        padding: var(--ks-spacing-sm);
    }

    .page-system-in-balance .main-headline {
        font-size: 4rem;
    }

    .page-system-in-balance .hero-subheadline {
        font-size: 1.6rem;
    }

    /* Subnavigation Mobile Layout - Pyramid Form */
    .page-tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 15px;
    }

    .page-tabs li {
        text-align: center;
        flex: 1 1 45%;
        /* Allow items to share row */
    }

    /* First item (Die Kunst des Lebens) on top and full width */
    .page-tabs li:first-child {
        flex: 1 1 100%;
        width: 100%;
        order: -1;
        margin-bottom: 5px;
    }

    .page-tabs li a {
        display: block;
        padding: 5px;
        white-space: nowrap;
        /* Prevent breaking inside link text if possible */
    }
}

@media (max-width: 480px) {
    .page-system-in-balance .main-headline {
        font-size: 3rem;
    }

    .page-system-in-balance .hero-subheadline {
        font-size: 1.4rem;
    }
}

.ks-block-contact__content {
    border-left-color: #afa7fe !important;
}

.ks-block-headline__content h2 {
    border-bottom-color: #afa7fe !important;
}