
:root {
    --gallery-orange: #ff7420;
    --gallery-dark: #222222;
    --gallery-muted: #6c757d;
    --gallery-light: #fff8f3;
}

.gallery-hero {
    min-height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(90deg, rgba(20, 20, 20, .78), rgba(20, 20, 20, .25)),
        url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1920&q=85")
        center 45% / cover no-repeat;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    padding-top: 65px;
    padding-bottom: 65px;
}

.gallery-eyebrow,
.section-label {
    display: inline-block;
    color: var(--gallery-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.gallery-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 800;
    margin-bottom: 18px;
}

.gallery-hero p {
    max-width: 600px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, .9);
    font-size: 16px;
    line-height: 1.8;
}

.gallery-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.gallery-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.gallery-breadcrumb a:hover {
    color: var(--gallery-orange);
}

.gallery-breadcrumb span:last-child {
    color: #ffb17e;
}

.gallery-section {
    padding: 85px 0;
    background: #ffffff;
}

.gallery-heading {
    max-width: 700px;
    margin: 0 auto 38px;
}

.gallery-heading h2 {
    color: var(--gallery-dark);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 15px;
}

.gallery-heading h2 span {
    color: var(--gallery-orange);
}

.gallery-heading p {
    color: var(--gallery-muted);
    line-height: 1.8;
    margin-bottom: 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 38px;
}

.gallery-filter {
    appearance: none;
    border: 1px solid #e8e8e8;
    background: #ffffff;
    color: #444444;
    padding: 11px 21px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s ease, color .25s ease,
                border-color .25s ease, transform .25s ease;
}

.gallery-filter:hover {
    border-color: var(--gallery-orange);
    color: var(--gallery-orange);
}

.gallery-filter.active {
    background: var(--gallery-orange);
    border-color: var(--gallery-orange);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(255, 116, 32, .2);
}

.gallery-filter:focus-visible,
.gallery-image-button:focus-visible,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    outline: 3px solid #222222;
    outline-offset: 3px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.gallery-item {
    min-width: 0;
    animation: galleryFadeIn .3s ease;
}

.gallery-item[hidden] {
    display: none !important;
}

.gallery-image-button {
    position: relative;
    display: block;
    width: 100%;
    height: 290px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #eeeeee;
    text-align: left;
    cursor: zoom-in;
}

.gallery-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-image-button:hover img {
    transform: scale(1.08);
}

.gallery-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 20px;
    color: #ffffff;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .78) 0%,
        rgba(0, 0, 0, .15) 55%,
        transparent 100%
    );
    opacity: .95;
    transition: background .3s ease;
}

.gallery-image-button:hover .gallery-image-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .85),
        rgba(0, 0, 0, .05) 75%
    );
}

.gallery-image-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.gallery-image-info small {
    color: #ffb17e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.gallery-image-info strong {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.4;
}

.gallery-zoom {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gallery-orange);
    color: #ffffff;
    font-size: 20px;
    transition: transform .3s ease;
}

.gallery-image-button:hover .gallery-zoom {
    transform: rotate(45deg);
}

.gallery-empty {
    padding: 30px;
    text-align: center;
    color: var(--gallery-muted);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 70px 75px;
    background: rgba(0, 0, 0, .94);
}

.gallery-lightbox.is-open {
    display: flex;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 45px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-figure figcaption {
    margin-top: 15px;
    color: #ffffff;
    text-align: center;
    font-size: 15px;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, .13);
    cursor: pointer;
    transition: background .2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--gallery-orange);
}

.lightbox-close {
    top: 18px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 20px;
}

.lightbox-prev {
    left: 18px;
}

.lightbox-next {
    right: 18px;
}

.lightbox-counter {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    color: #dddddd;
    text-align: center;
    font-size: 13px;
}

body.lightbox-open {
    overflow: hidden;
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablets */
@media (max-width: 991.98px) {
    .gallery-section {
        padding: 65px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .gallery-image-button {
        height: 260px;
    }

    .gallery-hero {
        min-height: 310px;
    }
}

/* Mobile phones */
@media (max-width: 575.98px) {
    .gallery-hero {
        min-height: 280px;
        background-position: center;
    }

    .gallery-hero-content {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .gallery-hero p {
        font-size: 14px;
    }

    .gallery-section {
        padding: 45px 0;
    }

    .gallery-heading {
        margin-bottom: 26px;
    }

    .gallery-filters {
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 25px;
    }

    .gallery-filter {
        padding: 9px 14px;
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-image-button {
        height: 190px;
        border-radius: 9px;
    }

    .gallery-image-overlay {
        padding: 12px;
    }

    .gallery-image-info {
        gap: 5px;
    }

    .gallery-image-info small {
        font-size: 8px;
        letter-spacing: .8px;
    }

    .gallery-image-info strong {
        font-size: 12px;
    }

    .gallery-zoom {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .gallery-lightbox {
        padding: 60px 12px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 7px;
    }

    .lightbox-next {
        right: 7px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-image-button {
        height: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-image-button img,
    .gallery-filter,
    .gallery-zoom {
        animation: none;
        transition: none;
    }
}
