/* ------------------------------------------------------------
   5) TESTIMONIAL SECTION (carousel)
------------------------------------------------------------ */
.testimonial-section {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    background: #050038;
    padding: 0; 
    min-height: 645px;
}

/* Container */
.testimonial-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center; 
    background: url('https://joinworthdev.wpengine.com/wp-content/themes/joinworth/images/gradient Background.png') no-repeat center center;
    background-size: contain;
    min-height: 645px;
}

/* Heading */
.testimonial-heading {
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4rem;
    background: linear-gradient(90deg, #BC42B9 4%, #4BC7E8 96%);
    -webkit-background-clip: text;  
    -webkit-text-fill-color: transparent; 
}

/* Carousel Wrapper */
.testimonial-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonial Cards */
.testimonial-slider {
    display: flex;
    overflow: hidden;
    width: 900px;
    justify-content: center;
    align-items: center;
}

.testimonial-card {
    display: none;
    background: linear-gradient(90deg, rgba(105, 102, 136, 0.2) 0%, rgba(5, 0, 56, 0.2) 100%) !important;
    border-radius: 1rem;
    padding: 2rem 3rem;
    color: #fff;
    max-width: 900px;
    margin: 0 auto;
    height: 352px;
}

.testimonial-card.active {
    display: block;
}

/* Quote Text */
.testimonial-text {
    font-size: 24px;
    line-height: 1.5;
    font-style: italic;
    margin-top: 2em;
    margin-bottom: 2rem;
}

/* Author Info */
.testimonial-author-block {
    position: absolute;
    bottom: 3.5rem; 
    left: 1rem;     
    width: 200px;
    color: #fff;
    text-align: left;
    margin-left: 16%;
}

.testimonial-author-block::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #bfa7ff;
}

.testimonial-author {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.testimonial-title {
    font-size: 1rem;
    color: #bfa7ff;
}

/* Company Logo */
.testimonial-logo {
    position: absolute;
    bottom: 4.5rem;
    margin-left: 20%;
    width: 150px;
}

/* Arrow Buttons */
.arrow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ff6fbc;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 28px;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease;
}

.arrow-button:hover {
    background-color: #ff50ab;
}

.arrow-button.left-arrow {
    left: 5rem;
}

.arrow-button.right-arrow {
    right: 5rem;
}

/* Responsive */
/* 📱 Mobile Optimizations */
@media (max-width: 768px) {
    .testimonial-container {
        padding: 8rem 1.5rem; /* Adjust padding */
        min-height: auto;
        padding-top: 0;
    }

    .testimonial-heading {
        font-size: 32px; /* Reduce heading size */
        margin-bottom: 2rem;
    }

    .testimonial-slider {
        width: 100%;
        overflow: hidden;
    }

    .testimonial-card {
        width: 90%;
        padding: 1.5rem;
        height: auto; /* Allow dynamic height */
        font-size: 18px;
        margin: 0 auto;
    }

    .testimonial-text {
        font-size: 16px; /* Adjust font size */
        line-height: 1.5;
    }

    .testimonial-author-block {
        position: relative;
        text-align: center; /* Center author on mobile */
        margin-left: 0;
        width: 100%;
        margin-top: 40%;
    }

    .testimonial-author-block::before {
        display: none; /* Hide vertical line for better spacing */
    }

    .testimonial-author {
        margin-right: 20px !important;
        padding-top: 50px;
    }
    .testimonial-title {
        margin-right: 20px !important;
    }

    .testimonial-logo {
        position: relative;
        bottom: 0;
        margin: 1rem auto;
        width: 120px; /* Reduce logo size */
        margin-right: 1px;
    }

    .arrow-button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 110%; /* Move below */
        transform: translateX(-50%);
    }

    .arrow-button.left-arrow {
        left: 35%;
    }

    .arrow-button.right-arrow {
        right: 25%;
    }
}

/* 📱📲 Mobile Horizontal & iPad-Friendly Layout */
@media (max-width: 1024px) {
    .testimonial-container {
        padding: 6rem 2rem;
        min-height: auto;
    }

    .testimonial-heading {
        font-size: 36px;
        margin-bottom: 3rem;
    }

    .testimonial-slider {
        width: 100%;
    }

    .testimonial-card {
        width: 85%;
        padding: 2rem;
        height: auto;
        font-size: 20px;
    }

    .testimonial-text {
        font-size: 18px;
        line-height: 1.6;
    }

    .testimonial-author {
        margin-right: 35%;
    }

    .testimonial-title {
        margin-right: 35%;
    }

    .testimonial-author-block {
        position: relative;
        text-align: center;
        width: 100%;
        margin-top: 20%;
    }

    .testimonial-author-block::before {
        display: none;
    }

    .testimonial-logo {
        position: relative;
        bottom: 0;
        margin: 1rem auto;
        width: 130px;
    }

    .arrow-button {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        top: 105%;
        transform: translateX(-50%);
    }

    .arrow-button.left-arrow {
        left: 30%;
    }

    .arrow-button.right-arrow {
        right: 20%;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .testimonial-container {
        padding: 4rem 2rem;
    }

    .testimonial-heading {
        font-size: 32px;
        margin-bottom: 2.5rem;
    }

    .testimonial-slider {
        width: 100%;
    }

    .testimonial-card {
        width: 90%;
        padding: 1.8rem;
        font-size: 18px;
    }

    .testimonial-text {
        font-size: 16px;
        line-height: 1.5;
    }

    .testimonial-author-block {
        position: relative;
        text-align: center;
        width: 100%;
        margin-top: 15%;
    }

    .testimonial-logo {
        width: 110px;
    }

    .arrow-button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 108%;
    }

    .arrow-button.left-arrow {
        left: 38%;
    }

    .arrow-button.right-arrow {
        right: 22%;
    }
}
