/* =========================================================
   KUPFERMAN FOUNDATION AFRICA
   MODERN AUTOMATIC GALLERY
========================================================= */

.gallery-page-content {
    --gallery-green: #176b4d;
    --gallery-green-dark: #0d4c35;
    --gallery-green-soft: #eaf6f0;

    --gallery-pink: #ef5c8a;
    --gallery-pink-dark: #d94774;
    --gallery-pink-soft: #fff0f5;

    --gallery-white: #ffffff;
    --gallery-bg: #f7faf8;
    --gallery-cream: #fffaf4;

    --gallery-dark: #10251d;
    --gallery-text: #5d6e66;
    --gallery-muted: #839087;
    --gallery-border: #dce8e2;

    --gallery-shadow:
        0 14px 35px rgba(19, 75, 52, 0.10);

    --gallery-shadow-hover:
        0 22px 50px rgba(19, 75, 52, 0.17);

    --gallery-radius: 20px;
    --gallery-transition: 0.3s ease;

    color: var(--gallery-text);
    background: var(--gallery-white);
}

.gallery-page-content *,
.gallery-page-content *::before,
.gallery-page-content *::after {
    box-sizing: border-box;
}


/* =========================================================
   COMMON TYPOGRAPHY
========================================================= */

.gallery-page-content h1,
.gallery-page-content h2,
.gallery-page-content h3,
.gallery-page-content p {
    margin-top: 0;
}

.gallery-page-content h1,
.gallery-page-content h2 {
    font-family: "Manrope", "Inter", sans-serif;
}

.gallery-page-content .gallery-section-label,
.gallery-page-content .gallery-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 14px;

    color: var(--gallery-pink-dark);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gallery-page-content .gallery-section-label i {
    color: var(--gallery-pink);
}

.gallery-page-content h2 {
    margin-bottom: 0;

    color: var(--gallery-dark);

    font-size: clamp(31px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.gallery-page-content h2 span {
    color: var(--gallery-green);
}


/* =========================================================
   BUTTONS
========================================================= */

.gallery-page-content .gallery-primary-button,
.gallery-page-content .gallery-secondary-button,
.gallery-page-content .gallery-outline-button {
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 12px 21px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;

    transition:
        transform var(--gallery-transition),
        background-color var(--gallery-transition),
        border-color var(--gallery-transition),
        color var(--gallery-transition),
        box-shadow var(--gallery-transition);
}

.gallery-page-content .gallery-primary-button {
    color: var(--gallery-white);
    background: var(--gallery-pink);
    border: 1px solid var(--gallery-pink);
}

.gallery-page-content .gallery-primary-button:hover {
    color: var(--gallery-white);
    background: var(--gallery-pink-dark);
    border-color: var(--gallery-pink-dark);

    transform: translateY(-2px);

    box-shadow:
        0 14px 28px rgba(217, 71, 116, 0.24);
}

.gallery-page-content .gallery-secondary-button {
    color: var(--gallery-white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.40);
}

.gallery-page-content .gallery-secondary-button:hover {
    color: var(--gallery-green-dark);
    background: var(--gallery-white);
    border-color: var(--gallery-white);

    transform: translateY(-2px);
}

.gallery-page-content .gallery-outline-button {
    color: var(--gallery-green);
    background: transparent;
    border: 1px solid var(--gallery-green);
}

.gallery-page-content .gallery-outline-button:hover {
    color: var(--gallery-white);
    background: var(--gallery-green);

    transform: translateY(-2px);
}


/* =========================================================
   HERO SECTION
========================================================= */

.gallery-page-content .gallery-page-hero {
    position: relative;

    min-height: 500px;

    display: flex;
    align-items: center;

    overflow: hidden;
    isolation: isolate;

    background:
        linear-gradient(
            120deg,
            rgba(5, 39, 27, 0.98),
            rgba(16, 93, 65, 0.91)
        );
}

.gallery-page-content .gallery-page-hero::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -2;

    background:
        radial-gradient(
            circle at 78% 24%,
            rgba(239, 92, 138, 0.23),
            transparent 25%
        ),
        radial-gradient(
            circle at 75% 85%,
            rgba(255, 255, 255, 0.09),
            transparent 30%
        );
}

.gallery-page-content .gallery-hero-decoration {
    position: absolute;
    z-index: -1;

    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.gallery-page-content .gallery-decoration-one {
    width: 380px;
    height: 380px;

    right: -110px;
    top: -120px;
}

.gallery-page-content .gallery-decoration-two {
    width: 230px;
    height: 230px;

    right: 20%;
    bottom: -130px;
}

.gallery-page-content .gallery-hero-content {
    max-width: 760px;

    padding: 82px 0;

    color: var(--gallery-white);
}

.gallery-page-content .gallery-hero-label {
    padding: 9px 14px;

    color: var(--gallery-white);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
}

.gallery-page-content .gallery-hero-label i {
    color: #ffabc5;
}

.gallery-page-content .gallery-page-hero h1 {
    max-width: 720px;
    margin-bottom: 20px;

    color: var(--gallery-white);

    font-size: clamp(42px, 6vw, 70px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.gallery-page-content .gallery-page-hero h1 span {
    color: #ffabc5;
}

.gallery-page-content .gallery-hero-content > p {
    max-width: 640px;
    margin-bottom: 0;

    color: rgba(255, 255, 255, 0.80);

    font-size: 16px;
    line-height: 1.75;
}

.gallery-page-content .gallery-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 29px;
}


/* =========================================================
   INTRODUCTION
========================================================= */

.gallery-page-content .gallery-intro-section {
    padding: 80px 0 50px;

    background: var(--gallery-white);
}

.gallery-page-content .gallery-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: end;
    gap: 65px;
}

.gallery-page-content .gallery-intro-heading {
    max-width: 720px;
}

.gallery-page-content .gallery-intro-description > p {
    margin-bottom: 22px;

    font-size: 15px;
    line-height: 1.8;
}

.gallery-page-content .gallery-count-card {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    padding: 14px 17px;

    background: var(--gallery-green-soft);
    border: 1px solid var(--gallery-border);
    border-radius: 16px;
}

.gallery-page-content .gallery-count-icon {
    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;

    color: var(--gallery-white);
    background: var(--gallery-green);
    border-radius: 13px;

    font-size: 18px;
}

.gallery-page-content .gallery-count-card strong,
.gallery-page-content .gallery-count-card span {
    display: block;
}

.gallery-page-content .gallery-count-card strong {
    color: var(--gallery-dark);

    font-family: "Manrope", "Inter", sans-serif;
    font-size: 22px;
    line-height: 1;
}

.gallery-page-content .gallery-count-card div > span {
    margin-top: 4px;

    color: var(--gallery-text);

    font-size: 12px;
}


/* =========================================================
   GALLERY SECTION
========================================================= */

.gallery-page-content .gallery-photos-section {
    padding: 55px 0 95px;

    background:
        radial-gradient(
            circle at top right,
            rgba(239, 92, 138, 0.07),
            transparent 23%
        ),
        var(--gallery-bg);
}

.gallery-page-content .gallery-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 30px;
}

.gallery-page-content .gallery-section-heading h2 {
    font-size: clamp(29px, 3vw, 42px);
}

.gallery-page-content .gallery-section-heading > p {
    max-width: 280px;
    margin-bottom: 4px;

    color: var(--gallery-muted);

    font-size: 13px;
    line-height: 1.6;
    text-align: right;
}


/* =========================================================
   ORGANIZED IMAGE GRID
========================================================= */

.gallery-page-content .automatic-gallery-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.gallery-page-content .automatic-gallery-item {
    position: relative;

    width: 100%;
    aspect-ratio: 4 / 3;

    display: block;
    padding: 0;

    overflow: hidden;

    background: #e9efec;
    border: 0;
    border-radius: var(--gallery-radius);

    box-shadow: var(--gallery-shadow);

    cursor: pointer;

    transition:
        transform var(--gallery-transition),
        box-shadow var(--gallery-transition);
}

.gallery-page-content .automatic-gallery-item:hover {
    transform: translateY(-5px);

    box-shadow: var(--gallery-shadow-hover);
}

.gallery-page-content .automatic-gallery-item:focus-visible {
    outline: 3px solid rgba(239, 92, 138, 0.40);
    outline-offset: 4px;
}

.gallery-page-content .automatic-gallery-image,
.gallery-page-content .automatic-gallery-image img,
.gallery-page-content .automatic-gallery-overlay {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.gallery-page-content .automatic-gallery-image {
    overflow: hidden;
}

.gallery-page-content .automatic-gallery-image img {
    display: block;

    object-fit: cover;
    object-position: center;

    transform: scale(1.001);

    transition: transform 0.5s ease;
}

.gallery-page-content .automatic-gallery-item:hover
.automatic-gallery-image img {
    transform: scale(1.055);
}

.gallery-page-content .automatic-gallery-overlay {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;

    padding: 18px;

    color: var(--gallery-white);

    background:
        linear-gradient(
            180deg,
            rgba(7, 36, 25, 0.00) 42%,
            rgba(7, 36, 25, 0.82) 100%
        );

    transition: background var(--gallery-transition);
}

.gallery-page-content .automatic-gallery-item:hover
.automatic-gallery-overlay {
    background:
        linear-gradient(
            180deg,
            rgba(7, 36, 25, 0.04) 28%,
            rgba(7, 36, 25, 0.90) 100%
        );
}

.gallery-page-content .automatic-gallery-caption {
    max-width: calc(100% - 50px);

    color: var(--gallery-white);

    font-family: "Manrope", "Inter", sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-page-content .automatic-gallery-open {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    color: var(--gallery-green-dark);
    background: var(--gallery-white);
    border-radius: 50%;

    font-size: 14px;

    transform: translateY(6px);
    opacity: 0;

    transition:
        transform var(--gallery-transition),
        opacity var(--gallery-transition);
}

.gallery-page-content .automatic-gallery-item:hover
.automatic-gallery-open {
    transform: translateY(0);
    opacity: 1;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.gallery-page-content .gallery-empty-state {
    max-width: 650px;
    margin: 0 auto;
    padding: 55px 25px;

    text-align: center;

    background: var(--gallery-white);
    border: 1px solid var(--gallery-border);
    border-radius: 24px;

    box-shadow: var(--gallery-shadow);
}

.gallery-page-content .gallery-empty-icon {
    width: 72px;
    height: 72px;

    display: grid;
    place-items: center;

    margin: 0 auto 20px;

    color: var(--gallery-white);
    background: var(--gallery-green);
    border-radius: 20px;

    font-size: 27px;
}

.gallery-page-content .gallery-empty-state h2 {
    font-size: 31px;
}

.gallery-page-content .gallery-empty-state p {
    margin: 16px 0 10px;
}

.gallery-page-content .gallery-empty-state code {
    display: inline-block;

    padding: 9px 13px;

    color: var(--gallery-pink-dark);
    background: var(--gallery-pink-soft);
    border: 1px solid var(--gallery-border);
    border-radius: 9px;
}

.gallery-page-content .gallery-empty-state small {
    display: block;
    margin-top: 14px;

    color: var(--gallery-muted);
}


/* =========================================================
   CALL TO ACTION
========================================================= */

.gallery-page-content .gallery-cta-section {
    padding: 85px 0;

    background: var(--gallery-cream);
}

.gallery-page-content .gallery-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 45px;

    padding: 42px;

    background: var(--gallery-white);
    border: 1px solid var(--gallery-border);
    border-radius: 25px;

    box-shadow: var(--gallery-shadow);
}

.gallery-page-content .gallery-cta-content {
    max-width: 710px;
}

.gallery-page-content .gallery-cta-content h2 {
    font-size: clamp(30px, 3.8vw, 45px);
}

.gallery-page-content .gallery-cta-content p {
    margin: 18px 0 0;

    font-size: 15px;
    line-height: 1.75;
}

.gallery-page-content .gallery-cta-actions {
    min-width: 200px;

    display: flex;
    flex-direction: column;
    gap: 11px;
}


/* =========================================================
   LIGHTBOX
========================================================= */

body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-page-content .gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 70px 90px;

    background: rgba(3, 24, 16, 0.96);

    visibility: hidden;
    opacity: 0;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.gallery-page-content .gallery-lightbox.is-visible {
    visibility: visible;
    opacity: 1;
}

.gallery-page-content .gallery-lightbox-content {
    width: min(1100px, 100%);
    max-height: calc(100vh - 110px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-page-content .gallery-lightbox-content img {
    max-width: 100%;
    max-height: calc(100vh - 170px);

    display: block;

    object-fit: contain;
    border-radius: 12px;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.48);
}

.gallery-page-content .gallery-lightbox-content p {
    margin: 14px 0 0;

    color: var(--gallery-white);

    font-family: "Manrope", "Inter", sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.gallery-page-content .gallery-lightbox-close,
.gallery-page-content .gallery-lightbox-navigation {
    position: absolute;

    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    color: var(--gallery-white);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 50%;

    font-size: 18px;

    cursor: pointer;

    transition:
        background-color var(--gallery-transition),
        color var(--gallery-transition),
        transform var(--gallery-transition);
}

.gallery-page-content .gallery-lightbox-close:hover,
.gallery-page-content .gallery-lightbox-navigation:hover {
    color: var(--gallery-green-dark);
    background: var(--gallery-white);
}

.gallery-page-content .gallery-lightbox-close {
    top: 20px;
    right: 22px;
}

.gallery-page-content .gallery-lightbox-previous {
    top: 50%;
    left: 22px;

    transform: translateY(-50%);
}

.gallery-page-content .gallery-lightbox-next {
    top: 50%;
    right: 22px;

    transform: translateY(-50%);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1199.98px) {

    .gallery-page-content .automatic-gallery-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 991.98px) {

    .gallery-page-content .gallery-intro-grid {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 28px;
    }

    .gallery-page-content .gallery-cta-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-page-content .gallery-cta-actions {
        width: 100%;
        min-width: 0;

        flex-direction: row;
        flex-wrap: wrap;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767.98px) {

    .gallery-page-content .gallery-page-hero {
        min-height: 470px;
    }

    .gallery-page-content .gallery-hero-content {
        padding: 72px 0;
    }

    .gallery-page-content .gallery-page-hero h1 {
        font-size: 40px;
    }

    .gallery-page-content .gallery-intro-section {
        padding: 65px 0 40px;
    }

    .gallery-page-content .gallery-photos-section {
        padding: 45px 0 75px;
    }

    .gallery-page-content .gallery-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .gallery-page-content .gallery-section-heading > p {
        max-width: none;

        text-align: left;
    }

    .gallery-page-content .automatic-gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .gallery-page-content .automatic-gallery-item {
        border-radius: 16px;
    }

    .gallery-page-content .automatic-gallery-overlay {
        padding: 14px;
    }

    .gallery-page-content .automatic-gallery-caption {
        font-size: 13px;
    }

    .gallery-page-content .automatic-gallery-open {
        width: 34px;
        height: 34px;

        opacity: 1;
        transform: none;
    }

    .gallery-page-content .gallery-cta-card {
        padding: 32px 24px;
    }

    .gallery-page-content .gallery-lightbox {
        padding: 70px 16px 90px;
    }

    .gallery-page-content .gallery-lightbox-navigation {
        top: auto;
        bottom: 22px;

        transform: none;
    }

    .gallery-page-content .gallery-lightbox-previous {
        left: calc(50% - 60px);
    }

    .gallery-page-content .gallery-lightbox-next {
        right: calc(50% - 60px);
    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 575.98px) {

    .gallery-page-content .gallery-page-hero h1 {
        font-size: 34px;
    }

    .gallery-page-content .gallery-hero-content > p {
        font-size: 14px;
    }

    .gallery-page-content .gallery-hero-actions,
    .gallery-page-content .gallery-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-page-content .gallery-primary-button,
    .gallery-page-content .gallery-secondary-button,
    .gallery-page-content .gallery-outline-button {
        width: 100%;
    }

    .gallery-page-content h2 {
        font-size: 30px;
    }

    .gallery-page-content .automatic-gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-page-content .automatic-gallery-item {
        aspect-ratio: 16 / 10;
    }

    .gallery-page-content .gallery-cta-section {
        padding: 65px 0;
    }

}

@media (max-width: 390px) {

    .gallery-page-content .gallery-page-hero h1 {
        font-size: 30px;
    }

    .gallery-page-content .automatic-gallery-item {
        aspect-ratio: 4 / 3;
    }

}