.inhouse_block {
    margin: 100px auto;
    margin-bottom: 200px;
}
.inhouse_block .inner-sec {
    padding-top: 100px;
    padding-bottom: 200px;
}
.inhouse_block.bg_color {
    background: var(--ib-bg-color);
    position: relative;
}
.inhouse_block.bg_color::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-image: var(--ib-bg-overlay-img);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.inhouse_block .container {
    z-index: 99;
}

.inhouse_tabs_wrap {
    position: relative;
    padding-top: 80px;
    width: 80%;
    margin: 0 auto;
}
.inhouse_media_wrap {
    position: relative;
    width: 100%;
    height: 247px;
    margin-bottom: 0;
    overflow: visible;
}
.inhouse_video {
    position: absolute;
    top: 0;
    width: 334px;
    height: 247px;
    border-radius: 0;
    overflow: hidden;
    background: #d9d7d2;
    box-shadow: none;
    transition:
        left 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease;
    will-change: left, transform;
    z-index: 10;
}
.inhouse_video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.inhouse_video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-media-source {
    display: none;
}
.inhouse_tab_title_wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    position: relative;
}
.inhouse_tab_item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 26px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}
.inhouse_tab_title_wrap .top_tiny_line {
    display: block;
    width: 36px;
    height: 2px;
    background: #9d9d9c;
    margin-bottom: 14px;
}
.inhouse_tab_title {
    font-family: 'Moderat_Regular';
    font-size: 26px;
    line-height: 37px;
    color: #24262E;
    font-weight: 400;
    transition: color 0.3s ease;
    white-space: nowrap;
    user-select: none;
    opacity: .5;
}
.inhouse_tab_item.active .inhouse_tab_title {
    color: #24262E;
    opacity: 1;
}
.inhouse_tab_item:not(.active):hover .inhouse_tab_title {
    color: #555551;
}
.inhouse_tab_item:not(.active):hover .top_tiny_line {
    background: #aaa;
}
.inhouse_content_wrap {
    padding: 64px 0 0;
    position: relative;
    min-height: 200px;
}
.inhouse_content {
    display: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.inhouse_content.active {
    display: block;
}
.inhouse_content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Two-column text layout */
.inhouse_content_inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
    align-items: start;
}
.inhouse_content_inner p {
    font-family: 'Moderat_Regular';
    font-size: 22px;
    line-height: 30px;
    color: #24262e;
    font-weight: 400;
}
.inhouse_content_inner p+p {
    margin-top: 20px;
}

@media (max-width: 991px) {
    .inhouse_video {
        width: 240px;
        height: 177px;
    }
    .inhouse_media_wrap {
        height: 177px;
    }
    .inhouse_content_inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .inhouse_tab_title {
        font-size: 0.82rem;
        letter-spacing: 0.04em;
    }
    .inhouse_tab_item {
        padding: 22px 10px 20px;
    }
    .inhouse_tabs_wrap {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .inhouse_video {
        width: 180px;
        height: 133px;
        box-shadow: none;
    }
    .inhouse_media_wrap {
        height: 133px;
    }
    /* Stack tabs vertically — each row full width */
    .inhouse_tab_title_wrap {
        flex-direction: column;
        overflow-x: visible;
    }
    .inhouse_tab_item {
        flex: 1 1 100%;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        padding: 18px 20px;
    }
    .inhouse_tab_title_wrap .top_tiny_line {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .inhouse_tab_title {
        font-size: 0.88rem;
        text-align: left;
    }
    .inhouse_content_inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .inhouse_content_wrap {
        padding: 40px 0 0;
    }
}

@media (max-width: 480px) {
    .inhouse_tab_title {
        font-size: 0.82rem;
    }
    .inhouse_video {
        width: 140px;
        height: 103px;
    }
    .inhouse_media_wrap {
        height: 103px;
    }
}