/* Kartenkatalog; nur die Projektuebersicht erhaelt dieses Layout. */
body:has(.project-overview) {
    background: #f6f7f8;
}

#content.container:has(.project-overview) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 1560px !important;
    margin: 0 auto !important;
    padding: 28px 32px 76px !important;
}

.project-overview {
    color: #374151;
    font: 14px/1.5 'Archivo', Arial, sans-serif;
}

.project-overview [hidden] {
    display: none !important;
}

.project-overview-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.project-overview h1 {
    margin: 0 0 4px;
    color: #27313e;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.project-overview-heading p {
    margin: 0;
    color: #687482;
}

.project-search {
    width: 320px;
    max-width: 100%;
}

.project-search label {
    display: block;
    margin: 0 0 5px;
    color: #596675;
    font-size: 12px;
    font-weight: 700;
}

.project-search-field {
    position: relative;
}

.project-search-field > svg {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #687482;
    stroke-width: 1.6;
    pointer-events: none;
}

.project-search input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 9px 12px 9px 38px;
    border: 1px solid #d7dce1;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    color: #374151;
    font: inherit;
}

.project-overview .project-result-count {
    margin: 22px 0 12px;
    color: #687482;
    font-size: 12px;
}

.project-overview .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-item {
    min-width: 0;
}

.project-overview a.project-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    border: 1px solid #dce1e5;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    text-decoration: none;
    box-shadow: 0 1px 2px rgb(31 41 55 / 4%);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.project-card-preview {
    height: 128px;
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 7px 7px 0 0;
    background: #edf0f2;
}

.project-card-preview img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    box-shadow: none;
}

.project-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 16px;
}

.project-overview h2.project-card-title {
    margin: 0;
    min-height: 44px;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    overflow-wrap: anywhere;
}

.project-card-action {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #b51220;
    font-size: 13px;
    font-weight: 700;
}

.project-card-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-overview a.project-card:hover {
    border-color: #bdc6ce;
    box-shadow: 0 3px 10px rgb(31 41 55 / 8%);
}

.project-overview a.project-card:hover .project-card-action {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-overview a.project-card:focus-visible,
.project-search input[type="search"]:focus-visible,
.project-empty button:focus-visible {
    outline: 2px solid #c1121f;
    outline-offset: 3px;
}

.project-empty {
    padding: 40px 16px;
    border: 1px dashed #d7dce1;
    border-radius: 8px;
    text-align: center;
}

.project-empty h2 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 24px;
}

.project-empty p {
    color: #687482;
}

.project-empty button {
    padding: 8px 12px;
    border: 1px solid #d7dce1;
    border-radius: 4px;
    background: #fff;
    color: #b51220;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 600px) {
    #content.container:has(.project-overview) {
        padding: 20px 16px 88px !important;
    }

    .project-search {
        width: 100%;
    }

    .project-overview .project-grid {
        gap: 12px;
        grid-template-columns: 1fr;
    }

    .project-overview a.project-card {
        flex-direction: row;
    }

    .project-card-preview {
        flex: 0 0 88px;
        height: auto;
        min-height: 116px;
        border: 0;
        border-right: 1px solid #e5e7eb;
        border-radius: 7px 0 0 7px;
    }

    .project-card-body {
        min-width: 0;
        gap: 12px;
        padding: 14px;
    }

    .project-overview h2.project-card-title {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-overview a.project-card {
        transition: none;
    }
}
