/* block-latest_cases styles */

/* ── Simple card ────────────────────────── */

.list-posts {
    position: relative;
}

.list-posts a {
    text-decoration: none;
}

.list-posts > a {
    position: relative;
    display: block;
}

.list-posts img {
    width: 100%;
    height: auto;
}

.case_logo {
    position: absolute;
    left: 15px;
    top: 15px;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.5em;
    z-index: 1;
}

.case_logo > div {
    height: clamp(28px, 56 * (100vw / 1920), 56px);
    display: flex;
    align-items: center;
}

.case_logo > div > img {
    object-fit: contain;
    height: inherit;
    width: inherit;
    max-width: none;
}

.case_info {
    position: relative;
    z-index: 2;
    margin-bottom: clamp(16px, 28 * (100vw / 1920), 28px);
}

.case_info:last-child {
    margin-bottom: 0;
}

.case_info p {
    color: #818181 !important;
    font-weight: 400;
}

.case_info h2:has(a):hover {
    text-decoration: underline;
    text-underline-position: from-font;
}

.case_info_bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 28 * (100vw / 1920), 28px);
    margin-bottom: 12px;
}

.case_info_bottom__item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case_info_bottom__title {
    font-weight: 500;
    font-size: 0.8em;
    line-height: 1.25em;
    text-transform: uppercase;
}

.case_info_bottom__text {
    font-weight: 500;
    font-size: 1em;
    line-height: 1.25em;
    text-transform: uppercase;
}

.case_info_bottom__text a:hover {
    text-decoration: underline;
}

/* ── Dark background overrides (card) ─── */

.black_bg .case_info h2 a,
.black_bg .case_info_bottom__title,
.black_bg .case_info_bottom__text {
    color: #fff;
}

/* ── Grid layout ───────────────────────── */

.block-latest-cases .items.wrap:not(.latest-cases__single_case) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: clamp(8px, 16 * 100vw / 1920, 16px);
    row-gap: clamp(28px, 84 * 100vw / 1920, 84px);
}

.block-latest-cases .items.wrap:not(:last-child) {
    margin-bottom: clamp(28px, 84 * 100vw / 1920, 84px);
}

.block-latest-cases .items.wrap.lists:empty,
.block-latest-cases:has(.cases-load-more.remove) .items.wrap,
.block-latest-cases:not(:has(.cases-view-all-link)):not(:has(.load-more)) .items.wrap {
    margin-bottom: 0;
}

/* ── NDA block ──────────────────────────── */

.block-latest-cases .cases-nda-block {
    margin-top: clamp(28px, 84 * 100vw / 1920, 84px);
}

/* ── Load more / view all ──────────────── */

.block-latest-cases .load-more,
.block-latest-cases .cases-view-all-link {
    display: flex;
    justify-content: center;
}

.block-latest-cases .load-more:has(.remove) {
    display: none;
}

.block-latest-cases .load-more a,
.block-latest-cases .cases-view-all-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: clamp(48px, 82 * (100vw / 1920), 82px);
    padding: 0 clamp(33px, 56 * (100vw / 1920), 56px);
    background: #000;
    color: #fff;
    border: 2px solid #000;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: clamp(11px, 19 * (100vw / 1920), 19px);
    line-height: clamp(14px, 24 * (100vw / 1920), 24px);
    letter-spacing: 0.03em;
    transition: background 0.2s, border-color 0.2s;
}

.block-latest-cases .load-more a:hover,
.block-latest-cases .cases-view-all-link a:hover {
    text-decoration: underline;
}

/* ── Dark background overrides ─────────── */

.block-latest-cases.black_bg .load-more a,
.block-latest-cases.black_bg .cases-view-all-link a {
    background: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
}

/* ── Responsive ────────────────────────── */

@media (max-width: 1024px) {
    .block-latest-cases .items.wrap:not(.latest-cases__single_case) {
        grid-template-columns: repeat(1, 1fr);
    }

    .block-latest-cases .list-posts {
        width: 100%;
        flex: none;
    }
}


/* ── Legacy .latest-cases styles ──────── */

.latest-cases .btn.btn-link {
    display: none;
}

.single-case.latest-cases p {
    font-size: 12px;
    color: #ffffff;
}

.single-case.latest-cases:hover p,
.single-case.latest-cases:hover h4 {
    color: #fff;
}

.single-case.latest-cases:hover .list-posts .post:before {
    background-color: rgba(0, 0, 0, 0.2);
}

.Industries .item-section .bottom-box-f .single-case.latest-cases {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.Industries .item-section .bottom-box-f .latest-cases .list-posts .block-info {
    height: 100%;
}

.Industries .item-section .bottom-box-f .latest-cases a {
    margin-bottom: 40px;
}

.Industries .item-section .bottom-box-f .latest-cases .list-posts .btn-link {
    height: auto;
    bottom: 40px;
    position: absolute;
}

.Industries .item-section .bottom-box-f .latest-cases .list-posts .post:before {
    background-color: rgba(0, 0, 0, 0.5);
}

.Industries .item-section .bottom-box-f .latest-cases .list-posts a:hover::before {
    background-color: rgba(0, 0, 0, 0.3);
}

.Industries .item-section .bottom-box-f .latest-cases a.post span {
    color: #fff;
    font-family: 'Roboto';
    font-weight: 400;
    font-size: 13.5px;
    line-height: 1.67;
    /* opacity: 0.6; */
    /* display: block; */
    margin: auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px;
    height: fit-content;
}

.latest-cases a.post span {
    color: #fff;
    font-family: 'Roboto';
    font-weight: 400;
    font-size: 13.5px;
    line-height: 1.67;
    /* opacity: 0.6; */
    /* display: block; */
    margin: auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px;
    height: fit-content;
    max-height: 40px;
}

.latest-cases .list-posts .block-info {
    height: 100%;
}

.webDevelopment .latest-cases {
    background-image: url(http://computools.com/wp-content/uploads/2018/11/discussing-business-project-prjplqf.jpg);
}

.insights-page .section-3.latest-cases {
    background-image: none !important;
}

.dedicated-team-page .Industries .latest-cases .list-posts .post {
    width: 100%;
}

.latest-cases .list-posts .post {
    background-color: #fff;
}

.section-3.latest-cases .block-btn{
    display: block;
    margin: 120px auto 0;
    width: 172px;
}

.home-page .section-3.latest-cases {
    font-size: 0;
    padding: 180px 0 0;
}

@media (max-width: 1500px) {
    .section-3.latest-cases .block-btn a{
        width: 100%;
        text-align: center;
    }
}

@media only screen and (max-width: 768px) {
    .Industries .item-section .bottom-box-f .single-case.latest-cases {
        width: 100%;
    }
    .Industries .item-section .bottom-box-f .latest-cases a.post span{
        height: auto;
        max-height: 177px;
    }
    .Industries .item-section .bottom-box-f .latest-cases .list-posts .btn-link{
        display: none;
    }
}

@media (max-width: 560px) {
    .home-page .section-3.latest-cases{
        padding-top: 40px;
    }
}

@media only screen and (min-width: 1024px) {
    .dedicated-team-page .home-page .section-3.latest-cases{
        padding-bottom: 160px;
    }
}
