
/*--====== Global Variables ======--*/
:root {
    --bg-color: rgb(36, 34, 34);
    --main-color: #63d54c;
    --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body {
    background: white; /*rgb(2,0,36);
    background: radial-gradient(circle, rgba(2,0,36,1) 34%, rgba(65,48,66,1) 91%); */
}

/*--====== CSS Reset ======--*/
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #fff; /* var(--bg-color); */
}

#gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

ul {
    list-style: none;
}

.overflow_hide {
    overflow: hidden;
}

/*--====== Gallery Section ======--*/
#gallery {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.galcontainer {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2.75rem;
    padding-right: 2.75rem;
}

/* Filterable Gallery */
.gallery_tabs {
    background-color: inherit;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    row-gap: 0.8rem;
    padding: 1.2rem;
    /* border-radius: 0px 50px 0px 50px;
    box-shadow: var(--box-shadow); */
}

.gallery_tabs li {
    padding: 0.375rem 1.05rem;   
    font-size: 1.0rem;   
    font-weight: 600;    
   /* text-transform: uppercase;*/
    color: #888;
    /*  border-radius: 0px 50px 0px 50px;     
    text-shadow: 3px 2px 2px rgba(0, 0, 0, 0.5); 
    background-color: rgb(255, 95, 47);
    background-image: linear-gradient(315deg, #e1e3e4 0%, #b621fe 74%);
    box-shadow: 5px 2px 5px rgb(102, 102, 101); */
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery_tabs li.active,
.gallery_tabs li:hover {
    /* background-color:rgb(255, 95, 47);
    background-image: linear-gradient(315deg, #e1e3e4 0%, salmon 74%); */
    color: #888; 
    border-bottom: 4px solid #c91882;
   /* text-decoration: underline; */
}

.gallery_tabs li.active {
/* background-color: var(--main-color); */
}

.gallery_tabs li.active:hover {
    /* background-color: rgb(255, 95, 47);
    background-image: linear-gradient(315deg, #e1e3e4 0%, #b621fe 74%); */
}

.gallery_wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 4rem;
}

.gallery_item {
   /* border-radius: 0px 50px 0px 50px; */
    box-shadow: 5px 5px 5px rgb(102, 102, 101);
    cursor: pointer;
    overflow: hidden;
}

/* when the gallery_item has 'show' class */
.gallery_item.show {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* when the gallery_item has 'hide' class */
.gallery_item.hide {
    display: none;
}

.gallery_item img {
    transition: transform 0.3s ease;
}

.gallery_item:hover img {
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 995;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

/* when the lightbox is open */
.lightbox.open {
    pointer-events: all;
    visibility: visible;
    opacity: 1;
}

.lightbox_wrapper {
    display: grid;
    place-items: center;
    min-height: calc(100% - 3rem);
    margin: 1.5rem;
}
.lightbox_caption {
    color: #fff;
    font-size: 24px; 
    font-weight: 600;
    text-align: center;
    margin-top: -100px;
}


.lightbox_content {
    box-shadow: var(--box-shadow);
    max-width: 700px;
    width: 100%;
   /* border-radius: 0px 50px 0px 50px;*/
    text-align: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform 0.5s ease;
}


/* when Lightbox is open then lightbox-content will... */
.lightbox.open .lightbox_content {
    transform: scale(1);
}

/* lightbox-close-btn */
.lightbox_close {
    position: absolute;
    top: 10vh; /* 6 */
    right: 23vw;/* 3 */
    z-index: 999;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.lightbox_close span {
    width: 100%;
    height: 3px;
    margin-top: -1.5px;
    margin-bottom: -1.5px;
    background-color: #ddd;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lightbox_close:hover span {
    opacity: 1;
}

.lightbox_close span:first-child {
    transform: rotate(45deg);
}

.lightbox_close span:last-child {
    transform: rotate(-45deg);
}

.lead { font-size: 1.5rem; font-weight: 300; }
/* .galcontainer { margin: 50px auto 0 auto; max-width: 960px; }*/

.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.pagination button.active {
    background: #5d88c8;/*007bff;*/
    color: #fff;
    border-color: #5d88c8;/*007bff;*/
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:last-child {
    width: auto;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .galcontainer {
       padding-left:  1.5rem;
       padding-right: 1.5rem;
}
    .gallery_wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
   .gallery_tabs {    
        justify-content: space-evenly;
        row-gap: 0.5rem;
        padding: 1.0rem;
    }

  .lightbox_caption {
    font-size: 20px;
    width: 95%;
  }
  .lightbox_close {
    position: absolute;
    top: 6vh; 
    right: 3vw;
   }
}

@media (max-width: 575.98px) {
    .lightbox_wrapper {
        margin: 0.5rem;
        min-height: calc(100% - 1rem);
    }
}
@media screen and (max-width: 520px) {
  .gallery_wrapper {
        grid-template-columns: repeat(1,1fr);
        gap: 0.5rem;
       }
   .gallery-item img {
        width: 95%;
        height: auto; 
    }
} 
/*  https://codepen.io/tofjadesign/pen/jOdXodm   */