/* ══════════════════════════════════════
   BENTO GRID – About Us Section
   ══════════════════════════════════════ */

/* ── Hero Image: kein Abstand zur Navigation ── */
#c204 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#c204.frame-space-before-extra-small {
    margin-top: 0 !important;
}

/* ── Section Wrapper ── */
.cb-bento {
    padding: 80px 0 0;
    overflow: hidden;
}

/* ── Hero Header ── */
.cb-bento .container {
    max-width: 1200px;
    padding-left: 72px;
    padding-right: 72px;
}

.cb-bento__eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bs-quaternary);
    opacity: 0.4;
    margin-bottom: 16px;
}

.cb-bento__headline {
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--bs-quaternary);
}

.cb-bento__headline em,
.cb-bento__headline strong {
    color: var(--bs-primary);
    font-style: normal;
}

.cb-bento__intro {
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.7;
    color: rgba(20, 55, 65, 0.5);
    max-width: 480px;
}

@media (max-width: 991px) {
    .cb-bento .container {
        padding-left: 24px;
        padding-right: 24px;
    }
}


/* ── Grid Container ── */
.cb-bento__grid {
    display: grid;
    gap: 14px;
    padding: 0 24px 24px;
    max-width: 1200px;
    margin: 0 auto;

    /* Mobile: 1 Spalte */
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .cb-bento__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .cb-bento__grid {
        grid-template-columns: repeat(12, 1fr);
        grid-auto-rows: minmax(0, auto);
        padding: 0 72px 24px;
    }
}


/* ══════════════════════════════════════
   GRID SIZING (Desktop) via nth-child
   Kachel-Reihenfolge bestimmt die Größe
   ══════════════════════════════════════ */

@media (min-width: 992px) {
    /* Reihe 1: Bild links + Text rechts (gleiche Höhe) */
    .cb-bento__grid > .cb-tile:nth-child(1) {
        grid-column: 1 / 8;
        grid-row: 1;
    }
    .cb-bento__grid > .cb-tile:nth-child(2) {
        grid-column: 8 / 13;
        grid-row: 1;
    }

    /* Reihe 2: Text links + Bild rechts */
    .cb-bento__grid > .cb-tile:nth-child(3) {
        grid-column: 1 / 5;
        grid-row: 2;
    }
    .cb-bento__grid > .cb-tile:nth-child(4) {
        grid-column: 5 / 13;
        grid-row: 2;
    }

    /* Reihe 3: Zwei halbe */
    .cb-bento__grid > .cb-tile:nth-child(5) {
        grid-column: 1 / 7;
        grid-row: 3;
    }
    .cb-bento__grid > .cb-tile:nth-child(6) {
        grid-column: 7 / 13;
        grid-row: 3;
    }

    /* Reihe 4: Text links + Bild rechts */
    .cb-bento__grid > .cb-tile:nth-child(7) {
        grid-column: 1 / 8;
        grid-row: 4;
    }
    .cb-bento__grid > .cb-tile:nth-child(8) {
        grid-column: 8 / 13;
        grid-row: 4;
    }

    /* Reihe 5: Zwei halbe */
    .cb-bento__grid > .cb-tile:nth-child(9) {
        grid-column: 1 / 6;
        grid-row: 5;
    }
    .cb-bento__grid > .cb-tile:nth-child(10) {
        grid-column: 6 / 13;
        grid-row: 5;
    }

    /* Reihe 6: Zwei halbe */
    .cb-bento__grid > .cb-tile:nth-child(11) {
        grid-column: 1 / 7;
        grid-row: 6;
    }
    .cb-bento__grid > .cb-tile:nth-child(12) {
        grid-column: 7 / 13;
        grid-row: 6;
    }

    /* Ab Kachel 13: einfaches 50/50-Paar-Layout (links/rechts nebeneinander) */
    .cb-bento__grid > .cb-tile:nth-child(n+13):nth-child(odd) {
        grid-column: 1 / 7;
        grid-row: auto;
    }
    .cb-bento__grid > .cb-tile:nth-child(n+13):nth-child(even) {
        grid-column: 7 / 13;
        grid-row: auto;
    }

    /* Wenn Gesamtanzahl ungerade: letzte (allein stehende) Kachel über volle Breite,
       damit sie nicht halbiert mit leerem Raum daneben dasteht */
    .cb-bento__grid > .cb-tile:nth-child(odd):last-child {
        grid-column: 1 / 13;
    }
}


/* ══════════════════════════════════════
   TILE BASE STYLES
   ══════════════════════════════════════ */

.cb-tile {
    border-radius: 6px;
    overflow: hidden;
    position: relative;

    /* Scroll-Animation initial */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}

.cb-tile.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cb-tile.is-visible:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(20, 55, 65, 0.12);
}


/* ══════════════════════════════════════
   TILE VARIANTS (via link_class)
   ══════════════════════════════════════ */

/* Default: Weiß */
.cb-tile--default {
    background: #fff;
}

.cb-tile--default .cb-tile__year {
    font-size: clamp(44px, 4.5vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(20, 55, 65, 0.12);
    display: block;
    margin-bottom: 8px;
}

.cb-tile--default .cb-tile__title {
    color: var(--bs-quaternary);
}

.cb-tile--default .cb-tile__desc {
    color: rgba(20, 55, 65, 0.5);
}

/* Primary: Rot / Akzent */
.cb-tile--primary {
    background: var(--bs-primary);
}

.cb-tile--primary .cb-tile__year {
    font-size: clamp(44px, 4.5vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.25);
    display: block;
    margin-bottom: 8px;
}

.cb-tile--primary .cb-tile__title {
    color: #fff;
}

.cb-tile--primary .cb-tile__desc {
    color: rgba(255, 255, 255, 0.65);
}

.cb-tile--primary .cb-btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.cb-tile--primary .cb-btn-outline:hover {
    background: #fff;
    color: var(--bs-primary);
}

/* Secondary: Weiß / Zitat */
.cb-tile--secondary {
    background: #fff;
}

.cb-tile--secondary .cb-tile__year {
    color: rgba(20, 55, 65, 0.12);
}

.cb-tile--secondary .cb-tile__title {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 300;
    line-height: 1.5;
    color: var(--bs-quaternary);
    font-style: italic;
}

.cb-tile--secondary .cb-tile__desc {
    color: rgba(20, 55, 65, 0.4);
    font-size: 13px;
    font-style: normal;
}

/* Tertiary: Dunkel */
.cb-tile--tertiary {
    background: var(--bs-quaternary);
}

.cb-tile--tertiary .cb-tile__year {
    font-size: clamp(44px, 4.5vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.12);
    display: block;
    margin-bottom: 8px;
}

.cb-tile--tertiary .cb-tile__title {
    color: #fff;
}

.cb-tile--tertiary .cb-tile__desc {
    color: rgba(255, 255, 255, 0.4);
}

.cb-tile--tertiary .cb-btn-outline {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.cb-tile--tertiary .cb-btn-outline:hover {
    background: var(--bs-primary);
    color: #fff;
}


/* ══════════════════════════════════════
   TILE BODY (text content)
   ══════════════════════════════════════ */

.cb-tile__body {
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cb-tile__title {
    font-size: clamp(16px, 1.3vw, 19px);
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.cb-tile__desc {
    font-size: 13.5px;
    line-height: 1.65;
    margin-bottom: 0;
    flex-grow: 1;
}

.cb-tile__desc p {
    margin-bottom: 0;
}

.cb-tile__cta {
    margin-top: 20px;
}


/* ══════════════════════════════════════
   IMAGE TILES
   ══════════════════════════════════════ */

/* Reine Bild-Kachel (kein Header gesetzt) */
.cb-bento__grid .cb-tile--image-only {
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.cb-bento__grid .cb-tile--image-only > .cb-tile__image-wrap {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.cb-bento__grid .cb-tile--image-only > .cb-tile__image-wrap > img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
}

/* Kachel mit Bild UND Text: Bild oben, Text darunter */
.cb-tile--has-image {
    display: flex;
    flex-direction: column;
}

.cb-tile--has-image .cb-tile__image-wrap {
    position: relative;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
}

.cb-tile--has-image .cb-tile__image {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
}

.cb-tile--has-image .cb-tile__body {
    flex-grow: 1;
}


/* ══════════════════════════════════════
   YEAR BADGE (small variant)
   ══════════════════════════════════════ */

/* Kleines Jahr-Badge als Alternative (wenn subheader kurz ist) */
.cb-tile__year:empty {
    display: none;
}


/* ══════════════════════════════════════
   CTA BUTTON
   ══════════════════════════════════════ */

.cb-btn-outline {
    display: inline-block;
    color: var(--bs-primary);
    border: 1px solid var(--bs-primary);
    background: transparent;
    padding: 11px 26px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cb-btn-outline:hover {
    background: var(--bs-primary);
    color: #fff;
    text-decoration: none;
}
