/**
 * OAG Overlap Grid - Fixed Scaling & Layout
 */

.oag-overlap {
    width: 100%;
    max-width: 100rem; /* Begrenzung nach oben */
    margin: 20px auto;
    padding: 0 20px;
    
}

.oag-overlap__layout {
    display: flex; /* Flex ist hier sicherer als Grid für die Hauptspalten */
    flex-wrap: nowrap;
    gap: 50px;
    align-items: center;
}

/* Linke Seite: Bild-Container */
.oag-overlap__visual-container {
    flex: 0 0 55%; /* Nimmt exakt 55% der Breite ein */
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
   /* Basis-Höhe für die Matrix */
    position: relative;
}

.oag-overlap__figure {
    margin: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 5px solid #ffffff;
    background: #f0f0f0;
    overflow: hidden;
    position: relative; /* Wichtig für das Kind-Bild */
    max-witdth: 350px;
    border-radius: 70px 10px 70px 10px;
}

/* DAS FIXT DIE RIESIGEN BILDER */
.oag-overlap__figure img,
.oag-overlap__figure picture,
.oag-overlap__figure picture img {
    display: block;
    width: 100% !important;  /* Erzwingt Breite der Zelle */
    height: 100% !important; /* Erzwingt Höhe der Zelle */
    object-fit: cover;   /* Beschneidet das Bild passend */
    max-width: 100%;
     
}

/* Grid-Positionen (Bleiben gleich, aber jetzt innerhalb der 55% Breite) */
.oag-overlap__figure--0 { grid-area: 2 / 1 / 10 / 8; z-index: 10; }
.oag-overlap__figure--1 { grid-area: 1 / 6 / 7 / 12; z-index: 20; }
.oag-overlap__figure--2 { grid-area: 6 / 4 / 12 / 11; z-index: 30; }

/* Rechte Seite: Text-Container */
.oag-overlap__content-column {
    flex: 0 0 40%; /* Nimmt 40% Breite ein */
    z-index: 50;
}


.oag-overlap__content-column {
    flex: 0 0 40%;
    min-width: 0; /* WICHTIG: Erlaubt dem Flex-Item, kleiner als sein Inhalt zu werden */
}

.oag-overlap__card {
    padding: 3rem;
    background: #fff;
    border-left: 5px solid #3d454d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    
    /* Text-Umbruch erzwingen */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto; /* Trennstriche bei langen Wörtern */
    border-radius: 40px 0px 40px 0px;
}

.oag-overlap__card-inner {
    max-width: 100%;
}

/* Falls Bilder im Text sind, dürfen diese nicht ausbrechen */
.oag-overlap__card-inner img {
    max-width: 100%;
    height: auto;
}

/* Verhindert, dass Tabellen oder Pre-Tags das Layout sprengen */
.oag-overlap__card-inner table,
.oag-overlap__card-inner pre {
    max-width: 100%;
    overflow-x: auto;
}

.oag-overlap__card h2, 
.oag-overlap__card h3 {
    margin-top: 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase; /* Optional für den High-Level Look */
}

.oag-overlap {
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 30px 30px; /* Abstand der Punkte */
    background-position: center;
   width: 100%;
    min-height: 400px;
   
    
}


/* Mobile: Alles untereinander */
@media (max-width: 991px) {
    .oag-overlap__layout {
        flex-direction: column;
    }
    .oag-overlap__visual-container, 
    .oag-overlap__content-column {
        flex: 0 0 100%;
        width: 100%;
    }
    .oag-overlap__visual-container {
        min-height: 400px;
    }
}
