/* Spolek 0.9.167 – galerie: kompaktní popisek alba, počet fotek v metadatech a plné náhledy. */

/* Běžná alba: stejný zaoblený panel jako ostatní bloky. */
body .gallery-results-section {
    border: 1px solid #dce6e1;
    border-radius: 16px !important;
    background-clip: padding-box;
}

/* Hlavička sekce nemá být nalepená na levý/pravý okraj panelu. */
body .gallery-results-section .gallery-results-heading {
    box-sizing: border-box;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* Náhledy běžných alb zůstávají přes celý rámeček. */
body .gallery-results-section .gallery-card__media > img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
}

body .gallery-results-section .gallery-card:hover .gallery-card__media > img {
    transform: scale(1.025) !important;
}

/* Archivní karta: obrázek musí vyplnit celý levý sloupec včetně jeho výšky. */
body .gallery-archive-card__media {
    align-self: stretch !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: hidden !important;
}

body .gallery-archive-card__media > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
}

@media (max-width: 760px) {
    body .gallery-results-section {
        border-radius: 14px !important;
    }

    body .gallery-results-section .gallery-results-heading {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}


/* Počet fotografií patří do popisku, ne přes náhled. */
body .gallery-results-section .gallery-card .photo-count {
    display: none !important;
}

body .gallery-results-section .gallery-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

body .gallery-results-section .gallery-card__meta-main {
    min-width: 0;
    color: #63736b;
    font-size: 11px;
    font-weight: 700;
}

body .gallery-results-section .gallery-card__photo-total {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    color: #65746d;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

body .gallery-results-section .gallery-card__photo-total svg {
    width: 14px;
    height: 14px;
}

/* Karty nemají držet prázdnou rezervu pod názvem. */
@media (min-width: 651px) {
    body .gallery-results-section .gallery-grid {
        align-items: start !important;
    }

    body .gallery-results-section .gallery-card--compact {
        height: auto !important;
        align-self: start !important;
    }

    body .gallery-results-section .gallery-card--compact .gallery-card__body {
        flex: 0 0 auto !important;
        min-height: 0 !important;
        padding: 12px 14px 13px !important;
    }

    body .gallery-results-section .gallery-card--compact h2 {
        margin: 4px 0 0 !important;
    }
}

@media (max-width: 650px) {
    body .gallery-results-section .gallery-card__meta {
        gap: 5px;
    }

    body .gallery-results-section .gallery-card__photo-total {
        gap: 3px;
        font-size: 9px;
    }

    body .gallery-results-section .gallery-card__photo-total svg {
        width: 11px;
        height: 11px;
    }
}
