/*
 * Die fünf Sammlungen rund ums Stadion — Stadionnamen, Anzeigetafeln,
 * Flutlichter, Kassenhäuschen, Busse — als Sammelkarten. Oben das Foto randlos in
 * seinem eigenen Format, darunter hinter einer Perforation der Abriss: wo es
 * stand und wann. Über den Karten das Regal der fünf Sammlungen, damit man von
 * einer zur nächsten kommt, ohne das Menü zu öffnen. Die Versprechen stehen in
 * specs/ground-photos.md.
 */

.collection-page {
    --cp-row: 120px;

    color: var(--gh-ink);
    margin-bottom: 48px;
}

.collection-page ol.breadcrumb {
    margin-bottom: 12px;
}

/* Vorspann: der Kasten aus intro-text.md, ruhig wie auf „Ich war dabei". */
.collection-page .collection-intro {
    margin: 4px 0 18px;
    background: transparent;
    border: 0;
}

.collection-page .collection-intro .card-header {
    padding: 0;
    background: transparent;
    border: 0;
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 22px;
    color: var(--gh-night);
}

.collection-page .collection-intro .card-body {
    padding: 4px 0 0;
    font-style: normal;
    font-size: 16px;
    line-height: 1.55;
    color: var(--gh-ink);
}

.collection-page .collection-numbers {
    display: block;
    margin-top: 6px;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 17px;
    color: var(--gh-muted);
    font-variant-numeric: tabular-nums;
}

/* Das Regal: die fünf Sammlungen nebeneinander, die geöffnete in Nachtfarbe. */
.collection-shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 24px;
}

.collection-page a.collection-shelf__entry {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 10px;
    background: var(--gh-paper);
    border-radius: 3px;
    color: var(--gh-ink);
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
}

.collection-page a.collection-shelf__entry:hover {
    background: var(--gh-paper-hover);
}

.collection-page a.collection-shelf__entry[aria-current="page"] {
    background: var(--gh-night);
    color: #fff;
}

.collection-shelf__count {
    font-weight: 500;
    color: var(--gh-muted);
    font-variant-numeric: tabular-nums;
}

.collection-shelf__entry[aria-current="page"] .collection-shelf__count {
    color: var(--gh-led);
}

.collection-page a.collection-shelf__entry:focus-visible {
    outline: 2px solid var(--gh-night);
    outline-offset: 2px;
}

/*
 * Bündige Reihen wie bei den Beweisfotos: Jede Karte wächst im Verhältnis ihres
 * Formats, sodass alle Fotos einer Reihe gleich hoch stehen und keines
 * beschnitten wird — ein Flutlichtmast ist hoch, ein Stadionname breit. Das
 * Pseudo-Element hält die letzte Reihe davon ab, sich über die ganze Breite zu
 * ziehen.
 */
.collection-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.collection-cards::after {
    content: '';
    flex-grow: 1000;
}

.collection-card {
    display: flex;
    flex-direction: column;
    flex: var(--ratio) 1 calc(var(--ratio) * var(--cp-row));
    min-width: 0;
    overflow: hidden;
    background: var(--gh-paper);
    border-radius: 6px;
}

.collection-card__photo {
    display: block;
    aspect-ratio: var(--ratio);
    margin-bottom: 5px;
    background: var(--gh-night);
}

.collection-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-card__photo:focus-visible {
    outline: 3px solid var(--gh-night);
    outline-offset: -3px;
}

/* Der Abriss: hinter der Perforation, wo es stand und wann. */
.collection-card__stub {
    flex: 1;
    margin: 0;
    padding: 7px 9px 9px;
    border-top: 2px dashed var(--gh-perforation);
    font-size: 13px;
    line-height: 1.35;
    color: var(--gh-muted);
}

.collection-card__ground {
    display: block;
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    color: var(--gh-ink);
    overflow-wrap: anywhere;
}

.collection-page a.collection-card__ground {
    color: var(--gh-ink);
    text-decoration: none;
}

.collection-page a.collection-card__ground:hover {
    color: var(--gh-grass);
    text-decoration: underline;
}

.collection-page a.collection-card__ground:focus-visible {
    outline: 2px solid var(--gh-night);
    outline-offset: 2px;
}

.collection-card__where {
    display: block;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .collection-page {
        --cp-row: 170px;
    }

    .collection-cards {
        gap: 18px 14px;
    }
}
