.service-swiper-clients .slide-wrapper {
    color: inherit;
    overflow: hidden;
    position: relative;
    display: block;
    padding-top: 80vh;
    /* fallback ratio for small screens */
}

.swiper-wrapper-relative {
    position: relative;
    padding-bottom: 3rem;
    /* creates space for dots */
}

.service-swiper-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    text-align: center;
    pointer-events: auto;
}

/* Bullet styling */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 6px;
    background: #b89d60;
    opacity: 0.4;
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* Responsive aspect ratio */
@media (min-width: 768px) {
    .service-swiper-clients .slide-wrapper {
        padding-top: 60vh;
    }
}

@media (min-width: 992px) {
    .service-swiper-clients .slide-wrapper {
        padding-top: 80vh;
    }
}

@media (min-width: 1200px) {
    .service-swiper-clients .slide-wrapper {
        padding-top: 60vh;
    }
}

@media (min-width: 1400px) {
    .service-swiper-clients .slide-wrapper {
        padding-top: 80vh;
    }
}

/* Image setup */
.service-swiper-clients img.full-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.45s cubic-bezier(0.61, 1, 0.88, 1);
    z-index: 1;
}

/* Hover effect */
.service-swiper-clients .slide-wrapper:hover img.full-bg-img {
    transform: scale(1.02);
}

/* Overlay text */
.service-swiper-clients .bottom-absolute {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: white;
    padding: 2rem;
    text-align: center;
}

.custom-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #CAA260;
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    z-index: 1055;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.custom-close-btn:hover {
    background-color: #a6864c;
}

.modal-gold-line {
    height: 1px;
    width: 100%;
    max-width: 600px;
    background-color: #b89d60;
}

.clients-service-modal .modal-dialog.modal-xl {
    max-width: 1400px;
    width: 95%;
}

@media (min-width: 1440px) {
    .clients-service-modal .modal-dialog.modal-xl {
        max-width: 80% !important;
        width: 80vw !important;
    }
}

.clients-service-modal .modal-content {
    border-radius: 0;
    border: none;
    overflow: hidden;
    display: block;
    height: auto;
    max-height: 90vh;
    overflow: visible !important;
}

/* Left Image */
.clients-service-modal .modal-image img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/* Scrollbar for text area */
.clients-service-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.clients-service-modal .modal-body::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.bottom-absolute {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.arrow-icon svg {
    width: 20px;
    height: 20px;
    stroke: #000;
}

.clients-service-modal .modal-footer .publication-navigation,
.clients-service-modal .modal-footer .clients-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end !important;
    width: 100%;
    padding: 5px;
}

.clients-service-modal .arrow-prev,
.clients-service-modal .arrow-next,
.clients-service-modal .clients-arrow-prev,
.clients-service-modal .clients-arrow-next {
    cursor: pointer;
    display: inline-block;
}

.clients-service-modal .arrow-prev:hover,
.clients-service-modal .arrow-next:hover,
.clients-service-modal .clients-arrow-prev:hover,
.clients-service-modal .clients-arrow-next:hover {
    opacity: 0.8;
}

.clients-service-modal .modal-footer .arrow-svg {
    width: 20px;
    position: relative;
    top: 0.6rem;
}

.clients-service-modal .modal-body {
    display: grid;
    grid-template-columns: 1fr;
}

.clients-service-modal .modal-dialog {
    max-width: 100%;
}

.clients-service-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clients-service-modal .modal-content {
    border-radius: unset;
}

.clients-service-modal .modal-footer .arrow-svg {
    width: 20px;
    top: .6rem;
}

.clickable-box {
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Ensure text block starts at top (not vertically centered) */
.clients-service-modal .d-flex.flex-column.justify-content-center.flex-grow-1 {
    justify-content: flex-start !important;
}

@media(min-width: 576px) {
    .clients-service-modal .modal-dialog {
        max-width: 93%;
    }
}

@media(min-width: 992px) {
    .clients-service-modal .modal-dialog {
        max-width: 83%;
    }
}

@media(min-width: 1200px) {
    .clients-service-modal .modal-dialog {
        max-width: 73%;
    }
}

@media(min-width: 1400px) {
    .clients-service-modal .modal-dialog {
        max-width: 95%;
    }
}

@media(min-width: 1700px) {
    .clients-service-modal .modal-dialog {
        max-width: 53%;
    }
}

/* Ensure image and content columns stay equal height */
@media (min-width: 768px) {
    .clients-service-modal .modal-content>.d-flex {
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        height: 100%;
    }

    .clients-service-modal .modal-image,
    .clients-service-modal .modal-body {
        width: auto !important;
        flex: 1 1 0;
    }

    .clients-service-modal .modal-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    .clients-service-modal .modal-dialog {
        max-width: 95vw;
        margin: 1rem auto;
        height: 75vh;
    }

    .clients-service-modal .modal-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .clients-service-modal .modal-body {
        padding: 1.5rem 1rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .clients-service-modal .text-content {
        overflow-y: auto;
        flex-grow: 1;
        margin-bottom: 1.5rem;
        padding-right: 0.5rem;
    }

    .clients-service-modal .text-content::-webkit-scrollbar {
        width: 6px;
    }

    .clients-service-modal .text-content::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 4px;
    }

    .clients-service-modal .text-content p {
        font-size: 16px !important;
        line-height: 1.6;
    }

    .clients-service-modal .d-flex.flex-row.gap-3 {
        flex-direction: row !important;
        gap: 0.75rem;
        justify-content: space-between;
    }

    .clients-service-modal .cta-button {
        font-size: 11px;
        padding: 0.6rem;
        width: 48%;
        text-align: center;
    }

    .clients-service-modal .modal-title {
        font-size: 17px;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
}

/* Ensure spacing below gold line on tablets (768–991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .clients-service-modal .modal-body {
        padding-top: 1.25rem;
    }

    .clients-service-modal .modal-gold-line {
        display: block;
        margin-bottom: 1rem;
    }

    .clients-service-modal .text-content {
        margin-top: 0;
        padding-top: 0.5rem;
    }

    .clients-service-modal .text-content p:first-child {
        margin-top: 0;
    }
}

/* Tight layout for small laptops/tablets: 992px–1023px (no inner scrollbar) */
@media (min-width: 992px) and (max-width: 1023px) {
    .clients-service-modal .modal-content {
        height: 83vh;
        max-height: 83vh;
    }

    .clients-service-modal .modal-body {
        padding: 1.25rem 1.75rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1rem;
    }

    .clients-service-modal .text-content {
        padding-top: .5rem;
    }

    .clients-service-modal .text-content {
        overflow: visible;
        flex-grow: 1;
        margin-bottom: 1.25rem;
        padding-right: 0;
        max-height: none;
    }

    .clients-service-modal .text-content p {
        font-size: 13px !important;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }

    .clients-service-modal .modal-title {
        font-size: 18px;
        line-height: 1.25;
        margin-bottom: 0.8rem;
    }

    .clients-service-modal .d-flex.flex-row.gap-3 {
        flex-direction: row !important;
        gap: 0.9rem;
        margin-top: auto;
        padding-top: 0.8rem;
        justify-content: space-between;
    }

    .clients-service-modal .cta-button {
        font-size: 11px;
        padding: 0.6rem 1rem;
        width: 48%;
        text-align: center;
        margin-bottom: 0;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1rem;
    }
}

/* Responsive fixes for clients popup at 1024px and 1440px - smaller text, no scrolling */
@media (min-width: 1024px) and (max-width: 1199px) {
    .clients-service-modal .modal-content {
        height: 85vh;
        max-height: 85vh;
    }

    .clients-service-modal .modal-body {
        padding: 1.5rem 2rem 1.5rem 2rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1rem;
    }

    .clients-service-modal .text-content {
        padding-top: .5rem;
    }

    .clients-service-modal .text-content {
        overflow: visible;
        flex: 0 0 auto;
        margin-bottom: 1.5rem;
        padding-right: 0;
        max-height: none;
    }

    .clients-service-modal .text-content p {
        font-size: 13px !important;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }

    .clients-service-modal .d-flex.flex-row.gap-3 {
        flex-direction: row !important;
        gap: 1rem;
        margin-top: auto;
        padding-top: 0.8rem;
        justify-content: space-between;
    }

    .clients-service-modal .cta-button {
        font-size: 11px;
        padding: 0.6rem 1rem;
        width: 48%;
        text-align: center;
        margin-bottom: 0;
    }

    .clients-service-modal .modal-title {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1rem;
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    .clients-service-modal .modal-content {
        height: 88vh;
        max-height: 88vh;
    }

    .clients-service-modal .modal-body {
        padding: 2rem 2.5rem 2rem 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1rem;
    }

    .clients-service-modal .text-content {
        padding-top: .5rem;
    }

    .clients-service-modal .text-content {
        overflow: visible;
        flex: 0 0 auto;
        margin-bottom: 2rem;
        padding-right: 0;
        max-height: none;
    }

    .clients-service-modal .text-content p {
        font-size: 14px !important;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .clients-service-modal .d-flex.flex-row.gap-3 {
        flex-direction: row !important;
        gap: 1.2rem;
        margin-top: auto;
        padding-top: 1rem;
        justify-content: space-between;
    }

    .clients-service-modal .cta-button {
        font-size: 14px;
        padding: 0.8rem 1.5rem;
        width: 48%;
        text-align: center;
        margin-bottom: 0;
    }

    .clients-service-modal .modal-title {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 1440px) {
    .clients-service-modal .modal-content {
        height: 90vh;
        max-height: 90vh;
        width: 90vw;
        max-width: 1600px;
    }

    .clients-service-modal .modal-body {
        padding: 2.5rem 3rem 2.5rem 3rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1.25rem;
    }

    .clients-service-modal .text-content {
        padding-top: .5rem;
    }

    .clients-service-modal .text-content {
        overflow: visible;
        flex: 0 0 auto;
        margin-bottom: 2.5rem;
        padding-right: 0;
        max-height: none;
        margin-top: 1rem;
    }

    .clients-service-modal .text-content p {
        font-size: 15px !important;
        line-height: 1.5;
        margin-bottom: 1.2rem;
    }

    .clients-service-modal .d-flex.flex-row.gap-3 {
        flex-direction: row !important;
        gap: 1.5rem;
        margin-top: auto;
        padding-top: 1.2rem;
        justify-content: space-between;
    }

    .clients-service-modal .cta-button {
        font-size: 14px;
        padding: 0.8rem 1.8rem;
        width: 48%;
        text-align: center;
        margin-bottom: 0;
    }

    .clients-service-modal .modal-title {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 1.2rem;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 2rem;
    }

    /* Ensure proper spacing between title, gold line, and text content */
    .clients-service-modal .modal-title {
        margin-bottom: 1rem;
    }

    .clients-service-modal .modal-gold-line {
        margin-bottom: 1.5rem;
    }

    /* Ensure text content wrapper has proper spacing */
    .clients-service-modal .d-flex.flex-column.justify-content-center.flex-grow-1 {
        margin-top: 0;
        padding-top: 0;
    }

    /* Prevent text from going above the gold line */
    .clients-service-modal .text-content {
        position: relative;
        z-index: 1;
    }
}

/* Specific 1440px optimization */
@media (min-width: 1440px) {
    .clients-service-modal .modal-dialog {
        max-width: 80% !important;
        width: 80vw !important;
    }

    .clients-service-modal .modal-content {
        width: 100% !important;
        max-width: 1600px !important;
    }

    .clients-service-modal .modal-image {
        width: 45% !important;
    }

    .clients-service-modal .modal-body {
        width: 55% !important;
        padding: 2.5rem 3.5rem;
    }

    .clients-service-modal .text-content {
        overflow: visible !important;
        max-height: none !important;
    }

    .clients-service-modal .text-content p {
        font-size: 15px !important;
        line-height: 1.5;
        margin-bottom: 1.2rem;
    }

    .clients-service-modal .cta-button {
        font-size: 14px;
        padding: 0.9rem 1.8rem;
        width: 48%;
    }
}

/* Additional responsive improvements for all screen sizes */
@media (min-width: 768px) {
    .clients-service-modal .modal-content {
        height: 85vh;
        max-height: 85vh;
    }

    .clients-service-modal .modal-body {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .clients-service-modal .text-content {
        overflow: visible;
        flex: 0 0 auto;
        min-height: 0;
        position: relative;
    }

    .clients-service-modal .d-flex.flex-column.flex-md-row.gap-3 {
        flex-shrink: 0;
        margin-top: auto;
    }
}

/* Ensure proper text content display */
.clients-service-modal .text-content {
    line-height: 1.6;
    word-wrap: break-word;
    hyphens: auto;
}

.clients-service-modal .text-content-wrapper {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.clients-service-modal .text-content p:last-child {
    margin-bottom: 0;
}

.clients-service-modal .text-content p {
    margin-bottom: 1rem;
}

/* Ensure buttons are always visible and properly spaced */
.clients-service-modal .d-flex.flex-row.gap-3 {
    background: white;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
    flex-shrink: 0;
}

/* Tablet layout - ensure image is visible */
@media (min-width: 768px) and (max-width: 991px) {
    .clients-service-modal .modal-content {
        height: 80vh;
        max-height: 80vh;
        flex-direction: row;
    }

    .clients-service-modal .modal-image {
        display: block !important;
        width: 40% !important;
    }

    .clients-service-modal .modal-body {
        width: 60% !important;
        padding: 2rem 2.5rem;
    }

    .clients-service-modal .text-content p {
        font-size: 14px !important;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }

    .clients-service-modal .cta-button {
        font-size: 10px;
        padding: 0.6rem 1rem;
        width: 48%;
    }
}

/* Slightly smaller body text on narrow tablets to keep it below the gold line */
@media (min-width: 768px) and (max-width: 820px) {
    .clients-service-modal .text-content p {
        font-size: 13px !important;
        line-height: 1.4;
    }
}

/* Ensure proper responsive behavior */
@media (max-width: 767px) {
    .clients-service-modal .modal-content {
        flex-direction: column;
    }

    .clients-service-modal .modal-image {
        display: none !important;
    }

    .clients-service-modal .modal-body {
        width: 100% !important;
    }
}

/* Ultra-wide screen optimization (2560px+) */
@media (min-width: 2560px) {
    .clients-service-modal .modal-dialog.modal-xl {
        max-width: 70% !important;
        width: 70vw !important;
        margin: 0 auto !important;
    }

    .clients-service-modal .modal-content {
        max-width: 1400px !important;
        margin: 0 auto !important;
    }

    .clients-service-modal .modal-image {
        width: 45% !important;
    }

    .clients-service-modal .modal-body {
        width: 55% !important;
        padding: 3rem 4rem;
    }
}

/* Large screen optimization (1920px - 2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .clients-service-modal .modal-dialog.modal-xl {
        max-width: 75% !important;
        width: 75vw !important;
    }

    .clients-service-modal .modal-content {
        max-width: 1500px !important;
    }
}



/* Testimonials text width to avoid overlapping arrows (Clients page) */
.testimonials-section .testimonialSwiper-inner-content .section-title {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1400px) {
    .testimonials-section .testimonialSwiper-inner-content .section-title {
        max-width: 1100px;
    }
}

/* Responsive font sizes for testimonials text (keep arrows unchanged) */
@media (max-width: 767.98px) {
    .testimonials-section .testimonialSwiper-inner-content .section-title {
        font-size: 22px;
        line-height: 1.4;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .testimonials-section .testimonialSwiper-inner-content .section-title {
        font-size: 26px;
        line-height: 1.35;
    }
}

@media (min-width: 1024px) and (max-width: 1439.98px) {
    .testimonials-section .testimonialSwiper-inner-content .section-title {
        font-size: 28px;
        line-height: 1.35;
    }
}

@media (min-width: 1440px) and (max-width: 1919.98px) {
    .testimonials-section .testimonialSwiper-inner-content .section-title {
        font-size: 32px;
        line-height: 1.35;
    }
}

/* Hide testimonial arrows on 768px–1439px; show outside this range */
@media (min-width: 768px) and (max-width: 1753.98px) {
    .testimonials-section .swiper--navigation {
        display: none !important;
    }
}

/* Mobile Modal Scrolling Improvements */
@media (max-width: 767.98px) {
    .clients-service-modal .modal-dialog {
        max-width: 95vw;
        margin: 0.5rem auto;
        height: 90vh;
        max-height: 90vh;
    }
    
    .clients-service-modal .modal-content {
        height: 90vh;
        max-height: 90vh;
        overflow: hidden;
    }
    
    .clients-service-modal .modal-body {
        width: 100% !important;
        height: 90vh;
        max-height: 90vh;
        padding: 1.5rem 1rem;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .clients-service-modal .modal-content-scrollable {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        padding-right: 0.5rem;
        max-height: calc(90vh - 200px);
        /* Smooth scrolling improvements */
        scroll-behavior: smooth;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        /* Prevent scroll chaining */
        overscroll-behavior-y: contain;
    }
    
    .clients-service-modal .text-content {
        padding-right: 0;
        /* Ensure smooth text rendering */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .clients-service-modal .text-content::-webkit-scrollbar {
        width: 6px;
    }
    
    .clients-service-modal .text-content::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 3px;
    }
    
    .clients-service-modal .text-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
}

/* Ensure smooth scrolling on all devices */
.clients-service-modal .modal-content-scrollable {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* Optimize touch scrolling for mobile */
@media (max-width: 767.98px) {
    .clients-service-modal .modal-content-scrollable {
        /* Touch scrolling optimizations */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior: contain;
        /* Prevent momentum scrolling issues */
        -webkit-overflow-scrolling: touch;
        /* Smooth momentum */
        -webkit-overflow-scrolling: auto;
    }
    
    /* Ensure proper touch target sizes */
    .clients-service-modal .text-content p {
        margin-bottom: 1rem;
        /* Prevent touch issues */
        touch-action: pan-y;
    }
}

/* Hide image on mobile for better content visibility */
@media (max-width: 767.98px) {
    .clients-service-modal .modal-image {
        display: none !important;
    }
}

/* Prevent external scrollbar on mobile devices */
@media (max-width: 767.98px) {
    .clients-service-modal {
        overflow: hidden !important;
    }
    
    .clients-service-modal .modal-dialog {
        overflow: hidden !important;
    }
    
    .clients-service-modal .modal-content {
        overflow: hidden !important;
    }
    
    .clients-service-modal .modal-body {
        overflow: hidden !important;
    }
    
    /* Ensure close button is inside modal on mobile */
    .clients-service-modal .custom-close-btn {
        top: 10px !important;
        right: 10px !important;
        position: absolute !important;
        z-index: 1060 !important;
    }
}

/* Fine-tune button font size for ~425px devices */
@media (max-width: 440px) {
    .clients-service-modal .cta-button {
        font-size: 10px;
        padding: 0.55rem;
    }
}

/* Even smaller phones (~375px) */
@media (max-width: 380px) {
    .clients-service-modal .cta-button {
        font-size: 8px;
        padding: 0.5rem;
    }
}