:root {
    --arthouse-project-accent: #f6de7a;
    --arthouse-project-ink: #2c2c2c;
    --arthouse-project-radius: 20px;
    --font-family: "Museo Sans Cyrl", sans-serif;
    --second-family: "Viaoda Libre", sans-serif;
    --third-family: "TAN - MON CHERI", sans-serif;
    --font3: "Better Friend", sans-serif;
}

.arthouse-projects,
.arthouse-projects * {
    box-sizing: border-box;
}

.arthouse-projects {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--arthouse-project-ink);
    margin-bottom: 120px;
}

.arthouse-projects [hidden] {
    display: none !important;
}

.arthouse-projects__heading {
    font-family: "Viaoda Libre", sans-serif;
    font-weight: 400;
    font-size: 42px;
    line-height: 120%;
    text-align: center;
    color: var(--arthouse-project-ink);
    margin: 0 0 40px 0;
}

.arthouse-projects__heading span {
    background: var(--arthouse-project-accent);
}

.arthouse-projects__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: clamp(38px, 5vw, 60px);
    align-items: start;
}

.arthouse-projects__project-title {
    font-family: "Viaoda Libre", sans-serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 120%;
    color: #2c2c2c;
    margin-bottom: 10px;
}

.arthouse-projects__gallery {
    display: grid;
    grid-template-columns: 490px 370px;
    grid-template-rows: 360px 300px;
    gap: 10px 20px;
    width: 880px;
    height: 670px;
    max-width: 100%;
}

.arthouse-projects__photo {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: var(--arthouse-project-radius);
    background: #eee !important;
    cursor: zoom-in;
    padding: 0 !important;
}

.arthouse-projects__photo:nth-child(3n + 2) {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.arthouse-projects__photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform 300ms ease;
}

.arthouse-projects__photo:hover img {
    transform: scale(1.018);
}

.arthouse-projects__gallery[data-visible-count="1"] .arthouse-projects__photo:not([hidden]) {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.arthouse-projects__gallery[data-visible-count="2"] .arthouse-projects__photo:not([hidden]) {
    grid-row: 1 / -1;
}

.arthouse-projects__gallery[data-visible-count="2"] .arthouse-projects__photo[data-visible-slot="1"] {
    grid-column: 1;
}

.arthouse-projects__gallery[data-visible-count="2"] .arthouse-projects__photo[data-visible-slot="2"] {
    grid-column: 2;
}

.arthouse-projects__photo-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 10px;
}

.arthouse-projects__photo-nav button {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    font-family: var(--font-family);
    font-weight: 300;
    font-size: 12px;
    text-align: right;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #2c2c2c !important;
    cursor: pointer;
}

.arthouse-projects__photo-nav button:hover {
    color: var(--arthouse-project-accent) !important;
    text-decoration: underline !important;
}

.arthouse-projects__photo-nav button:disabled {
    opacity: 0.38;
    cursor: default;
}

.arthouse-projects__photo-nav button:disabled:hover {
    color: #2c2c2c !important;
}

.arthouse-projects__project-list {
    display: grid;
    gap: 10px;
}

.arthouse-projects__project-button {
    display: grid;
    min-height: 115px;
    padding: 20px !important;
    border: 1px solid var(--arthouse-project-ink);
    border-radius: var(--arthouse-project-radius);
    color: var(--arthouse-project-ink) !important;
    background: transparent !important;
    font-family: "Museo Sans Cyrl", sans-serif;
    text-align: left;
    cursor: pointer;
    transition: border-color 200ms linear;
}

.arthouse-projects__project-button.is-active {
    border-color: var(--arthouse-project-accent) !important;
}

.arthouse-projects__project-button.is-active .arthouse-projects__number,
.arthouse-projects__project-button.is-active .arthouse-projects__button-title {
    color: var(--arthouse-project-accent) !important;
}

.arthouse-projects__project-button:hover {
    border-color: var(--arthouse-project-accent) !important;
}

.arthouse-projects__project-button:hover .arthouse-projects__number,
.arthouse-projects__project-button:hover .arthouse-projects__button-title {
    color: var(--arthouse-project-accent) !important;
}

.arthouse-projects__number {
    display: block;
    font-family: "Tan mon-cheri", Sans-serif;
    font-weight: 400;
    font-size: 40px;
    line-height: 120%;
    text-transform: uppercase;
    color: #2c2c2c;
    margin-bottom: 10px;
    transition: color 200ms linear;
}

.arthouse-projects__button-title {
    font-weight: 300;
    font-size: 14px;
    color: #2c2c2c;
    transition: color 200ms linear;
}

.arthouse-projects__selector-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.arthouse-projects__selector-nav button {
    width: 100%;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--arthouse-project-ink);
    border-radius: 12px;
    color: inherit;
    background: transparent !important;
    font-size: 22px;
    cursor: pointer;
}

.arthouse-projects__selector-nav button:disabled {
    opacity: 0.3;
    cursor: default;
}

.arthouse-projects__selector-nav button:hover:not(:disabled) {
    border-color: var(--arthouse-project-accent);
}

.arthouse-projects__selector-nav button svg {
    stroke: var(--arthouse-project-ink);
    transition: stroke 200ms linear;
}

.arthouse-projects__selector-nav button:hover:not(:disabled) svg {
    stroke: var(--arthouse-project-accent);
}

.arthouse-projects__selector-nav button:first-child svg {
    transform: rotate(-90deg);
}

.arthouse-projects__selector-nav button:last-child svg {
    transform: rotate(90deg);
}

.arthouse-projects__lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    padding: 54px;
    place-items: center;
    background: rgba(0, 0, 0, 0.82);
}

.arthouse-projects__lightbox-dialog {
    position: relative;
    display: grid;
    max-width: min(1200px, 92vw);
    max-height: 88vh;
    place-items: center;
}

.arthouse-projects__lightbox img {
    display: block;
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
}

.arthouse-projects__lightbox-close {
    position: fixed;
    top: 14px;
    right: 20px;
    width: 46px;
    height: 46px;
    padding: 0 !important;
    border: 0;
    color: #fff !important;
    background: transparent !important;
    font-size: 30px !important;
    cursor: pointer;
}

.arthouse-projects__lightbox-close:hover {
    color: var(--arthouse-project-accent) !important;
    background: transparent !important;
}

html.arthouse-lightbox-open {
    overflow: hidden;
}

@media screen and (max-width: 1279px) {
    .arthouse-projects__layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .arthouse-projects__selector {
        order: -1;
        width: 100%;
    }

    .arthouse-projects__project-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .arthouse-projects__project-button {
        display: flex;
        min-height: 65px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .arthouse-projects__number {
        flex: 0 0 auto;
        font-size: 18px;
        margin-bottom: 0 !important;
        line-height: 1;
    }

    .arthouse-projects__button-title {
        align-self: auto;
        font-size: 14px;
        margin-left: 6px;
    }

    .arthouse-projects__content {
        width: 100%;
    }

    .arthouse-projects__gallery {
        grid-template-columns: minmax(0, 49fr) minmax(0, 37fr);
        grid-template-rows: minmax(0, 36fr) minmax(0, 30fr);
        width: 100%;
        height: auto;
        aspect-ratio: 88 / 67;
    }
}

@media screen and (max-width: 767px) {
    .arthouse-projects__heading {
        margin-bottom: 26px;
        font-size: 32px;
    }

    .arthouse-projects__project-list {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .arthouse-projects__project-button {
        min-height: 65px;
        padding: 5px 10px;
        border-radius: 11px;
    }

    .arthouse-projects__number {
        font-size: 18px;
    }

    .arthouse-projects__button-title {
        font-size: 14px;
    }

    .arthouse-projects__project-title {
        margin-bottom: 10px;
        font-size: 30px;
    }

    .arthouse-projects__gallery,
    .arthouse-projects__gallery[data-visible-count] {
        display: flex;
        min-height: 0;
        flex-direction: column;
        gap: 10px;
        aspect-ratio: auto;
        padding: 0 30px !important;
    }

    .arthouse-projects__photo {
        width: 100%;
        min-height: 0;
        aspect-ratio: 1.45 / 1;
        border-radius: 11px;
    }

    .arthouse-projects__photo-nav {
        margin-top: 6px;
    }

    .arthouse-projects__photo-nav button {
        font-size: 10px;
    }

    .arthouse-projects__lightbox {
        padding: 42px 10px 20px;
    }

    .arthouse-projects__photo {
        min-height: 360px;
    }
}

@media screen and (max-width: 474px) {
    .arthouse-projects__photo {
        min-height: 320px;
    }

    .arthouse-projects__gallery,
    .arthouse-projects__gallery[data-visible-count] {
        padding: 0 10px !important;
    }
}


@media screen and (max-width: 374px) {
    .arthouse-projects__gallery,
    .arthouse-projects__gallery[data-visible-count] {
        padding: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arthouse-projects__photo img {
        transition: none;
    }
}