/* =========================================================
   CARE THE PEACE - GALLERY PAGE
========================================================= */

.ctp-gallery-page {
    width: 100%;
    background: #ffffff;
    padding: 70px 0 90px;
}


.ctp-gallery-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}


/* =========================================================
   INTRO
========================================================= */

.ctp-gallery-intro {
    max-width: 760px;
    margin: 0 auto 45px;
    text-align: center;
}


.ctp-gallery-intro .ctp-section-label {
    display: inline-block;
    margin-bottom: 12px;
}


.ctp-gallery-intro h1 {
    margin: 0 0 18px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 700;
    color: #173d25;
}


.ctp-gallery-intro h1 span {
    color: #68b83f;
}


.ctp-gallery-intro p {
    margin: 0 auto;
    max-width: 700px;
    color: #68756b;
    font-size: 16px;
    line-height: 1.8;
}


/* =========================================================
   FILTER BUTTONS
========================================================= */

.ctp-gallery-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 42px;
}


.ctp-gallery-filter-btn {
    border: 1px solid #dce8d8;
    background: #ffffff;
    color: #31503a;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}


.ctp-gallery-filter-btn:hover {
    border-color: #68b83f;
    color: #68b83f;
}


.ctp-gallery-filter-btn.active {
    background: #68b83f;
    border-color: #68b83f;
    color: #ffffff;
}


/* =========================================================
   GALLERY GRID
========================================================= */

.ctp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}


.ctp-gallery-item {
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e8eee5;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(23, 61, 37, 0.07);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.ctp-gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 38px rgba(23, 61, 37, 0.13);
}


/* =========================================================
   IMAGE
========================================================= */

.ctp-gallery-image-button {
    position: relative;
    display: block;
    width: 100%;
    height: 260px;
    padding: 0;
    border: 0;
    background: #f5faef;
    cursor: pointer;
    overflow: hidden;
}


.ctp-gallery-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}


.ctp-gallery-item:hover
.ctp-gallery-image-button img {
    transform: scale(1.06);
}


/* =========================================================
   IMAGE OVERLAY
========================================================= */

.ctp-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(23, 61, 37, 0.68);
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}


.ctp-gallery-item:hover .ctp-gallery-overlay {
    opacity: 1;
}


.ctp-gallery-overlay-icon {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}


.ctp-gallery-overlay span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}


/* =========================================================
   CAPTION
========================================================= */

.ctp-gallery-caption {
    padding: 20px 22px 22px;
}


.ctp-gallery-caption > span {
    display: block;
    margin-bottom: 7px;
    color: #68b83f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}


.ctp-gallery-caption h3 {
    margin: 0;
    color: #173d25;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.ctp-gallery-empty {
    max-width: 600px;
    margin: 40px auto;
    padding: 45px 25px;
    text-align: center;
    background: #f7fbf6;
    border-radius: 18px;
}


.ctp-gallery-empty-icon {
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #68b83f;
    color: #ffffff;
    font-size: 24px;
}


.ctp-gallery-empty h3 {
    margin: 0 0 10px;
    color: #173d25;
    font-size: 24px;
}


.ctp-gallery-empty p {
    margin: 0;
    color: #68756b;
    line-height: 1.7;
}


/* =========================================================
   BOTTOM CTA
========================================================= */

.ctp-gallery-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    margin-top: 70px;
    padding: 42px 48px;
    background: #f5faef;
    border: 1px solid #e1eddc;
    border-radius: 22px;
}


.ctp-gallery-cta-content {
    max-width: 720px;
}


.ctp-gallery-cta-content .ctp-section-label {
    display: inline-block;
    margin-bottom: 10px;
}


.ctp-gallery-cta h2 {
    margin: 0 0 12px;
    color: #173d25;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
}


.ctp-gallery-cta h2 span {
    color: #68b83f;
}


.ctp-gallery-cta p {
    margin: 0;
    color: #68756b;
    line-height: 1.7;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.ctp-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 80px;
    background: rgba(10, 25, 15, 0.94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


.ctp-gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.ctp-gallery-lightbox-content {
    position: relative;
    max-width: 1100px;
    width: 100%;
    max-height: calc(100vh - 80px);
    text-align: center;
}


.ctp-gallery-lightbox-content img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
}


.ctp-gallery-lightbox-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    color: #ffffff;
}


.ctp-gallery-lightbox-caption strong {
    font-size: 20px;
}


.ctp-gallery-lightbox-caption span {
    color: #cce6c4;
    font-size: 13px;
}


/* =========================================================
   LIGHTBOX CONTROLS
========================================================= */

.ctp-gallery-lightbox-close,
.ctp-gallery-lightbox-prev,
.ctp-gallery-lightbox-next {
    position: fixed;
    z-index: 100001;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s ease;
}


.ctp-gallery-lightbox-close:hover,
.ctp-gallery-lightbox-prev:hover,
.ctp-gallery-lightbox-next:hover {
    opacity: 0.65;
}


.ctp-gallery-lightbox-close {
    top: 20px;
    right: 28px;
    font-size: 42px;
    line-height: 1;
}


.ctp-gallery-lightbox-prev,
.ctp-gallery-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    line-height: 1;
}


.ctp-gallery-lightbox-prev {
    left: 25px;
}


.ctp-gallery-lightbox-next {
    right: 25px;
}


body.ctp-gallery-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {

    .ctp-gallery-page {
        padding: 55px 0 70px;
    }


    .ctp-gallery-container {
        width: min(100% - 36px, 760px);
    }


    .ctp-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }


    .ctp-gallery-image-button {
        height: 240px;
    }


    .ctp-gallery-cta {
        padding: 35px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .ctp-gallery-page {
        padding: 40px 0 55px;
    }


    .ctp-gallery-container {
        width: calc(100% - 30px);
    }


    .ctp-gallery-intro {
        margin-bottom: 30px;
    }


    .ctp-gallery-intro h1 {
        font-size: 38px;
    }


    .ctp-gallery-intro p {
        font-size: 14px;
        line-height: 1.7;
    }


    .ctp-gallery-filter {
        gap: 8px;
        margin-bottom: 30px;
    }


    .ctp-gallery-filter-btn {
        padding: 8px 14px;
        font-size: 12px;
    }


    .ctp-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }


    .ctp-gallery-image-button {
        height: 250px;
    }


    .ctp-gallery-caption {
        padding: 17px 18px 19px;
    }


    .ctp-gallery-caption h3 {
        font-size: 18px;
    }


    .ctp-gallery-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        margin-top: 45px;
        padding: 28px 22px;
        border-radius: 18px;
    }


    .ctp-gallery-cta h2 {
        font-size: 29px;
    }


    .ctp-gallery-lightbox {
        padding: 50px 15px 30px;
    }


    .ctp-gallery-lightbox-content img {
        max-height: 65vh;
    }


    .ctp-gallery-lightbox-prev,
    .ctp-gallery-lightbox-next {
        font-size: 42px;
    }


    .ctp-gallery-lightbox-prev {
        left: 5px;
    }


    .ctp-gallery-lightbox-next {
        right: 5px;
    }


    .ctp-gallery-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 36px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .ctp-gallery-image-button {
        height: 220px;
    }


    .ctp-gallery-filter-btn {
        padding: 7px 11px;
        font-size: 11px;
    }

}