/* =========================
   HERO
========================= */
.gallery-hero {
    position: relative;
    min-height: 34vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 60, 172, 0.18), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255, 196, 0, 0.12), transparent 28%),
        linear-gradient(135deg, #120014 0%, #1b0120 45%, #09000c 100%);
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.62));
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.gallery-kicker {
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #ffd166;
    font-weight: 700;
}

.gallery-hero h1 {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 3.8rem);
    font-weight: 800;
}

.gallery-subtitle {
    margin-top: 0.9rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.65;
}

.gallery-subtitle span {
    color: #ffd166;
    font-weight: 700;
}

/* =========================
   PAGE
========================= */
.gallery-page {
    padding: 0.75rem 0 4rem;
    background: #050507;
}

.gallery-page .container {
    max-width: 1500px;
    width: min(96vw, 1500px);
}

/* =========================
   MOSAIC GRID
========================= */
.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 110px;
    gap: 4px;
    grid-auto-flow: dense;
}

/* =========================
   ITEMS
========================= */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: #000;
    transition: transform 0.28s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.04);
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    z-index: 2;
}

.gallery-item:hover img {
    transform: scale(1);
}

/* =========================
   NO-CROP IMAGES (TEXT)
========================= */
.gallery-item.no-crop {
    background: #000;
}

.gallery-item.no-crop img {
    object-fit: contain;
    object-position: center;
    background: #000;
    transform: scale(1);
    padding: 0;
}

/* =========================
   LAYOUT VARIANTS
========================= */
.gallery-item.sm {
    grid-column: span 1;
    grid-row: span 2;
}

.gallery-item.md {
    grid-column: span 1;
    grid-row: span 3;
}

.gallery-item.tall {
    grid-column: span 1;
    grid-row: span 4;
}

.gallery-item.tall-xl {
    grid-column: span 1;
    grid-row: span 5;
}

.gallery-item.wide {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.wide-md {
    grid-column: span 2;
    grid-row: span 3;
}

.gallery-item.wide-lg {
    grid-column: span 2;
    grid-row: span 4;
}

.gallery-item.feature {
    grid-column: span 2;
    grid-row: span 5;
}

.gallery-item.poster {
    grid-column: span 1;
    grid-row: span 4;
}

.gallery-mosaic {
    grid-auto-flow: dense;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
    .gallery-mosaic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: 105px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        min-height: 28vh;
    }

    .gallery-page {
        padding-top: 0.5rem;
    }

    .gallery-mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 95px;
        gap: 5px;
    }

    .gallery-item.wide,
    .gallery-item.wide-md,
    .gallery-item.wide-lg,
    .gallery-item.feature {
        grid-column: span 2;
    }
}

@media (max-width: 540px) {
    .gallery-mosaic {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
        gap: 4px;
    }

    .gallery-item,
    .gallery-item.sm,
    .gallery-item.md,
    .gallery-item.tall,
    .gallery-item.tall-xl,
    .gallery-item.wide,
    .gallery-item.wide-md,
    .gallery-item.wide-lg,
    .gallery-item.feature {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item.no-crop img {
        padding: 0.2rem;
    }
}
