/* Dynamic public album */

.album-public-lead {
    max-width: 760px;
}

.album-public-lead > :first-child {
    margin-top: 0;
}

.album-public-lead > :last-child {
    margin-bottom: 0;
}

.album-public-section {
    padding: 62px 0 96px;
}

.album-public-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 34px;
}

.album-public-filter {
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--slate);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.album-public-filter:hover,
.album-public-filter.is-active {
    background: var(--navy);
    color: #fff;
}

.album-public-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: 205px;
    gap: 12px;
}

.album-public-cell {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #e9eef5;
}

.album-public-cell[hidden] {
    display: none;
}

.album-public-cell.is-layout-wide {
    grid-column: span 2;
}

.album-public-cell.is-layout-tall {
    grid-row: span 2;
}

.album-public-cell__button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.album-public-cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.album-public-cell:hover img {
    transform: scale(1.035);
}

.album-public-cell__fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 18px;
    background:
        repeating-linear-gradient(
            135deg,
            #1f56a9 0,
            #1f56a9 15px,
            #397be0 15px,
            #397be0 30px
        );
    color: #fff;
    text-align: center;
}

.album-public-cell__fallback[hidden] {
    display: none;
}

.album-public-cell__fallback span {
    font-weight: 800;
}

.album-public-cell__fallback small {
    max-width: 260px;
    opacity: .76;
    line-height: 1.4;
}

.album-public-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 16px 14px;
    background: linear-gradient(to bottom, transparent, rgba(4, 17, 45, .82));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
}

.album-public-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 46px;
}

.album-public-load-more-wrap [hidden],
.album-public-empty[hidden],
.album-public-error[hidden] {
    display: none;
}

.album-public-empty {
    padding: 34px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--slate);
    text-align: center;
}

.album-public-error {
    max-width: 680px;
    margin: 18px auto 0;
    color: #b42318;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* Lightbox */

.album-lightbox {
    position: fixed;
    width: min(94vw, 1400px);
    max-width: none;
    height: min(92vh, 980px);
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #07142f;
    color: #fff;
}

.album-lightbox::backdrop {
    background: rgba(2, 8, 23, .88);
    backdrop-filter: blur(5px);
}

.album-lightbox__figure {
    display: grid;
    width: 100%;
    height: 100%;
    margin: 0;
    grid-template-rows: minmax(0, 1fr) auto;
}

.album-lightbox__figure img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.album-lightbox__figure figcaption {
    min-height: 28px;
    padding: 14px 78px 18px;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    text-align: center;
}

.album-lightbox__close,
.album-lightbox__nav {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(7, 20, 47, .72);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.album-lightbox__close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    font-size: 28px;
}

.album-lightbox__nav {
    top: 50%;
    width: 48px;
    height: 48px;
    font-size: 22px;
    transform: translateY(-50%);
}

.album-lightbox__nav.is-prev {
    left: 14px;
}

.album-lightbox__nav.is-next {
    right: 14px;
}

.album-lightbox__close:hover,
.album-lightbox__nav:hover {
    background: var(--accent);
    color: var(--navy);
}

.cta-title.prosekit-content > :first-child {
    margin-top: 0;
}

.cta-title.prosekit-content > :last-child {
    margin-bottom: 0;
}

@media (max-width: 1050px) {
    .album-public-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: 190px;
    }
}

@media (max-width: 720px) {
    .album-public-section {
        padding-top: 44px;
    }

    .album-public-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 160px;
        gap: 8px;
    }

    .album-public-cell.is-layout-wide {
        grid-column: span 2;
    }

    .album-public-filter {
        padding: 9px 12px;
        font-size: 12px;
    }

    .album-lightbox {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 430px) {
    .album-public-grid {
        grid-auto-rows: 145px;
    }

    .album-public-caption {
        padding: 28px 10px 10px;
        font-size: 11px;
    }
}
