.wak-lehrer-filter {
    max-width: 100%;
    overflow: hidden;
}

.wak-lehrer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 30px;
}

.wak-lehrer-filter-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: min(100%, max-content);
    max-width: 100%;
    margin-bottom: 0;
}

.wak-lehrer-search {
    display: block;
    flex: 1 0 220px;
    max-width: 220px;
    margin-left: 0;
}

.wak-lehrer-search input {
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #4e4d4c;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
}

.wak-lehrer-search input::placeholder {
    color: #4e4d4c;
    opacity: 0.55;
}

.wak-lehrer-search input:focus {
    outline: none;
    color: #009883;
}

.wak-lehrer-empty {
    margin: 0;
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.wak-lehrer-filter-item {
    appearance: none;
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    background: #fff;
    color: #4e4d4c;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.wak-lehrer-filter-item:hover {
    color: #009883;
}

.wak-lehrer-filter-item.is-active {
    background: #009883;
    color: #fff !important;
}

.wak-lehrer-filter-item.is-active:hover {
    color: #fff !important;
}

.wak-lehrer-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 30px;
    padding: 0;
}

.wak-lehrer-grid[hidden] {
    display: none !important;
}

.wak-lehrer-layout-4col .wak-lehrer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wak-lehrer-card {
    min-width: 0;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: transform .3s ease;
}

.wak-lehrer-card:hover {
    transform: scale(1.03);
}

.wak-lehrer-card,
.wak-lehrer-card * {
    cursor: pointer;
}

.wak-lehrer-card[hidden] {
    display: none !important;
}

.wak-lehrer-filter .img-container {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f2f2f2;
}

.wak-lehrer-filter .img-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wak-lehrer-filter .wak-lehrer-title {
    display: block;
    padding: 15px 25px;
    margin: 0;
    line-height: 1.3;
    font-weight: 600;
}

.wak-lehrer-ansicht-liste .wak-lehrer-card,
.wak-lehrer-ansicht-liste .wak-lehrer-card *:not(.wak-lehrer-name) {
    cursor: default;
}

.wak-lehrer-ansicht-liste .wak-lehrer-card {
    display: flex;
    flex-direction: column;
    align-self: start;
}

.wak-lehrer-ansicht-liste .wak-lehrer-card:hover {
    transform: none;
}

.wak-lehrer-cat-name {
    display: block;
    padding: 15px 25px 8px;
    margin: 0;
    color: #009883;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wak-lehrer-filter .wak-lehrer-cat-names,
.wak-lehrer-cat-names {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
    padding: 0 25px 15px !important;
}

.wak-lehrer-cat-names li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.wak-lehrer-cat-names li::marker,
.wak-lehrer-cat-names li::before {
    content: none !important;
    display: none !important;
}

.wak-lehrer-cat-names li + li {
    margin-top: 4px;
}

.wak-lehrer-name {
    appearance: none;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    transition: color .2s ease;
}

.wak-lehrer-ansicht-liste a.wak-lehrer-name,
.wak-lehrer-name {
    cursor: pointer;
}

.wak-lehrer-name:hover,
.wak-lehrer-name:focus-visible {
    color: #009883;
    text-decoration: none !important;
}

.wak-lehrer-name:focus {
    outline: none;
}

.wak-lehrer-name:focus-visible {
    outline: 2px solid #009883;
    outline-offset: 2px;
}

.wak-lehrer-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 40px;
    border: 0;
    background: transparent;
    overflow: auto;
    box-sizing: border-box;
}

.wak-lehrer-modal[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wak-lehrer-modal::backdrop {
    background: rgba(0, 0, 0, .65);
}

.wak-lehrer-modal-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1050px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.wak-lehrer-modal-close {
    position: absolute;
    z-index: 10;
    top: 15px;
    right: 18px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: #009883;
    color: #fff;
    font-size: 30px;
    line-height: 40px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.wak-lehrer-modal-close:hover {
    background: #4e4d4c;
}

.wak-lehrer-popup {
    display: grid;
    grid-template-columns: 42% 58%;
}

.wak-lehrer-popup-image {
    min-height: 500px;
}

.wak-lehrer-popup-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wak-lehrer-popup-details {
    padding: 55px 60px;
}

.wak-lehrer-popup-details h2 {
    margin: 0 0 35px;
}

.wak-lehrer-detail {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.wak-lehrer-detail:last-of-type {
    border-bottom: none;
}

.wak-lehrer-detail strong {
    font-weight: 600;
}

.wak-lehrer-detail a {
    color: #009883;
}

.wak-lehrer-zusatz {
    margin-top: 30px;
}

.wak-lehrer-zusatz strong,
.wak-lehrer-zusatz b {
    font-weight: 500 !important;
}

.wak-lehrer-zusatz p:last-child {
    margin-bottom: 0;
}

body.wak-modal-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .wak-lehrer-grid,
    .wak-lehrer-layout-4col .wak-lehrer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .wak-lehrer-toolbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 20px;
        gap: 8px;
    }

    .wak-lehrer-filter-bar {
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 0;
    }

    .wak-lehrer-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .wak-lehrer-filter-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .wak-lehrer-search {
        margin-left: 0;
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
    }

    .wak-lehrer-search input {
        width: 100%;
    }

    .wak-lehrer-grid,
    .wak-lehrer-layout-4col .wak-lehrer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .wak-lehrer-filter .wak-lehrer-title {
        padding: 12px 14px;
    }

    .wak-lehrer-cat-name {
        padding: 12px 14px 6px;
        font-size: 12px;
        letter-spacing: 0;
    }

    .wak-lehrer-filter .wak-lehrer-cat-names,
    .wak-lehrer-cat-names {
        padding: 0 14px 12px !important;
    }

    .wak-lehrer-card:hover {
        transform: none;
    }

    .wak-lehrer-modal {
        padding: 12px;
        align-items: flex-start;
    }

    .wak-lehrer-modal[open] {
        align-items: flex-start;
    }

    .wak-lehrer-modal-box {
        margin-top: 0;
        max-height: calc(100dvh - 24px);
    }

    .wak-lehrer-popup {
        grid-template-columns: 1fr;
    }

    .wak-lehrer-popup-image {
        min-height: 0;
        height: 320px;
    }

    .wak-lehrer-popup-details {
        padding: 30px 25px;
    }

    .wak-lehrer-detail {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
