.gallery-preview,
.gallery-detail,
.gallery-list,
.gallery-plugin__empty {
    width: min(calc(100% - 48px), 1120px);
    margin-inline: auto;
}

.gallery-list {
    padding-block: clamp(56px, 8vw, 104px);
}

.gallery-list__header {
    max-width: 760px;
    margin-bottom: clamp(32px, 5vw, 56px);
}

.gallery-list__eyebrow {
    color: var(--brand, #635bff);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gallery-list__header h1 {
    margin: 8px 0 0;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
}

.gallery-list__header p {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--muted, #667085);
    font-size: 1.08rem;
}

.gallery-list__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 32px);
}

.gallery-list__card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line, #dfe3eb);
    border-radius: 18px;
    background: var(--card, #fff);
}

.gallery-list__card-link {
    display: flex;
    height: 100%;
    color: inherit;
    flex-direction: column;
    text-decoration: none;
}

.gallery-list__cover {
    display: block;
    overflow: hidden;
    background: var(--surface-alt, #eef1f7);
    aspect-ratio: 4 / 3;
}

.gallery-list__cover img,
.gallery-list__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-list__cover img {
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-list__placeholder {
    background:
        linear-gradient(135deg, transparent 48%, rgba(99, 91, 255, .16) 49% 51%, transparent 52%),
        var(--surface-alt, #eef1f7);
}

.gallery-list__card:hover .gallery-list__cover img {
    transform: scale(1.035);
}

.gallery-list__body {
    display: flex;
    padding: 22px;
    flex: 1;
    align-items: flex-start;
    flex-direction: column;
}

.gallery-list__labels {
    display: flex;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.gallery-list__labels > span {
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-alt, #eef1f7);
    color: var(--muted, #667085);
    font-size: .7rem;
    font-weight: 700;
}

.gallery-list__body > strong {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.2;
}

.gallery-list__excerpt {
    margin-top: 12px;
    color: var(--muted, #667085);
    line-height: 1.55;
}

.gallery-list__more {
    margin-top: auto;
    padding-top: 22px;
    color: var(--brand, #635bff);
    font-weight: 750;
}

@media (max-width: 900px) {
    .gallery-list__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gallery-preview,
.gallery-detail {
    padding-block: clamp(48px, 7vw, 88px);
}

.gallery-preview__header {
    display: flex;
    margin-bottom: 28px;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.gallery-preview__header h2,
.gallery-detail__header h1 {
    margin: 6px 0 0;
}

.gallery-preview__eyebrow,
.gallery-detail__eyebrow {
    color: var(--brand, #635bff);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gallery-preview__detail-link {
    flex: 0 0 auto;
    color: var(--brand, #635bff);
    font-weight: 750;
    text-decoration: none;
}

.gallery-preview__grid,
.gallery-detail__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.gallery-preview__item,
.gallery-detail__item {
    position: relative;
    grid-column: span 4;
    overflow: hidden;
    border-radius: 16px;
    background: var(--surface-alt, #eef1f7);
    color: #fff;
    aspect-ratio: 4 / 3;
}

.gallery-preview__item:first-child {
    grid-column: span 8;
    grid-row: span 2;
}

.gallery-preview__item--lightbox-only {
    display: none;
}

.gallery-preview__item img,
.gallery-detail__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-preview__item:hover img,
.gallery-detail__item:hover img {
    transform: scale(1.035);
}

.gallery-preview__item span,
.gallery-detail__item span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 32px 14px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .72));
    font-size: .85rem;
}

.gallery-detail__header {
    max-width: 760px;
    margin-bottom: clamp(30px, 5vw, 52px);
}

.gallery-detail__header h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.08;
}

.gallery-detail__description {
    margin-top: 20px;
    color: var(--muted, #667085);
    font-size: 1.08rem;
}

.gallery-detail__item:nth-child(5n + 1),
.gallery-detail__item:nth-child(5n + 2) {
    grid-column: span 6;
}

.gallery-plugin__empty {
    padding-block: 48px;
    color: var(--muted, #667085);
    text-align: center;
}

@media (max-width: 760px) {
    .gallery-preview,
    .gallery-detail,
    .gallery-list,
    .gallery-plugin__empty {
        width: min(calc(100% - 28px), 1120px);
    }

    .gallery-list__grid {
        grid-template-columns: 1fr;
    }

    .gallery-preview__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .gallery-preview__item,
    .gallery-preview__item:first-child,
    .gallery-detail__item,
    .gallery-detail__item:nth-child(5n + 1),
    .gallery-detail__item:nth-child(5n + 2) {
        grid-column: span 12;
        grid-row: auto;
    }
}
