/*--------------------------------------------------------------
# Gallery
--------------------------------------------------------------*/

.gallery-page {
    position: relative;
    display: block;
    padding: 80px 0 0;
    z-index: 1;
}

/*--------------------------------------------------------------
# Gallery Introduction
--------------------------------------------------------------*/

.gallery-page__intro {
    position: relative;
    display: block;
    margin-bottom: 80px;
    text-align: center;
}

.gallery-page__intro-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 52px;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--tecture-white);
}

.gallery-page__intro-text {
    font-size: 18px;
    line-height: 28px;
    color: var(--tecture-gray);
    max-width: 780px;
    margin: 0 auto;
}

/*--------------------------------------------------------------
# Gallery Filter
--------------------------------------------------------------*/

.gallery-page__filter-wrapper {
    position: relative;
    display: block;
    margin-bottom: 80px;
    text-align: center;
}

.gallery-page__filter {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gallery-page__filter .filter-item {
    position: relative;
    display: inline-block;
}

.gallery-page__filter .filter-text {
    position: relative;
    display: inline-block;
    color: var(--tecture-white);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 24px;
    border: 1px solid var(--tecture-bdr-color);
    border-radius: 0;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
}

.gallery-page__filter .filter-item.active .filter-text,
.gallery-page__filter .filter-text:hover {
    color: var(--tecture-white);
    background-color: var(--tecture-base);
    border-color: var(--tecture-base);
}

/*--------------------------------------------------------------
# Featured Gallery
--------------------------------------------------------------*/

.gallery-page__featured {
    position: relative;
    display: block;
    margin-bottom: 100px;
}

.gallery-page__featured-main {
    position: relative;
    display: flex;
    flex-direction: column;
}

.gallery-page__featured-img {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    margin-bottom: 32px;
    flex-shrink: 0;
}

.gallery-page__featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    display: block;
}

.gallery-page__featured-main:hover .gallery-page__featured-img img {
    transform: scale(1.05);
}

.gallery-page__featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(166, 161, 130, 0.15);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.gallery-page__featured-main:hover .gallery-page__featured-overlay {
    opacity: 1;
}

.gallery-page__featured-overlay a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: var(--tecture-base);
    border-radius: 50%;
    font-size: 24px;
    color: var(--tecture-white);
    transition: all 0.4s ease;
}

.gallery-page__featured-overlay a:hover {
    background-color: var(--tecture-white);
    color: var(--tecture-base);
    transform: scale(1.1);
}

.gallery-page__featured-content {
    position: relative;
    display: block;
    padding: 0;
    margin-top: 0;
}

.gallery-page__featured-category {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tecture-base);
    margin: 0 0 8px 0;
}

.gallery-page__featured-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 46px;
    text-transform: uppercase;
    color: var(--tecture-white);
    margin: 0 0 16px 0;
}

.gallery-page__featured-desc {
    font-size: 16px;
    line-height: 26px;
    color: var(--tecture-gray);
    margin: 0;
}

.gallery-page__featured-secondary {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-page__featured-secondary .gallery-page__featured-img {
    margin-bottom: 0;
    aspect-ratio: 4 / 5;
    flex-shrink: 0;
}

/*--------------------------------------------------------------
# Main Gallery Grid
--------------------------------------------------------------*/

.gallery-page__grid-wrapper {
    position: relative;
    display: block;
    margin-bottom: 100px;
    width: 100%;
}

.gallery-page__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.gallery-page__item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    width: 100%;
}

.gallery-page__item {
    transition: opacity 0.6s ease-in-out;
}

.gallery-page__item.filter-item {
    opacity: 1;
}

.gallery-page__item.hidden {
    display: none !important;
    opacity: 0;
}

.gallery-page__item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-page__item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    display: block;
}

.gallery-page__item:hover .gallery-page__item-inner img {
    transform: scale(1.08);
}

.gallery-page__item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(166, 161, 130, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.gallery-page__item:hover .gallery-page__item-overlay {
    opacity: 1;
}

.gallery-page__item-overlay a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--tecture-base);
    border-radius: 50%;
    font-size: 20px;
    color: var(--tecture-white);
    transition: all 0.4s ease;
    cursor: pointer;
    transform: scale(0.8);
}

.gallery-page__item:hover .gallery-page__item-overlay a {
    transform: scale(1);
}

.gallery-page__item-overlay a:hover {
    background-color: var(--tecture-white);
    color: var(--tecture-base);
    transform: scale(1.15);
}

.gallery-page__item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(31, 32, 34, 0.98), rgba(31, 32, 34, 0.8), rgba(31, 32, 34, 0));
    padding: 40px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 3;
}

.gallery-page__item:hover .gallery-page__item-content {
    transform: translateY(0);
}

.gallery-page__item-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tecture-white);
    margin-bottom: 4px;
}

.gallery-page__item-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tecture-base);
}

/*--------------------------------------------------------------
# Full-Width Feature Section
--------------------------------------------------------------*/

.gallery-page__feature-section {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
    padding: 60px 0;
}

.gallery-page__feature-img {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.gallery-page__feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
}

.gallery-page__feature-section:hover .gallery-page__feature-img img {
    transform: scale(1.05);
}

.gallery-page__feature-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(166, 161, 130, 0.15);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-page__feature-img:hover .gallery-page__feature-overlay {
    opacity: 1;
}

.gallery-page__feature-overlay a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: var(--tecture-base);
    border-radius: 50%;
    font-size: 24px;
    color: var(--tecture-white);
    transition: all 0.4s ease;
}

.gallery-page__feature-overlay a:hover {
    background-color: var(--tecture-white);
    color: var(--tecture-base);
    transform: scale(1.1);
}

.gallery-page__feature-content h3 {
    font-size: 36px;
    font-weight: 700;
    line-height: 46px;
    text-transform: uppercase;
    color: var(--tecture-white);
    margin-bottom: 24px;
}

.gallery-page__feature-content p {
    font-size: 16px;
    line-height: 28px;
    color: var(--tecture-gray);
    margin: 0;
}

/*--------------------------------------------------------------
# Gallery Lightbox Modal
--------------------------------------------------------------*/

.gallery-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gallery-lightbox-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.gallery-lightbox-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 15, 0.95);
    z-index: 1;
}

.gallery-lightbox-modal__content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-lightbox-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    font-size: 40px;
    color: var(--tecture-white);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.gallery-lightbox-modal__close:hover {
    color: var(--tecture-base);
}

.gallery-lightbox-modal__image-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-lightbox-modal__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-lightbox-modal__prev,
.gallery-lightbox-modal__next {
    position: absolute;
    top: 50%;
    width: 60px;
    height: 60px;
    background-color: var(--tecture-base);
    border: none;
    border-radius: 50%;
    color: var(--tecture-white);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.gallery-lightbox-modal__prev:hover,
.gallery-lightbox-modal__next:hover {
    background-color: var(--tecture-white);
    color: var(--tecture-base);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-modal__prev {
    left: 20px;
}

.gallery-lightbox-modal__next {
    right: 20px;
}

.gallery-lightbox-modal__info {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-lightbox-modal__counter {
    font-size: 14px;
    color: var(--tecture-base);
    font-weight: 600;
}

.gallery-lightbox-modal__details {
    text-align: right;
}

.gallery-lightbox-modal__project {
    font-size: 16px;
    font-weight: 600;
    color: var(--tecture-white);
    margin: 0;
}

.gallery-lightbox-modal__category {
    font-size: 12px;
    color: var(--tecture-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    margin-top: 4px;
}

/*--------------------------------------------------------------
# CTA Section
--------------------------------------------------------------*/

.gallery-cta-section {
    position: relative;
    display: block;
    padding: 100px 0;
    border-top: 1px solid var(--tecture-bdr-color);
    z-index: 1;
}

.gallery-cta-content {
    position: relative;
    display: block;
    text-align: center;
}

.gallery-cta-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 52px;
    text-transform: uppercase;
    color: var(--tecture-white);
    margin-bottom: 24px;
}

.gallery-cta-text {
    font-size: 18px;
    line-height: 28px;
    color: var(--tecture-gray);
    margin-bottom: 40px;
}

.gallery-cta-btn {
    position: relative;
    display: inline-block;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (max-width: 1199px) {
    .gallery-page__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        width: 100%;
    }

    .gallery-page__feature-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gallery-page__intro-title {
        font-size: 32px;
        line-height: 42px;
    }

    .gallery-page__featured-title {
        font-size: 28px;
        line-height: 36px;
    }

    .gallery-page__feature-content h3 {
        font-size: 28px;
        line-height: 36px;
    }

    .gallery-cta-title {
        font-size: 32px;
        line-height: 42px;
    }
}

@media (max-width: 767px) {
    .gallery-page {
        padding: 60px 0 0;
    }

    .gallery-page__intro {
        margin-bottom: 60px;
    }

    .gallery-page__intro-title {
        font-size: 24px;
        line-height: 32px;
    }

    .gallery-page__intro-text {
        font-size: 16px;
        line-height: 26px;
    }

    .gallery-page__filter-wrapper {
        margin-bottom: 60px;
    }

    .gallery-page__filter {
        gap: 8px;
    }

    .gallery-page__filter .filter-text {
        font-size: 14px;
        padding: 10px 18px;
    }

    .gallery-page__featured {
        margin-bottom: 60px;
    }

    .gallery-page__featured-img {
        margin-bottom: 20px;
        aspect-ratio: 1;
    }

    .gallery-page__featured-secondary .gallery-page__featured-img {
        aspect-ratio: 1;
    }

    .gallery-page__featured-title {
        font-size: 20px;
        line-height: 30px;
    }

    .gallery-page__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }

    .gallery-page__item {
        aspect-ratio: 1;
        width: 100%;
    }

    .gallery-page__feature-section {
        padding: 40px 0;
        margin-bottom: 60px;
    }

    .gallery-page__feature-content h3 {
        font-size: 20px;
        line-height: 30px;
        margin-bottom: 16px;
    }

    .gallery-page__feature-content p {
        font-size: 14px;
        line-height: 24px;
    }

    .gallery-cta-section {
        padding: 60px 0;
    }

    .gallery-cta-title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 16px;
    }

    .gallery-cta-text {
        font-size: 16px;
        line-height: 26px;
        margin-bottom: 30px;
    }

    .gallery-lightbox-modal__content {
        width: 95%;
        height: 95vh;
    }

    .gallery-lightbox-modal__prev,
    .gallery-lightbox-modal__next {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .gallery-lightbox-modal__prev {
        left: 10px;
    }

    .gallery-lightbox-modal__next {
        right: 10px;
    }

    .gallery-lightbox-modal__close {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
}

@media (max-width: 575px) {
    .gallery-page__grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .gallery-page__filter {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-page__filter .filter-item {
        width: 100%;
    }

    .gallery-page__filter .filter-text {
        width: 100%;
        display: block;
    }

    .gallery-lightbox-modal__info {
        bottom: 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-lightbox-modal__details {
        text-align: left;
        width: 100%;
    }
}

/*--------------------------------------------------------------
# Prefers Reduced Motion
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
    .gallery-page__item-inner img,
    .gallery-page__featured-img img,
    .gallery-page__feature-img img {
        transition: none;
    }

    .gallery-page__item-overlay,
    .gallery-page__featured-overlay,
    .gallery-page__feature-overlay {
        transition: none;
    }

    .gallery-page__item-content {
        transform: none;
    }

    .gallery-lightbox-modal {
        animation: none;
    }

    .gallery-lightbox-modal__image {
        animation: none;
    }
}

/*--------------------------------------------------------------
# End
--------------------------------------------------------------*/
