@import 'reset.css';
@import './components/page-hero.css';
@import "./global.css";
@import "./components/cta.css";

.gallery {
    margin: 0 37px 120px;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.gallery__wrapper {
    display: grid;
    grid-template-columns: repeat(12, 100px);
    grid-template-rows: repeat(8, 100px);
    grid-template-areas:
        "item1 item1 item1 item2 item2 item2 item3 item3 item3 item4 item4 item4"
        "item1 item1 item1 item2 item2 item2 item3 item3 item3 item4 item4 item4"
        "item1 item1 item1 item9 item9 item9 item9 item9 item9 item4 item4 item4"
        "item1 item1 item1 item9 item9 item9 item9 item9 item9 item4 item4 item4"
        "item8 item8 item8 item9 item9 item9 item9 item9 item9 item4 item4 item4"
        "item8 item8 item8 item9 item9 item9 item9 item9 item9 item5 item5 item5"
        "item7 item7 item7 item7 item7 item7 item6 item6 item6 item5 item5 item5"
        "item7 item7 item7 item7 item7 item7 item6 item6 item6 item5 item5 item5";
    gap:8px;
    margin: 0;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
        transition: transform 0.3s ease-in-out;
        cursor: pointer;
    }

    img:hover {
        transform: scale(1.1);
        box-shadow: 0 0 10px 0px var(--color-text-dark);
    }

    img:nth-child(1) {
        grid-area: item1;
    }

    img:nth-child(2) {
        grid-area: item2;
    }
    
    img:nth-child(3) {
        grid-area: item3;
    }
    
    img:nth-child(4) {
        grid-area: item4;
    }
    
    img:nth-child(5) {
        grid-area: item5;
    }
    
    img:nth-child(6) {
        grid-area: item6;
    }
    
    img:nth-child(7) {
        grid-area: item7;
    }
    
    img:nth-child(8) {
        grid-area: item8;
    }
    
    img:nth-child(9) {
        grid-area: item9;
    }
}

.gallery__wrapper img.gallery__image--hidden {
    display: none;
}

.read-more__container {
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: absolute;
    bottom: -2px;
    padding-top: 100px;
    background: linear-gradient(0deg, #fff, rgba(255, 255, 255, 0.54), transparent);

    button {
        color: var(--color-primary);
        font-size: 18px;
        font-weight: 500;
        font-family: "Poppins", sans-serif;
        line-height: 24px;
    }
}

.gallery-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*gap: 20px;*/
    padding: 50px 0;
    color: var(--color-text-light);
    border-radius: 24px;
    margin-bottom: 120px;

    .gallery-cta__content {
        width: 620px;
        margin: 0 120px;
        
        p {
            color: var(--color-text-gray);
            font-weight: 400;
            font-size: 20px;
            font-family: "Poppins", sans-serif;
            margin: 24px 0 0;
        }

        .gallery-cta__text-under-description {
            color: var(--color-text-dark) !important;
            font-weight: 500;
            font-size: 24px;
            font-family: "Poppins", sans-serif;
            margin: 16px 0 42px;
            text-transform: capitalize;
        };
    }


    h2 {
        color: var(--color-primary);
        font-size: 32px;
        font-family: "Epilogue", sans-serif;
        font-weight: 700;
    }

    

    button {
        background-color: var(--color-primary);
        color: var(--color-text-light);
        border-radius: 8px;
        padding: 10px 20px;
        font-size: 16px;
        font-weight: 500;
    }
}

@media (max-width: 1330px) {
    .gallery__wrapper {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(8, auto);
        max-width: 100%;
    }
}

@media (max-width: 800px) {
    .read-more__container {
        margin-top: 30px;
        display: flex;
        text-align: center;
        background: linear-gradient(0deg, #fff 50%, transparent);
    }

    .gallery {
        margin: 30px 0 40px;
        padding: 0;
    }

    .gallery__wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding-top:5px;
        margin: 0 29px;
        grid-template-areas: initial;
    }
    
    .gallery__wrapper img {
        grid-area: auto;
        border-radius: 8px;
    }
    .gallery-cta {
        flex-direction: column;
        gap: 32px !important;
        margin-left: 20px !important;
        margin-bottom: 0 !important;
        padding: 40px 0 50px;

        .gallery-cta__content {
            width: 100% !important;
            margin: 0 !important;
        }
        
        h2 {
            font-size: 24px !important;
        }
        p {
            font-size: 14px !important;
        }
        .gallery-cta__text-under-description {
            font-size: 16px !important;
            margin-bottom: 32px !important;
        }
        button {
            font-size: 16px !important;
        }

        img {
            width: 100% !important;
            padding-left: 30px !important;
        }
    }
    
}

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.lightbox--visible {
    opacity: 1;
    visibility: visible;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

.lightbox__content {
    position: relative;
    max-width: 80dvw;
    max-height: 80dvh;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox__arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox__arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox__arrow--prev {
    left: 20px;
}

.lightbox__arrow--next {
    right: 20px;
}

.lightbox__arrow svg {
    width: 24px;
    height: 24px;
}

.lightbox__arrows {
    width: calc(100% + 160px);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    
}

@media (max-width: 800px) {
    .lightbox__arrows {
        width: 120px;
        bottom: -80px;
        top: initial;
    }

   

}

@media (max-width: 576px) {
    .lightbox__close {
        top: -24px;
        right: -24px;
    }

    .lightbox__arrow {
        width: 40px;
        height: 40px;
    }

    .lightbox__arrow--prev {
        left: 10px;
    }

    .lightbox__arrow--next {
        right: 10px;
    }

    .lightbox__arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery__wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        margin: 0 15px;
        width: calc(100% - 30px);

    }
}

body.lightbox-open {
    overflow: hidden;
}