/* BAUSTEIN SUBPAGE STYLES */
:root {
    --baustein-01-primary: var(--bakule-color-01);
    --baustein-01-light: hsla(267, 41%, 71%, 0.25);
    --baustein-01-medium: hsla(267, 41%, 55%, 0.4);
    --baustein-01-dark: hsla(267, 41%, 41%, 0.5);
    
    --baustein-02-primary: var(--bakule-color-02);
    --baustein-02-light: hsla(312, 31%, 66%, 0.25);
    --baustein-02-medium: hsla(312, 31%, 50%, 0.4);
    --baustein-02-dark: hsla(312, 31%, 36%, 0.5);
    
    --baustein-03-primary: var(--bakule-color-03);
    --baustein-03-light: hsla(356, 41%, 66%, 0.25);
    --baustein-03-medium: hsla(356, 41%, 50%, 0.4);
    --baustein-03-dark: hsla(356, 41%, 36%, 0.5);
    
    --baustein-04-primary: var(--bakule-color-04);
    --baustein-04-light: hsla(15, 51%, 66%, 0.25);
    --baustein-04-medium: hsla(15, 51%, 50%, 0.4);
    --baustein-04-dark: hsla(15, 51%, 36%, 0.5);
    
    --baustein-05-primary: var(--bakule-color-05);
    --baustein-05-light: hsla(42, 51%, 66%, 0.25);
    --baustein-05-medium: hsla(42, 51%, 50%, 0.4);
    --baustein-05-dark: hsla(42, 51%, 36%, 0.5);
    
    --baustein-06-primary: var(--bakule-color-06);
    --baustein-06-light: hsla(68, 41%, 66%, 0.25);
    --baustein-06-medium: hsla(68, 41%, 50%, 0.4);
    --baustein-06-dark: hsla(68, 41%, 36%, 0.5);
    
    --baustein-07-primary: var(--bakule-color-07);
    --baustein-07-light: hsla(139, 41%, 66%, 0.25);
    --baustein-07-medium: hsla(139, 41%, 50%, 0.4);
    --baustein-07-dark: hsla(139, 41%, 36%, 0.5);
    
    --baustein-08-primary: var(--bakule-color-08);
    --baustein-08-light: hsla(168, 41%, 66%, 0.25);
    --baustein-08-medium: hsla(168, 41%, 50%, 0.4);
    --baustein-08-dark: hsla(168, 41%, 36%, 0.5);
    
    --baustein-09-primary: var(--bakule-color-09);
    --baustein-09-light: hsla(202, 56%, 66%, 0.25);
    --baustein-09-medium: hsla(202, 56%, 50%, 0.4);
    --baustein-09-dark: hsla(202, 56%, 36%, 0.5);
    
    --baustein-10-primary: var(--bakule-color-10);
    --baustein-10-light: hsla(228, 56%, 66%, 0.25);
    --baustein-10-medium: hsla(228, 56%, 50%, 0.4);
    --baustein-10-dark: hsla(228, 56%, 36%, 0.5);
}

/* Add at the beginning of the file to ensure it applies throughout */
* {
    box-sizing: border-box;
}

/* Update body styles to help with mobile layout */
.baustein-page {
    min-height: 100vh;
    background-color: #f6f6f8;
    position: relative;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* Improved navigation bar */
.baustein-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

/* Enhanced home link */
.home-link {
    font-weight: 700;
    font-size: 1.5rem;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-link:hover {
    transform: translateY(-2px);
}

.bakule-logo {
    height: 2rem;
    width: auto;
}

.bakule-text {
    font-weight: inherit;
    font-size: inherit;
}

.baustein-page[data-baustein="01"] .home-link:hover {
    color: var(--baustein-01-primary);
}

.measure-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Improved navigation arrows */
.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    color: #666;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.baustein-page[data-baustein="01"] .nav-arrow:hover {
    background-color: var(--baustein-01-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(105, 63, 148, 0.3);
}

.current-measure {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
}

/* Background blobs styling */
.baustein-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.baustein-page[data-baustein="01"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-01-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="01"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-01-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="01"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-01-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 02 Blobs */
.baustein-page[data-baustein="02"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-02-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="02"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-02-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="02"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-02-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 03 Blobs */
.baustein-page[data-baustein="03"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-03-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="03"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-03-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="03"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-03-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 04 Blobs */
.baustein-page[data-baustein="04"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-04-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="04"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-04-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="04"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-04-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 05 Blobs */
.baustein-page[data-baustein="05"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-05-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="05"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-05-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="05"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-05-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 06 Blobs */
.baustein-page[data-baustein="06"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-06-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="06"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-06-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="06"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-06-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 07 Blobs */
.baustein-page[data-baustein="07"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-07-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="07"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-07-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="07"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-07-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 08 Blobs */
.baustein-page[data-baustein="08"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-08-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="08"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-08-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="08"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-08-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 09 Blobs */
.baustein-page[data-baustein="09"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-09-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="09"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-09-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="09"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-09-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Baustein 10 Blobs */
.baustein-page[data-baustein="10"] .blob-1 {
    position: absolute;
    top: 5%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background-color: var(--baustein-10-light);
    filter: blur(80px);
    animation: floatBlob 8s infinite alternate ease-in-out;
}

.baustein-page[data-baustein="10"] .blob-2 {
    position: absolute;
    top: 30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--baustein-10-medium);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate-reverse ease-in-out;
}

.baustein-page[data-baustein="10"] .blob-3 {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background-color: var(--baustein-10-dark);
    filter: blur(70px);
    animation: floatBlob 8s infinite alternate ease-in-out;
    animation-delay: 8s;
    will-change: transform, filter;
}

/* Main content area */
.baustein-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 3.5rem auto 2rem;
    padding: 0 2rem;
}

.baustein-header {
    margin-top: 8rem;
    margin-bottom: 1.5rem;
}

/* Better badge design */
.baustein-badge {
    display: inline-block;
    background-color: var(--current-baustein-primary, #666); /* use dynamic color from template */
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(105, 63, 148, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.baustein-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(105, 63, 148, 0.3);
}

.baustein-page[data-baustein="01"] .baustein-badge {
    background-color: var(--bakule-color-01) !important;
}

.baustein-page[data-baustein="02"] .baustein-badge {
    background-color: var(--bakule-color-02) !important;
}

.baustein-page[data-baustein="03"] .baustein-badge {
    background-color: var(--bakule-color-03) !important;
}

.baustein-page[data-baustein="04"] .baustein-badge {
    background-color: var(--bakule-color-04) !important;
}

.baustein-page[data-baustein="05"] .baustein-badge {
    background-color: var(--bakule-color-05) !important;
}

.baustein-page[data-baustein="06"] .baustein-badge {
    background-color: var(--bakule-color-06) !important;
}

.baustein-page[data-baustein="07"] .baustein-badge {
    background-color: var(--bakule-color-07) !important;
}

.baustein-page[data-baustein="08"] .baustein-badge {
    background-color: var(--bakule-color-08) !important;
}

.baustein-page[data-baustein="09"] .baustein-badge {
    background-color: var(--bakule-color-09) !important;
}

.baustein-page[data-baustein="10"] .baustein-badge {
    background-color: var(--bakule-color-10) !important;
}

.baustein-content h1 {
    letter-spacing: normal;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: #222;
    line-height: 1.1;
}

.baustein-body {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* New flexible layout container */
.layout-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 1rem;
}

/* Positioning of elements */
.baustein-illustration {
    grid-column: 2 / span 2;
    grid-row: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.featured-text {
    grid-column: 1 / span 1;
    grid-row: 1;
}

.baustein-quote {
    grid-column: 1 / span 3;
    grid-row: 2;
}

.two-column-blocks {
    grid-column: 1 / span 3;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.data-table-section {
    grid-column: 1 / span 3;
    grid-row: 4;
}

.outcomes {
    grid-column: 1 / span 3;
    grid-row: 5;
}

/* Styling for the first featured text */
.baustein-body .featured-text p {
    font-size: 1.3rem !important;
    line-height: 1.4 !important;
    color: #333 !important;
    font-weight: 400 !important;
    margin-bottom: 1rem !important;
    font-family: 'Inter', sans-serif !important;
}

/* Quote styling with larger text */
.baustein-body .baustein-quote {
    position: relative;
    margin: 1.25rem 0;
    padding: 1.25rem 1.5rem;
    background-color: rgba(105, 63, 148, 0.05);
    border-left: 5px solid var(--baustein-01-primary);
    border-radius: 0; /* Rectangular corners */
}

.baustein-body .baustein-quote p {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
    font-style: italic;
    color: #333 !important;
    margin-bottom: 1.5rem !important;
    font-family: 'Inter', sans-serif !important;
}

.baustein-quote cite {
    font-size: 1rem;
    font-style: normal;
    color: #666;
    display: block;
    text-align: right;
}

.baustein-quote::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 4rem;
    color: var(--baustein-01-primary);
    opacity: 0.2;
    font-family: 'Merriweather', serif;
}

/* Table styling */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.baustein-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-bottom: 1.5rem;
}

.baustein-table th {
    background-color: var(--baustein-01-primary);
    color: white;
    padding: 1rem;
    font-weight: 600;
}

.baustein-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.baustein-table tr:nth-child(even) {
    background-color: rgba(105, 63, 148, 0.05);
}

.baustein-table tr:hover {
    background-color: rgba(105, 63, 148, 0.1);
}

/* Basic styling for all section elements */
.layout-container section {
    margin-bottom: 1rem;
}

.layout-container h2 {
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    color: #333;
    text-align: left;
}

.baustein-page[data-baustein="01"] .layout-container h2 {
    color: var(--baustein-01-primary);
}

.layout-container p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.layout-container ul {
    list-style-type: none;
    padding-left: 0;
}

.layout-container li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    color: #444;
}

.layout-container li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--baustein-01-primary);
    font-weight: bold;
}

.baustein-image {
    max-width: 100%;
    height: auto;
    max-height: 450px;
}

/* Enhanced letter spacing for CAPS text - but not the main heading */
.baustein-badge,
.layout-container h2 {
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* New Ergebnisse grid layout */
.outcomes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0.75rem;
}

/* Enhance outcome boxes with better animation */
.outcome-box {
    flex: 1;
    min-width: 200px;
    height: 180px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.outcome-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(105, 63, 148, 0.2);
}

.outcome-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.outcome-box:hover::after {
    opacity: 1;
}

.outcome-box p {
    font-family: 'Inter', sans-serif !important;
    margin: 0 !important;
    font-size: 1.1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

/* Different shades for baustein 01 */
.baustein-page[data-baustein="01"] .outcome-box:nth-child(1) {
    background-color: rgba(105, 63, 148, 0.5);
}

.baustein-page[data-baustein="01"] .outcome-box:nth-child(2) {
    background-color: rgba(105, 63, 148, 0.6);
}

.baustein-page[data-baustein="01"] .outcome-box:nth-child(3) {
    background-color: rgba(105, 63, 148, 0.7);
}

/* Subtle animations for content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.baustein-header, 
.featured-text, 
.baustein-quote, 
.outcomes-grid {
    animation: fadeInUp 0.8s ease-out forwards;
}

.featured-text {
    animation-delay: 0.2s;
}

.baustein-quote {
    animation-delay: 0.4s;
}

.outcomes-grid {
    animation-delay: 0.6s;
}

/* Responsive styles */
@media (max-width: 992px) {
    .layout-container {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .baustein-illustration,
    .featured-text,
    .baustein-quote,
    .two-column-blocks,
    .data-table-section,
    .outcomes {
        grid-column: 1;
        width: 100%;
    }
    
    .baustein-illustration {
        grid-row: 1;
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .featured-text {
        grid-row: 2;
    }
    
    .baustein-quote {
        grid-row: 3;
    }
    
    .two-column-blocks {
        grid-row: 4;
        grid-template-columns: 1fr;
    }
    
    .data-table-section {
        grid-row: 5;
    }
    
    .outcomes {
        grid-row: 6;
    }
    
    .baustein-body {
        padding: 2.5rem;
    }
    
    .baustein-nav {
        padding: 1.2rem 1.5rem;
    }
    
    .baustein-body .featured-text p {
        font-size: 1.2rem !important;
    }
    
    .baustein-body .baustein-quote p {
        font-size: 1.9rem !important;
    }
}

/* Strengthen the mobile fixes */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .baustein-content {
        margin-top: 6rem;
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .baustein-body {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        overflow-x: hidden;
    }
    
    .layout-container {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .featured-text, 
    .baustein-quote, 
    .data-table-section,
    .outcomes,
    .two-column-blocks {
        width: 100%;
        max-width: 100%;
        display: block;
        overflow-x: hidden;
        padding-left: 0;
        padding-right: 0;
    }
    
    .layout-container p,
    .layout-container h2,
    .layout-container li,
    .layout-container blockquote,
    .layout-container div {
        max-width: 100%;
        word-break: break-word;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .two-column-blocks {
        display: block;
    }
    
    .baustein-illustration {
        width: 100%;
        display: flex;
        justify-content: center;
        max-width: 100%;
        overflow: hidden;
    }
    
    .baustein-image {
        max-width: 100%;
        height: auto;
    }
    
    .baustein-table {
        width: 100%;
        font-size: 0.9rem;
    }
    
    table.baustein-table th,
    table.baustein-table td {
        padding: 8px;
    }
    
    .baustein-header {
        margin-top: 9rem;
        margin-bottom: 2rem;
        text-align: center;
        width: 100%;
    }
    
    .baustein-image {
        max-width: 90%;
        margin: 0 auto;
    }
    
    .layout-container {
        padding: 0;
        width: 100%;
    }
    
    .layout-container p, 
    .layout-container h2,
    .layout-container ul,
    .layout-container blockquote {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .baustein-body .featured-text p {
        font-size: 1.2rem !important;
    }
    
    .baustein-body .baustein-quote p {
        font-size: 1.7rem !important;
    }
    
    .outcome-box {
        min-width: 100%;
        height: auto;
        padding: 1.2rem;
    }
}

/* Completely override mobile styles for smallest screens */
@media (max-width: 480px) {
    .baustein-content {
        padding: 15px 10px;
        margin-top: 80px;
    }
    
    .baustein-body {
        padding: 15px 10px;
    }
    
    .baustein-header {
        margin-bottom: 20px;
    }
    
    .layout-container {
        padding: 0;
        margin: 0;
    }
    
    .baustein-body .featured-text p {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .baustein-body .baustein-quote {
        padding: 15px;
        margin: 15px 0;
    }
    
    .baustein-body .baustein-quote p {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .layout-container section {
        margin-bottom: 20px;
    }
    
    .baustein-table {
        font-size: 0.8rem;
    }
    
    .layout-container h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .baustein-nav {
        padding: 1rem;
    }
    
    .home-link {
        font-size: 1.3rem;
    }
    
    .baustein-content {
        margin-top: 5rem;
        padding: 0 0.5rem;
    }
    
    .baustein-body {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .layout-container h2 {
        font-size: 1.3rem;
    }
    
    .baustein-body .baustein-quote {
        padding: 1.5rem 1rem;
    }
    
    .baustein-body .baustein-quote p {
        font-size: 1.1rem;
    }
    
    .outcome-box {
        min-width: 100%;
        height: auto;
        padding: 1.2rem;
    }
}

/* Mobile-specific fixes */
@media (max-width: 480px) {
    /* Fix content overflow */
    .baustein-content {
        overflow-x: hidden;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix image and text alignment */
    .baustein-body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .layout-container {
        overflow-x: hidden;
        width: 100%;
    }
    
    .baustein-illustration {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0 auto 2rem auto;
    }
    
    .baustein-image {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }
    
    .baustein-body .featured-text p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Ensure all text containers don't overflow */
    section, blockquote, .two-column-blocks {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .baustein-body .baustein-quote {
        width: 100%;
        box-sizing: border-box;
        padding: 1.5rem 1rem;
    }
    
    .table-container {
        max-width: 100%;
        overflow-x: auto;
    }
    
    .outcome-box {
        min-width: 100%;
        height: auto;
        padding: 1.2rem;
    }
}

/* Apply hyphenation to all paragraph tags */
.layout-container p,
.baustein-quote p,
.outcome-box p {
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphenate-limit-chars: 6 3 2;
    hyphenate-limit-lines: 2;
    hyphenate-limit-zone: 8%;
}

/* Override serif font for all paragraphs on Baustein pages */
.baustein-page p {
    font-family: 'Inter', sans-serif !important;
}

/* Footer styling for Baustein pages */
.baustein-page .footer-section {
    background-color: #2B2A29;
    color: #F7F5F2;
    padding: 2rem;
    margin-top: 3rem;
}

.baustein-page .footer-section p {
    color: #F7F5F2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    line-height: 1.5;
}

.baustein-page .footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.baustein-page .footer-links a {
    color: #F8836F;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.baustein-page .footer-links a:hover {
    color: #F7F5F2;
    text-decoration: underline;
}

.baustein-page .footer-logo {
    margin-bottom: 1rem;
}

.baustein-page .footer-logo-img {
    height: 60px;
    width: auto;
}

.baustein-page .footer-funding {
    font-size: 0.8rem;
    color: #F7F5F2;
    font-style: italic;
    margin-top: 1rem;
}

/* Don't justify text in outcome boxes */
.outcome-box p {
    text-align: center;
}

/* ============================================
   EXTRA CONTENT SECTION (Markdown body content)
   ============================================ */

.baustein-extra-content {
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
}

.baustein-extra-content a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1.15rem;
    transition: opacity 0.2s ease;
}

.baustein-extra-content a:hover {
    opacity: 0.8;
}

/* Dynamic link colors for extra content */
.baustein-page[data-baustein="01"] .baustein-extra-content a { color: var(--baustein-01-primary); }
.baustein-page[data-baustein="02"] .baustein-extra-content a { color: var(--baustein-02-primary); }
.baustein-page[data-baustein="03"] .baustein-extra-content a { color: var(--baustein-03-primary); }
.baustein-page[data-baustein="04"] .baustein-extra-content a { color: var(--baustein-04-primary); }
.baustein-page[data-baustein="05"] .baustein-extra-content a { color: var(--baustein-05-primary); }
.baustein-page[data-baustein="06"] .baustein-extra-content a { color: var(--baustein-06-primary); }
.baustein-page[data-baustein="07"] .baustein-extra-content a { color: var(--baustein-07-primary); }
.baustein-page[data-baustein="08"] .baustein-extra-content a { color: var(--baustein-08-primary); }
.baustein-page[data-baustein="09"] .baustein-extra-content a { color: var(--baustein-09-primary); }
.baustein-page[data-baustein="10"] .baustein-extra-content a { color: var(--baustein-10-primary); }

/* ============================================
   TEAM SECTION STYLES
   ============================================ */

.team-section {
    grid-column: 1 / span 3;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.team-section h2 {
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: #333;
    text-align: left;
}

/* Dynamic color for team heading based on baustein */
.baustein-page[data-baustein="01"] .team-section h2 { color: var(--baustein-01-primary); }
.baustein-page[data-baustein="02"] .team-section h2 { color: var(--baustein-02-primary); }
.baustein-page[data-baustein="03"] .team-section h2 { color: var(--baustein-03-primary); }
.baustein-page[data-baustein="04"] .team-section h2 { color: var(--baustein-04-primary); }
.baustein-page[data-baustein="05"] .team-section h2 { color: var(--baustein-05-primary); }
.baustein-page[data-baustein="06"] .team-section h2 { color: var(--baustein-06-primary); }
.baustein-page[data-baustein="07"] .team-section h2 { color: var(--baustein-07-primary); }
.baustein-page[data-baustein="08"] .team-section h2 { color: var(--baustein-08-primary); }
.baustein-page[data-baustein="09"] .team-section h2 { color: var(--baustein-09-primary); }
.baustein-page[data-baustein="10"] .team-section h2 { color: var(--baustein-10-primary); }

/* Flexible Grid for all team members */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Individual team card */
.team-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem; /* Tight spacing within card for proximity */
}

/* Badge for Leitung/Mitarbeitend */
.member-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.25rem;
    width: fit-content;
}

.badge-leitung {
    background-color: rgba(100, 100, 100, 0.15);
    color: #555;
}

.badge-mitarbeitend {
    background-color: rgba(100, 100, 100, 0.1);
    color: #666;
}

.member-name {
    font-weight: 500;
    color: #333;
    font-size: 1rem;
    line-height: 1.3;
}

.member-role {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
}

.member-link {
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: 0.1rem;
}

/* Dynamic link colors based on baustein */
.baustein-page[data-baustein="01"] .member-link { color: var(--baustein-01-primary); }
.baustein-page[data-baustein="02"] .member-link { color: var(--baustein-02-primary); }
.baustein-page[data-baustein="03"] .member-link { color: var(--baustein-03-primary); }
.baustein-page[data-baustein="04"] .member-link { color: var(--baustein-04-primary); }
.baustein-page[data-baustein="05"] .member-link { color: var(--baustein-05-primary); }
.baustein-page[data-baustein="06"] .member-link { color: var(--baustein-06-primary); }
.baustein-page[data-baustein="07"] .member-link { color: var(--baustein-07-primary); }
.baustein-page[data-baustein="08"] .member-link { color: var(--baustein-08-primary); }
.baustein-page[data-baustein="09"] .member-link { color: var(--baustein-09-primary); }
.baustein-page[data-baustein="10"] .member-link { color: var(--baustein-10-primary); }

.member-link:hover {
    text-decoration: underline;
}

.team-links {
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.external-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dynamic background colors for external links */
.baustein-page[data-baustein="01"] .external-link { background-color: var(--baustein-01-primary); }
.baustein-page[data-baustein="02"] .external-link { background-color: var(--baustein-02-primary); }
.baustein-page[data-baustein="03"] .external-link { background-color: var(--baustein-03-primary); }
.baustein-page[data-baustein="04"] .external-link { background-color: var(--baustein-04-primary); }
.baustein-page[data-baustein="05"] .external-link { background-color: var(--baustein-05-primary); }
.baustein-page[data-baustein="06"] .external-link { background-color: var(--baustein-06-primary); }
.baustein-page[data-baustein="07"] .external-link { background-color: var(--baustein-07-primary); }
.baustein-page[data-baustein="08"] .external-link { background-color: var(--baustein-08-primary); }
.baustein-page[data-baustein="09"] .external-link { background-color: var(--baustein-09-primary); }
.baustein-page[data-baustein="10"] .external-link { background-color: var(--baustein-10-primary); }

.external-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive styles for team section */
@media (max-width: 768px) {
    .team-section {
        grid-column: 1;
        padding: 1rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: 1rem 0.75rem;
        margin-top: 1rem;
    }

    .team-section h2 {
        font-size: 1.1rem;
    }

    .team-grid {
        gap: 1rem;
    }

    .member-name {
        font-size: 0.95rem;
    }

    .member-role {
        font-size: 0.8rem;
    }

    .member-badge {
        font-size: 0.65rem;
    }
} 