/* --- Main Content Area --- */
.main-content-area {
    padding-top: 140px; /* Platz für die sticky Navbar, passe dies an die tatsächliche Höhe deiner Navbar an */
    padding-bottom: 20px; /* Abstand nach unten */
}


/* --- Karlsson Banner Section --- */
.karlsson-banner {
    display: flex;
    flex-direction: row; /* Bild links, Text rechts */
    max-width: 1450px; /* Breite des Banners beibehalten, wie im letzten Code */
    margin: 0 auto;
    background-color: #f0ead6; /* Hellbeige wie altes Papier */
    border: 1px solid #c0b080; /* Rand wie alte Zeitung */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2); /* Sanfter Schatten */
    padding: 10px;
    gap: 20px; /* Abstand zwischen Bild und Text */
    position: relative; /* Für Karussell-Navigation */
    box-sizing: border-box;
    align-items: stretch;
}

.karlsson-image-carousel {
    flex-basis: 30%; /* **Beibehalten:** Bild nimmt 35% der Breite ein */
    flex-shrink: 0;
    position: relative; /* Für Navigationspunkte */
    overflow: hidden; /* Wichtig für die Ränder */
    aspect-ratio: 4 / 3;
    border-right: 1px dashed #c0b080; /* Gestrichelte Linie wie in einer Zeitung */
    background-image:
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
    url('../img/wfj.png');
    background-blend-mode: lighten; /* oder multiply, overlay, soft-light je nach Look */
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    width: 100%;
    max-width: 100%; /* oder 100%, wenn du’s ganz responsiv willst */
    height: auto;
    max-height: none; 
    min-height: 300px; /* oder ein relativer Wert wie 40vh */
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        /* Das Karussell selbst bekommt den Zeitungsrahmen */
    border: 1px solid #c0b080;
    z-index: 1;
}

.karlsson-image-carousel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(240, 234, 214, 0.4); /* leicht pergamentfarben */
    mix-blend-mode: multiply; /* sattere Farben, wirkt "druckähnlich" */
    backdrop-filter: contrast(0.9) brightness(1.1); /* leicht weicher & heller */
    pointer-events: none;
    z-index: 0;
}

/* Angepasste Klasse für das Figure-Element im Karussell */
.karlsson-figure {
    position: absolute; /* Muss absolut sein für den Überblend-Effekt */
    width: 100%; /* Nimmt die volle Breite des Karussell-Containers ein */
    height: 100%;
    align-items: center; /* Zentriert den Inhalt horizontal im Figure */
    opacity: 0;
    transform: scale(0.95);
    top: 0; /* Oben im Karussell-Container */
    left: 0; /* Links im Karussell-Container */
    z-index: 0;
    margin: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box; /* Stellt sicher, dass padding die Gesamtgröße nicht erhöht */
}

.karlsson-figure.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
}

.karlsson-figure img {
    width: 90%;
    max-height: 90%;
    margin-bottom: 10px;
    object-fit: contain;
    display: block;
    padding: 0.7rem 0.7rem 1.7rem 0.7rem; /* ⬅️ Polaroid: unten dicker! */
    background:  rgba(255, 255, 255, 0.2);
    border: 2px solid #44444454;
    border-radius: 0;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
}

.karlsson-caption {
    font-family: 'Lora', serif;
    font-style: italic;
    color: #555;
    text-align: center; /* Bildunterschrift bleibt zentriert */
    border-radius: 6px;
    max-width: 90%; /* Caption-Breite beibehalten, wie im vorletzten Code */
    font-size: 0.9rem;
    padding: 0.7rem 0.7rem;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
    background:  rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(3px);
    margin-bottom: 1rem; 
}

.carousel-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    width: 100%;
    justify-content: center;
    padding-bottom: 10px;
}

.karlsson-text-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0px 30px; /* Top/Bottom 20px, Left/Right 30px */
    margin-top: 0;
}

hgroup {
    margin-bottom: 20px;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

.karlsson-headline {
    font-family: 'Old Standard TT', serif;
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #222;
    line-height: 1.1;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.karlsson-subheadline {
    font-family: 'Merriweather', serif;
    font-size: 1.3em;
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
}

.karlsson-article-text {
    column-count: 2;
    column-gap: 20px;
    font-family: 'Lora', serif;
    font-size: 1em;
    color: #444;
    text-align: justify;
}

.karlsson-article-text p {
    margin-bottom: 1em;
}

.karlsson-signature {
    text-align: right;
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.9em;
    margin-top: 15px;
    color: #666;
}


/* Für Tablets und kleinere Desktops */
@media (max-width: 992px) {
    .main-content-area {
        padding-top: 160px; /* Mehr Platz nach oben für Tablets */
    }

    .karlsson-banner {
        flex-direction: column; /* Stapelt Karussell und Text untereinander */
        padding: 20px;
        gap: 20px;
        align-items: center;
        min-height: auto; /* min-height zurücksetzen für flexibles Verhalten */
    }


    .karlsson-image-carousel {
        flex-basis: auto; /* Nimmt wieder die volle Breite im Column-Layout */
        width: 100%;
        max-height: 100vh;
        min-height: 100vh;
        margin-top: 0; /* Nicht mehr an den unteren Rand drücken im Column-Layout */
        border-right: none; /* Keine Linie mehr nach rechts */
        padding-right: 0;
        aspect-ratio: auto; /* Bei fester Höhe 'auto' setzen */
    }

    .karlsson-figure {
        top: 0;
        height: 100%; /* Nimmt volle Höhe des Karussells ein */
        padding-top: 80px; /* Angepasster Platz für Overlay auf Tablets */
        padding-bottom: 10px; /* Platz für Dots und Caption */
    }

    .karlsson-figure img {
        width: 100%;
        height: auto;
    }

    .karlsson-headline {
        font-size: 2.2em;
    }

    .karlsson-subheadline {
        font-size: 1.1em;
    }

    .karlsson-article-text {
        column-count: 1;
        font-size: 0.95em;
        line-height: 1.5;
        padding: 0;
    }
    .carousel-nav {
        padding-bottom: max(10px, 2vh);
    }
    .karlsson-caption {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* Für Smartphones */
@media (max-width: 600px) {
    .main-content-area {
        padding-top: 120px; /* Mehr Platz nach oben für Smartphones */
    }

    .karlsson-banner {
        padding: 10px;
    }


    .karlsson-image-carousel {
        max-height: 100vh;
        min-height: 100vh;
    }

    .karlsson-figure {
        top: 0;
        height: 100%; /* Nimmt volle Höhe des Karussells ein */
        padding-top: 80px; /* Angepasster Platz für Overlay auf Smartphones */
        padding-bottom: 35px; /* Platz für Dots und Caption */
    }
    .karlsson-figure img {
        /* WICHTIG: max-height muss das Gesamt-Padding der Figure abziehen */
        max-height: calc(100% - (60px + 35px)); /* 100% minus Padding Top (60px) minus Padding Bottom (35px) */
    }

    .karlsson-headline {
        font-size: 1.8em;
    }

    .karlsson-subheadline {
        font-size: 1em;
    }

    .karlsson-article-text {
        font-size: 0.9em;
        line-height: 1.4;
        padding: 0;
    }
    .karlsson-caption {
        white-space: normal;
    }
}
