/*
    * Project : 'Filterable Gallery with Lightbox'
    * Built by : 'Gulshan Songara'
*/

/*--====== Global Variables ======--*/
:root {
    --bg-color: #ffffff;
    --main-color: #4C57D5;
    --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}


/*--====== CSS Reset ======--*/
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rubik', sans-serif;
    background-color: var(--bg-color);
}

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;
}

.container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.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: 50px;
    box-shadow: var(--box-shadow);
}

.gallery_tabs li {
    padding: 0.7rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery_tabs li.active,
.gallery_tabs li:hover {
    background-color: var(--main-color);
    color: #fff;
}

.gallery_wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .gallery_wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

.gallery_item {
    border-radius: 10px;
    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.6);
    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;
}

@media (max-width: 575.98px) {
    .lightbox_wrapper {
        margin: 0.5rem;
        min-height: calc(100% - 1rem);
    }
}

.lightbox_content {
    box-shadow: var(--box-shadow);
    max-width: 700px;
    width: 100%;
    border-radius: 10px;
    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: 3vh;
    right: 3vw;
    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);
}

/* ===================================
    5. Portfolio Section
====================================== */

.menu-wrapper.section-portfolio {
    background-color: #dcc1c7;
}

.grid {
    width: 1170px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    display: block;
}

.grid-item {
    float: left;
    font-size: 0;
    line-height: 0;
    box-sizing:border-box;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box; 
}

.grid-item img {
    width: 100%;
    height: 100%;
}

.grid-sizer, 
.grid-item {
    width: 390px;    
}

.grid-item.p_1x1 {
    width: 390px;    
}

.grid-item.p_2x2 {
    width: 780px;    
}

.portfolio-text-holder {
    position: absolute;
    top: 30px;
    left: 30px;
    bottom: 30px;
    right: 30px;
    z-index: 1;
    font-size: 20px;    
    text-align: center; 
    opacity: 0;
    transition: opacity .3s ease-in-out;
    background-color: #fff;
}

.portfolio-text-holder:hover {
    opacity: 1;
}

.portfolio-text-wrapper {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-type {
    line-height: 100%;
    font-size: 11px;
    color: #9a9a9a;    
    padding-bottom: 20px;        
}

.portfolio-type img {
    width: 35px;
    height: 35px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-text {
    font-family: 'Montserrat', sans-serif;    
    font-weight: 700;
    font-size: 18px;
    line-height: 18px;
    letter-spacing: 4px;
    padding-left: 4px;
    margin-bottom: 10px;  
    color: #5F5A6D;
}

.grid-item a:hover {
    color: #191919;
}

.process-holder {
    text-align: center;
}

.process {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #d0a8b1;
    font-size: 82px;
    display: inline-block;
    width: 230px;
    text-align: center;
    line-height: 100%;
}

.process span {
    letter-spacing: -15px;
    margin-left: -15px;
}

.process span:first-child {
    font-size: 132px;
}

.process span:nth-child(2) {
    vertical-align: -25px;
    margin-left: -15px;
}

.process span:nth-child(3) {
    vertical-align: -60px;
    margin-left: -13px;
}

.process .process-txt {
    font-size: 20px;
    line-height: 25px;
    color: #616263;
    margin: 0;	
}

.process-holder .separator {
    width: 96px;
    margin: 0 20px;
    height: 10px;
    background-color: #f4eaed;
    display: inline-block;
    vertical-align: 125px;
}

.process-holder .process:last-child {
    padding-bottom: 0;
}

div.pp_default a.pp_arrow_previous {
    background-image: url(images/nav_left.png);
    background-size: 20px;
    background-position: 0 0;
}

div.pp_default a.pp_arrow_next {
    background-image: url(images/nav_right.png);
    background-size: 20px;
    background-position: 0 0;
    margin-left: 10px;
}

div.pp_default .pp_close {
    background-image: url(images/close.png);
    background-position: 0 0;
    background-size: 30px;
}

