/* Fix for horizontal scroll caused by 100vw breakout */
body {
    overflow-x: hidden;
}

.avidpay-carousel-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit !important;
}

.avidpay-carousel-container {
    font-family: Poppins, Arial, "sans-serif" !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 140px;
    /* Increased top/bottom padding */
    overflow: hidden;
    /* Breakout to full screen width */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: linear-gradient(245deg, #10082f 30%, #01195d 60%, #00a5c3 100%, #2a6671 100%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

.avidpay-carousel-container .section {
    max-width: 1200px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    max-height: 1040px;
    margin: 0 auto;
    align-items: center;
    /* Ensure child flex items are centered */
}

.avidpay-carousel-container .section h2 {
    font-weight: 600;
    color: #fff;
    margin-bottom: 18px;
    font-size: clamp(2.75rem, 2.125rem + 2vw, 3.25rem) !important;
}

.avidpay-carousel-container .section>p {
    color: #ffffff;
    line-height: 1.6;
    max-width: 760px;
    font-weight: 300;
    margin: 0 auto clamp(20px, 4vh, 35px);
    font-size: clamp(1rem, 0.84375rem + 0.5vw, 1.125rem);
}

.avidpay-carousel-container .why-label {
    color: #fff;
    font-weight: 600;
    margin-top: clamp(10px, 3vh, 25px);
    margin-bottom: clamp(30px, 5vh, 45px);
    /* Increased bottom margin */
    font-size: clamp(1.125rem, 0.96875rem + 0.5vw, 1.25rem);
    text-align: center;
    width: 100%;
}

/* Carousel */
.avidpay-carousel-container .carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(15px, 3vh, 32px);
    height: clamp(350px, 55vh, 480px);
    flex-shrink: 0;
    width: 100%;
}

.avidpay-carousel-container .apc-track {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.avidpay-carousel-container .apc-card {
    position: absolute;
    left: 50%;
    top: 50%;
    border: none;
    height: inherit;
    background: linear-gradient(180deg, #e0faff 0%, #b8f0ff 100%);
    border-radius: 20px;
    padding: 30px 25px;
    /* Increased padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center contents */
    will-change: transform, opacity, width;
    transition:
        transform 0.6s cubic-bezier(0.34, 1.26, 0.64, 1),
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.6s cubic-bezier(0.34, 1.26, 0.64, 1),
        filter 0.6s ease,
        box-shadow 0.6s ease !important;
    cursor: pointer;
    overflow: hidden;
}

.avidpay-carousel-container .apc-card img {
    object-fit: contain;
    padding: 10px;
    flex-shrink: 0;
    transform: scale(1.2);
    height: 70%;
    /* Reduced to give more space */
    margin: 10px auto;
    overflow: hidden;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
    /* Added image shadow */
}

/* Active */
.avidpay-carousel-container .apc-card.active {
    width: min(380px, 85vw);
    height: inherit;
    backdrop-filter: blur(16px);
    z-index: 3;
    transform: translate(-50%, -50%) scale(1) translateZ(0px) !important;
    opacity: 1 !important;
    overflow: hidden;
    filter: blur(0px) brightness(1) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

/* Left side */
.avidpay-carousel-container .apc-card.prev {
    width: min(320px, 75vw);
    backdrop-filter: blur(8px);
    z-index: 2;
    transform: translate(calc(-50% - clamp(160px, 35vw, 260px)), -50%) scale(0.85) translateZ(-60px) !important;
    opacity: 0.65 !important;
    filter: blur(0.5px) brightness(0.85) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

/* Right side */
.avidpay-carousel-container .apc-card.next {
    width: min(320px, 75vw);
    backdrop-filter: blur(8px);
    z-index: 2;
    transform: translate(calc(-50% + clamp(160px, 35vw, 260px)), -50%) scale(0.85) translateZ(-60px) !important;
    opacity: 0.65 !important;
    filter: blur(0.5px) brightness(0.85) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

/* Hidden (far left/right) */
.avidpay-carousel-container .apc-card.hidden-left {
    width: min(260px, 65vw);
    background: rgba(180, 210, 240, 0.07);
    z-index: 1;
    transform: translate(calc(-50% - clamp(280px, 46vw, 380px)), -50%) scale(0.75) translateZ(-120px) !important;
    opacity: 0 !important;
    filter: blur(2px) brightness(0.6) !important;
    pointer-events: none;
}

.avidpay-carousel-container .apc-card.hidden-right {
    width: min(260px, 65vw);
    background: rgba(180, 210, 240, 0.07);
    z-index: 1;
    transform: translate(calc(-50% + clamp(280px, 46vw, 380px)), -50%) scale(0.75) translateZ(-120px) !important;
    opacity: 0 !important;
    filter: blur(2px) brightness(0.6) !important;
    pointer-events: none;
}

.avidpay-carousel-container .card-caption {
    color: #0A2E57;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    padding: 15px 10px 10px;
    /* Adjusted padding */
    flex-grow: 1;
    display: flex;
    align-items: center;
    /* Centered vertically */
    justify-content: center;
    margin: 20px 0 0;
    /* Increased top margin for spacing */
    font-size: clamp(0.875rem, 0.71875rem + 0.5vw, 1rem);
}

/* Nav buttons */
.avidpay-carousel-container .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100; /* Higher z-index */
    background: rgba(255, 255, 255, 0.1); /* Subtle background */
    backdrop-filter: blur(4px); /* Glassmorphism */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    padding: 0;
    transition: all 0.35s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.avidpay-carousel-container .nav-btn svg {
    width: 32px;
    height: auto;
    opacity: 1; /* Full opacity */
    stroke-width: 2.5px; /* Thicker stroke for better visibility */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.avidpay-carousel-container .nav-btn:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

.avidpay-carousel-container .nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.avidpay-carousel-container .nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.avidpay-carousel-container .nav-btn.apc-left {
    left: 50px; /* Move slightly inward from very edge */
}

.avidpay-carousel-container .nav-btn.apc-right {
    right: 50px;
}

/* Hide nav arrows on very small screens, use swipe instead */
@media (max-width: 600px) {
    .avidpay-carousel-container .nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .avidpay-carousel-container .nav-btn svg {
        width: 24px;
    }

    .avidpay-carousel-container .carousel-wrapper {
        height: 380px;
    }

    .avidpay-carousel-container .apc-card.prev {
        transform: translate(calc(-50% - 130px), -50%) scale(0.85) translateZ(-60px) !important;
    }

    .avidpay-carousel-container .apc-card.next {
        transform: translate(calc(-50% + 130px), -50%) scale(0.85) translateZ(-60px) !important;
    }
}

/* Dots */
.avidpay-carousel-container .dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.avidpay-carousel-container .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.35s, transform 0.35s;
}

.avidpay-carousel-container .dot.active {
    background: #fff;
    transform: scale(1.25);
}

.avidpay-carousel-container .quote {
    color: #fff;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin: 0 auto 12px !important;
    /* Increased bottom margin */
    max-width: 600px;
    /* Slightly wider */
    transition: opacity 0.4s ease;
    text-align: center;
    font-size: clamp(1.25rem, 1.09375rem + 0.5vw, 1.5rem) !important;
}

.avidpay-carousel-container .quote-attr {
    color: #ffffff !important;
    font-weight: 300 !important;
    transition: opacity 0.4s ease;
    margin-bottom: 30px;
    /* Increased bottom margin */
    display: block;
    text-align: center;
    font-size: clamp(1rem, 0.84375rem + 0.5vw, 1.125rem) !important;
}

.avidpay-carousel-container .section-footer {
    min-height: clamp(140px, 25vh, 200px);
    /* Increased min-height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center contents vertically instead of flex-end */
    align-items: center;
    margin-top: clamp(20px, 4vh, 40px);
    /* Increased top margin */
    padding-bottom: 60px;
    padding-top: 90px;
}