/* =========================================================
   DIGITAL SIGNS HIRE - GALLERY
   ========================================================= */

.gallery-hero {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: #06080a;
}

.gallery-hero__media,
.gallery-hero__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.gallery-hero__media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-hero__overlay {
    background:
        linear-gradient(90deg,
            rgba(3,6,8,.97) 0%,
            rgba(3,6,8,.82) 48%,
            rgba(3,6,8,.24) 78%,
            rgba(3,6,8,.10) 100%);
}

.gallery-hero__content {
    position: relative;
    z-index: 2;
    max-width: 940px;
    padding: 7rem 0;
}

.gallery-hero h1 {
    max-width: 850px;
    margin: 0 0 1.4rem;
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: .95;
    letter-spacing: -.055em;
}

.gallery-hero__lead {
    max-width: 760px;
    margin-bottom: 2rem;
    color: rgba(255,255,255,.84);
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.65;
}


/* Intro */

.gallery-intro {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: clamp(3rem, 8vw, 8rem);
    align-items: start;
}

.gallery-intro h2,
.gallery-heading h2,
.gallery-cta h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.3rem, 4.8vw, 4.6rem);
    line-height: 1;
    letter-spacing: -.045em;
}

.gallery-intro p {
    color: #5f6972;
    line-height: 1.75;
}

.gallery-intro .lead {
    color: #171b1f;
    font-size: 1.2rem;
}


/* Category Strip */

.gallery-category-strip {
    border-top: 1px solid #dde2e6;
    border-bottom: 1px solid #dde2e6;
}

.gallery-category-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
}

.gallery-category-grid a {
    min-height: 130px;
    padding: 1.6rem;
    color: inherit;
    text-decoration: none;
    border-right: 1px solid #dde2e6;
    transition: background .2s ease;
}

.gallery-category-grid a:last-child {
    border-right: 0;
}

.gallery-category-grid a:hover {
    background: #f4f5f6;
}

.gallery-category-grid strong,
.gallery-category-grid span {
    display: block;
}

.gallery-category-grid span {
    margin-top: .45rem;
    color: #66717b;
    font-size: .92rem;
    line-height: 1.5;
}


/* Heading */

.gallery-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 3rem;
    margin-bottom: 3rem;
}

.gallery-heading > p {
    max-width: 380px;
    color: #66717b;
}


/* Gallery Grid */

.modern-gallery {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    grid-auto-rows: 260px;
    gap: 14px;
}

.gallery-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #0b0d0f;
}

.gallery-card--large {
    grid-column: span 2;
    grid-row: span 2;
}

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

.gallery-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, opacity .45s ease;
}

.gallery-card:hover img {
    transform: scale(1.045);
    opacity: .88;
}

.gallery-card__overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1.5rem 1.5rem;
    color: #fff;
    background:
        linear-gradient(
            transparent,
            rgba(0,0,0,.85)
        );
}

.gallery-card__overlay span {
    display: block;
    margin-bottom: .3rem;
    color: rgba(255,255,255,.66);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gallery-card__overlay h3 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
}


/* Applications */

.gallery-applications {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    border-top: 1px solid #dde2e6;
    border-left: 1px solid #dde2e6;
}

.gallery-applications a {
    min-height: 240px;
    padding: 2rem;
    color: inherit;
    text-decoration: none;
    border-right: 1px solid #dde2e6;
    border-bottom: 1px solid #dde2e6;
    transition: background .2s ease;
}

.gallery-applications a:hover {
    background: #f5f6f7;
}

.gallery-applications span {
    display: block;
    margin-bottom: 3rem;
    color: #d71920;
    font-weight: 900;
}

.gallery-applications h3 {
    margin-bottom: .7rem;
    font-size: 1.2rem;
}

.gallery-applications p {
    margin: 0;
    color: #66717b;
    line-height: 1.65;
}


/* CTA */

.gallery-cta {
    padding: clamp(4.5rem,8vw,7rem) 0;
    color: #fff;
    background: #d71920;
}

.gallery-cta .eyebrow {
    color: #fff;
}

.gallery-cta p {
    max-width: 720px;
    color: rgba(255,255,255,.84);
    line-height: 1.7;
}

.gallery-cta__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.gallery-phone {
    align-self: center;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
    text-decoration: none;
}


/* Lightbox */

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(0,0,0,.92);
}

.gallery-modal.is-open {
    display: flex;
}

.gallery-modal__image {
    display: block;
    width: auto;
    max-width: min(1400px, 94vw);
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-modal__close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

body.gallery-modal-open {
    overflow: hidden;
}


/* Responsive */

@media (max-width: 1050px) {
    .modern-gallery {
        grid-template-columns: repeat(2,1fr);
    }

    .gallery-applications {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 800px) {
    .gallery-intro,
    .gallery-category-grid {
        grid-template-columns: 1fr;
    }

    .gallery-category-grid a {
        border-right: 0;
        border-bottom: 1px solid #dde2e6;
    }

    .gallery-heading,
    .gallery-cta__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .gallery-hero__overlay {
        background:
            linear-gradient(
                rgba(3,6,8,.55),
                rgba(3,6,8,.97)
            );
    }

    .modern-gallery {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: 310px;
    }

    .gallery-card,
    .gallery-card--large,
    .gallery-card--wide {
        grid-column: auto;
        grid-row: auto;
    }

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

    .gallery-modal {
        padding: 20px;
    }
}
