@font-face {
    font-family: "Tid";
    src: url("../fonts/tid-regular.woff2") format("woff2");
}

:root {
    --bottom-offset: 0;
}

html {
    font-size: 1vw;
}

@media (max-width: 1200px) {
    html {
        font-size: 16px;
    }
}

body {
    height: 100svh;
    width: 100vw;
    overflow: hidden;
    font-family: "Tid", sans-serif;
}

.agency-loading-layout {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3125rem;
    font-size: 1.875rem;
    font-weight: 800;
    color: #c9c9c9;
    background-color: #ffffff;
    z-index: 1000000000;
    animation: agency-loading-layout-animation 2s ease-in-out forwards;
}

.agency-loading-layout svg {
    width: 5.625rem;
    height: 2.81rem;
}

@keyframes agency-loading-layout-animation {
    0% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

.agency-main-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100svh - var(--wp-admin-bar-height));
}

.agency-projects-section ul,
.agency-projects-section li {
    list-style-type: none;
}

.agency-projects-section {
    width: 100vw;
    height: 50%;
    position: relative;
}

.agency-projects-section .agency-projects-item,
.agency-lightbox__content .splide__slide {
    width: 100%;
    display: flex;
    position: relative;
}

.agency-projects-item__nagivation {
    cursor: pointer;
    background-color: white;
}

.agency-projects-section .splide,
.agency-projects-item__left-nagivation,
.agency-projects-item__right-nagivation,
.lightbox-navigation {
    height: 100%;
}

.agency-projects-section .agency-projects-item img,
.agency-lightbox__content .splide__slide img {
    max-width: 54.5rem;
    height: 100%;
    width: auto;
    cursor: pointer;
}

.agency-projects-section .agency-projects-item img {
    object-fit: cover;
}

.agency-lightbox__content .splide__slide img {
    width: fit-content;
    object-fit: contain;
}

.agency-projects-item__left-nagivation,
.agency-projects-item__right-nagivation,
.lightbox-navigation {
    flex: 1;
}

.agency-projects-item__left-nagivation,
.lightbox-navigation--left {
    cursor: w-resize !important;
}

.agency-projects-item__right-nagivation,
.lightbox-navigation--right {
    cursor: e-resize !important;
}

.splide__arrows,
.splide__pagination {
    display: none !important;
}

.agency-projects-item__title {
    position: absolute;
    width: 100%;
    background-color: #D3D3D380;
    line-height: 1.1;
    top: 0;
    z-index: 99;
}

.agency-projects-item__title span {
    padding: 0 0.3rem;
}

.agency-projects-item__client-name {
    display: none;
    position: absolute;
    left: 0;
    width: 100svw;
    line-height: 1.1;
    z-index: 100;
}

.agency-top-projects .agency-projects-item__client-name {
    top: 0;
}

.agency-bottom-projects .agency-projects-item__client-name {
    bottom: 0;
}


.agency-bottom-projects .agency-projects-item__title {
    bottom: var(--bottom-offset);
    top: unset;
}


.agency-middle-section {
    background-color: #D3D3D380;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 100;
    height: 1.1rem;
    display: flex;
    align-items: center;
    transition: height 0.8s cubic-bezier(0.87, 0, 0.13, 1), background-color 0.8s cubic-bezier(0.87, 0, 0.13, 1);
    cursor: pointer;
}

.agency-middle-section span {
    padding: 0 0.3rem;
    display: block;
}

.agency-middle-section__content,
.agency-middle-section__footer {
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.87, 0, 0.13, 1), visibility 0.8s cubic-bezier(0.87, 0, 0.13, 1);
    cursor: default;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    font-size: 1rem;
}

.agency-middle-section__content>*,
.agency-middle-section__footer>* {
    grid-column: 6 / -2;
}

.agency-middle-section.open {
    height: 100%;
    background-color: #D3D3D3;
}

.agency-middle-section.open .agency-middle-section__content,
.agency-middle-section.open .agency-middle-section__footer {
    opacity: 1;
    visibility: visible;
}

.agency-middle-section__content {
    position: absolute;
    top: 50%;
    transform: translateY(-1.0625rem);
    padding: 0.3125rem;
}

.agency-middle-section__footer {
    position: absolute;
    bottom: var(--bottom-offset);
    padding: 0.3125rem;
}

.agency-middle-section__title {
    width: 7rem;
    height: 0.8125rem;
    z-index: 100;
}

.agency-projects-section:has(.agency-projects-item.open) .agency-projects-item__client-name {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}

.agency-projects-item__client-name * {
    grid-column: 6 / -2;
}

.agency-projects-item__features {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 10;
    height: 0;
    background-color: #D3D3D3;
    display: none;
    z-index: 1000;
    overflow: hidden;
    transition: height 0.8s cubic-bezier(0.87, 0, 0.13, 1);
}

.agency-projects-item__features-wrapper {
    gap: 0;
    row-gap: 0.3125rem;
    flex-wrap: wrap;
    flex-direction: row;
    height: fit-content;
    display: none;
    max-height: 100%;
    overflow-y: auto;
    max-height: calc(100% - 18px);
}

.agency-top-projects .agency-projects-item__features {
    bottom: calc(1.1rem / 2 * -1);
    align-items: start;
}

.agency-top-projects .agency-projects-item__features-wrapper {
    align-items: flex-start;
}

.agency-bottom-projects .agency-projects-item__features {
    align-items: end;
    top: calc(1.1rem / 2 * -1);
}

.agency-bottom-projects .agency-projects-item__features-wrapper {
    align-items: flex-start;
    flex-wrap: wrap-reverse;
}

.agency-projects-item__features-wrapper img {
    cursor: pointer;
}

.agency-projects-item__features-wrapper>* {
    width: 6.75rem;
    height: auto;
    max-height: 8.4375rem;
    object-fit: cover;
}

.agency-projects-item__features-wrapper.open {
    display: flex;
}

.projects-item__features-close {
    position: absolute;
    left: 0;
    cursor: pointer;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    width: 100%;
}

.projects-item__features-close span {
    grid-column: 6 / -2;
}

.agency-top-projects .projects-item__features-close {
    bottom: 0;
}

.agency-bottom-projects .projects-item__features-close {
    top: 0;
}

@media (max-width: 1000px) {
    .agency-middle-section__content {
        left: 0;
        top: 0;
        transform: none;
    }

    .agency-middle-section__footer {
        left: 0;
        transform: none;
    }

    .agency-middle-section__content>*,
    .agency-middle-section__footer>* {
        grid-column: 1 / -2;
    }
}

@media screen and (min-width: 872px) {

    .agency-projects-section .agency-projects-item img,
    .agency-lightbox__content .splide__slide img {
        max-width: 60%;
    }
}

@media screen and (max-width: 500px) {

    .agency-projects-item img,
    .agency-lightbox__content .splide__slide img {
/*         width: 100% !important; */
/*         object-fit: contain !important; */
    }

    .agency-lightbox .splide__slide {
        overflow: hidden;
    }

    .agency-projects-item__features-wrapper>* {
        /* flex: 1; */
        width: 25%;
    }
	
	.agency-projects-item {
		display: flex;
		justify-content: center;
		overflow: hidden;
	}

    .agency-lightbox__content .splide__slide {
        justify-content: center;
    }
	
	.agency-lightbox .agency-lightbox__content .splide__slide img {
		object-fit: contain !important;
    	width: 100% !important;
		height: auto !important;
	}

}


.agency-lightbox {
    display: none;
    width: 100svw !important;
    height: 100svh !important;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000000000;
    background: white !important;
}

.agency-lightbox.open {
    display: block;
}

.agency-lightbox__header,
.agency-lightbox__footer {
    position: absolute;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: space-between;
    background-color: #D3D3D380;
    z-index: 1000000;
}

.agency-lightbox__header {
    top: 0;
}

.agency-lightbox__footer {
    bottom: 0;
}

.agency-lightbox__header__title,
.agency-lightbox__footer__title,
.agency-lightbox__header__close,
.agency-lightbox__footer__close {
    padding: 0 0.3rem;
}

.agency-lightbox.open.top .agency-lightbox__header {
    display: flex;
}

.agency-lightbox.open.bottom .agency-lightbox__footer {
    display: flex;
}

.agency-lightbox .splide__slide img {
    cursor: zoom-out !important;
}

.agency-lightbox__header__close,
.agency-lightbox__footer__close {
    cursor: pointer;
}


.agency-lightbox__header,
.agency-lightbox__footer,
.agency-lightbox__header__title,
.agency-lightbox__footer__title,
.agency-lightbox__header__close,
.agency-lightbox__footer__close,
.agency-projects-item__title,
.agency-projects-item__client-name,
.projects-item__features-close{
    line-height: 1.1rem;
    font-size: 1rem !important;
    font-weight: 400 !important;
}