@import url('https://fonts.googleapis.com/css2?family=Gilda+Display&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --gallery-primary: #e44f73;
    --gallery-dark: #171717;
    --gallery-muted: #707070;
    --gallery-light: #f8f7f5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    color: var(--gallery-dark);
}

a {
    text-decoration: none !important;
}

/* HERO */

.gallery-hero {
    min-height: 470px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 100px 20px;
    background:
        linear-gradient(rgba(0, 0, 0, .48), rgba(0, 0, 0, .48)),
        url("https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e?auto=format&fit=crop&w=2000&q=85") center 48% / cover no-repeat;
}

.gallery-hero-content {
    max-width: 850px;
}

.gallery-eyebrow {
    display: inline-block;
    color: #fff;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.gallery-hero h1 {
    color: #fff;
    font-size: 38px;
    line-height: 1.12;
    margin: 0 0 20px;
    font-family: "Gilda Display", serif;
}

.gallery-hero p {
    max-width: 650px;
    margin: auto;
    font-size: 16px;
    line-height: 1.8;
    color: #f3f3f3;
}

.gallery-hero .hero-line {
    width: 65px;
    height: 3px;
    background: var(--gallery-primary);
    margin: 25px auto;
}

/* INTRO */

.gallery-intro {
    padding: 75px 0 25px;
    text-align: center;
}

.gallery-section-label {
    color: var(--gallery-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.gallery-intro h2 {
    font-size: 34px;
    margin: 14px 0;
    font-family: "Gilda Display", serif;
}

.gallery-intro p {
    max-width: 720px;
    margin: auto;
    color: var(--gallery-muted);
    font-size: 14px;
    line-height: 1.9;
    font-family: "Montserrat", sans-serif;
}

/* FILTERS */

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 30px 15px 40px;
}

.gallery-filter {
    padding: 11px 22px;
    border: 1px solid #dedede;
    border-radius: 30px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: .3s ease;
    font-family: "Montserrat", sans-serif;
}

.gallery-filter:hover,
.gallery-filter.active {
    color: #fff;
    border-color: var(--gallery-primary);
    background: var(--gallery-primary);
}

/* GALLERY GRID */

.gallery-section {
    background: var(--gallery-light);
    padding: 0 0 85px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.gallery-item {
    min-width: 0;
    transition: opacity .3s ease, transform .3s ease;
}

.gallery-item.hidden {
    display: none;
}

.gallery-card {
    position: relative;
    height: 320px;
    overflow: hidden;
    background: #e9e9e9;
    border-radius: 5px;
    cursor: pointer;
}

.gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, .78),
            rgba(0, 0, 0, 0) 65%);
    pointer-events: none;
}

.gallery-card-content {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    color: #fff;
}

.gallery-card-content span {
    display: block;
    color: #ffd8d8;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gallery-card-content h3 {
    font-size: 23px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.gallery-zoom {
    position: absolute;
    top: 17px;
    right: 17px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--gallery-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: .3s ease;
}

.gallery-card:hover .gallery-zoom,
.gallery-card:focus-within .gallery-zoom {
    opacity: 1;
    transform: translateY(0);
}

/* CTA */

.gallery-cta {
    padding: 75px 20px;
    text-align: center;
    background: #fff;
}

.gallery-cta h2 {
    font-size: 33px;
    margin-bottom: 15px;
    font-family: "Gilda Display", serif;
}

.gallery-cta p {
    color: var(--gallery-muted);
    margin-bottom: 28px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
}

.gallery-cta-btn {
    display: inline-block;
    padding: 15px 30px;
    color: #fff !important;
    background: var(--gallery-primary);
    border: 1px solid var(--gallery-primary);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: .3s ease;
}

.gallery-cta-btn:hover {
    background: #fff;
    color: var(--gallery-primary) !important;
}

/* LIGHTBOX */

.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 65px 70px;
    background: rgba(0, 0, 0, .94);
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox img {
    display: block;
    object-fit: contain;
    border-radius: 3px;
    width: 55%;
    margin: 0 auto;
}

.lightbox-caption {
    display: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 32px;
    padding: 10px;
    line-height: 1;
}

.lightbox-close {
    top: 18px;
    right: 25px;
    font-size: 40px;
}

.lightbox-prev {
    left: 15px;
    top: 50%;
}

.lightbox-next {
    right: 15px;
    top: 50%;
}

.lightbox-inner {
    width: 100%;
    text-align: center;
}

body.lightbox-active {
    overflow: hidden;
}

/* RESPONSIVE */

@media (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .gallery-card {
        height: 290px;
    }

    .lightbox-close {
        font-size: 28px;
    }

    .gallery-lightbox img {
        width: 85%;
    }

    .gallery-section {
        padding: 0 0 25px;
    }
}

@media (max-width: 575px) {
    .gallery-hero {
        min-height: 390px;
        padding: 117px 18px;
    }

    .gallery-hero p {
        font-size: 14px;
    }

    .gallery-intro {
        padding: 55px 0 15px;
    }

    .gallery-filters {
        gap: 8px;
        padding: 25px 10px 30px;
    }

    .gallery-filter {
        padding: 9px 15px;
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-card {
        height: 300px;
    }

    .gallery-zoom {
        opacity: 1;
        transform: none;
    }

    .gallery-section {
        padding-bottom: 55px;
    }

    .gallery-lightbox {
        padding: 55px 15px;
    }

    .lightbox-prev {
        left: 0;
    }

    .lightbox-next {
        right: 0;
    }

    .gallery-pagination button {
        width: 35px;
        height: 35px;
    }

    #galleryPageNumbers {
        gap: 4px;
    }

    .gallery-cta h2 {
        font-size: 25px;
    }

    .gallery-cta-btn {
        font-size: 11px;
    }

    .gallery-intro h2 {
        font-size: 26px;
    }

    .gallery-intro p {
        font-size: 12px;
    }

    .gallery-hero h1 {
        font-size: 29px;
    }

    .gallery-lightbox img {
        width: 95%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .gallery-card img,
    .gallery-filter,
    .gallery-item,
    .gallery-zoom {
        transition: none;
    }
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
}

#galleryPageNumbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-pagination button {
    width: 42px;
    height: 42px;
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    cursor: pointer;
    border-radius: 3px;
}

.gallery-pagination button.active,
.gallery-pagination button:hover:not(:disabled) {
    background: #e44f73;
    border-color: #e44f73;
    color: #fff;
}

.gallery-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}