/* Homepage layout matching Mid South Sales reference design */

/* Header is no longer overlaying a hero slider — keep it in normal document flow */
.home header.header2.transparent {
    position: relative;
}

.home section.extra-gap {
    padding-top: 25px;
}

.home .row-fluid {
    display: block;
    width: 100%;
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.home .row-fluid::before,
.home .row-fluid::after {
    content: "";
    display: table;
}

.home .row-fluid::after {
    clear: both;
}

.home .vc_col-sm-5,
.home .vc_col-sm-7,
.home .vc_col-sm-8,
.home .vc_col-sm-4,
.home .vc_col-sm-12 {
    float: left;
    min-height: 1px;
    box-sizing: border-box;
}

.home .vc_col-sm-12 { width: 100%; }
.home .vc_col-sm-8 { width: 66.6667%; }
.home .vc_col-sm-7 { width: 58.3333%; }
.home .vc_col-sm-5 { width: 41.6667%; }
.home .vc_col-sm-4 { width: 33.3333%; }

.home .partnerslogo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.home .partnerslogo a {
    display: inline-block;
}

/* Homepage body text: improved line spacing and letter spacing. */
.home section.extra-gap p,
.home section.extra-gap li,
.home section.extra-gap .staff_cover p,
.home section.extra-gap .clients > p,
.home section.extra-gap .abt-client p,
.home section.extra-gap .vc_tta-panel-body p {
    line-height: 1.75;
    letter-spacing: 0.02em;
}

.home section.extra-gap .myfirstrow .wpb_wrapper > p,
.home section.extra-gap .myserviceblock > .wpb_text_column > .wpb_wrapper > p,
.home section.extra-gap .vc_tta-panel-body .wpb_wrapper > p {
    margin-bottom: 0.85em;
}

.home section.extra-gap .mycustomtestimonial li {
    margin-bottom: 0.65em;
}

/* Our Services cards: keep MORE links visible with readable text spacing. */
@media (min-width: 1200px) {
    .home #slider4 .viewport {
        height: auto !important;
        min-height: 314px;
        overflow: visible !important;
    }

    .home #slider4 .staff_cover {
        height: auto !important;
        min-height: 156px;
        padding-bottom: 12px !important;
        box-sizing: border-box;
        overflow: visible;
    }

    .home #slider4 .staff_cover > p {
        line-height: 1.55;
        letter-spacing: 0.02em;
        margin: 0;
    }

    .home #slider4 .staff_cover > p > a.th-read-more:last-of-type {
        margin-top: 10px !important;
        display: inline-block;
    }
}

@media (max-width: 1199px) {
    .home .vc_col-sm-5,
    .home .vc_col-sm-7,
    .home .vc_col-sm-8,
    .home .vc_col-sm-4 {
        width: 100%;
        float: none;
    }

    /* Theme zeros column padding; content gutters come from section.extra-gap. */
    .home .myfirstrow,
    .home .myserviceblock,
    .home .mycustomtab,
    .home .mycustomtestimonial,
    .home .mycustomaffiliation {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .home .myfirstrow .wpb_wrapper h2,
    .home .myfirstrow .wpb_wrapper > p {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Match the Company Profile / Corporate Values tab card layout. */
    .home .myfirstrow .wpb_text_column {
        background: #fff;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 1px 1px #d8dadb, 2px 2px #d8dadb;
    }

    .home .myfirstrow .wpb_wrapper {
        padding: 14px 20px;
        background: #f8f8f8;
        box-sizing: border-box;
    }

    .home .myfirstrow .wpb_wrapper > p:first-child {
        margin: 0 0 12px;
        padding: 0 !important;
    }

    .home .myfirstrow .wpb_wrapper img {
        float: none !important;
        display: block;
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        margin: 0 !important;
    }

    .home .myfirstrow .wpb_wrapper h2 {
        margin: 0 0 10px;
        padding: 0 !important;
        font-size: 1.15em;
        line-height: 1.3;
        text-align: left;
    }

    .home .myfirstrow .wpb_wrapper > p:not(:first-child) {
        margin: 0 0 12px;
        text-align: justify;
    }

    .home .myfirstrow .wpb_wrapper .th-read-more {
        margin: 0 !important;
        display: inline-block;
    }

    /* Match the Welcome block card layout for Our Services on tablet/mobile. */
    .home .myserviceblock {
        background: #fff;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 1px 1px #d8dadb, 2px 2px #d8dadb;
        padding: 0 !important;
    }

    .home .myserviceblock > .wpb_text_column {
        background: transparent;
        box-shadow: none;
    }

    .home .myserviceblock > .wpb_text_column > .wpb_wrapper {
        padding: 14px 20px 0;
        background: #f8f8f8;
        box-sizing: border-box;
    }

    .home .myserviceblock #slider4 {
        padding: 0 20px 14px;
        background: #f8f8f8;
        box-sizing: border-box;
    }

    .home .myserviceblock .col-title {
        float: none;
        width: 100%;
        margin: 0 0 10px;
    }

    .home .myserviceblock .col-title h2 {
        float: none;
        margin: 0 0 10px;
        padding: 0 !important;
        font-size: 1.15em;
        line-height: 1.3;
        text-align: left;
    }

    .home .myserviceblock .col-title h2:after {
        display: none;
    }

    .home .myserviceblock > .wpb_text_column > .wpb_wrapper > p {
        margin: 0 0 12px;
        padding: 0 !important;
        text-align: justify;
    }

    .home .myserviceblock .col-title,
    .home .myserviceblock > .wpb_text_column > .wpb_wrapper > p,
    .home .mycustomtab .vc_tta-panel-body .wpb_wrapper,
    .home .mycustomaffiliation .col-title,
    .home .mycustomaffiliation .partnerslogo {
        padding-left: 0;
        padding-right: 0;
    }

    .home .row-fluid.sales {
        overflow: visible;
        display: flow-root;
    }

    .home .row-fluid.sales .mycustomtab,
    .home .row-fluid.sales .mycustomtestimonial {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box;
    }

    .home .mycustomtestimonial {
        margin-top: 16px;
        padding: 15px !important;
        background: #fff;
        height: auto !important;
        min-height: 0 !important;
        display: flow-root;
        overflow: visible;
    }

    .home .mycustomtestimonial .wpb_text_column,
    .home .mycustomtestimonial .wpb_wrapper {
        height: auto !important;
        overflow: visible;
        display: flow-root;
    }

    .home .mycustomtestimonial h2 {
        font-size: 15px;
        line-height: 1.35;
        padding-bottom: 12px;
        text-align: left;
        float: none !important;
    }

    .home .mycustomtestimonial ul {
        float: none !important;
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100% !important;
    }

    .home .mycustomtestimonial li {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 10px;
        padding: 0;
        text-align: left;
        font-size: 14px;
        line-height: 1.3;
    }

    .home .mycustomtestimonial li img.alignleft {
        float: none !important;
        display: block !important;
        width: 14px !important;
        height: auto !important;
        margin: 0 !important;
        flex: 0 0 14px;
    }

    .home .mycustomaffiliation {
        display: flow-root;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        float: none !important;
        margin: 0 0 20px !important;
        padding: 0 !important;
        background: transparent;
        box-shadow: none;
    }

    .home .mycustomaffiliation > .wpb_text_column {
        float: none !important;
        width: 100% !important;
        background: #fff;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 1px 1px #d8dadb, 2px 2px #d8dadb;
    }

    .home .mycustomaffiliation > .wpb_text_column > .wpb_wrapper {
        padding: 14px 20px;
        background: #f8f8f8;
        box-sizing: border-box;
    }

    .home .mycustomaffiliation .col-title {
        float: none;
        width: 100%;
        margin: 0 0 14px;
    }

    .home .mycustomaffiliation .col-title h2 {
        float: none;
        margin: 0;
        padding: 0 !important;
        font-size: 1.15em;
        line-height: 1.3;
    }

    .home .mycustomaffiliation .col-title h2:after {
        display: none;
    }

    .home .mycustomaffiliation .partnerslogo {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 14px 16px;
        width: 100%;
    }

    .home .mycustomaffiliation .partnerslogo a {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 calc(25% - 12px);
        max-width: calc(25% - 12px);
        min-height: 68px;
        margin: 0 !important;
        padding: 8px 6px;
        box-sizing: border-box;
    }

    .home .mycustomaffiliation .partnerslogo img {
        float: none !important;
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 56px !important;
        height: auto !important;
        margin: 0 !important;
        object-fit: contain;
    }

    .home .mycustomaffiliation .partnerslogo a:hover img {
        transform: none;
    }
}

@media (max-width: 767px) {
    .home .mycustomaffiliation .partnerslogo a {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        min-height: 72px;
    }

    .home .mycustomaffiliation .partnerslogo img {
        max-height: 52px !important;
    }
}

/* Desktop / large screens: authorized reps card beside company tabs. */
@media (min-width: 1200px) {
    .home .row-fluid.sales {
        display: flex;
        align-items: stretch;
        overflow: visible;
    }

    .home .row-fluid.sales::before,
    .home .row-fluid.sales::after {
        display: none;
    }

    .home .row-fluid.sales .mycustomtab,
    .home .row-fluid.sales .mycustomtestimonial {
        float: none;
    }

    .home .row-fluid.sales .mycustomtab {
        flex: 0 0 66.6667%;
        max-width: 66.6667%;
    }

    .home .row-fluid.sales .mycustomtestimonial {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        background: #fff;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 1px 1px #d8dadb, 2px 2px #d8dadb;
        box-sizing: border-box;
    }

    .home .mycustomtestimonial .wpb_text_column,
    .home .mycustomtestimonial .wpb_wrapper {
        float: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible;
    }

    .home .mycustomtestimonial .wpb_text_column {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .home .mycustomtestimonial .wpb_wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 14px 16px;
        background: #f8f8f8;
        box-sizing: border-box;
    }

    .home .mycustomtestimonial h2 {
        float: none !important;
        margin: 0 0 12px;
        padding: 0 0 12px !important;
        font-size: 14px;
        line-height: 1.35;
        text-align: left;
    }

    .home .mycustomtestimonial ul {
        float: none !important;
        background: transparent !important;
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100% !important;
        flex: 1;
    }

    .home .mycustomtestimonial li {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 10px;
        padding: 0;
        font-size: 14px;
        line-height: 1.3;
        text-align: left;
    }

    .home .mycustomtestimonial li:last-child {
        margin-bottom: 0;
    }

    .home .mycustomtestimonial li img.alignleft {
        float: none !important;
        display: block !important;
        width: 14px !important;
        height: auto !important;
        margin: 0 !important;
        flex: 0 0 14px;
    }
}
