/* ==========================================================================
   Testimonials — redesigned to match the rest of the site.
   Same language as Managed IT services / About MADDS:
     • purple -> blue colour field flowing one way in an endless loop
     • frosted-glass cards (same recipe as the About cards)
     • animated magenta / orange / violet / cyan gradient border on the visible cards
     • white pill pagination (same as the industry carousel dots)

   Loaded AFTER style.css, mobile-fixes.css and the Swiper stylesheet (see layout/base.html),
   so these rules win without touching the old ones. Brand colours:
       magenta #B51BB5 · orange #F0A400 · violet #AC20BC · cyan #43D2E0
   ========================================================================== */

/* ---- section shell ------------------------------------------------------- */
.testimonial {
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    padding: 3rem 0;                    /* same as the original section: height follows the content */
    color: #fff;
    text-align: center;

    /* purple -> blue, flowing one way in an endless loop (same movement as Managed IT services) */
    background: linear-gradient(90deg,
        rgba(185, 0, 255, 0.85) 0%,
        rgba(0, 88, 255, 0.85) 50%,
        rgba(185, 0, 255, 0.85) 100%);
    background-size: 200% 100%;
    background-repeat: repeat-x;
    animation: testimonial-gradient-flow 16s linear infinite;
}

@keyframes testimonial-gradient-flow {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }      /* exactly one tile -> seamless loop */
}

/* soft brand-colour glows behind the cards (static, so they never fight the flow) */
.testimonial::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 18%, rgba(255, 47, 214, .28), transparent 34%),
        radial-gradient(circle at 92% 82%, rgba(67, 210, 224, .30), transparent 36%),
        radial-gradient(circle at 78% 8%,  rgba(240, 164, 0, .14),  transparent 30%);
    pointer-events: none;
}

.testimonial > .container-div {
    position: relative;
    z-index: 1;
    width: var(--site-width, 88%);
}

/* ---- heading ------------------------------------------------------------- */
.testimonial .testimonial-head {
    max-width: 760px;
    margin: 0 auto clamp(1.4rem, 3.5vh, 2.4rem);
}

.testimonial .testimonial-eyebrow {
    display: inline-block;
    margin-bottom: .7rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #ffb27a;
}

.testimonial .testimonial-head h2 {
    margin: 0;
    font-size: clamp(2rem, 3.6vw + .4rem, 3.25rem);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: -.03em;
    color: #fff;
}

.testimonial .testimonial-head p {
    max-width: 620px;
    margin: .9rem auto 0;
    font-size: clamp(.95rem, 1.3vw, 1.08rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, .86);
}

/* ---- slider ---------------------------------------------------------------- */
/* padding gives the hover lift, the shadow and the glowing border room (the slider clips) */
.testimonial .swiper.mySwiperAutotest {
    position: relative;
    height: auto;
    margin: 0;
    padding: 14px 6px 3.4rem;
}

.testimonial .swiper-slide {
    height: auto;
    display: flex;
}

/* ---- the glass card ---------------------------------------------------------- */
.testimonial .testimonial-bg {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.9rem 2rem 1.7rem;
    border-radius: 22px;
    color: #fff;
    text-align: left;
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 10px 28px rgba(8, 10, 45, .28);
    transition: background .35s ease, border-color .35s ease, transform .3s ease, box-shadow .3s ease;
}

.testimonial .testimonial-bg:hover {
    background: rgba(255, 255, 255, .17);
    border-color: rgba(255, 255, 255, .45);
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(8, 10, 45, .34);
}

/* animated brand-gradient border on the cards in view (same effect as the centre industry card) */
.testimonial .swiper-slide-active .testimonial-bg::before,
.testimonial .swiper-slide-next .testimonial-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, #B51BB5 0%, #F0A400 35.58%, #AC20BC 65.87%, #43D2E0 100%);
    background-size: 200% 100%;
    animation: testimonial-border-move 4s ease-in-out infinite alternate;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

@keyframes testimonial-border-move {
    0%   { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ---- card content ------------------------------------------------------------ */
.testimonial .star-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.testimonial .star-icon ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.testimonial .star-icon ul li {
    display: inline-block;
    padding: 0 2px;
}

.testimonial .star-icon svg path {
    fill: #FFC94D;
}

/* the quote badge: glass disc instead of the old solid magenta one */
.testimonial .only-icon svg {
    display: block;
    width: 52px;
    height: 52px;
}

.testimonial .only-icon svg rect {
    fill: rgba(255, 255, 255, .16);
    stroke: rgba(255, 255, 255, .45);
    stroke-width: 1;
}

.testimonial .test-content {
    text-align: left;
}

.testimonial .test-content p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .94);
}

/* signature pinned to the bottom, so both cards line up whatever the quote length */
.testimonial .signature {
    margin-top: auto;
    padding-top: 1rem;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, .24);
}

.testimonial .signature h3 {
    margin: 0 0 .15rem;
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
}

.testimonial .signature p {
    margin: 0;
    font-size: .92rem;
    color: #ffb27a;
}

/* ---- pagination: white pill dots (same as the industry carousel) --------------- */
.testimonial .swiper-pagination {
    bottom: .9rem;
}

.testimonial .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, .4);
    opacity: 1;
    transition: width .3s ease, background .3s ease;
}

.testimonial .swiper-pagination-bullet-active {
    width: 24px;
    background: #fff;
}

/* ---- tablet / phone ------------------------------------------------------------ */
@media (max-width: 768px) {
    .testimonial {
        padding: 2.5rem 0;
    }

    .testimonial .testimonial-head {
        padding: 0 18px;
        margin-bottom: 1.2rem;
    }

    .testimonial .testimonial-head h2 {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

    .testimonial .testimonial-head p {
        font-size: .92rem;
    }

    .testimonial .swiper.mySwiperAutotest {
        padding: 10px 4px 3rem;
    }

    .testimonial .testimonial-bg {
        padding: 1.3rem 1.2rem 1.2rem;
        border-radius: 18px;
        gap: 1rem;
    }

    .testimonial .only-icon svg {
        width: 44px;
        height: 44px;
    }

    .testimonial .test-content p {
        font-size: .95rem;
        line-height: 1.6;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimonial {
        animation: none;
    }

    .testimonial .swiper-slide-active .testimonial-bg::before,
    .testimonial .swiper-slide-next .testimonial-bg::before {
        animation: none;
    }

    .testimonial .testimonial-bg,
    .testimonial .swiper-pagination-bullet {
        transition: none;
    }

    .testimonial .testimonial-bg:hover {
        transform: none;
    }
}