/* =====================
   WRAPPER & KACHELN
===================== */
.mitarbeiter-archiv-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0 30px;
    justify-content: flex-start;
    align-items: stretch; /* gleiche Höhe */
    box-sizing: border-box;
}

.mitarbeiter-archiv-kachel {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    min-width: calc(25% - 15px);
    display: flex;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
}

/* =====================
   KARTEN
===================== */
.mitarbeiter-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: var(--awb-color3);
    border: 2px solid var(--awb-color4);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease, background 0.2s ease;
    width: 100% !important; /* unbedingt */
    flex: 1 1 auto !important;
}

.mitarbeiter-item:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

/* =====================
   BILD & INITIALEN
===================== */
.mitarbeiter-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mitarbeiter-thumb img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
}

.mitarbeiter-initialen {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: var(--awb-color4);
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* =====================
   TEXT & INFO
===================== */
.mitarbeiter-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-start;
}

/* =====================
   SLOTS & FIXED HEIGHTS
===================== */
.slot {
    line-height: 1.35;
    text-align: center;
    min-height: 1.4em; /* Default für einzeilige Slots */
}

/* Name immer 3 Zeilen */
.slot-name {
    display: block;          /* Block-Level */
    height: 2.8em;           /* 3 Zeilen * line-height 1.4em */
    line-height: 1.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100% !important;
	-webkit-line-clamp: 3;
}

/* Abteilung immer 2 Zeilen */
.slot-abteilung {
    display: block;          /* Block-Level */
    height: 2.8em;           /* 2 Zeilen * line-height 1.4em */
    line-height: 1.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100% !important;
}

/* Position, Email, Telefon: 1 Zeile */
.slot-position,
.slot-email,
.slot-telefon {
    display: block;
    height: 1.4em;
    line-height: 1.4em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Unsichtbare Slots sichtbar für Layout */
.slot:empty {
    visibility: hidden; /* bleibt im Grid/Flow, nur unsichtbar */
}

/* Clamp Utility */
.clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }

/* Keine extra Margins */
.mitarbeiter-info h2,
.mitarbeiter-info p {
    margin: 0;
    font-size: 0.85rem;
}

/* Links */
.slot a {
    color: inherit;
    text-decoration: none;
}

/* =====================
   SINGLE MITARBEITER
===================== */
.mitarbeiter-archiv-wrapper.single {
    display: flex !important;
    justify-content: center !important;
    margin: 20px 0;
}

.mitarbeiter-archiv-wrapper.single .mitarbeiter-archiv-kachel {
    flex: 0 0 350px;
    max-width: 90%;
    margin: 0;
}

/* =====================
   HOVER & LINKS
===================== */
.mitarbeiter-link {
    text-decoration: none;
    color: inherit;
}

.mitarbeiter-link:hover .mitarbeiter-thumb,
.mitarbeiter-link:hover {
    transform: scale(1.02);
}

/* =====================
   FILTER
===================== */
.mitarbeiter-filter-wrapper {
    margin: 20px auto 30px auto;
    text-align: center;
}

.mitarbeiter-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.mitarbeiter-filter select {
    flex: 0 0 calc(25% - 15px);
    min-width: calc(25% - 15px);
    max-width: calc(25% - 15px);
    height: 46px;
    padding: 8px 12px;
    padding-right: 30px;
    font-size: 0.95rem;
    border: 1px solid #A2231D;
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><polygon points='0,0 12,0 6,6' style='fill:%23000'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.mitarbeiter-filter select:focus,
.mitarbeiter-filter select.active {
    border: 3px solid #A2231D;
    outline: none;
}

/* ====
   Mitarbeiter Live Suche
==== */
.mitarbeiter-suche {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

.mitarbeiter-suche .fusion-search-form-content {
    display: flex;
    gap: 15px;
    width: auto;
    max-width: none;
    opacity: 1 !important; /* Menü Script neutralisieren */
}

/* Lupen-Button */
.mitarbeiter-suche .fusion-search-submit {
    height: 46px; /* gleiche Höhe */
    width: 46px;  /* quadratisch wie Filterhöhe */
    border-left: 1px solid #A2231D !important;
    border-top: 1px solid #A2231D !important;
    border-bottom: 1px solid #A2231D !important;
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    background-color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "FontAwesome"; /* falls Icon als Font */
    font-size: 1rem;
    cursor: pointer;
}

.fusion-search-form-content .fusion-live-search-input {
    padding-left: 50px !important;   /* Abstand Input-Inhalt */
    box-sizing: border-box;          /* wichtig, damit Padding nicht die Breite sprengt */
}

/* Placeholder selbst */
.fusion-search-form-content .fusion-live-search-input::placeholder {
    text-indent: 5px !important;
    padding-left: 0px !important;
    color: #999;
}

/* Input selbst */
.mitarbeiter-suche .fusion-live-search-input {
    flex: 1 1 auto;
    height: 46px;
    padding-left: 50px;       /* Abstand links vom Lupen-Icon */
    border: 1px solid #A2231D;
    border-radius: 6px;
    background-color: #fff;
    box-sizing: border-box;   /* wichtig, sonst springt der Text */
    font-size: 0.95rem;
}

/* Placeholder */
.mitarbeiter-suche .fusion-live-search-input::placeholder {
    color: #999;
    opacity: 1;
}

.suchergebnisse-seiten-titel {
    max-width: 100% !important;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1600px) {
    .mitarbeiter-archiv-kachel {
        flex: 0 0 calc(33.333% - 15px);
        max-width: calc(33.333% - 15px);
    }
    .mitarbeiter-filter select {
        flex: 0 0 calc(33.333% - 15px);
        min-width: calc(33.333% - 15px);
        max-width: calc(33.333% - 15px);
    }
}

@media (max-width: 1200px) {
    .mitarbeiter-archiv-kachel {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
    .mitarbeiter-filter select {
        flex: 0 0 calc(50% - 15px);
        min-width: calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 700px) {
    .mitarbeiter-archiv-kachel {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .mitarbeiter-filter select {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
    }
}