.hc-complex-gallery,
.hc-complex-gallery * {
    box-sizing: border-box;
}

body.hc-complex-gallery-lock {
    overflow: hidden;
    touch-action: none;
}

.hc-complex-gallery {
    width: 100%;
    background: #fefcf9;
    font-family: Onest, Arial, sans-serif;
}

.hc-complex-gallery--empty {
    padding: 24px 12px 80px;
}

.hc-complex-gallery--empty p {
    margin: 0;
    color: #7b6f5e;
    font-size: 18px;
    line-height: 24px;
}

.hc-complex-gallery__grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px 12px 80px;
}

.hc-complex-gallery-card {
    position: relative;
    display: block;
    width: 100%;
    height: 460px;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background-color: #e7e2da;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.hc-complex-gallery-card__shade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
    opacity: 1;
    transition: height .3s ease, opacity .3s ease;
}

.hc-complex-gallery-card__content {
    position: absolute;
    right: 24px;
    bottom: 20px;
    left: 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #fff;
    opacity: 1;
    transition: opacity .3s ease, bottom .3s ease;
}

.hc-complex-gallery-card__title {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.hc-complex-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
}

.hc-complex-gallery-modal.is-open {
    display: block;
}

.hc-complex-gallery-modal__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: none;
    background: rgba(0, 0, 0, .5);
}

.hc-complex-gallery-modal__desktop {
    display: none;
}

.hc-complex-gallery-modal__mobile {
    position: fixed;
    inset: 0;
    z-index: 3;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #fff;
}

.hc-complex-gallery-modal__mobile-gradient {
    pointer-events: none;
    position: absolute;
    right: 0;
    left: 0;
    z-index: 4;
    height: 42%;
    background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.hc-complex-gallery-modal__mobile-gradient--top {
    top: 0;
    transform: rotate(180deg);
}

.hc-complex-gallery-modal__mobile-gradient--bottom {
    bottom: 0;
}

.hc-complex-gallery-modal__mobile-track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hc-complex-gallery-modal__mobile-slides,
.hc-complex-gallery-carousel__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .4s ease-in-out;
}

.hc-complex-gallery-modal__mobile-slide,
.hc-complex-gallery-carousel__slide {
    min-width: 100%;
    height: 100%;
}

.hc-complex-gallery-modal__mobile-slide img,
.hc-complex-gallery-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-complex-gallery-modal__mobile-top {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-top: 30px;
}

.hc-complex-gallery-modal__mobile-bars {
    display: flex;
    gap: 8px;
    width: 100%;
    padding: 0 12px;
}

.hc-complex-gallery-modal__mobile-bar {
    position: relative;
    height: 3px;
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255, 255, 255, .4);
}

.hc-complex-gallery-modal__mobile-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: #fff;
    transition: width .3s ease;
}

.hc-complex-gallery-modal__mobile-bar.is-complete span,
.hc-complex-gallery-modal__mobile-bar.is-active span {
    width: 100%;
}

.hc-complex-gallery-modal__mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-right: 12px;
}

.hc-complex-gallery-modal__mobile-header h2 {
    margin: 0;
    padding-left: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
}

.hc-complex-gallery-modal__mobile-header button {
    display: flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.hc-complex-gallery-modal__mobile-header i {
    font-size: 24px;
    line-height: 1;
}

.hc-complex-gallery-modal__mobile-zone {
    position: absolute;
    top: 120px;
    bottom: 180px;
    z-index: 7;
    width: 50%;
    border: 0;
    background: transparent;
    padding: 0;
}

.hc-complex-gallery-modal__mobile-zone--prev {
    left: 0;
}

.hc-complex-gallery-modal__mobile-zone--next {
    right: 0;
}

.hc-complex-gallery-modal__mobile-bottom {
    position: absolute;
    right: 0;
    bottom: 36px;
    left: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 12px;
}

.hc-complex-gallery-modal__mobile-bottom h3 {
    width: 80%;
    margin: 0 0 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

.hc-complex-gallery-modal__mobile-bottom p {
    width: 80%;
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.hc-complex-gallery-modal__mobile-consult {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    background: #ff5500;
    color: #fff;
    cursor: pointer;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

@media (min-width: 768px) {
    .hc-complex-gallery__grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
        padding: 80px 120px 40px;
    }

    .hc-complex-gallery-card__shade {
        height: 0;
        opacity: 0;
    }

    .hc-complex-gallery-card__content {
        bottom: 0;
        opacity: 0;
    }

    .hc-complex-gallery-card:hover .hc-complex-gallery-card__shade,
    .hc-complex-gallery-card:focus-visible .hc-complex-gallery-card__shade {
        height: 100%;
        opacity: 1;
    }

    .hc-complex-gallery-card:hover .hc-complex-gallery-card__content,
    .hc-complex-gallery-card:focus-visible .hc-complex-gallery-card__content {
        bottom: 20px;
        opacity: 1;
    }

    .hc-complex-gallery-modal.is-open {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 24px;
    }

    .hc-complex-gallery-modal.is-open.is-top-anchored {
        align-items: flex-start;
        padding-top: var(--hc-gallery-modal-top, 24px);
        padding-bottom: 24px;
    }

    .hc-complex-gallery-modal__backdrop {
        display: block;
    }

    .hc-complex-gallery-modal__mobile {
        display: none;
    }

    .hc-complex-gallery-modal__desktop {
        position: relative;
        z-index: 2;
        display: flex;
        width: 1225px;
        max-width: calc(100vw - 48px);
        height: 700px;
        max-height: calc(100vh - 48px);
        flex-direction: column;
        gap: 40px;
        overflow: hidden;
        border-radius: 32px;
        background: #fff;
        padding: 16px 24px 24px;
        transition: height 180ms ease;
    }

    .hc-complex-gallery-modal__top {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 35px;
    }

    .hc-complex-gallery-modal__tabs {
        display: flex;
        min-width: 0;
        flex: 1 1 auto;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        padding: 6px;
        scroll-padding-inline: 6px;
        scrollbar-width: none;
    }

    .hc-complex-gallery-modal__tabs::-webkit-scrollbar {
        display: none;
    }

    .hc-complex-gallery-modal__tab {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 8px;
        background: rgba(255, 255, 255, .6);
        color: #423a2e;
        cursor: pointer;
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
        white-space: nowrap;
    }

    .hc-complex-gallery-modal__tab.is-active {
        background: rgba(255, 85, 0, .6);
        color: #fff;
        box-shadow: 0 0 0 6px rgba(255, 85, 0, .2);
    }

    .hc-complex-gallery-modal__top-actions {
        position: relative;
        display: flex;
        align-items: center;
        gap: 24px;
        padding-left: 10px;
    }

    .hc-complex-gallery-modal__category-arrows {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .hc-complex-gallery-modal__small-button,
    .hc-complex-gallery-modal__close,
    .hc-complex-gallery-carousel__arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        cursor: pointer;
    }

    .hc-complex-gallery-modal__small-button {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        background: transparent;
        color: #1f1911;
        font-size: 16px;
    }

    .hc-complex-gallery-modal__small-button:hover {
        background: #e7e2da;
    }

    .hc-complex-gallery-modal__small-button:disabled {
        cursor: default;
        opacity: .35;
    }

    .hc-complex-gallery-modal__small-button:disabled:hover {
        background: transparent;
    }

    .hc-complex-gallery-modal__close {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        background: #1f1e1b;
        color: #fff;
        font-size: 24px;
    }

    .hc-complex-gallery-modal__body {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 24px;
    }

    .hc-complex-gallery-modal__intro {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .hc-complex-gallery-modal__intro h1 {
        margin: 0;
        color: #2f281e;
        font-size: 40px;
        font-weight: 400;
        line-height: 48px;
    }

    .hc-complex-gallery-modal__intro p {
        width: 85%;
        margin: 0;
        color: #423a2e;
        font-size: 18px;
        font-weight: 400;
        line-height: 24px;
    }

    .hc-complex-gallery-modal__content {
        display: grid;
        min-height: 0;
        grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
        gap: 24px;
    }

    .hc-complex-gallery-carousel {
        position: relative;
        height: 384px;
        overflow: hidden;
        border-radius: 20px;
        background: #e7e2da;
    }

    .hc-complex-gallery-carousel__slide img {
        border-radius: 20px;
    }

    .hc-complex-gallery-carousel__shade {
        pointer-events: none;
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 2;
        width: 0;
        opacity: 0;
        transition: width .7s ease, opacity .7s ease;
    }

    .hc-complex-gallery-carousel__shade--left {
        left: 0;
        background: linear-gradient(to right, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0));
    }

    .hc-complex-gallery-carousel__shade--right {
        right: 0;
        background: linear-gradient(to left, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0));
    }

    .hc-complex-gallery-carousel:hover .hc-complex-gallery-carousel__shade {
        width: 30%;
        opacity: 1;
    }

    .hc-complex-gallery-carousel__arrow {
        position: absolute;
        top: 50%;
        z-index: 3;
        width: 48px;
        height: 48px;
        border-radius: 8px;
        background: #fff;
        color: #1f1911;
        font-size: 24px;
        opacity: 0;
        transform: translateY(-50%);
        transition: left .7s ease, right .7s ease, opacity .7s ease;
    }

    .hc-complex-gallery-carousel__arrow--prev {
        left: -80px;
    }

    .hc-complex-gallery-carousel__arrow--next {
        right: -80px;
    }

    .hc-complex-gallery-carousel:hover .hc-complex-gallery-carousel__arrow--prev {
        left: 24px;
        opacity: 1;
    }

    .hc-complex-gallery-carousel:hover .hc-complex-gallery-carousel__arrow--next {
        right: 24px;
        opacity: 1;
    }

    .hc-complex-gallery-carousel__dots {
        position: absolute;
        top: 20px;
        left: 24px;
        z-index: 4;
        display: flex;
        width: fit-content;
        align-items: flex-start;
        gap: 4px;
        border-radius: 10px;
        background: rgba(0, 0, 0, .3);
        padding: 6px;
    }

    .hc-complex-gallery-carousel__dots span {
        display: block;
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .4);
    }

    .hc-complex-gallery-carousel__dots span.is-active {
        background: #fff;
    }

    .hc-complex-gallery-benefits {
        display: grid;
        height: 384px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(120px, auto);
        gap: 12px;
        overflow-y: auto;
        scrollbar-width: none;
    }

    .hc-complex-gallery-benefits::-webkit-scrollbar {
        display: none;
    }

    .hc-complex-gallery-benefit {
        display: flex;
        min-width: 0;
        flex-direction: column;
        gap: 8px;
        border-radius: 16px;
        background: #f3f0ec;
        padding: 20px;
    }

    .hc-complex-gallery-benefit i {
        color: #1f1911;
        font-size: 16px;
        line-height: 1;
    }

    .hc-complex-gallery-benefit__icon {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .hc-complex-gallery-benefit h4 {
        margin: 0;
        color: #423a2e;
        font-size: 16px;
        font-weight: 500;
        line-height: 20px;
    }
}

@media (min-width: 1920px) {
    .hc-complex-gallery__grid {
        padding-right: 300px;
        padding-left: 300px;
    }
}
