.sa-gallery-template,
.sa-gallery-hub,
.sa-gallery-single,
.sa-gallery-section {
    max-width: 1280px;
    margin: 0 auto;
}

.sa-gallery-hub,
.sa-gallery-single {
    padding: 32px 20px 64px;
}

.sa-gallery-hero,
.sa-gallery-single__header,
.sa-gallery-single__intro,
.sa-gallery-section,
.sa-gallery-overview-card,
.sa-gallery-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.sa-gallery-hero,
.sa-gallery-single__header,
.sa-gallery-single__intro,
.sa-gallery-section {
    padding: 28px;
}

.sa-gallery-hero {
    margin-bottom: 24px;
}

.sa-gallery-hero__eyebrow,
.sa-gallery-single__eyebrow,
.sa-gallery-overview-card__eyebrow,
.sa-gallery-card__gallery {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
}

.sa-gallery-hero h1,
.sa-gallery-single__header h1,
.sa-gallery-section__head h2 {
    margin: 0 0 8px;
}

.sa-gallery-hero p,
.sa-gallery-section__head p,
.sa-gallery-single__intro p {
    color: #475569;
}

.sa-gallery-section {
    margin-bottom: 24px;
}

.sa-gallery-section__head,
.sa-gallery-single__meta,
.sa-gallery-overview-card__meta,
.sa-gallery-card__topline,
.sa-lightbox__meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.sa-gallery-section__head {
    margin-bottom: 20px;
}

.sa-gallery-section__link,
.sa-gallery-single__meta a,
.sa-gallery-card__gallery a,
.sa-lightbox__download,
.sa-lightbox__permalink a {
    color: #4338ca;
    text-decoration: none;
}

.sa-gallery-group-grid,
.sa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.sa-gallery-grid--single {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sa-gallery-overview-card {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    overflow: hidden;
}

.sa-gallery-overview-card__media {
    min-height: 280px;
    background: #f8fafc;
}

.sa-gallery-overview-card__media img,
.sa-gallery-card__media img,
.sa-gallery-single__cover img,
.sa-lightbox__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sa-gallery-overview-card__content {
    padding: 24px;
}

.sa-gallery-overview-card__thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.sa-gallery-overview-card__thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
}

.sa-gallery-card {
    overflow: hidden;
}

.sa-gallery-card__media {
    position: relative;
    background: #f8fafc;
}

.sa-gallery-card__trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.sa-gallery-card__trigger img {
    aspect-ratio: 4 / 3;
}

.sa-gallery-card__download {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    text-decoration: none;
    font-size: 18px;
}

.sa-gallery-card__body {
    padding: 18px;
}

.sa-gallery-card__title {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.3;
}

.sa-gallery-card__date,
.sa-gallery-card__views,
.sa-gallery-card__description,
.sa-gallery-single__meta {
    color: #475569;
}

.sa-gallery-single__header {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 340px);
    gap: 24px;
    margin-bottom: 24px;
}

.sa-gallery-single__cover {
    min-height: 240px;
    overflow: hidden;
    border-radius: 20px;
    background: #f8fafc;
}

.sa-gallery-single__intro {
    margin-bottom: 24px;
}

.sa-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.sa-lightbox.is-open {
    display: block;
}

.sa-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
}

.sa-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 420px);
    gap: 0;
    max-width: 1200px;
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.sa-lightbox__media-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    min-height: 320px;
}

.sa-lightbox__image {
    max-height: calc(100vh - 48px);
    object-fit: contain;
}

.sa-lightbox__content {
    padding: 28px;
    overflow: auto;
}

.sa-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.sa-lightbox__description {
    color: #475569;
    white-space: pre-wrap;
}

@media (max-width: 1200px) {
    .sa-gallery-group-grid,
    .sa-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sa-gallery-group-grid,
    .sa-gallery-grid,
    .sa-gallery-grid--single,
    .sa-gallery-single__header,
    .sa-gallery-overview-card,
    .sa-lightbox__dialog {
        grid-template-columns: 1fr;
    }

    .sa-lightbox__dialog {
        max-height: calc(100vh - 24px);
        margin: 12px;
    }
}

@media (max-width: 640px) {
    .sa-gallery-group-grid,
    .sa-gallery-grid {
        grid-template-columns: 1fr;
    }

    .sa-gallery-hub,
    .sa-gallery-single {
        padding-inline: 12px;
    }

    .sa-gallery-hero,
    .sa-gallery-single__header,
    .sa-gallery-single__intro,
    .sa-gallery-section,
    .sa-lightbox__content {
        padding: 20px;
    }
}


.sa-gallery-card__characters {
    margin-top: 14px;
}

.sa-gallery-card__characters-label,
.sa-lightbox__characters-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.sa-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sa-tag-list__item {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.sa-lightbox__characters {
    margin-top: 18px;
}
