/* =========================================================
   COMPLEXION 28
   MYCODES / STRUKTURBAUSTEINE
   ========================================================= */


/* =========================================================
   01. GEMEINSAME BASIS
   ========================================================= */

.pfm-structure,
.pfm-divider {
    --pfm-structure-accent:
        var(--group-color, var(--design));

    --pfm-structure-rgb:
        var(--group-rgb, 65, 100, 216);
}


.pfm-structure {
    position: relative;

    max-width: 100%;
    margin:
        var(--space-xl)
        0
        var(--space-m);

    color: var(--akzent-hell);

    font-family: var(--akzenttext);
    font-weight: 500;
    line-height: 0.95;
    text-transform: uppercase;

    overflow-wrap: anywhere;
}


/*
 * MyBB kann Zeilenumbrüche zwischen verschachtelten
 * MyCodes in <br>-Elemente umwandeln.
 * Direkte Umbrüche innerhalb des Kopfes werden deshalb
 * ausgeblendet. Umbrüche innerhalb der Unterzeile bleiben.
 */

.pfm-structure > br,
.pfm-divider > br {
    display: none;
}


/* =========================================================
   02. UNTERZEILE
   ========================================================= */

.pfm-structure__sub {
    display: block;

    max-width: 70ch;
    margin-top: var(--space-xs);

    color: var(--txtcol-soft);

    font-family: var(--fliesstext);
    font-size: var(--txtm);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.04em;
    text-transform: none;
}


/* =========================================================
   03. GROSSER TITEL
   ========================================================= */

.pfm-structure--title {
    padding:
        0
        0
        var(--space-s)
        var(--space-m);

    font-size:
        clamp(
            var(--txtxl),
            4vw,
            var(--txtxxl)
        );

    letter-spacing: -0.025em;

    border-bottom:
        1px solid
        var(--hairline);

    border-left:
        3px solid
        var(--pfm-structure-accent);
}


/* =========================================================
   04. GROSSER TITEL RECHTS
   ========================================================= */

.pfm-structure--right {
    padding:
        0
        var(--space-m)
        var(--space-s)
        0;

    text-align: right;

    border-left: 0;

    border-right:
        3px solid
        var(--pfm-structure-accent);
}

.pfm-structure--right .pfm-structure__sub {
    margin-left: auto;
}


/* =========================================================
   05. GROSSER TITEL ZENTRIERT
   ========================================================= */

.pfm-structure--center {
    padding:
        var(--space-m)
        var(--space-l);

    text-align: center;

    border-top:
        1px solid
        var(--hairline);

    border-right: 0;

    border-bottom:
        1px solid
        var(--hairline);

    border-left: 0;
}

.pfm-structure--center::before {
    content: "";

    position: absolute;
    top: -1px;
    left: 50%;

    width: var(--space-xxl);

    border-top:
        2px solid
        var(--pfm-structure-accent);

    transform: translateX(-50%);
}

.pfm-structure--center .pfm-structure__sub {
    margin-right: auto;
    margin-left: auto;
}


/* =========================================================
   06. KAPITELKOPF
   ========================================================= */

.pfm-structure--chaptered {
    min-height:
        calc(
            var(--txtxxxl)
            + var(--space-m)
        );

    padding:
        var(--space-xs)
        0
        var(--space-m)
        calc(
            var(--space-xxl)
            + var(--space-xl)
        );

    font-size:
        clamp(
            var(--txtxl),
            4vw,
            var(--txtxxl)
        );

    letter-spacing: -0.02em;

    border-bottom:
        1px solid
        var(--hairline);
}

.pfm-structure__chapter {
    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    width:
        calc(
            var(--space-xxl)
            + var(--space-m)
        );

    min-height: 100%;

    padding-right: var(--space-m);

    color:
        rgba(
            var(--pfm-structure-rgb),
            0.42
        );

    font-size:
        clamp(
            var(--txtxxxl),
            9vw,
            calc(
                var(--txtxxxl)
                * 1.8
            )
        );

    font-weight: 500;
    line-height: 0.72;
    letter-spacing: -0.08em;

    border-right:
        1px solid
        rgba(
            var(--pfm-structure-rgb),
            0.55
        );
}


/* =========================================================
   07. ABSCHNITTSÜBERSCHRIFT
   ========================================================= */

.pfm-structure--section {
    padding-bottom: var(--space-xs);

    color: var(--pfm-structure-accent);

    font-size: var(--txtl);
    line-height: 1.1;
    letter-spacing: 0.09em;

    border-bottom:
        1px solid
        var(--hairline);
}

.pfm-structure--section::after {
    content: "";

    position: absolute;
    right: auto;
    bottom: -1px;
    left: 0;

    width: var(--space-xxl);

    border-bottom:
        2px solid
        var(--pfm-structure-accent);
}

.pfm-structure--section .pfm-structure__sub {
    color: var(--txtcol-soft);
}


/* =========================================================
   08. DEKORATIVER TRENNER
   ========================================================= */

.pfm-divider {
    display: flex;
    align-items: center;
    gap: var(--space-s);

    width: 100%;
    margin:
        var(--space-xl)
        0;

    color: var(--txtcol-soft);

    font-family: var(--fliesstext);
    font-size: var(--txtxsmall);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
}

.pfm-divider::before,
.pfm-divider::after {
    content: "";

    flex: 1 1 auto;

    border-top:
        1px solid
        var(--hairline);
}

.pfm-divider::before {
    border-top-color:
        var(--pfm-structure-accent);
}

.pfm-divider span {
    flex: 0 1 auto;

    max-width: 80%;
}


/* =========================================================
   09. MOBILE
   ========================================================= */

@media (max-width: 620px) {

    .pfm-structure--title {
        font-size: var(--txtxl);
    }

    .pfm-structure--center {
        padding:
            var(--space-m)
            var(--space-s);
    }

    .pfm-structure--chaptered {
        min-height: 0;

        padding:
            0
            0
            var(--space-m);
    }

    .pfm-structure__chapter {
        position: relative;

        justify-content: flex-start;

        width: 100%;
        min-height: 0;
        margin-bottom: var(--space-s);
        padding:
            0
            0
            var(--space-xs);

        font-size: var(--txtxxl);
        line-height: 1;
        letter-spacing: -0.04em;

        border-right: 0;

        border-bottom:
            1px solid
            rgba(
                var(--pfm-structure-rgb),
                0.55
            );
    }

}