/* =========================================================
   CIAT GALLERY PAGE
========================================================= */

:root {
    --ciat-green: #009c27;
    --ciat-blue: #0864fe;
    --black: #111111;
    --white: #ffffff;
}


/* =========================================================
   PAGE
========================================================= */

.gallery-page {
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
}


/* =========================================================
   GALLERY SECTION
========================================================= */

.gallery-section {
    width: 100%;
    padding: 145px 0 100px;
}


/* =========================================================
   CONTAINER
========================================================= */

.gallery-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}


/* =========================================================
   HEADING
========================================================= */

.gallery-heading {
    width: 100%;

    display: flex;
    justify-content: flex-end;
    align-items: flex-end;

    margin-bottom: 55px;
}

.gallery-heading > div {
    text-align: right;
}

.gallery-heading span {
    display: block;

    margin-bottom: 8px;

    font-family: "Nunito Sans", sans-serif;

    font-size: 15px;
    font-weight: 700;

    letter-spacing: 3px;
    text-transform: uppercase;

    color: #009c27;
}

.gallery-heading h1 {
    margin: 0;

    font-family: "DM Sans", sans-serif;

    font-size: clamp(42px, 5vw, 68px);

    font-weight: 700;

    line-height: 1;

    letter-spacing: -2.5px;

    color: #111111;
}

.gallery-heading h1 strong {
    color: #0864fe;
    font-weight: 700;
}


/* =========================================================
   GALLERY GRID
========================================================= */

.gallery-grid {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 24px;

    align-items: start;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.gallery-item {
    width: 100%;

    position: relative;

    overflow: hidden;

    background: #f5f6f7;

    border-radius: 14px;

    border: 1px solid rgba(8, 100, 254, 0.10);

    box-sizing: border-box;

    aspect-ratio: 1 / 0.78;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}


/* =========================================================
   IMAGE
========================================================= */

.gallery-item img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: fill;

    object-position: center;

    transition:
        transform 0.55s ease;
}


/* =========================================================
   GREEN TOP LINE
========================================================= */

.gallery-item::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: #009c27;

    z-index: 5;
}


/* =========================================================
   HOVER
========================================================= */

.gallery-item:hover {
    transform: translateY(-7px);

    border-color: rgba(8, 100, 254, 0.20);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.12);
}

.gallery-item:hover img {
    transform: scale(1.04);
}


/* =========================================================
   IMAGE LIGHTBOX
========================================================= */

.gallery-lightbox {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.92);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px;

    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;

    z-index: 99999;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox img {
    max-width: 90%;
    max-height: 88vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 8px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    border: none;

    background: transparent;

    color: #ffffff;

    cursor: pointer;

    z-index: 2;

    font-family: Arial, sans-serif;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.lightbox-close {
    top: 25px;
    right: 35px;

    font-size: 42px;
}

.lightbox-prev {
    left: 30px;

    font-size: 38px;
}

.lightbox-next {
    right: 30px;

    font-size: 38px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    transform: scale(1.15);

    opacity: 0.8;
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (max-width: 1250px) {

    .gallery-container {
        width: 91%;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 22px;
    }

    .gallery-item {
        aspect-ratio: 1 / 0.78;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .gallery-section {
        padding: 125px 0 75px;
    }

    .gallery-container {
        width: 90%;
    }

    .gallery-heading {
        justify-content: flex-start;

        margin-bottom: 38px;
    }

    .gallery-heading > div {
        text-align: left;
    }

    .gallery-heading span {
        font-size: 13px;

        letter-spacing: 2.5px;
    }

    .gallery-heading h1 {
        font-size: 52px;

        letter-spacing: -1.8px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

    .gallery-item {
        aspect-ratio: 1 / 0.78;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .gallery-section {
        padding: 105px 0 55px;
    }

    .gallery-container {
        width: 92%;
    }

    .gallery-heading {
        margin-bottom: 30px;
    }

    .gallery-heading h1 {
        font-size: 40px;

        letter-spacing: -1px;
    }

    .gallery-heading span {
        font-size: 12px;

        margin-bottom: 7px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .gallery-item {
        width: 100%;

        aspect-ratio: 1 / 0.72;

        border-radius: 12px;
    }

    .gallery-item img {
        object-fit: cover;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .gallery-section {
        padding-top: 95px;
    }

    .gallery-heading h1 {
        font-size: 35px;
    }

    .gallery-grid {
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 1 / 0.70;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-item,
    .gallery-item img,
    .gallery-lightbox {
        transition: none;
    }

    .gallery-item:hover {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}