:root {
    --swiper-pagination-bottom: 40px;
}

/* General styling for the back-to-top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible; 
}

.back-to-top:hover {
    background: rgba(0, 0, 0, 0.8);
}

.back-to-top i {
    font-size: 24px;
    pointer-events: none;
}

.swiper ~ .vertical-gallery {
    margin-top: 1.5rem;
}

/* .vertical-gallery:not(#assignmentGallery) {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    margin-top: -500px !important;
} */

.swiper-container {
    width: 100%;
    height: 500px;
}
.zoomimage {
    position: absolute;
    top: 30px;
    right: 30px;
    cursor: pointer;
    z-index: 25;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, .4);
    border-radius: 50%;
    overflow: hidden;
}
.swiper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgb(0 0 0));
    opacity: 0.5;
    z-index: 2;
}
.bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-attachment: scroll;
    background-position: center;
    background-repeat: repeat;
    background-origin: content-box;
}
.pagination, .swiper-horizontal>.swiper-pagination-bullets, 
.swiper-pagination-bullets.swiper-pagination-horizontal {
    position: absolute;
    z-index: 20 !important;
    text-align: center;
}

.pagination .swiper-pagination-bullet, .swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet, 
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    display: inline-block;
    margin: 0 10px !important;
    position: relative;
    transition: all .5s ease;
    background: #fff;
    opacity: .5;
}
.pagination .swiper-pagination-bullet:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    box-sizing: border-box;
    border-radius: 100%;
    transition: all 0.3s ease;
    /* transform: scale(0.0); */
}
.pagination .swiper-pagination-bullet.swiper-pagination-bullet-active:after {
    /* transform: scale(1.0); */
    border: 1px solid #ccc;
}
.pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
    opacity: 1;
}

#gallery-swiper {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out;
}

#gallery-swiper.gallery-loaded {
    opacity: 1;
    visibility: visible;
}

.slide-title-holder {
	width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

.slide-title {
	position: relative;
	z-index: 5;
    text-align: center;
    background: #00000057;
    padding: 3.5rem;
    margin: 20px;
}

.slide-title .separator-image {
	padding: 10px 0;
}

.slide-title .subtitle {
	position: relative;
}
.slide-title h3,
.grid-item-title h3 {
    position: relative;
    font-weight: 400;
    margin-bottom: 20px;
    color: #fff;
    display: block;
}
.slide-title :is(h3,h4) a,
.grid-item-title :is(h3,h4) a {
    color: #fff;
    text-transform: uppercase;
}
.transition {
	transition: all .4s linear;
}

.transition2 {
	transition: all .2s linear;
}

.transition3 {
	transition: all .3s linear;
}

.fl-l {
	float: left;
}

.show-info, .zoomimage {
    display: none;
}

.isotope-gallery {
    position: relative;
}

.isotope-gallery:after {
    content: '';
    display: block;
    clear: both;
}

.gallery-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 20px;
    padding: 1.5rem;
    border-radius: 9px;
    border: solid 1px #eaeaea;
}

/* When there's only one child, make it full width */
.gallery-header:has(> :only-child) {
    grid-template-columns: 1fr;
}

/* Alternative approach using CSS for browsers that don't support :has() */
.gallery-header.single-child {
    grid-template-columns: 1fr;
}

.gallery-header-left button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
}

.gallery-header-left > span {
    cursor: pointer;
    margin-bottom: 8px;
    display:block;
}

.gallery-header-left > span.show {
    position: fixed;
    top: 6rem;
    left: 2rem;
    background: #ffffffde;
    z-index: 1;
    padding: 20px;
    border-radius: 12px;
}

.gallery-text-indicator {
    text-align: center;
    padding: 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin: 10px 0;
    display: block;
}

.sponsor-section {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    gap: 15px;
}

.contribly form>fieldset {
    background: #fff;
}

.page article ul.project-details li {
    line-height: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-details li i {
    display: inline-block;
    margin-right: 10px;
}

.grid-item {
    float: left;
    height: 390px;
    background-color: whitesmoke;
    background-size: cover;
    cursor: pointer;
}

.grid-item:before {
    content: '';
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    background: white;
    left: 0;
    top: 0;
    opacity: 0;
}

.grid-item:hover:before{
    opacity: 0.5;
    transition: opacity 0.35s ease-in-out;
}

.grid-item.video-item {
    background-color: #000;
    display: flex;
    justify-content: center;
}

.grid-item.video-item.grid-item--width2 video {
    display: flex;
    width: 100%;
    height: auto;
}

.grid-item-inner {
    width: 100%;
    height: 100%;
    display: flex;
}

.grid-item-title {
    position: relative;
    z-index: 5;
    text-align: center;
    background: #00000052;
    padding: 3.5rem;
    margin: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 4 columns */
.grid-item,
.grid-sizer {
    width: calc(25% - 10px);
    margin: 5px;
}

.grid-item--width2 {
    width: calc(50% - 10px);
}

.grid-item--height2 {
    height: 780px;
}

.grid-item .share-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #00000045;
    padding: 15px;
    border-radius: 40px;
    color: white;
    cursor: pointer;
}

.fw-contribly-content-footer .share-icon {
    color: white;
    margin-left: 10px;
    display: inline;
    cursor: pointer;
}

.fw-contribly-content-footer .share-icon:after {
    content: 'Share this';
    margin-left: 7px;
}

/* Modal Content (Image) */

.fw-contribly-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    display: none;
}

.fw-contribly-modal-content {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgb(0 0 0 / 65%);
    align-items: center;
    justify-content: center;
    transform: none;
    pointer-events: none;
}

.fw-contribly-content-inner {
    position: relative;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 1.6s ease-in-out;
    pointer-events: none;
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100% !important;
    height: 100%;
    z-index: 1000;
    flex-direction: column;
    align-content: center;
}

.fw-contribly-modal-content iframe {
    width: 100%;
    max-width: 800px;
    height: 100%;
    border: none;
    overflow: hidden;
    display: block;
    margin: 0 auto;
    padding: 0;
}

.fw-contribly-content-footer {
    background: #00000069;
    position: absolute;    
    top: 0;
    width: 100%;
    padding: 30px;
    animation: fadeIn 1.6s ease-in-out;
    pointer-events: all;
}

.fw-contribly-content-inner>img,
.fw-contribly-content-inner>video {
    margin: 0;
    height: auto;
    width: auto;
    pointer-events: all;
}

.fw-contribly-prevent-scroll {
    overflow: hidden;
}

.fw-contribly-next, .fw-contribly-prev {
    position: fixed;
    width: 50px;
    height: 50px;
    background: #ffffff96;
    color: #000;
    z-index: 3;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-name: opac;
    animation-name: opac;
}

.fw-contribly-next {
    right: 15px;
}

.fw-contribly-prev {
    left: 15px;
}

.fw-contribly-next:hover, .fw-contribly-prev:hover {
    background: #ffffffd8;
}


/* Add Animation - Zoom in the Modal */

.fw-contribly-content-inner {
    -webkit-animation: zoom 0.6s ease-in-out;
    -moz-animation: zoom 0.6s ease-in-out;
    -ms-animation: zoom 0.6s ease-in-out;
    -o-animation: zoom 0.6s ease-in-out;
    animation: zoom 0.6s ease-in-out;
}

.fw-contribly-modal-content.fade-content .fw-contribly-content-inner,
.fw-contribly-content-inner>img,
.fw-contribly-content-inner>video,
.fw-contribly-content-footer {
    -webkit-animation: fadeIn 1s ease-in-out;
    -moz-animation: fadeIn 1s ease-in-out;
    -ms-animation: fadeIn 1s ease-in-out;
    -o-animation: fadeIn 1s ease-in-out;
    animation: fadeIn 1s ease-in-out;
}


/* The Close Button */

.fw-contribly-modal-close {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    text-align: center;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 3;
    background: #0000005c;
    padding: 10px;
}

.fw-contribly-modal-overlay {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
}

.fw-contribly-modal-close:hover,
.fw-contribly-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.fw-contribly-modal-headline,
.fw-contribly-modal-date,
.fw-contribly-modal-attribution {
    color: white;
}

.fw-contribly-modal-date~.fw-contribly-modal-attribution {
    margin-left: 10px;
}

.fw-contribly-modal-date~.fw-contribly-modal-attribution:before {
    content: '•';
    margin-right: 10px;
}

.fw-contribly-modal-headline {
    margin-bottom: 0;
}

.fw-contribly-modal-body {
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 30px;
    margin: 0;
}

@media (orientation: portrait) {

    .fw-contribly-modal-content img,
    .fw-contribly-modal-content video {
        object-fit: contain;
    }
    .fw-contribly-modal-content video{
        height: 100%;
        width: 100%;
        object-fit: contain;
    }
    .fw-contribly-next {
        bottom: 15px;
    }
    .fw-contribly-prev {
        bottom: 75px;
        right: 15px;
        left: auto;
    }
}

@media (orientation: landscape) {

    .fw-contribly-modal-content img{
        height: 100%;
        width: auto;
        object-fit: contain;
    }
    .fw-contribly-modal-content video{
        height: 100%;
        width: 100%;
        object-fit: contain;
    }
    .fw-contribly-next, .fw-contribly-prev {
        top: calc(50% - 25px);
    }
}

/* Zoom animation for modal */
@keyframes zoomIn {
    from {transform: scale(0.4);} 
    to {transform: scale(1);}
}

@media screen and (max-width: 960px) {
    /* 3 columns */
    .grid-item,
    .grid-sizer {
        width: calc(33.3333% - 10px);
    }

    .grid-item--width2 {
        width: calc(66.6666% - 10px);
    }
    
    .grid-item--height2 {
        height: 780px;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --swiper-pagination-bottom: 20px;
    }
    .swiper-container {
        height: 250px;
    }
    .slide-title {
        margin: 0;
        padding: 2rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    /* 2 columns */
    .grid-item,
    .grid-sizer {
        width: calc(50% - 10px);
    }
    .gallery-header-left > span.show {
        top: 4rem;
        left: 2rem;
    }

    .grid-item--width2 {
        width: 100%;
    }
    
    .grid-item--height2 {
        height: 780px;
    }
}

@media screen and (max-width: 600px) {
    .gallery-header {
        grid-template-columns: 1fr;
    }
    /* 1 columns */
    .grid-item,
    .grid-sizer {
        width: 100%;
    }

    .grid-item--width2 {
        width: 100%;
    }
    
    .grid-item--height2 {
        height: 780px;
    }
}