/*
 | Mobile scroll shortening (rollback: "mobile scroll wapas karo").
 | Loaded after tbtk-mobile-fixes.css. Everything here is phone-only
 | (max-width: 767px) so desktop layouts stay exactly as they were.
 */

.tbms-more-wrap {
    display: none;
}

/*
 | FAQ / job accordions on pages that do not load bootstrap.min.css (help,
 | careers, package, how it works, google ads, email marketing...). Their
 | markup is already "collapsed" and bootstrap.bundle.js toggles it, but
 | without these three rules every answer rendered open. All widths.
 */
.accordion-collapse.collapse:not(.show) {
    display: none;
}

.accordion-collapse.collapsing {
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}

@media (max-width: 767px) {
    /* ---- Shared 4-up collage helpers ---- */
    .tbms-more-wrap {
        display: flex;
        justify-content: center;
        margin-top: 18px;
    }

    .tbms-more {
        align-items: center;
        background: #0073FC;
        border: 0;
        border-radius: 999px;
        color: #fff;
        display: inline-flex;
        font-size: 14px;
        font-weight: 800;
        gap: 8px;
        padding: 12px 22px;
        text-transform: uppercase;
    }

    /* ---- Live website links: 2 x 2 collage, rest behind a button ---- */
    .website-link-showcase .website-link-showcase__grid {
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tbms-showcase:not(.is-expanded) .website-link-showcase__grid > :nth-child(n+5) {
        display: none;
    }

    .website-link-showcase .website-link-card__body {
        padding: 10px;
    }

    .website-link-showcase .website-link-card__meta {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .website-link-showcase .website-link-card__title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .website-link-showcase .website-link-card__cta {
        font-size: 10px;
        gap: 5px;
    }

    .website-link-showcase .website-link-card__live {
        font-size: 9px;
        left: 8px;
        padding: 3px 7px;
        top: 8px;
    }
}

@media (max-width: 767px) {
    /* ---- Web design: "Not shared hosting" 4 cards as 2 x 2 ---- */
    #tk-webinfra .gd-grid {
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tk-webinfra .gc {
        padding: 14px 10px;
    }

    #tk-webinfra .gc .gd {
        margin-left: auto;
        margin-right: auto;
        transform: scale(.72);
        transform-origin: top center;
        margin-bottom: -28px;
    }

    #tk-webinfra .gc-figure {
        font-size: 22px;
    }

    #tk-webinfra .gc-name,
    #tk-webinfra .gc-text {
        font-size: 11.5px;
        line-height: 1.35;
    }

    /* ---- Web design: "What you do not see" tech cards side by side,
            free audit form stays full width ---- */
    #tk-webhood .hd-grid {
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tk-webhood .hd--benefits,
    #tk-webhood .hd--scan {
        grid-column: 1 / -1;
    }

    #tk-webhood .hd--pipeline,
    #tk-webhood .hd--uptime {
        padding: 14px 10px;
    }

    #tk-webhood .hd--pipeline .trm {
        display: none;
    }

    #tk-webhood .hd--pipeline .hd-name,
    #tk-webhood .hd--uptime .hd-name {
        font-size: 13px;
        line-height: 1.25;
    }

    #tk-webhood .hd--pipeline .hd-text,
    #tk-webhood .hd--uptime .hd-text {
        font-size: 11.5px;
        line-height: 1.35;
    }

    #tk-webhood .hd--uptime .hd-figure {
        font-size: 26px;
    }

    #tk-webhood .hd--uptime .hm {
        gap: 2px;
    }

    #tk-webhood .bn-list {
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* ---- "Get more than just a website / app": 2-up cards ---- */
    .service_main--growth .row.tk-m-grid {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .service_main--growth .row.tk-m-grid > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .service_main--growth .service_block {
        height: 100%;
        padding: 14px 10px;
    }

    .service_main--growth .service_block .serice_img {
        display: block;
        margin-bottom: 8px;
    }

    .service_main--growth .service_block .serice_desc {
        display: block;
        width: auto;
    }

    .service_main--growth .service_block .serv_title {
        font-size: 14px !important;
        line-height: 1.25 !important;
        margin-bottom: 4px;
    }

    .service_main--growth .service_block .serv_desc,
    .service_main--growth .service_block .serv_desc p {
        font-size: 11.5px !important;
        line-height: 1.4 !important;
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    /* ---- AI automation pages: every card group as a 2-up collage ---- */
    .automation-section .automation-tier-grid,
    .automation-section .automation-tier-grid.is-centered,
    .automation-section .automation-tier-grid.is-four {
        display: grid !important;
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .automation-section .automation-tier-grid > .automation-tier-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .automation-section .automation-tier-card {
        max-width: none;
        min-width: 0;
        padding: 14px 11px;
        width: auto;
    }

    .automation-section .automation-tier-card .automation-tier-icon {
        font-size: 15px;
        height: 34px;
        margin-bottom: 8px;
        width: 34px;
    }

    .automation-section .automation-tier-card h3 {
        font-size: 14px;
        line-height: 1.25;
        margin-bottom: 6px;
    }

    .automation-section .automation-tier-card p,
    .automation-section .automation-tier-card li,
    .automation-section .automation-tier-card .automation-tier-monthly,
    .automation-section .automation-tier-card .automation-tier-note {
        font-size: 11.5px;
        line-height: 1.4;
    }

    .automation-section .automation-tier-card li {
        margin-bottom: 3px;
    }

    .automation-section .automation-tier-card .automation-tier-price strong {
        font-size: 18px;
    }

    .automation-section .automation-tier-card .automation-tier-action a {
        font-size: 11px;
        min-height: 0;
        padding: 9px 10px;
        width: 100%;
    }
}

@media (max-width: 767px) {
    /* ---- Home: "How it works" 4 steps as 2 x 2 ---- */
    .home-process-section .home-process-grid {
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-process-section .home-process-step {
        padding: 14px 10px;
    }

    .home-process-section .home-process-step .home-process-number {
        font-size: 14px;
        height: 38px;
        width: 38px;
    }

    .home-process-section .home-process-step h3 {
        font-size: 14px;
    }

    .home-process-section .home-process-step p {
        font-size: 11.5px;
        line-height: 1.4;
        max-width: none;
    }

    /* ---- Trending tiles (home + printing pages) as a 2-up collage ---- */
    .tk-trending .tk-trending-grid {
        --bs-gutter-x: 10px;
        justify-content: center;
    }

    .tk-trending .tk-trending-grid > .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .tk-trending .what-we-do-box {
        gap: 8px;
        height: 100%;
        width: 100%;
    }


    .tk-trending .what-do-item-content {
        display: none !important;
    }

    .tk-trending .what-we-do-box {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }

    .tk-trending .what-we-do-item {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
        order: 2;
        padding: 10px 12px !important;
    }

    .tk-trending .tk-trending-media {
        flex: 0 0 auto !important;
        order: 1;
    }

    .tk-trending .what-do-body-box {
        display: block !important;
    }

    .tk-trending .what-do-body-title {
        width: 100% !important;
    }

    .tk-trending .what-do-body-title h3,
    .tk-trending .what-do-body-title h4,
    .tk-trending .what-do-body-title .animated-stat {
        font-size: 14px !important;
        line-height: 1.25 !important;
        overflow-wrap: normal;
        word-break: normal;
    }

    .tk-trending .what-do-body-box .icon-box {
        display: none;
    }

    .tk-trending .tk-trending-grid .tk-trending-media,
    .tk-trending .tk-trending-grid .tk-trending-media .tk-trending-link,
    .tk-trending .tk-trending-grid .tk-trending-media .twenty20 {
        height: 150px !important;
        max-height: 150px !important;
        min-height: 0 !important;
        overflow: hidden;
    }

    .tk-trending .tk-trending-media img,
    .tk-trending .tk-trending-compare .twenty20 img {
        height: 150px !important;
        object-fit: cover;
        width: 100%;
    }

    .tk-trending .tk-trending-media-label {
        font-size: 9px;
    }

    /* ---- Home: team photos as a 2-up collage ---- */
    .tk-promo-section .row.tk-m-grid {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
        justify-content: center;
    }

    .tk-promo-section .row.tk-m-grid > .col-lg-4 {
        flex: 0 0 50%;
        margin-bottom: 0;
        max-width: 50%;
    }

    .tk-promo-section .home-promo-card,
    .tk-promo-section .home-promo-card img {
        height: auto;
        width: 100%;
    }
}

@media (max-width: 767px) {
    /* ---- All Services page: service cards 2-up ---- */
    .tbms-all-services .row.gy-4 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .tbms-all-services .row.gy-4 > .col-lg-4.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .tbms-all-services .logo-slide {
        margin: 0;
        max-width: none;
        padding: 0;
        width: 100%;
    }

    .tbms-all-services .product-card {
        margin: 0;
        max-width: none;
        width: 100%;
    }

    .tbms-all-services .product-card .details {
        padding: 8px;
    }

    .tbms-all-services .product-card .tk-title {
        font-size: 10.5px;
        line-height: 1.2;
    }

    .tbms-all-services .product-card .tk-category {
        font-size: 9px;
    }

    .tbms-all-services .product-card .details a {
        font-size: 10px;
    }
}

@media (max-width: 767px) {
    .tbms-all-services .product-card .featured-img {
        aspect-ratio: 1 / 1;
        height: auto !important;
        object-fit: cover;
        width: 100%;
    }
}

@media (max-width: 767px) {
    /* ---- Portfolio pages: project cards 2-up ---- */
    #portfolio.elementor-portfolios {
        gap: 10px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #portfolio.elementor-portfolios > li {
        min-width: 0;
        width: auto !important;
    }

    #portfolio.elementor-portfolios .tk-product-info {
        padding: 8px !important;
    }

    #portfolio.elementor-portfolios .tk-product-info * {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
}
