.works-hero {
    padding: 88px 0 76px;
    background: #f7f7f7;
}

.works-hero .container {
    max-width: 920px;
}

.works-eyebrow {
    margin-bottom: 12px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.works-hero h1 {
    max-width: 820px;
    margin-bottom: 22px;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.12;
}

.works-hero p:not(.works-eyebrow) {
    max-width: 790px;
    color: #5f6266;
    line-height: 1.8;
}

.works-hero__intro {
    color: var(--dark) !important;
    font-size: 1.2rem;
    font-weight: 600;
}

.works-section {
    padding: 100px 0;
    background: #f7f7f7;
}

.works-section__heading {
    display: block;
    max-width: 760px;
    margin-bottom: 38px !important;
}

.works-explanation {
    max-width: 680px;
    margin: -20px auto 30px;
    color: #6f6f6f;
    line-height: 1.7;
    text-align: center;
}

.works-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 34px;
}

.works-filter {
    padding: 9px 16px;
    border: 1px solid #dfe1e3;
    border-radius: 999px;
    background: #fff;
    color: #4b4d50;
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.works-filter:hover,
.works-filter.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.works-filter:focus-visible,
.works-card__open:focus-visible,
.works-lightbox__close:focus-visible,
.works-lightbox__nav:focus-visible {
    outline: 3px solid #511787;
    outline-offset: 3px;
}

.works-grid {
    margin-top: 0;
    gap: 12px 16px;
}

.works-card {
    min-width: 0;
}

.works-card[hidden] {
    display: none;
}

.solution-card.works-card__open {
    width: 100%;
    padding: 0;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.works-card__placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #dfe7e2 0%, #edf0ee 54%, #e5e1e9 100%);
}

.other-projects {
    margin-top: 90px;
    padding: 42px;
    border-radius: 8px;
    background: #f7f7f7;
}

.other-projects > p:not(.works-eyebrow) {
    margin: 14px 0;
    color: #65686d;
    line-height: 1.7;
}

.other-projects__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 28px;
}

.other-projects__card {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    margin: 0;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 4 / 3;
    border: 0;
    background: #212529;
    color: #fff;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.other-projects__card::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .08) 30%, rgba(0, 0, 0, .62) 100%);
    content: "";
    transition: background-color .25s ease, opacity .25s ease;
}

.other-projects__card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.other-projects__caption {
    position: absolute;
    z-index: 1;
    right: 18px;
    bottom: 17px;
    left: 18px;
    color: #fff;
    font-size: .98rem;
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1.4;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

.other-projects__card:hover img {
    transform: scale(1.035);
}

.other-projects__card:hover::after {
    background-color: rgba(0, 0, 0, .1);
}

.other-projects__card:focus-visible {
    z-index: 2;
}

.works-cta {
    padding: 68px 0;
    background: #f5f5f5;
    text-align: center;
}

.works-cta h2 {
    max-width: 820px;
    margin: 0 auto 28px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.3;
}

.works-cta .btn {
    background: var(--primary);
    border-color: var(--primary);
}

.works-lightbox {
    position: fixed;
    width: min(1000px, calc(100% - 32px));
    max-width: none;
    max-height: min(780px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 25px 90px rgba(0, 0, 0, .35);
}

.works-lightbox::backdrop {
    background: rgba(15, 20, 24, .78);
    backdrop-filter: blur(3px);
}

.works-lightbox[open] {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
}

.works-lightbox__close {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
    cursor: pointer;
}

.works-lightbox__media {
    position: relative;
    min-height: 390px;
    background: #e8ebea;
}

.works-lightbox__media[hidden] {
    display: none;
}

.works-lightbox__media img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 780px;
    object-fit: cover;
}

.works-lightbox__nav {
    position: absolute;
    top: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
    cursor: pointer;
}

.works-lightbox__nav[hidden],
.works-lightbox__counter[hidden] {
    display: none;
}

.works-lightbox__nav--previous {
    left: 14px;
}

.works-lightbox__nav--next {
    right: 14px;
}

.works-lightbox__counter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: .85rem;
}

.works-lightbox__details {
    align-self: center;
    max-height: 100%;
    padding: 54px 42px 42px;
    overflow-y: auto;
}

.works-lightbox__details h2 {
    margin: 0 0 16px;
    font-size: 1.8rem;
    line-height: 1.2;
}

.works-lightbox__details > p:not(.works-eyebrow) {
    color: #5f6266;
    line-height: 1.75;
}

.works-lightbox__details h3 {
    margin: 24px 0 10px;
    font-size: 1rem;
}

.works-lightbox__details ul {
    margin: 0;
    padding-left: 20px;
    color: #5f6266;
}

.works-lightbox__details li + li {
    margin-top: 6px;
}

@media (max-width: 991px) {
    .other-projects__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .works-lightbox[open] {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .works-lightbox__media {
        min-height: 0;
        height: min(48vh, 360px);
    }

    .works-lightbox__details {
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .works-hero {
        padding: 64px 0 56px;
    }

    .works-section {
        padding: 78px 0;
    }

    .other-projects {
        margin-top: 62px;
        padding: 28px 22px;
    }

    .other-projects__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .works-lightbox {
        width: calc(100% - 20px);
        max-height: calc(100% - 20px);
    }

    .works-lightbox__details {
        padding: 26px 22px;
    }
}
