/* Publiczna galeria — wygląd oparty na panelu administratora */

:root {
    --gallery-bg: #f4f7fb;
    --gallery-text: #263238;
    --gallery-muted: #607d8b;
    --gallery-blue: #2563eb;
    --gallery-blue-dark: #1d4ed8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--gallery-bg);
    color: var(--gallery-text);
    font-family: Arial, Helvetica, sans-serif;
}

.publicGallery {
    /*width: min(1500px, calc(100% - 48px));*/
    margin: 0 auto;
    padding: 42px 0 70px;
}

.galleryPageHeader {
    margin-bottom: 26px;
}

.galleryEyebrow,
.albumEyebrow {
    margin-bottom: 7px;
    color: var(--gallery-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.galleryPageHeader h1 {
    margin: 0;
    font-size: clamp(30px, 2.1vw, 42px);
    line-height: 1.15;
}

.galleryPageHeader p {
    margin: 10px 0 0;
    color: var(--gallery-muted);
    font-size: 16px;
}

.galleryToolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 30px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}

.toolbarLeft {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.galleryButton {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gallery-blue), var(--gallery-blue-dark));
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.galleryButton.light {
    background: #f5f7fb;
    color: #2c3e50;
}

.galleryButton:hover {
    transform: translateY(-1px);
}

.gallerySearch {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 290px;
    max-width: 100%;
    height: 40px;
    padding: 0 13px;
    background: #f5f7fb;
    border-radius: 10px;
}

.gallerySearch:focus-within {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.13);
}

.gallerySearch span {
    color: #607d8b;
    font-size: 22px;
}

.gallerySearch input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #263238;
    font: inherit;
    font-size: 14px;
}

.yearBlock {
    margin-bottom: 32px;
}

.yearHeader {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 0;
    border-radius: 13px;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,.06);
    transition: .2s ease;
}

.yearHeader:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 21px rgba(0,0,0,.10);
}

.yearLeft {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.yearArrow {
    width: 18px;
    transition: transform .25s ease;
}

.yearBlock.collapsed .yearArrow {
    transform: rotate(-90deg);
}

.yearFolder { font-size: 19px; }

.yearTitle {
    font-size: clamp(18px, 1.45vw, 26px);
    font-weight: 750;
}

.yearStats {
    display: flex;
    gap: 20px;
    color: var(--gallery-muted);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.yearContent {
    overflow: hidden;
    max-height: 10000px;
    margin-top: 15px;
    opacity: 1;
    transition: max-height .35s ease, opacity .25s ease, margin .35s ease;
}

.yearBlock.collapsed .yearContent {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

.albumGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
    gap: 23px;
}

.albumLink {
    display: block;
    color: inherit;
    text-decoration: none;
}

.albumCard {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.albumCard:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 32px rgba(0,0,0,.15);
}

.albumPhoto {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #edf1f5;
}

.albumPhoto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.albumCard:hover .albumPhoto img {
    transform: scale(1.06);
}

.noPhoto {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0bec5;
    font-size: 52px;
}

.photoCounter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.62);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(5px);
}

.albumBody {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.albumBody h2 {
    margin: 0 0 12px;
    color: #263238;
    font-size: 18px;
    line-height: 1.35;
}

.albumMeta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    color: var(--gallery-muted);
    font-size: 12px;
}

.albumDate { white-space: nowrap; }

.albumAuthor {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emptyGallery {
    padding: 70px 20px;
    border-radius: 15px;
    background: #fff;
    text-align: center;
    box-shadow: 0 5px 18px rgba(0,0,0,.06);
}

.emptyIcon { font-size: 48px; }

.emptyGallery h2 { margin: 12px 0 6px; }
.emptyGallery p { margin: 0; color: var(--gallery-muted); }

.albumLink[hidden],
.yearBlock[hidden] { display: none; }


/*
@media (max-width: 800px) {
    .publicGallery {
        width: min(100% - 28px, 680px);
        padding-top: 25px;
    }

    .galleryToolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gallerySearch { width: 100%; }

    .yearHeader {
        align-items: flex-start;
        flex-direction: column;
    }

    .yearStats {
        padding-left: 30px;
        white-space: normal;
    }

    .albumGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .albumBody { padding: 13px; }
    .albumBody h2 { font-size: 15px; }
}

@media (max-width: 520px) {
    .albumGrid { grid-template-columns: 1fr; }
    .publicGallery { width: calc(100% - 20px); }
    .galleryToolbar { padding: 13px; }
    .toolbarLeft { display: grid; grid-template-columns: 1fr 1fr; }
    .galleryButton { padding: 0 8px; font-size: 12px; }
}


*/