/* ======= Testimonials Video Section - Core Utility Classes ======= */

:root {
    --label-color-1: #111827;
    --label-color-2: #fff;
    --label-color-3: #194cff;
    --label-color-7: #4b5563;
    --label-color-17: #1f2937;
    --label-color-24: #fc9c03;
}

/* Layout & Display */
.d-flex {
    display: flex !important;
}

.d-inline-block {
    display: inline-block !important;
}

.d-none {
    display: none !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.overflow-x-auto {
    overflow-x: auto !important;
}

/* Positioning */
.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

.top-0 {
    top: 0 !important;
}

/* Flexbox Alignment */
.align-items-end {
    align-items: flex-end !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* Spacing */
.mb-3 {
    margin-bottom: 1rem !important;
}

.ms-1 {
    margin-left: .25rem !important;
}

.ms-2 {
    margin-left: .5rem !important;
}

.p-0 {
    padding: 0 !important;
}

.px-2 {
    padding-right: .5rem !important;
    padding-left: .5rem !important;
}

.py-1 {
    padding-top: .25rem !important;
    padding-bottom: .25rem !important;
}

.p-15 {
    padding: .9375rem;
}

.px-16 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.pl-16 {
    padding-left: 1rem;
}

.pr-22 {
    padding-right: 1.375rem;
}

.pb-10 {
    padding-bottom: .625rem;
}

.pb-44 {
    padding-bottom: 2.75rem;
}

.pt-64 {
    padding-top: 4rem;
}

.mt-20 {
    margin-top: 1.25rem;
}

.w-100 {
    width: 100% !important;
}

.w-full {
    width: 100%;
}

.w-size-56 {
    width: 3.5rem;
}

.h-size-56 {
    height: 3.5rem;
}

.max-h-20 {
    max-height: 1.25rem !important;
}

.max-h-454 {
    max-height: 28.375rem !important;
}

.min-h-454 {
    min-height: 30rem !important;
}

.max-w-1167 {
    max-width: 72.9375rem;
}

/* Text Styling */
.text-center {
    text-align: center !important;
}

.text-nowrap {
    white-space: nowrap !important;
}

.text-color-1 {
    color: var(--label-color-1);
}

.text-color-2 {
    color: var(--label-color-2);
}

.text-color-7 {
    color: var(--label-color-7);
}

.text-color-17 {
    color: var(--label-color-17);
}

.fs-12 {
    font-size: .75rem;
}

.fs-16 {
    font-size: 1rem;
}

.fs-20 {
    font-size: 1.25rem;
}

.fs-32 {
    font-size: 2rem;
}

.fw-400 {
    font-weight: 400;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.lh-18 {
    line-height: 1.125rem;
}

.lh-40 {
    line-height: 2.5rem;
}

/* Border & Radius */
.border-0 {
    border: 0 !important;
}

.rounded-1 {
    border-radius: .0625rem;
}

.rounded-16 {
    border-radius: 1rem;
}

.rounded-circle {
    border-radius: 50% !important;
}

/* Background */
.bg-color-24 {
    background-color: #00CF7B;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background-color: #ebebeb;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background: rgba(0, 0, 0, .2);
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

/* Grid & Layout */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1*var(--bs-gutter-y));
    margin-right: calc(-.5*var(--bs-gutter-x));
    margin-left: calc(-.5*var(--bs-gutter-x));
}

.row>* {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x)*.5);
    padding-left: calc(var(--bs-gutter-x)*.5);
    margin-top: var(--bs-gutter-y);
}

@media (min-width:992px) {
    .col-lg-8 {
        flex: 0 0 auto;
        width: 66.66666667%;
    }

    .d-lg-inline-block {
        display: inline-block !important;
    }

    .d-lg-flex {
        display: flex !important;
    }

    .mb-lg-0 {
        margin-bottom: 0 !important;
    }

    .text-lg-start {
        text-align: left !important;
    }

    .fw-lg-600 {
        font-weight: 600;
    }

    .p-lg-20 {
        padding: 1.25rem;
    }

    .mt-lg-50 {
        margin-top: 3.125rem;
    }

    .pb-lg-80 {
        padding-bottom: 5rem;
    }

    .pt-lg-160 {
        padding-top: 10rem;
    }
}

@media (min-width:1200px) {
    .px-xl-0 {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .pl-xl-0 {
        padding-left: 0;
    }

    .pr-xl-0 {
        padding-right: 0;
    }

    .grid-gap-xl-20 {
        gap: 1.25rem;
    }
}

/* ======= Testimonials Video Section - Specific Styles ======= */

.home-st-reviews .testimonials-block {
    background: url(https://www.wscubetech.com/images/home-images/testimonials-block-bg.svg) 50%;
    background-repeat: repeat-x;
}

.home-st-reviews .testimonials-block .review-text-content {
    background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0, transparent);
    overflow: hidden;
}

.home-st-reviews .testimonials-block .review-text-content .btn-play-review {
    right: 20px;
    top: 20px;
    transition: width .2s, background-color .2s ease;
}

.home-st-reviews .testimonials-block .review-text-content .btn-play-review span {
    opacity: 0;
    width: 0;
    transition: width .2s, opacity .2s ease;
    margin-left: 0;
}

.home-st-reviews .testimonials-block .review-text-content .btn-play-review:hover {
    width: 100px;
    border-radius: 35px !important;
    color: var(--label-color-3) !important;
}

.home-st-reviews .testimonials-block .review-text-content .btn-play-review:hover span {
    opacity: 1;
    width: 35px;
    display: inline !important;
    margin-left: .5rem;
}

.home-st-reviews .testimonials-block .review-text-content .btn-play-review:focus {
    outline: 2px solid var(--label-color-3);
    outline-offset: 2px;
}

.home-st-reviews .testimonials-block .review-text-content .btn-play-review:active {
    transform: scale(0.95);
}

.home-page-slider-wrapper .review-slide {
    width: 151px;
    transition: width .4s linear;
    background-position: top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

.home-page-slider-wrapper .review-slide.active-slider {
    width: 270px;
}

.z-index-99 {
    z-index: 99;
}

.ts-auto {
    margin-right: 127.2px !important;
    margin-left: 127.2px !important;
}

/* Responsive Design */
@media (max-width:1499px) {
    .home-st-reviews h2 {
        font-size: 32px;
        line-height: 48px;
    }
}

@media (max-width:991px) {
    .home-st-reviews h2 {
        font-size: 32px;
        line-height: 45px;
        text-align: center;
    }

    .home-st-reviews p {
        font-size: 16px;
        line-height: 24px;
    }

    .home-page-slider-wrapper .review-slide {
        width: 270px;
        transition: .4s linear;
        background-position: 50% !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }

    .home-page-slider-wrapper .review-slide.active-slider {
        width: 270px;
    }
}

/* Fix: make testimonial slider safe for tablet / small desktop (<=991px)
   - reduce fixed min/max height coming from utility classes
   - avoid slider z-index overlapping footer/menu
   - constrain video positioning so it doesn't escape its slide
*/
@media (max-width: 991px) {
    .home-st-reviews .min-h-454,
    .home-st-reviews .max-h-454,
    .home-st-reviews .home-page-slider-wrapper .review-slide {
        min-height: 454px !important;
        max-height: 260px !important;
    }

    .home-st-reviews .d-flex.grid-gap-xl-20.position-relative,
    .home-st-reviews .home-page-slider-wrapper {
        z-index: 1 !important;
    }

    .home-st-reviews .testimonial-video {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .home-st-reviews .slider-item-wrapper {
        min-width: 160px !important;
        max-width: 80vw !important;
    }

    /* ensure the text overlay doesn't push layout beyond slide */
    .home-st-reviews .review-text-content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px !important;
        box-sizing: border-box;
        z-index: 5;
    }

    /* Remove large side margins on mobile introduced by .ts-auto */
    .home-st-reviews .ts-auto {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
        max-width: 100% !important;
    }

    /* Use left-aligned horizontal scrolling on mobile so items are fully visible */
    .home-st-reviews .d-flex.grid-gap-xl-20.position-relative {
        justify-content: flex-start;
        gap: 12px !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }

    /* Keep each slide from shrinking and ensure a sensible min-width so items
       are shown fully instead of partially cut off. Remove per-item right
       margin since gap provides spacing. */
    .home-st-reviews .slider-item-wrapper {
        flex: 0 0 auto !important;
        min-width: 220px !important;
        max-width: 80vw !important;
        margin: 0 !important;
    }
}

