.home-gallery-section {
    --gallery-accent: var(--theme-primary, #ff3300);
    --gallery-accent-dark: var(--theme-primary-hover, #d92b00);
    --gallery-ink: var(--theme-heading, #101a32);
    --gallery-muted: #657086;
    background:
        radial-gradient(circle at 7% 22%, rgba(var(--theme-primary-rgb, 255, 51, 0), .08), transparent 9%),
        radial-gradient(circle at 83% 13%, rgba(var(--theme-primary-rgb, 255, 51, 0), .08), transparent 15%),
        #fff;
    overflow: hidden;
    padding: 54px 0 70px;
    position: relative;
}

.home-gallery-section::before,
.home-gallery-section::after {
    content: "";
    pointer-events: none;
    position: absolute;
}

.home-gallery-section::before {
    background-image: radial-gradient(rgba(var(--theme-primary-rgb, 255, 51, 0), .32) 1.5px, transparent 1.5px);
    background-size: 13px 13px;
    height: 92px;
    left: clamp(110px, 16vw, 220px);
    opacity: .42;
    top: 64px;
    width: 92px;
}

.home-gallery-section::after {
    border: 1px solid rgba(var(--theme-primary-rgb, 255, 51, 0), .18);
    border-bottom: 0;
    border-left: 0;
    border-radius: 50%;
    height: 230px;
    left: -34px;
    top: 95px;
    transform: rotate(18deg);
    width: 230px;
}

.home-gallery-section > .container {
    max-width: 1320px;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
    z-index: 1;
}

.home-gallery-camera {
    align-items: center;
    background:
        radial-gradient(circle at 42% 44%, rgba(255, 255, 255, .72), transparent 42%),
        linear-gradient(135deg, rgba(var(--theme-primary-rgb, 255, 51, 0), .12), rgba(var(--theme-primary-rgb, 255, 51, 0), .03));
    border-radius: 48% 52% 44% 56%;
    color: #1d273d;
    display: flex;
    font-size: 88px;
    height: 160px;
    justify-content: center;
    opacity: .28;
    position: absolute;
    right: clamp(70px, 11vw, 190px);
    top: 38px;
    transform: rotate(-5deg);
    width: 210px;
    z-index: 0;
}

.home-gallery-header {
    animation: homeGalleryFadeDown .7s ease both;
    margin: 0 auto 28px;
    max-width: 680px;
    text-align: center;
}

.home-gallery-label {
    align-items: center;
    color: var(--gallery-accent);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    letter-spacing: .08em;
    line-height: 1.2;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.home-gallery-header h2 {
    color: var(--gallery-ink);
    font-size: 46px;
    font-weight: 800;
    line-height: 1.06;
    margin: 0;
}

.home-gallery-header p {
    color: var(--gallery-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.65;
    margin: 14px auto 0;
    max-width: 590px;
}

.home-gallery-filters {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin: 0 auto 30px;
}

.home-gallery-filter {
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 999px;
    color: var(--gallery-ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    min-height: 38px;
    min-width: 104px;
    padding: 0 20px;
    transition: background .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}

.home-gallery-filter:hover,
.home-gallery-filter:focus-visible,
.home-gallery-filter.is-active {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: #fff;
    outline: 0;
    transform: translateY(-2px);
}

.home-gallery-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.08fr);
    grid-template-rows: repeat(2, 205px);
}

.home-gallery-card {
    animation: homeGalleryFadeUp .7s ease both;
    min-width: 0;
}

.home-gallery-card:nth-child(2) { animation-delay: .04s; }
.home-gallery-card:nth-child(3) { animation-delay: .08s; }
.home-gallery-card:nth-child(4) { animation-delay: .12s; }
.home-gallery-card:nth-child(5) { animation-delay: .16s; }
.home-gallery-card:nth-child(6) { animation-delay: .2s; }

.home-gallery-card[hidden] {
    display: none;
}

.home-gallery-card-button {
    background: #edf0f3;
    border: 0;
    border-radius: 0;
    box-shadow: 0 13px 32px rgba(20, 24, 31, .1);
    cursor: pointer;
    display: block;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: left;
    transition: box-shadow .3s ease, transform .3s ease;
    width: 100%;
}

.home-gallery-card--layout-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.home-gallery-card--layout-2 {
    grid-column: 2;
    grid-row: 1;
}

.home-gallery-card--layout-3 {
    grid-column: 3;
    grid-row: 1;
}

.home-gallery-card--layout-4 {
    grid-column: 4;
    grid-row: 1 / span 2;
}

.home-gallery-card--layout-5 {
    grid-column: 2;
    grid-row: 2;
}

.home-gallery-card--layout-6 {
    grid-column: 3;
    grid-row: 2;
}

.home-gallery-card-button:focus-visible {
    outline: 3px solid rgba(var(--theme-primary-rgb, 227, 38, 46), .38);
    outline-offset: 4px;
}

.home-gallery-card-button:hover,
.home-gallery-card-button:focus-visible {
    box-shadow: 0 20px 46px rgba(20, 24, 31, .18);
    transform: translateY(-4px);
}

.home-gallery-card-button img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
    width: 100%;
}

.home-gallery-card-button:hover img,
.home-gallery-card-button:focus-visible img {
    transform: scale(1.08);
}

.home-gallery-overlay {
    align-items: flex-start;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .18) 35%, rgba(0, 0, 0, .82) 100%);
    bottom: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    left: 0;
    opacity: .94;
    padding: 62px 18px 17px;
    position: absolute;
    right: 0;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease;
}

.home-gallery-card-button:hover .home-gallery-overlay,
.home-gallery-card-button:focus-visible .home-gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.home-gallery-card-title {
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    transform: translateY(8px);
    transition: transform .3s ease;
}

.home-gallery-card-button:hover .home-gallery-card-title,
.home-gallery-card-button:focus-visible .home-gallery-card-title {
    transform: translateY(0);
}

.home-gallery-card-date,
.home-gallery-card-location {
    color: rgba(255, 255, 255, .86);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 7px;
    line-height: 1.4;
    opacity: .82;
    transition: opacity .3s ease;
}

.home-gallery-card-button:hover .home-gallery-card-date,
.home-gallery-card-button:focus-visible .home-gallery-card-date,
.home-gallery-card-button:hover .home-gallery-card-location,
.home-gallery-card-button:focus-visible .home-gallery-card-location {
    opacity: 1;
}

.home-gallery-cta {
    align-items: center;
    animation: homeGallerySlideUp .7s ease .15s both;
    background: linear-gradient(135deg, var(--theme-primary-light, #fff1eb) 0%, #fff 54%, rgba(var(--theme-primary-rgb, 255, 51, 0), .08) 100%);
    border: 1px solid rgba(var(--theme-primary-rgb, 255, 51, 0), .16);
    border-radius: 24px;
    box-shadow: 0 22px 52px rgba(84, 59, 24, .1);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-top: 24px;
    padding: 30px;
}

.home-gallery-cta-copy {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: 72px minmax(0, 1fr);
}

.home-gallery-cta-icon {
    align-items: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 32px rgba(84, 59, 24, .12);
    color: var(--gallery-accent);
    display: flex;
    font-size: 32px;
    height: 72px;
    justify-content: center;
    width: 72px;
}

.home-gallery-cta h3 {
    color: var(--gallery-ink);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 7px;
}

.home-gallery-cta p {
    color: var(--gallery-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
}

.home-gallery-cta-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
}

.home-gallery-cta-primary,
.home-gallery-cta-secondary {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.home-gallery-cta-primary {
    background: var(--gallery-accent);
    color: #fff;
}

.home-gallery-cta-secondary {
    background: #fff;
    border: 1px solid #e6d7bd;
    color: var(--gallery-ink);
}

.home-gallery-cta-primary:hover,
.home-gallery-cta-primary:focus-visible,
.home-gallery-cta-secondary:hover,
.home-gallery-cta-secondary:focus-visible {
    color: #fff;
    outline: 0;
    transform: scale(1.04);
}

.home-gallery-cta-secondary:hover,
.home-gallery-cta-secondary:focus-visible {
    background: var(--gallery-accent-dark);
    border-color: var(--gallery-accent-dark);
}

.home-gallery-lightbox {
    align-items: center;
    background: rgba(10, 12, 16, .92);
    display: grid;
    inset: 0;
    justify-items: center;
    opacity: 0;
    padding: 28px;
    position: fixed;
    transition: opacity .25s ease;
    z-index: 9999;
}

.home-gallery-lightbox.is-open {
    opacity: 1;
}

.home-gallery-lightbox[hidden] {
    display: none;
}

.home-gallery-lightbox-figure {
    margin: 0;
    max-width: min(1040px, calc(100vw - 120px));
    text-align: center;
}

.home-gallery-lightbox-figure img {
    border-radius: 0;
    box-shadow: 0 26px 72px rgba(0, 0, 0, .38);
    display: block;
    max-height: min(78vh, 760px);
    max-width: 100%;
    object-fit: contain;
}

.home-gallery-lightbox-figure figcaption {
    color: #fff;
    display: grid;
    gap: 4px;
    margin-top: 16px;
}

.home-gallery-lightbox-figure strong {
    font-size: 22px;
    font-weight: 800;
}

.home-gallery-lightbox-figure span {
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    font-weight: 700;
}

.home-gallery-lightbox-close,
.home-gallery-lightbox-nav {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    position: absolute;
    transition: background .25s ease, transform .25s ease;
}

.home-gallery-lightbox-close {
    font-size: 20px;
    height: 46px;
    right: 26px;
    top: 24px;
    width: 46px;
}

.home-gallery-lightbox-nav {
    font-size: 24px;
    height: 54px;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
}

.home-gallery-lightbox-prev {
    left: 24px;
}

.home-gallery-lightbox-next {
    right: 24px;
}

.home-gallery-lightbox-close:hover,
.home-gallery-lightbox-close:focus-visible,
.home-gallery-lightbox-nav:hover,
.home-gallery-lightbox-nav:focus-visible {
    background: var(--gallery-accent);
    outline: 0;
}

.home-gallery-lightbox-nav:hover,
.home-gallery-lightbox-nav:focus-visible {
    transform: translateY(-50%) scale(1.06);
}

@keyframes homeGalleryFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes homeGalleryFadeDown {
    from { opacity: 0; transform: translateY(-18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes homeGallerySlideUp {
    from { opacity: 0; transform: translateY(34px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1199px) {
    .home-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(3, 210px);
    }

    .home-gallery-card--layout-1 {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .home-gallery-card--layout-2 {
        grid-column: 2;
        grid-row: 1;
    }

    .home-gallery-card--layout-3 {
        grid-column: 3;
        grid-row: 1;
    }

    .home-gallery-card--layout-4 {
        grid-column: 2;
        grid-row: 2;
    }

    .home-gallery-card--layout-5 {
        grid-column: 3;
        grid-row: 2 / span 2;
    }

    .home-gallery-card--layout-6 {
        grid-column: 1 / span 2;
        grid-row: 3;
    }
}

@media (max-width: 991px) {
    .home-gallery-camera {
        display: none;
    }

    .home-gallery-header h2 {
        font-size: 44px;
    }

    .home-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .home-gallery-card--layout-1,
    .home-gallery-card--layout-2,
    .home-gallery-card--layout-3,
    .home-gallery-card--layout-4,
    .home-gallery-card--layout-5,
    .home-gallery-card--layout-6 {
        grid-column: auto;
        grid-row: auto;
    }

    .home-gallery-card-button {
        height: 260px;
    }

    .home-gallery-card--layout-1 .home-gallery-card-button,
    .home-gallery-card--layout-4 .home-gallery-card-button {
        height: 360px;
    }

    .home-gallery-cta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .home-gallery-section {
        padding: 58px 0;
    }

    .home-gallery-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-left: -20px;
        margin-right: -20px;
        overflow-x: auto;
        padding: 0 20px 8px;
        scrollbar-width: none;
    }

    .home-gallery-filters::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 575px) {
    .home-gallery-section {
        padding: 25px 0;
    }

    .home-gallery-header h2 {
        font-size: 34px;
    }

    .home-gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-gallery-card-button,
    .home-gallery-card--layout-1 .home-gallery-card-button,
    .home-gallery-card--layout-4 .home-gallery-card-button {
        height: 320px;
    }

    .home-gallery-cta {
        padding: 22px;
    }

    .home-gallery-cta-copy {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-gallery-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .home-gallery-lightbox {
        padding: 18px;
    }

    .home-gallery-lightbox-figure {
        max-width: calc(100vw - 36px);
    }

    .home-gallery-lightbox-nav {
        height: 42px;
        width: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-gallery-header,
    .home-gallery-card,
    .home-gallery-cta {
        animation: none;
    }

    .home-gallery-filter,
    .home-gallery-card-button,
    .home-gallery-card-button img,
    .home-gallery-overlay,
    .home-gallery-card-title,
    .home-gallery-card-date,
    .home-gallery-card-location,
    .home-gallery-cta-primary,
    .home-gallery-cta-secondary,
    .home-gallery-lightbox,
    .home-gallery-lightbox-close,
    .home-gallery-lightbox-nav {
        transition: none;
    }
}
