


/* =========================================================
   FILTER
========================================================= */

.filter-wrap {
    margin-top: 45px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid #e6e1d7;
    border-radius: 50px;
    background: #fff;
    white-space: nowrap;
}

.filter button {
    border: 0;
    background: transparent;
    color: #555;
    padding: 10px 19px;
    border-radius: 50px;
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: .3s ease;
}

.filter button:hover {
    color: var(--gold);
}

.filter button.active {
    background: #111;
    color: #fff;
}


/* =========================================================
   GALLERY SECTION
========================================================= */

.gallery-section {
    padding: 20px 0;
}

.gallery-section.soft {
    background: var(--soft);
}

.gallery-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 35px;
}

.gallery-heading h2 {
    margin: 0;
    font-size: clamp(38px, 5vw, 65px);
    font-weight: 400;
}

.gallery-count {
    color: #888;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}


/* =========================================================
   PREMIUM EDITORIAL WEDDING GALLERY
   Inspired by the reference screenshot
========================================================= */

.masonry-gallery {
    display: grid;

    grid-auto-flow: dense;

    /*
     * 12 columns gives us much better control
     * over large / small / tall images.
     */
    grid-template-columns: repeat(12, 1fr);

    /*
     * Smaller rows create a more compact
     * editorial photography wall.
     */
    grid-auto-rows: 95px;

    /*
     * Very small gap like the reference website.
     */
    gap: 4px;

    width: 100%;
}


/* =========================================================
   GALLERY ITEM - BASE
========================================================= */

.gallery-item {
    position: relative;

    grid-column: span 4;
    grid-row: span 3;

    overflow: hidden;

    background: #111;

    cursor: pointer;

    isolation: isolate;
}


/* =========================================================
   LARGE IMAGE
========================================================= */

.gallery-item.large {
    grid-column: span 4;
    grid-row: span 4;
}


/* =========================================================
   TALL IMAGE
========================================================= */

.gallery-item.tall {
    grid-column: span 2;
    grid-row: span 4;
}


/* =========================================================
   WIDE IMAGE
========================================================= */

.gallery-item.wide {
    grid-column: span 4;
    grid-row: span 2;
}


/* =========================================================
   SMALL IMAGE
========================================================= */

.gallery-item.small {
    grid-column: span 2;
    grid-row: span 2;
}


/* =========================================================
   EXTRA LARGE
========================================================= */

.gallery-item.xlarge {
    grid-column: span 6;
    grid-row: span 4;
}


/* =========================================================
   IMAGE
========================================================= */

.gallery-item img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    /*
     * Prevents image distortion.
     */
    object-position: center;

    transition:
        transform 1s cubic-bezier(.2, .7, .2, 1),
        filter .6s ease;
}


/* =========================================================
   IMAGE HOVER
========================================================= */

.gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(.72);
}


/* =========================================================
   DARK HOVER OVERLAY
========================================================= */

.gallery-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 24px;

    color: #fff;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .78) 0%,
            rgba(0, 0, 0, .38) 32%,
            rgba(0, 0, 0, .08) 65%,
            transparent 100%
        );

    opacity: 0;

    transition:
        opacity .45s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}


/* =========================================================
   VIEW STORY
========================================================= */

.gallery-overlay .view {
    margin-bottom: 7px;

    font-size: 9px;
    letter-spacing: 2.5px;
    text-transform: uppercase;

    opacity: .85;
}


/* =========================================================
   IMAGE TITLE
========================================================= */

.gallery-overlay h3 {
    margin: 0 0 4px;

    font-family: "Playfair Display", serif;

    font-size: 25px;
    font-weight: 400;

    line-height: 1.1;
}


/* =========================================================
   IMAGE TAG
========================================================= */

.gallery-overlay p {
    margin: 0;

    color: rgba(255, 255, 255, .72);

    font-family: "DM Sans", sans-serif;

    font-size: 10px;
    letter-spacing: 1px;
}


/* =========================================================
   PLUS BUTTON
========================================================= */

.gallery-overlay .plus {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .7);

    border-radius: 50%;

    background: rgba(0, 0, 0, .08);

    font-size: 21px;
    font-weight: 200;

    transition:
        background .3s ease,
        transform .3s ease;
}

.gallery-item:hover .gallery-overlay .plus {
    background: rgba(255, 255, 255, .12);
    transform: rotate(90deg);
}


/* =========================================================
   HEART / FAVORITE BUTTON
   ========================================================= */

.gallery-heart {
    position: absolute;

    left: 16px;
    bottom: 16px;

    z-index: 5;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .55);

    border-radius: 50%;

    background: rgba(0, 0, 0, .15);

    color: #fff;

    font-size: 18px;
    font-weight: 300;

    backdrop-filter: blur(4px);

    transition:
        background .3s ease,
        transform .3s ease;
}

.gallery-heart:hover {
    background: rgba(255, 255, 255, .18);
    transform: scale(1.08);
}


/* =========================================================
   SHOW HEART ON HOVER
========================================================= */

.gallery-item:hover .gallery-heart {
    background: rgba(0, 0, 0, .25);
}


/* =========================================================
   HIDDEN FILTER ITEMS
========================================================= */

.gallery-item.hidden {
    display: none;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1199px) {

    .gallery-section {
        padding-left: 0;
        padding-right: 0;
    }

    .masonry-gallery {
        grid-auto-rows: 80px;
        gap: 3px;
    }

    .gallery-overlay {
        padding: 20px;
    }

    .gallery-overlay h3 {
        font-size: 22px;
    }
}


/* =========================================================
   TABLET / SMALL DESKTOP
========================================================= */

@media (max-width: 991px) {

    .pagehero {
        padding: 70px 0 45px;
    }

    .gallery-section {
        padding: 15px 0 65px;
    }

    .masonry-gallery {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 90px;
        gap: 3px;
    }

    /*
     * 6-column tablet layout
     */

    .gallery-item.large {
        grid-column: span 3;
        grid-row: span 3;
    }

    .gallery-item.tall {
        grid-column: span 2;
        grid-row: span 4;
    }

    .gallery-item.wide {
        grid-column: span 4;
        grid-row: span 2;
    }

    .gallery-item.small {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item.xlarge {
        grid-column: span 6;
        grid-row: span 4;
    }

    .gallery-overlay {
        padding: 17px;
    }

    .gallery-overlay h3 {
        font-size: 20px;
    }

    .gallery-overlay .view {
        font-size: 8px;
        letter-spacing: 2px;
    }

    .gallery-overlay p {
        font-size: 9px;
    }

    .gallery-overlay .plus {
        top: 14px;
        right: 14px;

        width: 34px;
        height: 34px;

        font-size: 18px;
    }

    .gallery-heart {
        left: 12px;
        bottom: 12px;

        width: 31px;
        height: 31px;

        font-size: 16px;
    }

    .lightbox-info {
        left: 25px;
        bottom: 25px;
    }

    .lightbox-counter {
        right: 25px;
        bottom: 25px;
    }

    .lightbox-thumbs {
        display: none;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .navbar .container {
        padding-top: 12px;
        padding-bottom: 12px;
    }


    /* -----------------------------------------------------
       HERO
    ----------------------------------------------------- */

    .pagehero {
        padding: 55px 0 35px;
    }

    .pagehero h1 {
        font-size: 48px;
    }

    .pagehero p {
        font-size: 14px;
        line-height: 1.7;
    }


    /* -----------------------------------------------------
       GALLERY
    ----------------------------------------------------- */

    .gallery-section {
        padding: 8px 0 55px;
    }

    .gallery-section .container {
        width: 100%;
        max-width: 100%;

        padding-left: 5px;
        padding-right: 5px;
    }


    /*
     * Six-column phone mosaic matching the editorial gallery layout.
     */
    .masonry-gallery {
        grid-template-columns: repeat(6, minmax(0, 1fr));

        grid-auto-rows: clamp(82px, 25vw, 125px);

        gap: 3px;
    }


    /*
     * Reset all desktop dimensions
     */
    .gallery-item,
    .gallery-item.large,
    .gallery-item.tall,
    .gallery-item.wide,
    .gallery-item.small,
    .gallery-item.xlarge {

        grid-column: span 6;
        grid-row: span 2;
    }


    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item.tall {
        grid-column: span 2;
        grid-row: span 3;
    }

    .gallery-item.wide {
        grid-column: span 4;
        grid-row: span 1;
    }

    .gallery-item.small {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-item.xlarge {
        grid-column: span 6;
        grid-row: span 2;
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(6),
    .gallery-item:nth-child(7),
    .gallery-item:nth-child(12) {
        grid-column: span 6;
        grid-row: span 2;
    }

    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(14),
    .gallery-item:nth-child(15) {
        grid-column: span 3;
        grid-row: span 1;
    }

    .gallery-item:nth-child(4),
    .gallery-item:nth-child(8),
    .gallery-item:nth-child(13) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-item:nth-child(5),
    .gallery-item:nth-child(9),
    .gallery-item:nth-child(10) {
        grid-column: span 4;
        grid-row: span 1;
    }

    .gallery-item:nth-child(11) {
        grid-column: span 2;
        grid-row: span 1;
    }


    /* -----------------------------------------------------
       OVERLAY
    ----------------------------------------------------- */

    .gallery-overlay {
        padding: 13px;

        /*
         * Keep hidden until touch/hover
         */
        opacity: 0;

        background:
            linear-gradient(
                to top,
                rgba(0, 0, 0, .78),
                rgba(0, 0, 0, .05) 75%,
                transparent
            );
    }

    .gallery-item:hover .gallery-overlay {
        opacity: 1;
    }


    .gallery-overlay h3 {
        font-size: 18px;
    }

    .gallery-overlay p {
        font-size: 8px;

        letter-spacing: .7px;
    }

    .gallery-overlay .view {
        margin-bottom: 4px;

        font-size: 7px;

        letter-spacing: 1.5px;
    }


    /* -----------------------------------------------------
       PLUS
    ----------------------------------------------------- */

    .gallery-overlay .plus {
        top: 9px;
        right: 9px;

        width: 29px;
        height: 29px;

        font-size: 17px;
    }


    /* -----------------------------------------------------
       HEART
    ----------------------------------------------------- */

    .gallery-heart {
        left: 9px;
        bottom: 9px;

        width: 29px;
        height: 29px;

        font-size: 15px;
    }


    /* -----------------------------------------------------
       LIGHTBOX
    ----------------------------------------------------- */

    .lightbox-image-area {
        width: 100vw;
        height: 65vh;
    }

    .lightbox-arrow {
        width: 42px;
        height: 42px;

        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;

        width: 42px;
        height: 42px;

        font-size: 23px;
    }

    .lightbox-info {
        left: 20px;
        right: 20px;
        bottom: 25px;
    }

    .lightbox-title {
        font-size: 25px;
    }

    .lightbox-counter {
        top: 25px;
        left: 25px;

        right: auto;
        bottom: auto;
    }


    /* -----------------------------------------------------
       CTA
    ----------------------------------------------------- */

    .gallery-cta {
        padding: 80px 20px;
    }


    /* -----------------------------------------------------
       MOBILE BAR
    ----------------------------------------------------- */

    .mobilebar {
        position: fixed;

        z-index: 999;

        left: 0;
        right: 0;
        bottom: 0;

        display: grid;

        grid-template-columns: repeat(4, 1fr);

        padding: 8px 5px;

        background: rgba(15, 15, 15, .97);

        border-top: 1px solid rgba(255, 255, 255, .1);
    }

    .mobilebar a {
        display: flex;

        flex-direction: column;

        align-items: center;

        gap: 4px;

        color: #fff;

        font-size: 8px;

        letter-spacing: 1px;

        text-transform: uppercase;
    }

    .mobilebar i {
        color: var(--gold-light);

        font-size: 17px;

        font-style: normal;
    }

    body {
        padding-bottom: 60px;
    }
}

@media (min-width: 992px) {
    .masonry-gallery {
        display: grid;
        column-count: auto;
        column-gap: normal;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-auto-rows: clamp(58px, 6vw, 95px);
        grid-auto-flow: dense;
        gap: 4px;
    }

    .masonry-gallery .gallery-item,
    .masonry-gallery .gallery-item.large,
    .masonry-gallery .gallery-item.tall,
    .masonry-gallery .gallery-item.wide,
    .masonry-gallery .gallery-item.small,
    .masonry-gallery .gallery-item.xlarge {
        display: block;
        width: auto;
        height: auto;
        margin: 0;
        break-inside: auto;
    }

    .masonry-gallery .gallery-item { grid-column: span 4; grid-row: span 3; }
    .masonry-gallery .gallery-item.large { grid-column: span 4; grid-row: span 4; }
    .masonry-gallery .gallery-item.tall { grid-column: span 2; grid-row: span 4; }
    .masonry-gallery .gallery-item.wide { grid-column: span 4; grid-row: span 2; }
    .masonry-gallery .gallery-item.small { grid-column: span 2; grid-row: span 2; }
    .masonry-gallery .gallery-item.xlarge { grid-column: span 6; grid-row: span 4; }

    .masonry-gallery .gallery-item img {
        height: 100%;
        aspect-ratio: auto;
    }
}

/* Desktop editorial mosaic: horizontal rows with no empty cells. */
@media (min-width: 992px) {
    .masonry-gallery {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-auto-rows: clamp(58px, 6vw, 95px);
        grid-auto-flow: dense;
        gap: 4px;
    }

    .masonry-gallery .gallery-item,
    .masonry-gallery .gallery-item.large,
    .masonry-gallery .gallery-item.tall,
    .masonry-gallery .gallery-item.wide,
    .masonry-gallery .gallery-item.small,
    .masonry-gallery .gallery-item.xlarge {
        display: block;
        width: auto;
        height: auto;
        margin: 0;
        break-inside: auto;
    }

    .masonry-gallery .gallery-item {
        grid-column: span 4;
        grid-row: span 3;
    }

    .masonry-gallery .gallery-item.large {
        grid-column: span 4;
        grid-row: span 4;
    }

    .masonry-gallery .gallery-item.tall {
        grid-column: span 2;
        grid-row: span 4;
    }

    .masonry-gallery .gallery-item.wide {
        grid-column: span 4;
        grid-row: span 2;
    }

    .masonry-gallery .gallery-item.small {
        grid-column: span 2;
        grid-row: span 2;
    }

    .masonry-gallery .gallery-item.xlarge {
        grid-column: span 6;
        grid-row: span 4;
    }

    .masonry-gallery .gallery-item img,
    .masonry-gallery .gallery-item.large img,
    .masonry-gallery .gallery-item.tall img,
    .masonry-gallery .gallery-item.wide img,
    .masonry-gallery .gallery-item.small img,
    .masonry-gallery .gallery-item.xlarge img {
        height: 100%;
        aspect-ratio: auto;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 575px) {

    .pagehero {
        padding: 45px 15px 30px;
    }

    .pagehero h1 {
        font-size: 42px;
    }

    .pagehero p {
        font-size: 13px;
    }


    /* -----------------------------------------------------
       GALLERY
    ----------------------------------------------------- */

    .gallery-section {
        padding-top: 5px;
    }

    .gallery-section .container {
        padding-left: 3px;
        padding-right: 3px;
    }

    /* -----------------------------------------------------
       MOBILE OVERLAY
    ----------------------------------------------------- */

    .gallery-overlay {
        padding: 11px;
    }

    .gallery-overlay h3 {
        font-size: 17px;
    }

    .gallery-overlay p {
        font-size: 7px;
    }

    .gallery-overlay .view {
        font-size: 6px;
        letter-spacing: 1.3px;
    }


    /* -----------------------------------------------------
       PLUS
    ----------------------------------------------------- */

    .gallery-overlay .plus {
        top: 8px;
        right: 8px;

        width: 27px;
        height: 27px;

        font-size: 15px;
    }


    /* -----------------------------------------------------
       HEART
    ----------------------------------------------------- */

    .gallery-heart {
        left: 8px;
        bottom: 8px;

        width: 27px;
        height: 27px;

        font-size: 14px;
    }


    /* -----------------------------------------------------
       LIGHTBOX
    ----------------------------------------------------- */

    .lightbox-image-area {
        height: 60vh;
    }

    .lightbox-info {
        bottom: 20px;
    }

    .lightbox-title {
        font-size: 22px;
    }

    .lightbox-desc {
        font-size: 11px;
    }

    .lightbox-tag {
        font-size: 8px;
        letter-spacing: 2px;
    }

    .lightbox-counter {
        top: 20px;
        left: 20px;
    }
}


/* =========================================================
   EXTRA SMALL DEVICES
========================================================= */

@media (max-width: 380px) {

    .pagehero h1 {
        font-size: 37px;
    }

    .gallery-overlay h3 {
        font-size: 15px;
    }

    .gallery-overlay p {
        display: none;
    }

    .gallery-overlay .view {
        margin-bottom: 2px;
    }
}


/* =========================================================
   RESPONSIVE MASONRY
   Continuous columns prevent empty grid cells around mixed-size images.
========================================================= */

.masonry-gallery {
    display: block;
    column-count: 4;
    column-gap: 4px;
}

.masonry-gallery .gallery-item,
.masonry-gallery .gallery-item.large,
.masonry-gallery .gallery-item.tall,
.masonry-gallery .gallery-item.wide,
.masonry-gallery .gallery-item.small,
.masonry-gallery .gallery-item.xlarge {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 4px;
    break-inside: avoid;
    grid-column: auto;
    grid-row: auto;
}

.masonry-gallery .gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.masonry-gallery .gallery-item.large img,
.masonry-gallery .gallery-item.xlarge img {
    aspect-ratio: 4 / 3;
}

.masonry-gallery .gallery-item.tall img {
    aspect-ratio: 3 / 4;
}

.masonry-gallery .gallery-item.wide img {
    aspect-ratio: 16 / 9;
}

.masonry-gallery .gallery-item.small img {
    aspect-ratio: 1 / 1;
}

@media (max-width: 991px) {
    .masonry-gallery {
        column-count: 3;
    }
}

@media (max-width: 767px) {
    .gallery-section .container {
        padding-left: 3px;
        padding-right: 3px;
    }

    .pagehero .container,
    .filter-wrap {
        max-width: 100%;
        width: 100%;
    }

    .filter-wrap {
        overflow-x: auto;
    }

    .masonry-gallery {
        column-count: 2;
        column-gap: 3px;
    }

    .masonry-gallery .gallery-item,
    .masonry-gallery .gallery-item.large,
    .masonry-gallery .gallery-item.tall,
    .masonry-gallery .gallery-item.wide,
    .masonry-gallery .gallery-item.small,
    .masonry-gallery .gallery-item.xlarge {
        margin-bottom: 3px;
    }
}

@media (min-width: 992px) {
    .masonry-gallery {
        display: grid;
        column-count: auto;
        column-gap: normal;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-auto-rows: clamp(58px, 6vw, 95px);
        grid-auto-flow: dense;
        gap: 4px;
    }

    .masonry-gallery .gallery-item,
    .masonry-gallery .gallery-item.large,
    .masonry-gallery .gallery-item.tall,
    .masonry-gallery .gallery-item.wide,
    .masonry-gallery .gallery-item.small,
    .masonry-gallery .gallery-item.xlarge {
        display: block;
        width: auto;
        height: auto;
        margin: 0;
        break-inside: auto;
    }

    .masonry-gallery .gallery-item { grid-column: span 4; grid-row: span 3; }
    .masonry-gallery .gallery-item.large { grid-column: span 4; grid-row: span 4; }
    .masonry-gallery .gallery-item.tall { grid-column: span 2; grid-row: span 4; }
    .masonry-gallery .gallery-item.wide { grid-column: span 4; grid-row: span 2; }
    .masonry-gallery .gallery-item.small { grid-column: span 2; grid-row: span 2; }
    .masonry-gallery .gallery-item.xlarge { grid-column: span 6; grid-row: span 4; }

    .masonry-gallery .gallery-item img {
        height: 100%;
        aspect-ratio: auto;
    }
}