/* Spolek 0.9.172 — akce + aktuality podle roční logiky PZKO.
   Aktuální obsah je viditelný, starší roky jsou kompaktní <details> sekce. */

.content-year-section {
    padding-top: 36px;
}

.content-year-heading {
    align-items: center;
}

.content-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid #cfe0d7;
    border-radius: 999px;
    background: #f5f9f7;
    color: #3c6253;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* Nadcházející akce — podobně jako PZKO: samostatné karty v řádku. */
.content-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-upcoming-card,
.content-news-card,
.content-mini-event {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce6e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(25, 57, 43, .045);
}

.content-upcoming-card {
    display: flex;
    flex-direction: column;
}

.content-upcoming-card:hover,
.content-news-card:hover,
.content-mini-event:hover {
    border-color: #bdd5c8;
    box-shadow: 0 13px 28px rgba(25, 57, 43, .08);
}

.content-upcoming-card__media,
.content-news-card__media,
.content-mini-event__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #edf3f0;
}

.content-upcoming-card__media {
    aspect-ratio: 16 / 10;
}

.content-upcoming-card__media > img,
.content-news-card__media > img,
.content-mini-event__media > img,
.content-fallback > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background: #f6faf8;
}

.content-fallback > img {
    width: 45%;
    height: 45%;
    object-fit: contain;
    opacity: .45;
}

.content-upcoming-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.content-event-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #155d43;
    font-size: 12px;
}

.content-event-date strong {
    font-weight: 850;
}

.content-event-date span {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf7f2;
    color: #38745d;
    font-size: 10px;
    font-weight: 800;
}

.content-upcoming-card h2,
.content-news-card h2 {
    margin: 8px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.content-upcoming-card h2 a,
.content-news-card h2 a {
    color: #14251e;
}

.content-place {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 0 0 10px;
    color: #557066;
    font-size: 13px;
    font-weight: 650;
}

.content-upcoming-card__excerpt {
    margin: 0 0 14px;
    color: #65736c;
    font-size: 13px;
    line-height: 1.55;
}

/* Proběhlé akce aktuálního roku — kompaktní dlaždice. */
.content-year-archive {
    background: #f3f7f5;
}

.content-current-events {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.content-mini-event {
    display: flex;
    flex-direction: column;
    color: #17251f;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.content-mini-event:hover {
    transform: translateY(-2px);
}

.content-mini-event__media {
    aspect-ratio: 4 / 3;
}

.content-mini-event__body {
    display: flex;
    min-height: 116px;
    flex-direction: column;
    padding: 12px 13px 14px;
}

.content-mini-event__body > small {
    margin-bottom: 5px;
    color: #65766d;
    font-size: 11px;
    font-weight: 750;
}

.content-mini-event__body > strong {
    color: #17251f;
    font-size: 14px;
    line-height: 1.28;
}

.content-mini-event__body > span {
    margin-top: auto;
    padding-top: 8px;
    color: #6f7f77;
    font-size: 11px;
    line-height: 1.3;
}

/* Aktuální aktuality — fotografie zůstávají dominantní, ale celek je kompaktnější. */
.content-taxonomy-compact {
    padding-bottom: 0;
}

.content-news-current {
    padding-top: 28px;
}

.content-current-news {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-news-card {
    display: flex;
    flex-direction: column;
}

.content-news-card__media {
    aspect-ratio: 16 / 9;
}

.content-news-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 17px 18px 18px;
}

.content-news-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.content-news-meta time {
    flex: 0 0 auto;
    color: #65736c;
    font-size: 11px;
    font-weight: 750;
}

.content-badges--compact {
    justify-content: flex-end;
}

.content-badges--compact .content-badge {
    padding: 3px 6px;
    font-size: 9px;
}

.content-news-card__body > p {
    margin: 0 0 14px;
    color: #65736c;
    font-size: 13px;
    line-height: 1.55;
}

/* Starší roky — přehledné rozbalovací pruhy. */
.content-older-heading {
    margin: 38px 0 14px;
}

.content-older-heading--first {
    margin-top: 0;
}

.content-older-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 32px);
}

.content-year-accordions {
    display: grid;
    gap: 9px;
}

.content-year-accordion {
    overflow: hidden;
    border: 1px solid #dce6e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(25, 57, 43, .025);
}

.content-year-accordion > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 26px;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 13px 16px;
    color: #173228;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.content-year-accordion > summary::-webkit-details-marker {
    display: none;
}

.content-year-accordion > summary:hover {
    background: #f8fbf9;
}

.content-year-accordion__year {
    font-size: 20px;
    font-weight: 850;
}

.content-year-accordion__count {
    color: #6a7b73;
    font-size: 12px;
    font-weight: 750;
}

.content-year-accordion__chevron {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    color: #0a6d49;
    font-size: 18px;
    font-weight: 900;
    transition: transform .18s ease, background .18s ease;
}

.content-year-accordion[open] > summary {
    border-bottom: 1px solid #e4ece8;
    background: #f7faf8;
}

.content-year-accordion[open] .content-year-accordion__chevron {
    transform: rotate(180deg);
    background: #e8f3ed;
}

.content-year-accordion__body {
    display: grid;
    gap: 7px;
    padding: 10px;
}

.content-history-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 13px;
    min-height: 66px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #17251f;
    transition: background .16s ease, border-color .16s ease;
}

.content-history-row:hover {
    border-color: #d9e7e0;
    background: #f7faf8;
}

.content-history-date {
    display: grid;
    min-height: 50px;
    place-items: center;
    align-content: center;
    border-radius: 9px;
    background: #edf6f1;
    color: #087047;
    text-align: center;
}

.content-history-date strong {
    font-size: 20px;
    line-height: 1;
}

.content-history-date small {
    margin-top: 2px;
    color: #4f7564;
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.content-history-date--empty {
    font-size: 19px;
    font-weight: 800;
}

.content-history-main {
    min-width: 0;
}

.content-history-main > strong {
    display: block;
    overflow: hidden;
    color: #17251f;
    font-size: 14px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-history-main > small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #708078;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.content-history-badges small {
    padding: 2px 6px;
    border-radius: 999px;
    background: #edf5f1;
    color: #356451;
    font-size: 9px;
    font-weight: 800;
}

.content-history-arrow {
    color: #0a6d49;
    font-size: 17px;
    font-weight: 900;
    text-align: center;
}

@media (max-width: 1050px) {
    .content-current-events {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

    .content-current-events {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .content-year-section {
        padding-top: 28px;
        padding-bottom: 38px;
    }

    .content-year-heading {
        align-items: flex-start;
    }

    .content-upcoming-grid,
    .content-current-news {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .content-current-events {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .content-upcoming-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .content-upcoming-card__media {
        height: 100%;
        min-height: 150px;
        aspect-ratio: auto;
    }

    .content-upcoming-card__body {
        padding: 14px;
    }

    .content-upcoming-card h2 {
        margin-top: 7px;
        font-size: 17px;
    }

    .content-upcoming-card__excerpt {
        display: none;
    }

    .content-place {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .content-event-date {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        font-size: 11px;
    }

    .content-mini-event__body {
        min-height: 104px;
        padding: 10px;
    }

    .content-mini-event__body > strong {
        font-size: 13px;
    }

    .content-news-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .content-news-card__media {
        height: 100%;
        min-height: 145px;
        aspect-ratio: auto;
    }

    .content-news-card__body {
        padding: 13px 14px;
    }

    .content-news-meta {
        display: block;
    }

    .content-badges--compact {
        justify-content: flex-start;
        margin-top: 5px;
    }

    .content-news-card h2 {
        margin: 7px 0 8px;
        font-size: 16px;
    }

    .content-news-card__body > p {
        display: none;
    }

    .content-year-accordion > summary {
        grid-template-columns: minmax(0, 1fr) auto 24px;
        min-height: 54px;
        padding: 12px 13px;
    }

    .content-year-accordion__year {
        font-size: 18px;
    }

    .content-history-row {
        grid-template-columns: 52px minmax(0, 1fr) 20px;
        gap: 9px;
        min-height: 60px;
        padding: 7px;
    }

    .content-history-date {
        min-height: 46px;
    }

    .content-history-main > strong {
        white-space: normal;
    }

    .content-history-main > small {
        white-space: normal;
    }
}

@media (max-width: 380px) {
    .content-current-events {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-mini-event {
        display: grid;
        grid-template-columns: 94px minmax(0, 1fr);
    }

    .content-mini-event__media {
        height: 100%;
        min-height: 100px;
        aspect-ratio: auto;
    }

    .content-mini-event__body {
        min-height: 100px;
    }

    .content-upcoming-card,
    .content-news-card {
        grid-template-columns: 94px minmax(0, 1fr);
    }

    .content-year-heading {
        gap: 8px;
    }

    .content-count-pill {
        padding-inline: 9px;
        font-size: 10px;
    }

    .content-year-accordion__count {
        font-size: 10px;
    }
}
