/* =========================================
   GRUNDSTRUKTUR DER KACHELN
========================================= */
.experten-team-kacheln-container {
    display: grid !important;
    width: 100% !important;
    gap: 30px !important;
    background: #264065 !important;
    padding: 30px !important;
}

.team-kachel {
    background: #264065  !important;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: auto;
    position: relative;
    border: 0;
    margin: 0 !important;
}

.team-kachel-inner {
    display: flex;
    flex-direction: column;
    height: auto;
}

/* =========================================
   BILD-BEREICH
========================================= */
.team-kachel-image {
    width: 100% !important;
    padding: 0;
    background: white !important;
    padding: 0;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    transition: all 0.3s ease;
}

.team-kachel-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0;
    border: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

/* =========================================
   INHALT DER KACHELN
========================================= */
.team-kachel-content {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    padding: 20px 25px 30px;
    transition: all 0.3s ease;
}

.kachel-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.kachel-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #7f8c8d;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* =========================================
   HOVER-EFFEKTE
========================================= */
.team-kachel.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.team-kachel.hover-lift:hover .team-kachel-image img {
    transform: translateY(-5px) scale(1.05);
}

.team-kachel.hover-zoom:hover .team-kachel-image img {
    transform: scale(1.15);
    z-index: 2;
}

.team-kachel.hover-slide:hover .team-kachel-content {
    transform: translateY(-8px);
}

.team-kachel:hover .team-kachel-image {
    background: linear-gradient(135deg, #f0f0f0 0%, #e6e6e6 100%);
}

/* =========================================
   GRID-LAYOUT: SPALTEN
========================================= */
.experten-team-kacheln-container.columns-1 {
    grid-template-columns: 1fr !important;
}

.experten-team-kacheln-container.columns-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.experten-team-kacheln-container.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.experten-team-kacheln-container.columns-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* =========================================
   FLEX-LAYOUT: BILD LINKS / RECHTS
========================================= */
.team-kachel-flex {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.team-kachel-flex .team-kachel-inner {
    flex-direction: row;
    align-items: stretch;
}

.layout-left .team-kachel-inner {
    flex-direction: row;
}

.layout-right .team-kachel-inner {
    flex-direction: row-reverse;
}

.team-kachel-flex .team-kachel-image {
    width: 40%;
    padding: 0;
    aspect-ratio: unset;
}

.team-kachel-flex .team-kachel-image img {
    aspect-ratio: unset;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0;
}

.team-kachel-flex .team-kachel-content {
    width: 60%;
    text-align: left;
    padding: 25px;
}

/* =========================================
   RESPONSIVE BREAKPOINTS
========================================= */
@media (max-width: 1200px) {
    .experten-team-kacheln-container.columns-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    .experten-team-kacheln-container.columns-3,
    .experten-team-kacheln-container.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .team-kachel-image {
        aspect-ratio: 1 / 1;
    }

    .team-kachel-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .experten-team-kacheln-container {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 20px !important;
    }

    .team-kachel-flex .team-kachel-inner {
        flex-direction: column;
    }

    .team-kachel-flex .team-kachel-image,
    .team-kachel-flex .team-kachel-content {
        width: 100%;
    }

    .team-kachel-flex .team-kachel-content {
        text-align: center;
    }

    .team-kachel-image {
        aspect-ratio: 1 / 1;
    }

    .team-kachel-image img {
        height: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .team-kachel-content {
        padding: 15px;
    }

    .kachel-title {
        font-size: 1.15rem;
    }

    .kachel-description {
        font-size: 0.9rem;
    }
}
