@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;600;700&display=swap');

/* Hyphenation settings for various browsers */
html {
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3; /* Optional: Minimal nützlich */
    hyphenate-limit-lines: 2;     /* Optional: Begrenzung auf 2 Zeilen */
    hyphenate-limit-last: always; /* Optional: Immer im letzten Block */
    hyphenate-limit-zone: 20%;     /* Optional: Zone für bessere Lesbarkeit */
}

/* CSS Variables for color scheme */
:root {
    --bg-color: #FFFFFF;
    --text-color: #202025;
    --code-text-color: #404046;
    --mass-text: #3C3C46;
    --link: #4569BC;
    --hover-link: #183475;
    --subtle-text-color: #707071;
    --separator-color: #CFCFCF;
    --hover-text-color: #373740;
    --active-text-color: #494955;
    --hover-subtle-text-color: #4b4b5e;
    --selected-border: #898994;
    --hover-border: #9a9ab3;
    --button-color: #eeeff1;
    --hover-button-color: #c9cbcf;
    --active-button-color: #d6d8db;
    --subtle-content-background-color: #F5F5F5;
    --quote-line-color: #CFCFCF;
    --max-width-text: 45rem;
    --max-width-header: 65rem;
    --baseline-height: 1.6;

    --focus-border: #ff8f1f;
}

/* 
--breakpoint-mobile: 799px;
--breakpoint-tablet: 1200px;
--breakpoint-desktop: 1400px;
*/

/* Dark mode color scheme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #101012;
        --text-color: #FFFFFF;
        --code-text-color: #c7c7da;
        --mass-text: #E0E0E9;
        --link: #6895FF;
        --hover-link: #94b4ff;
        --subtle-text-color: #8A8A9B;
        --separator-color: #36363c;
        --hover-text-color: #c8c8e2;
        --active-text-color: #e0e0ff;
        --hover-subtle-text-color: #DBDBF6;
        --selected-border: #DBDBF9;
        --hover-border: #DBDBF9;
        --button-color: #222225;
        --active-button-color: #343438;
        --hover-button-color: #37373b;
        --subtle-content-background-color: #222225;
        --quote-line-color: #8b8b96;

        --focus-border: #ff8f1f;
    }
}


/* Font face declarations */
:root {
    --fontspath: "../fnt";
}
/*
@font-face {
    font-family: 'CamingoCode';
    src: url('assets/fonts/CamingoCode Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'CamingoCode';
    src: url('assets/fonts/CamingoCode Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'CamingoWeb';
    src: url('assets/fonts/CamingoWeb Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'CamingoWeb';
    src: url('assets/fonts/CamingoWeb Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'CamingoWeb';
    src: url('assets/fonts/CamingoWeb Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

*/
@font-face {
    font-family: 'CamingoCode';
    src: url('../fnt/CamingoCode Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'CamingoCode';
    src: url('../fnt/CamingoCode Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'CamingoWeb';
    src: url('../fnt/CamingoWeb Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'CamingoWeb';
    src: url('../fnt/CamingoWeb Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'CamingoWeb';
    src: url('../fnt/CamingoWeb Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}


*:focus-visible {
    outline: 2px solid var(--focus-border);
    outline-offset: 2px;
    border-radius: 6px;
}



/* Global styles */
html {
    scroll-behavior: smooth !important;
    text-wrap: balance;
}

@supports (text-wrap: pretty) {
    html {
        text-wrap: pretty;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: clip;
    margin: 0;
    padding: 0;
    font-family: 'CamingoWeb', sans-serif;
}


/* Hyphenation for all elements */
* {
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
    box-sizing: border-box;
}

/* Heading styles */
/* MARGINS OF MAIN CONTENT ARE BELOW IN MAIN CONTENT SECTION */
h1 {
    font-family: "CamingoWeb";
    font-size: 1.8rem;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    text-align: center;
    word-wrap: break-word !important;
    display: block !important;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    margin: 0 0 1rem 0;
}


h2 {
    font-family: "CamingoWeb";
    font-size: 1.7rem;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    margin: 0;
}

h3 {
    margin: 0;
    font-family: "CamingoWeb";
    font-size: 1.35rem;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

h4 {
    margin: 0;
    font-family: "CamingoWeb";
    font-size: 1.05rem;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0.015rem;
}

p {
    font-family: CamingoWeb;
    font-size: 1.05rem;
    font-style: normal;
    font-weight: 400;
    line-height: calc(var(--baseline-height) * 1em);
    margin: 0;
}

hr {
    margin: 1rem 0;
    color: var(--separator-color);
}

button {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'CamingoWeb';
    font-size: 1.15rem;
    letter-spacing: 0.015rem;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.1s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background-color: var(--button-color);
    color: var(--button-text);
}

button span {
    display: inline-block;
}

 button:hover {
    background-color: var(--hover-button-color);
}

button:active {
    background-color: var(--active-button-color);
}

/* style-base.css end   */ 

/*@import url('style-base.css');  */

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    margin: 1rem;
    z-index: 1000;
    opacity: 0;
    color: var(--link);
}

.skip-link:focus-visible {
    opacity: 1;
}

.intro-paragraph {
    font-family: CamingoWeb;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.0125rem;
    text-align: center;
    margin-bottom: 1rem;
    display: block !important;
}
.intro-paragraph p{
     display: block !important;
}

.date {
    margin-bottom: 2rem;
    font-family: CamingoWeb;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.0125rem;
    text-align: center;
}

/* Properties – Don't touch, fragile */
.property-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    row-gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    padding: 1rem 1rem 0 1rem;
    max-width: 100svw;
}

.property-item {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 0.25rem;
}

.property-headline {
    font-family: CamingoCode;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.1125rem;
    text-transform: uppercase;
    color: var(--subtle-text-color);
}

.property-text {
    font-family: CamingoCode;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2rem;
    letter-spacing: 0.07438rem;
    text-transform: uppercase;
    text-overflow: ellipsis;
    max-width: 15rem;
    hyphens: none !important;
    color: var(--text-color);
}

.property-link-container {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    color: var(--link);
    align-items: flex-start;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    width: 100%; /* Ensure consistent width */
    white-space: nowrap; /* Prevent any wrapping */
}

.property-link-container .ref {
    margin-left: 0.5rem;
    white-space: nowrap;
    hyphens: none !important;
    overflow: visible;
    flex-shrink: 0; /* Prevent the ref from shrinking */
}

.property-link-container:hover > * {
    color: var(--hover-link);
}

.property-link-container span {
    text-decoration: none;
    align-items: center;
    text-overflow: ellipsis;
    overflow: hidden;

    font-family: CamingoCode;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2rem;
    hyphens: none !important; /* Prevent hyphenation */
    white-space: nowrap; /* Keep text on one line */

    max-width: 12rem;
    color: var(--link);
}

/* only for property footer, its 1:1 styles from property container in smallest breakpoint */

.property-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0;
    margin-top: 2rem !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.property-footer .property-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.property-footer .property-headline {
    flex-basis: 35%;
    text-align: left;
    font-family: CamingoCode;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--subtle-text-color);
    
}

.property-footer .property-text-list {
    flex-basis: 65%;
    text-align: left;
    width: 65%;
    box-sizing: border-box;
    overflow: hidden;
}

.property-footer .property-text-list li {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    max-width: none;
}

.property-footer .property-link-container {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: baseline;
    text-transform: uppercase;
    color: var(--link);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap; /* Prevent any wrapping */
}

.property-footer .property-link-container span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: none;
    flex-grow: 0;
    flex-shrink: 1;
    color: inherit; /* Ensure it inherits the color from the container */
    hyphens: none !important; /* Prevent hyphenation */
}

.property-footer .property-link-container .ref {
    flex: 0 0 auto; /* Don't grow, don't shrink, use auto size */
    margin-left: 0.5rem;
    white-space: nowrap;
}



/* Top Area */
.upper-section {
    min-height: clamp(40rem, 100svh, 100svh);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: var(--max-width-header);
    margin: 0 auto 1rem auto;
    gap: 2rem;
    padding: 2rem;
    box-sizing: border-box;
    flex-grow: 1;
}

.top-div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.bottom-div {
    width: var(--max-width);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0;
    box-sizing: border-box;
    width: 100svw;
    padding: 0 1rem;
}

.bottom-chev {
    display: flex;
    justify-content: center;
}

/* Cover Image */
.cover-image-container {
    width: 100%;
    max-width: var(--max-width);
    height: auto;
    overflow: hidden;
    margin-bottom: 1.5rem;
    min-height: 15rem;
    flex-shrink: 1;
    flex-grow: 0;
}

.cover-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 60svh;
} 


/* Profile Pic */
.profile-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    row-gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    min-width: 0;
}

.profile-pic-container {
    display: flex;
    align-items: center;
    min-width: fit-content;
    text-decoration: none;
    color: inherit;
}

.profile-pic-container:not(.no-link):hover {
    background-color: var(--subtle-content-background-color);
    transition: background-color 100ms ease;
    padding: 0 0.75rem 0 0;
    margin: 0 -0.75rem 0 0;
    border-radius: 500px;
}

.profile-pic-container:not(.no-link):hover p {
    color: var(--hover-text-color);
}
.no-link{
    cursor: default;
}
.profile-pic-container img {
    object-fit: fill;
    width: 2.3rem;
    height: 2.3rem;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Content Area */
.content-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    overflow: visible;
}




/* Table Of Contents */
.table-of-contents {
    top: 1rem;
    position: fixed;
    left: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 20rem;
}

.table-of-contents.visible,
.table-of-contents:focus-within {
    opacity: 1;
}

.table-of-contents ul {
    position: sticky;
    top: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}




.table-of-contents li {
    position: relative;
    color: var(--subtle-text-color);
    transition-delay: 0.05s;
    padding: 0.2rem 0;
    padding-left: 0.8rem;
    display: flex;
    align-items: center;
}

.table-of-contents a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    width: 100%;
    padding: 0;
}

.table-of-contents li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: transparent;
}

.table-of-contents .active a {
    color: var(--text-color);
    transition: color 300ms ease;
}

.table-of-contents li:hover::before {
    background-color: var(--hover-subtle-text-color) !important;
    transition: background-color 300ms ease;
    transition: width 100ms ease;
    width: 4px;
}

.table-of-contents .active::before {
    background-color: var(--text-color);
    transition: background-color 300ms ease;
}

.table-of-contents li:hover {
    transition-delay: 0.05s;
    transition: color 0.2s ease;
    color: var(--hover-subtle-text-color);
}

.mobile-menu li a {
    text-decoration: none;
    color: var(--subtle-text-color);
    font-size: 1.2rem;
    line-height: 1.5;
}


/* Text Area */
.main-content {
    position: relative;
    flex: 0 1 var(--max-width-text);
    padding: 0;
    max-width: var(--max-width-text);
    margin: 0 auto 2rem auto;
}

/* Neuer Container für den Textinhalt */
.main-content-text {
    overflow: hidden; /* Verhindert horizontales Scrollen nur für Text */
}

.main-content h4 {
    margin-top: calc(((var(--baseline-height) * 1em) / 4) * 2); /* 2/4 der Baseline */

}

.main-content h3 {
    margin-top: calc(((var(--baseline-height) * 1em) / 4) * 3); /* 2/4 der Baseline */
}

.main-content h2 {
    margin-top: calc(((var(--baseline-height) * 1em) / 4) * 4); /* 3/4 der Baseline */
}

.main-content p {
    margin-top: calc(((var(--baseline-height) * 1em) / 4) * 1); /* 1/4 der Baseline */
    color: var(--mass-text);
}

/* Gallery mit Scroll Snap */
.gallery-wrapper {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.gallery-images-wrapper {
    display: flex;
    height: 30rem; /* Fixe Höhe für die Galerie */
    max-height: 60svh;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    -webkit-overflow-scrolling: touch; /* Für besseres Scrollverhalten auf iOS */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    box-sizing: content-box; /* Wichtig: Zurück zu content-box für die Breitenberechnung */
}

.gallery-images-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.gallery-images-wrapper img:not(.active) {
    cursor: pointer;
}



.gallery-images-wrapper img {
    flex: 0 0 auto;
    height: 100%;
    width: auto;
    max-height: 100%;
    object-fit: contain;
    scroll-snap-align: start; 
    border-radius: 0.2rem;
}



.gallery-images-wrapper img:last-child {
    margin-right: 1rem; /* Keep this for additional spacing */
}

.gallery-spacer {
    flex: 0 0 auto;
    height: 100%;
    scroll-snap-align: start;
    min-width: 0.5rem;
    width: 1rem;
    display: block;
    position: relative;
}

/* Thumbnail-Container */
.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.thumbnail {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    border: none;
    margin: 0;
    border-radius: 0.1rem;
}

.thumbnail:hover, .thumbnail:focus-visible {
    opacity: 0.8;
}

.thumbnail.active {
    opacity: 1;
}

.thumbnail:not(.active) {
    cursor: pointer;
}

.main-content > *:first-child, .main-content section:first-of-type > *:first-child {
    margin-top: 0;
}

/* Video Container   */
.video-container {
    position: relative;
    width: 100%;
    height:0;
    padding-bottom: 56.25% !important; /* 16:9 */
    background-color: var(--subtle-content-background-color);
    margin: 0;
    padding: 0;
}
.video-container iframe{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Image Container & PDF section specific styles */
.pdf { 
    border: 1px solid var(--separator-color);
    border-radius: 0.2rem;
    padding: 0.5rem;
    position: relative;
    box-sizing: border-box;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background-color 100ms ease;
}

.pdf:hover {
    background-color: var(--subtle-content-background-color);
}

.pdf > .main-image-container {
    max-width: 80%;
    margin: 0 auto;
}

.main-image-container, .pdf {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.pdf .main-image-container img {
    width: 100%;
    height: auto;
    max-height: 50svh;
    object-fit: contain;
    border-radius: 0.1rem;
}

.pdf .ext-button {
    display: block;
    text-decoration: none;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.pdf:hover .ext-button button {
    background-color: var(--hover-button-color);
}


.main-content a {
    text-decoration: underline;
    color: inherit;
    text-underline-offset: 3px;
    text-decoration-skip-ink: auto;
}


.main-image-container img {
    width: 100%;
    max-height: 80svh;
    object-fit: contain;
}

.image-source {
    font-family: 'CamingoWeb';
    font-style: italic;
    font-size: 0.6rem;
    color: var(--subtle-text-color);
}

/* Quote styles */
blockquote {
    margin:0;
}
.markdown blockquote p, .quote {
    position: relative;
    margin: 2rem auto;
    font-family: CamingoWeb;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
    font-style: italic;
    color: var(--text-color);
    text-align: center;
    padding: 2rem 1rem;
    margin: 3rem 0;
}

.markdown blockquote p::before,
.markdown blockquote p::after,
.quote::before,
.quote::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 8rem;
    height: 1px;
    background-color: var(--separator-color);
}

.markdown blockquote p::before, .quote::before {
    top: 0;
}

.markdown blockquote p::after,.quote::after {
    bottom: 0;
}

/* Code block styles */
.markdown pre, .code-block {
    background-color: var(--subtle-content-background-color);
    padding: 1.5rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    height: auto;
    margin-top: 1rem;
    color: var(--code-text-color);
    border-radius: 0.1rem;

}

.markdown pre code, .code-block code {
    font-family: 'CamingoCode', monospace;
    line-height: 1.5rem;
    font-size: 0.9rem;
}

/* List styles */
.markdown ul, .list {
    list-style-type: none;
    padding: 0;
    font-family: CamingoWeb;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: calc(var(--baseline-height) * 1em);
    margin-top: 1rem;
    color: var(--mass-text);
}

.markdown ul li, .list li {
    position: relative;           /* Für Platzierung des Pseudo-Elements */
    padding-left: 3ch;            /* Gleiche Padding wie .list */
}

.markdown ul li::before, .list li::before {
    content: "– ";
    position: absolute;
    left: 0;
    color: var(--text-color);
}

.markdown ol, .numbered-list {
    list-style-type: none;
    padding: 0;
    font-family: CamingoWeb;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: calc(var(--baseline-height) * 1em);
    margin-top: 1rem;
    color: var(--mass-text);
    counter-reset: item;
}

.markdown ol li, .numbered-list li {
    counter-increment: item;
    position: relative;     
    padding-left: 3ch;         
}

.markdown ol li::before, .numbered-list li::before {
    content: counter(item) ". ";
    position: absolute;
    left: 0;
    color: var(--text-color);
}



/* Preformatted text styles */
/*  muss weg wegen codeblock
pre {
    margin: 0;
    padding: 0;
    line-height: 1;
}
*/ 

/* Inline code styles */
code {
    display: block;
    padding: 0;
    white-space: pre-wrap;
    line-height: 1;
}





.property-text-list , .chapter-nav{
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.property-text-list li, .chapter-nav li {
    font-family: CamingoCode;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2rem;
    letter-spacing: 0.07438rem;
    text-transform: uppercase;
    text-overflow: ellipsis;
    max-width: 15rem;
    hyphens: none !important;
    color: var(--text-color);
}
.chapter-nav li {
    max-width: 20rem;
}


.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: inset 0 -1px 0 var(--separator-color);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    opacity: 1;
    padding: 0.5rem 1rem;
    align-items: center;
    box-sizing: border-box;
}

.mobile-table-of-contents {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1500;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--separator-color);
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    transform: translateY(0);
    margin-top: -1px;
    display: none;
}

.mobile-table-of-contents.with-header {
    transform: translateY(var(--mobile-header-height, 0px));
}

.mobile-title {
    margin: 0;
    font-family: CamingoWeb;
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3rem;
    
    /* Add truncation after 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


.incomlogo{
    /*display: inline-block;  */
    display: block;
    position: fixed;
    right: 10px;
    bottom: 34px;
    
    

    width: 2.4rem;
    height: 5.2rem;
    overflow: hidden;
    transition: all .2s ease-in-out; 
}



.imprintlink{
    display: inline-block;
    float: right;
    position: relative;
    right: 15px;
    font-family: CamingoCode;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.1125rem;
   /* text-transform: uppercase; */
    color: var(--subtle-text-color);

}
.imprintlink a{
     text-decoration: none;
     color: var(--subtle-text-color);
    
 }
.footer{
        position: relative;
        padding: 40px 0 1.5rem 0;
        margin-top:40px;
}


/*
a:active,
a:visited{
    color: var(--link) !important;
}
*/




@media (max-width: 799px) { /* Mobile */


    .cover-image-container {
        margin-bottom: 0;
    }

    .image-source {
        font-size: 0.7rem;
    }

    .incomlogo{
        display: block;
        position: absolute;
        right: 20px;
        z-index: 5;
        bottom: -8px;
        transform: rotate(0.75turn);
    }
    
    .imprintlink{
        right: 30px;
    }

    .imprintlink a{
        text-decoration: none;
        font-size: 0.6rem !important;
    }
    

    .main-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .content-section {
        padding: 0 1rem;
    }

    .mobile-table-of-contents {
        display: block;
        opacity: 0;
    }

    .mobile-table-of-contents.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .content-section {
        flex-direction: column;
        margin: 0;
        box-sizing: border-box;
    }

    .upper-section {
        padding: 1rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .bottom-div {
        width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .property-container {
        grid-template-columns: 1fr;
        padding: 1rem 0 2rem 0;
        row-gap: 0.75rem;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .property-item {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: first baseline;
        box-sizing: border-box;
    }

    .property-item .property-headline {
        flex-basis: 35%;
        text-align: left;
    }

    .property-item .property-text-list {
        flex-basis: 65%; 
        text-align: left;
        width: 65%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .property-text-list li {
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
        max-width: none;

    }

    .property-text-list li .property-link-container {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: baseline;
    }

    .property-text-list li .property-link-container span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        max-width: none;
        flex-grow: 0;
        flex-shrink: 1;
    }

    .property-text-list li .property-link-container .ref {
        flex: 0 0 auto;
        margin-left: 0.5rem;
    }

    

    .table-of-contents {
        display: none;
    }

    .mobile-table-of-contents {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1500;
        border-bottom: 1px solid var(--separator-color);
        padding: 0.5rem 1rem;
        box-sizing: border-box;
        font-family: CamingoCode;
        font-size: 1rem;
        font-style: normal;
        font-weight: 700;
        line-height: normal;
        user-select: none;
        text-transform: uppercase;
    }

    .selected-section {
        display: flex;
        gap: 0.25rem;
        align-items: center;
        cursor: pointer;
        letter-spacing: 0.07438rem;
    }

    .selected-section .baseline {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }

    .chevron {
        font-size: 1.2rem;
        color: var(--text-color);
    }

    div.mobile-table-of-contents ul {
        margin: 0;
        list-style: none;
    }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        opacity: 95%;
        z-index: 500;
        justify-content: center;
        align-items: center;
        letter-spacing: 0.07438rem;
        max-height: 100vh;
        overflow-y: auto;
    }

    .mobile-menu ul {
        background-color: var(--bg-color);
        width: 95%;
        padding: 0;
        margin: 0;
        text-transform: uppercase;
    }

    .mobile-menu li.close-menu-item {
        margin-bottom: 1rem;
    }

    .mobile-menu li {
        text-align: left;
        position: relative;
        padding: 0.3rem 0;
        padding-left: 1rem;
    }

    .mobile-menu li a {
        color: var(--subtle-text-color);
        text-decoration: none;
        font-size: 1.2rem;
    }

    .mobile-menu li.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background-color: var(--text-color);
    }

    .mobile-menu li.active a {
        color: var(--text-color);
    }
    
    .footer-content {
        padding: 0 1rem !important;
    }

    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        box-shadow: inset 0 -1px 0 var(--separator-color);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        opacity: 1;
    }

    .mobile-header.visible {
        transform: translateY(0);
    }

    .content-section {
        margin: 0;
    }

    .gallery-images-wrapper {
        gap: 0.5rem;
    }

    /* Without this, safari screws things up */
    html, 
    body {
        margin: 0;
        padding: 0;
        width: 100%;

    }   

    .gallery-images-wrapper {
        height: 18rem;
    }


    .property-item:focus-within > ul > li > a {
        outline-offset: -0.25rem;
    }

    .mobile-table-of-contents:focus-within {
        opacity: 1;
    }

}

@media (min-width: 800px) and (max-width: 1400px) { /* Medium */
    .incomlogo{
        bottom: 14px;   
    }
    
    /* Footer styles */
    .footer {
        position: relative;
        width: 100%;
        background-color: var(--bg-color);
        padding: 1rem 0 1.5rem 0;
    }

    .content-section {
        padding: 0 1rem;
        padding-right: 2rem;
        gap: 2rem;
        display: flex;
        flex-direction: row;
        overflow: visible;
    }

    .main-content {
        width: calc(100% - 22rem); /* This solution is meh but it works. Can surely be done better */
        overflow: visible;
        flex: 1;
        max-width: var(--max-width-text);
    }

    .table-of-contents {
        position: -webkit-sticky;
        position: sticky;
        top: 1rem;
        left: 0;
        width: 20rem;
        align-self: flex-start;
        height: fit-content;
    }

    .table-of-contents ul {
        position: static;
    }

    


}

@media (min-width: 800px) {
    .incomlogo:hover{
        transform: scale(1.3);
        
    }
    .chapter-nav li {
        max-width: 24rem;
    }
}



/* Prevent scroll on mobile menu */
.no-scroll {
    overflow: hidden;
} 