/* =====================================================
   GALLERY SECTION
===================================================== */

.gallery-section {
    padding: 40px 0 60px;
}


/* =====================================================
   TOOLBAR
===================================================== */

.gallery-toolbar {
    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 25px;
}


.filter-btn {
    border: 1px solid #eadfd3;

    background: #fffdf9;

    color: #44254d;

    padding: 8px 18px;

    border-radius: 20px;

    cursor: pointer;

    font-size: 14px;

    font-weight: 500;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}


.filter-btn:hover {
    background: #f5ede3;

    border-color: #a86f1d;

    color: #44254d;

    transform: translateY(-1px);
}


.filter-btn.active {
    background: #44254d;

    border-color: #44254d;

    color: #fff;
}


/* =====================================================
   IMAGE COUNT
===================================================== */

.gallery-count {
    text-align: center;

    margin-bottom: 28px;

    color: #756a70;

    font-size: 14px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =====================================================
   GALLERY GRID
===================================================== */

.gallery-item {
    transition:
        opacity .25s ease,
        transform .25s ease;
}


.gallery-item.d-none {
    display: none !important;
}


/* =====================================================
   GALLERY CARD
===================================================== */

.gallery-card {
    height: 100%;

    display: flex;

    flex-direction: column;

    background: #fffdf9;

    border: 1px solid #eadfd3;

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 4px 14px
        rgba(68,37,77,.08);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.gallery-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 25px
        rgba(68,37,77,.15);
}


/* =====================================================
   IMAGE CONTAINER
   IMPORTANT:
   NO FIXED HEIGHT
===================================================== */

.gallery-image-wrap {
    position: relative;

    width: 100%;

    overflow: hidden;

    background: #f5ede3;

    display: block;

    /*
     * Height is determined by the photograph.
     * This prevents the top/bottom of the image
     * from being cut.
     */
}


/* =====================================================
   IMAGE LINK
   IMPORTANT:
   NO height: 100%
===================================================== */

.gallery-image-link {
    position: relative;

    display: block;

    width: 100%;

    height: auto;

    overflow: hidden;

    text-decoration: none;
}


/* =====================================================
   GALLERY IMAGE
   COMPLETE IMAGE — NO CROPPING
===================================================== */

.gallery-image {
    display: block;

    width: 100%;

    height: auto;

    max-width: 100%;

    /*
     * Natural aspect ratio is preserved.
     *
     * The complete photograph is displayed.
     */
    object-fit: contain;

    object-position: center;

    background: #f5ede3;

    transition:
        transform .35s ease;
}


/* =====================================================
   IMAGE HOVER
===================================================== */

.gallery-card:hover .gallery-image {
    transform: scale(1.02);
}


/* =====================================================
   IMAGE OVERLAY
===================================================== */

.image-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(68,37,77,.45);

    color: #fff;

    font-size: 30px;

    opacity: 0;

    transition:
        opacity .25s ease;
}


.gallery-image-link:hover .image-overlay {
    opacity: 1;
}


/* =====================================================
   OVERLAY ICON
===================================================== */

.image-overlay i {
    width: 55px;

    height: 55px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid
        rgba(255,255,255,.75);

    border-radius: 50%;

    background:
        rgba(68,37,77,.65);

    transition:
        transform .2s ease;
}


.gallery-image-link:hover
.image-overlay i {
    transform: scale(1.08);
}


/* =====================================================
   CARD BODY
===================================================== */

.gallery-card-body {
    flex: 1;

    padding: 16px;

    background: #fffdf9;
}


/* =====================================================
   GALLERY TITLE
===================================================== */

.gallery-card-title {
    margin:
        0 0 8px;

    color: #44254d;

    font-size: 20px;

    line-height: 1.35;

    font-weight: 700;
}


/* =====================================================
   DATE
===================================================== */

.gallery-date {
    margin:
        0 0 10px;

    color: #756a70;

    font-size: 14px;

    line-height: 1.4;
}


.gallery-date i {
    margin-right: 5px;

    color: #a86f1d;
}


/* =====================================================
   CATEGORY TAG
===================================================== */

.category-tag {
    display: inline-block;

    padding:
        5px 10px;

    border-radius: 12px;

    background: #f1e5d4;

    color: #805315;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 12px;

    line-height: 1.2;

    font-weight: 600;
}


/* =====================================================
   NO RESULTS
===================================================== */

.no-results {
    display: none;

    text-align: center;

    padding:
        60px 20px;

    color: #756a70;
}


.no-results i {
    display: block;

    margin-bottom: 15px;

    color: #a86f1d;

    font-size: 40px;
}


.no-results h3 {
    margin:
        0 0 8px;

    color: #44254d;

    font-size: 22px;
}


.no-results p {
    margin: 0;

    font-size: 14px;
}


/* =====================================================
   SINGLE GALLERY PAGE
===================================================== */

.single-gallery-section {
    padding:
        40px 0 60px;
}


.single-gallery {
    width: 100%;

    max-width: 1150px;

    margin: 0 auto;
}


/* =====================================================
   SINGLE IMAGE VIEWER
===================================================== */

.single-gallery-viewer {
    position: relative;

    background: #fffdf9;

    border:
        1px solid #eadfd3;

    border-radius: 16px;

    padding: 15px;

    box-shadow:
        0 8px 25px
        rgba(68,37,77,.10);
}


/* =====================================================
   SINGLE IMAGE
   COMPLETE PHOTO
===================================================== */

.single-gallery-image-wrap {
    position: relative;

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    border-radius: 12px;

    background: #f5ede3;
}


.single-gallery-image {
    display: block;

    width: 100%;

    height: auto;

    max-width: 100%;

    /*
     * Never crop the event photograph.
     */
    object-fit: contain;

    object-position: center;
}


/* =====================================================
   PREVIOUS / NEXT NAVIGATION
===================================================== */

.gallery-navigation {
    position: absolute;

    top: 50%;

    left: 0;

    right: 0;

    z-index: 5;

    display: flex;

    justify-content: space-between;

    padding:
        0 25px;

    transform:
        translateY(-50%);

    pointer-events: none;
}


.gallery-nav-button {
    width: 52px;

    height: 52px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 50%;

    background:
        rgba(68,37,77,.90);

    color: #fff;

    font-size: 25px;

    text-decoration: none;

    pointer-events: auto;

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.gallery-nav-button:hover {
    background: #a86f1d;

    color: #fff;

    transform:
        scale(1.07);

    box-shadow:
        0 6px 18px
        rgba(68,37,77,.25);
}


/* =====================================================
   SINGLE GALLERY INFORMATION
===================================================== */

.single-gallery-info {
    padding:
        25px 15px 10px;

    text-align: center;
}


.single-gallery-title {
    margin: 0;

    color: #44254d;

    font-size: 28px;

    line-height: 1.35;

    font-weight: 700;
}


.single-gallery-date {
    margin-top: 8px;

    color: #805315;

    font-size: 14px;

    font-weight: 600;
}


.single-gallery-description {
    max-width: 750px;

    margin:
        10px auto;

    color: #756a70;

    font-size: 15px;

    line-height: 1.6;
}


.single-gallery-counter {
    margin-top: 12px;

    color: #756a70;

    font-size: 14px;
}


/* =====================================================
   BACK TO GALLERY
===================================================== */

.back-to-gallery {
    margin-top: 22px;

    text-align: center;
}


.back-to-gallery a {
    display: inline-block;

    padding:
        10px 20px;

    border-radius: 7px;

    background: #44254d;

    color: #fff;

    text-decoration: none;

    font-size: 14px;

    transition:
        background .2s ease,
        transform .2s ease;
}


.back-to-gallery a:hover {
    background: #a86f1d;

    color: #fff;

    transform:
        translateY(-1px);
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 991.98px) {

    .gallery-section {
        padding:
            35px 15px 50px;
    }


    .single-gallery-section {
        padding:
            35px 15px 50px;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767.98px) {

    .gallery-section {
        padding:
            25px 10px 40px;
    }


    .gallery-toolbar {
        gap: 6px;

        margin-bottom: 20px;
    }


    .filter-btn {
        padding:
            7px 13px;

        font-size: 13px;
    }


    .gallery-count {
        margin-bottom: 20px;

        font-size: 13px;
    }


    /*
     * IMPORTANT:
     * No fixed image height.
     */
    .gallery-image-wrap {
        height: auto;

        min-height: 0;
    }


    .gallery-image {
        width: 100%;

        height: auto;

        object-fit: contain;
    }


    .gallery-card-title {
        font-size: 18px;
    }


    .gallery-card-body {
        padding: 14px;
    }


    .gallery-date {
        font-size: 13px;
    }


    /* =================================================
       SINGLE GALLERY MOBILE
    ================================================= */

    .single-gallery-section {
        padding:
            25px 10px 40px;
    }


    .single-gallery-viewer {
        padding: 8px;

        border-radius: 12px;
    }


    .single-gallery-image-wrap {
        height: auto;

        min-height: 0;

        border-radius: 9px;
    }


    .single-gallery-image {
        width: 100%;

        height: auto;

        object-fit: contain;
    }


    .gallery-navigation {
        padding:
            0 12px;
    }


    .gallery-nav-button {
        width: 42px;

        height: 42px;

        font-size: 21px;
    }


    .single-gallery-title {
        font-size: 22px;
    }


    .single-gallery-description {
        font-size: 14px;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {

    .gallery-section {
        padding-left: 8px;

        padding-right: 8px;
    }


    .gallery-image-wrap {
        height: auto;
    }


    .gallery-image {
        width: 100%;

        height: auto;
    }


    .single-gallery-image-wrap {
        height: auto;
    }


    .single-gallery-image {
        width: 100%;

        height: auto;
    }


    .gallery-navigation {
        padding:
            0 8px;
    }


    .gallery-nav-button {
        width: 38px;

        height: 38px;

        font-size: 19px;
    }

}


/* =====================================================
   ACCESSIBILITY
===================================================== */

@media (prefers-reduced-motion: reduce) {

    .gallery-card,
    .gallery-image,
    .image-overlay,
    .filter-btn,
    .gallery-nav-button,
    .back-to-gallery a {
        transition: none;
    }

}
