/* Vereinstakt – Funktionen: sechs Bereiche als Bild- und Textkacheln, darunter die durchsuchbare Übersicht (js/matrix.js). */

.areas {
    display: grid;
    gap: var(--gap);
    padding: clamp(48px, 6vw, 96px) var(--margin) 0;
}

.area {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap);
}

.area-shot {
    grid-column: 1 / span 7;
    overflow: hidden;
    background: var(--slate);
    border-radius: var(--radius);
}

.area-shot img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    object-position: 0 0;
}

.area-text {
    grid-column: 8 / -1;
    padding: clamp(24px, 3vw, 40px);
    background: var(--surface);
    border-radius: var(--radius);
}

.area.flip .area-shot {
    grid-column: 6 / -1;
    grid-row: 1;
}

.area.flip .area-text {
    grid-column: 1 / span 5;
    grid-row: 1;
}

.area:nth-child(3n + 2) .area-text {
    background: var(--slate);
    color: var(--slate-ink);
}

.area:nth-child(3n + 3) .area-text {
    background: var(--surface-2);
}

.area-text h2 {
    font-size: var(--step-title);
}

.area-text p {
    margin-top: 16px;
    font-size: var(--step-lead);
    line-height: 1.35;
}

.area-text ul {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding-left: 1.2em;
}

@media (max-width: 900px) {
    .area-shot,
    .area-text,
    .area.flip .area-shot,
    .area.flip .area-text {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .area-shot img {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
}

/* ---------- Funktionsübersicht ---------- */

.overview {
    padding: var(--section) var(--margin) 0;
    scroll-margin-top: 24px;
}

.overview-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px var(--gap);
    align-items: end;
    margin-bottom: 40px;
}

.overview-head h2 {
    grid-column: 1 / span 6;
    font-size: var(--step-head);
}

.overview-head p {
    grid-column: 7 / -1;
    max-width: 44ch;
    font-size: var(--step-lead);
    line-height: 1.35;
}

.matrix-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 16px;
}

.matrix-filter input {
    flex: 1 1 18rem;
    max-width: 30rem;
    min-height: 52px;
    padding: 12px 16px;
    border: 2px solid var(--surface-2);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    transition: border-color 160ms ease;
}

.matrix-filter input:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.matrix-count {
    color: var(--ink-soft);
}

.no-js .matrix-filter {
    display: none;
}

.matrix-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--surface);
}

.matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px;
    font-size: var(--step-body);
}

.matrix th,
.matrix td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.matrix tbody td {
    background: var(--bg);
}

.matrix thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    font-weight: 600;
}

.matrix tbody th[colspan] {
    padding-top: 28px;
    background: var(--surface);
    font-size: var(--step-lead);
    letter-spacing: -0.02em;
}

.matrix td:first-child {
    width: 24%;
    font-weight: 600;
}

.matrix td:nth-child(2) {
    color: var(--ink-soft);
}

.matrix .avail {
    width: 6.5rem;
    white-space: nowrap;
    text-align: center;
}

.matrix tr[hidden] {
    display: none;
}

.yes,
.web-only,
.partial {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius);
    font-size: var(--step-small);
    font-weight: 600;
}

.yes {
    background: var(--accent);
    color: var(--accent-ink);
}

.web-only {
    background: var(--surface-2);
    color: var(--ink);
}

.partial {
    background: var(--field-4);
    color: var(--slate-ink);
}

.matrix-legend {
    max-width: 80ch;
    margin-top: 16px;
    color: var(--ink-soft);
}

@media (max-width: 900px) {
    .overview-head h2,
    .overview-head p {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .matrix,
    .matrix tbody {
        display: block;
    }

    .matrix thead {
        display: none;
    }

    .matrix tbody tr {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 4px 8px;
        padding: 12px;
        margin-bottom: 2px;
        background: var(--bg);
    }

    .matrix tbody tr:has(th) {
        display: block;
        padding: 0;
        background: var(--surface);
    }

    .matrix tbody td {
        padding: 0;
    }

    .matrix td:first-child {
        width: auto;
    }

    .matrix td:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .matrix tbody th[colspan] {
        display: block;
        padding: 24px 12px 12px;
    }

    .matrix .avail {
        width: auto;
    }

    .matrix td.avail:nth-child(3)::before { content: "Web "; font-size: var(--step-small); color: var(--ink-soft); }
    .matrix td.avail:nth-child(4)::before { content: "App "; font-size: var(--step-small); color: var(--ink-soft); }
}

/* ---------- Neu: die jüngsten Funktionen als Karten ---------- */

.news {
    padding: var(--section) var(--margin) 0;
    scroll-margin-top: 24px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-grid li {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px 24px 28px;
    background: var(--surface);
    border-radius: var(--radius);
}

.news-grid li:nth-child(4n + 1) { background: var(--slate); color: var(--slate-ink); }
.news-grid li:nth-child(4n + 4) { background: var(--surface-2); }

.news-grid .news-area {
    color: var(--accent);
    font-size: var(--step-small);
    font-weight: 600;
}

.news-grid li:nth-child(4n + 1) .news-area { color: inherit; opacity: 0.75; }

.news-grid h3 {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.news-grid p {
    font-size: 1rem;
    line-height: 1.55;
}

.news-grid a {
    margin-top: auto;
    padding-top: 4px;
    color: inherit;
    font-weight: 600;
}

@media (max-width: 1000px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .news-grid { grid-template-columns: minmax(0, 1fr); }
}
