/* ==========================================================================
   "What your clients say" — testimonial carousel
   --------------------------------------------------------------------------
   Ported 1:1 from the notebookbd.com theme (section.testimonial): identical
   layout, spacing, sizes, transitions and mobile breakpoints.

   Deliberate adaptations to this site (see notes in the report):
     * accent  #dfa667 (gold)  -> rust #F5A623   (logo orange)
     * ink     #111111         -> #000000        (logo black)
     * quote   Poppins 300 italic -> Playfair Display italic (site display font)
     * avatars use object-fit: cover so portrait photos stay round, not squashed
     * the original relied on Slick's generated markup (.slick-slide /
       .slick-center); the same states are now driven by .is-center / .is-active

   Everything is scoped under .testimonial, so Tailwind on the rest of the
   page is unaffected. A minimal Bootstrap 4 grid subset is included further
   down because the original section markup uses the Bootstrap grid classes.
   ========================================================================== */

.testimonial {
    --nb-accent: #f5a623;
    --nb-ink: #000000;
    --nb-display: "Playfair Display", Georgia, serif;
    --nb-body: "Hanken Grotesk", system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Minimal Bootstrap 4 grid (only what this section uses)
   -------------------------------------------------------------------------- */

.testimonial .container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.testimonial .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.testimonial .row > [class^="col-"],
.testimonial .row > [class*=" col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.testimonial .text-center {
    text-align: center;
}

.testimonial .d-flex {
    display: flex;
}

.testimonial .justify-content-center {
    justify-content: center;
}

@media (min-width: 576px) {
    .testimonial .container { max-width: 540px; }
    .testimonial .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
}

@media (min-width: 768px) {
    .testimonial .container { max-width: 720px; }
    .testimonial .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
}

@media (min-width: 992px) {
    .testimonial .container { max-width: 960px; }
    .testimonial .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .testimonial .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .testimonial .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1200px) {
    .testimonial .container { max-width: 1140px; }
    .testimonial .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .testimonial .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
}

/* --------------------------------------------------------------------------
   Section shell / heading  (theme: .spad, .set-bg, .section-title)
   -------------------------------------------------------------------------- */

.testimonial.spad {
    padding-top: 100px;
    padding-bottom: 100px;
}

.testimonial.set-bg {
    background-color: #f7f7f7;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
}

.testimonial .section-title {
    margin-bottom: 40px;
}

.testimonial .section-title span {
    display: block;
    margin-bottom: 12px;
    color: var(--nb-accent);
    font-family: var(--nb-body);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.testimonial .section-title h2 {
    margin: 0;
    color: var(--nb-ink);
    font-family: var(--nb-display);
    font-size: 42px;
    font-weight: 400;
    line-height: 50px;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Quote card  (theme: .testimonial__carousel)
   -------------------------------------------------------------------------- */

.testimonial__carousel {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    padding: 75px 60px 90px;
    margin-bottom: 20px;
    box-shadow: 0px 15px 60px rgba(67, 69, 70, 0.1);
}

.testimonial__carousel:after {
    position: absolute;
    content: "";
    left: calc(50% - 85px);
    bottom: -115px;
    width: 170px;
    height: 170px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    box-shadow: inset 0 0 21px rgba(0, 0, 0, 0.2);
}

/* --- bracket arrows (theme: button.slick-arrow) --- */

.testimonial__carousel button.nb-arrow {
    position: absolute;
    left: 30px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    margin-top: -25px;
    padding: 0;
    font-size: 28px;
    color: var(--nb-ink);
    background: transparent;
    border: none;
    cursor: pointer;
}

.testimonial__carousel button.nb-arrow.nb-next {
    left: auto;
    right: 30px;
}

.testimonial__carousel button.nb-arrow:before {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 20px;
    width: 20px;
    border-left: 2px solid rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 0 0 0 4px;
    content: "";
    transition: all, 0.5s;
}

.testimonial__carousel button.nb-arrow:after {
    position: absolute;
    right: 0;
    top: 0;
    height: 20px;
    width: 20px;
    border-right: 2px solid rgba(0, 0, 0, 0.2);
    border-top: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 0 4px 0 0;
    content: "";
    transition: all, 0.5s;
}

.testimonial__carousel button.nb-arrow:hover:before,
.testimonial__carousel button.nb-arrow:hover:after {
    height: 100%;
    width: 100%;
    border-radius: 4px;
}

.testimonial__carousel button.nb-arrow:focus-visible {
    outline: 2px solid var(--nb-accent);
    outline-offset: 4px;
}

.testimonial__carousel button.nb-arrow svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* --- the quote itself (theme: .testimonial__item) --- */

.testimonial__item {
    display: none;
    text-align: center;
}

.testimonial__item.is-active {
    display: block;
    animation: nbQuoteIn 0.6s ease both;
}

.testimonial__item p {
    margin: 0;
    color: var(--nb-ink);
    font-family: var(--nb-display);
    font-size: 24px;
    font-weight: 500;
    font-style: italic;
    line-height: 48px;
}

@keyframes nbQuoteIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Client film strip (theme: .testimonial__client / .slick-slide / .slick-center)
   The three copies of the list are rendered server-side; the strip is
   translated so the active client always sits dead centre (the original got
   this from Slick's centerMode + infinite clones).
   -------------------------------------------------------------------------- */

.testimonial__client {
    position: relative;
    margin-top: -75px;
    margin-bottom: 50px;
    /* The clipping window (the original's .slick-list). It must never move:
       transforming the clipping box would drag the whole window, and the
       strip would slide out of the section instead of inside it. */
    overflow: hidden;
}

.testimonial__client__track {
    display: flex;
    transition: transform 0.45s ease;
    /* Pre-JS position: middle copy, first item. 10 x 100px + the 180px active
       one puts its centre at 1090px, so half the window minus that = centred. */
    transform: translateX(calc(50% - 1090px));
}

.testimonial__client__track.no-anim,
.testimonial__client__track.no-anim * {
    transition: none !important;
}

.testimonial__client__item {
    flex: 0 0 auto;
    width: 100px;
    padding-top: 80px;
    text-align: center;
    cursor: pointer;
    background: none;
    border: none;
    transition: 0.4s;
}

.testimonial__client__item.is-center {
    width: 180px;
    padding-top: 35px;
}

.testimonial__client__item .testimonial__client__pic {
    display: block;
    position: relative;
    z-index: 1;
    height: 70px;
    width: 70px;
    padding-top: 5px;
    margin: 0 auto;
    transition: 0.4s;
}

.testimonial__client__item .testimonial__client__pic img {
    display: block;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    transition: 0.4s;
}

/* The centred client's photo is pulled up 30px (theme rule) so it straddles
   the bottom edge of the white card. */
.testimonial__client__item.is-center .testimonial__client__pic {
    top: -30px;
}

.testimonial__client__item.is-center .testimonial__client__pic,
.testimonial__client__item.is-center .testimonial__client__pic img {
    width: 150px;
    height: 150px;
}

.testimonial__client__item .testimonial__client__text {
    display: none;
}

.testimonial__client__item.is-center .testimonial__client__text {
    display: block;
    margin-top: -8px;
}

.testimonial__client__item .testimonial__client__name {
    display: block;
    margin: 0 0 5px;
    color: var(--nb-ink);
    font-family: var(--nb-body);
    font-size: 15px;
    font-weight: 600;
}

.testimonial__client__item .testimonial__client__role {
    display: block;
    color: var(--nb-accent);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Partner logo marquee (theme: .logo__carousel, an Owl carousel in the
   original: 5 logos, 80px spacing, 1200ms autoplay loop)
   -------------------------------------------------------------------------- */

.testimonial .logo__carousel {
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.testimonial .logo__carousel__track {
    display: flex;
    width: max-content;
    animation: nbLogoScroll 34s linear infinite;
}

.testimonial .logo__carousel__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 244px;
    height: 62px;
    padding: 0 40px;
}

.testimonial .logo__carousel__item img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    max-height: 62px;
    object-fit: contain;
}

@keyframes nbLogoScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Small devices — values taken from the theme's own 479px block
   -------------------------------------------------------------------------- */

@media (max-width: 479px) {
    .testimonial .section-title h2 {
        font-size: 28px;
        line-height: 1;
    }

    .testimonial__item p {
        font-size: 16px;
        line-height: normal;
    }

    .testimonial__carousel {
        padding: 60px 45px 65px;
    }

    .testimonial__carousel:after {
        left: calc(50% - 70px);
        bottom: -80px;
        width: 140px;
        height: 140px;
    }

    .testimonial__carousel button.nb-arrow {
        left: 10px;
        height: 40px;
        width: 40px;
    }

    .testimonial__carousel button.nb-arrow.nb-next {
        left: auto;
        right: 10px;
    }

    .testimonial__client__item.is-center .testimonial__client__pic,
    .testimonial__client__item.is-center .testimonial__client__pic img {
        width: 110px;
        height: 110px;
        opacity: 1;
    }

    .testimonial__client__item .testimonial__client__pic {
        width: 110px;
        height: 110px;
        opacity: 0;
    }

    .testimonial__client__item {
        padding-top: 30px;
    }
}

@media (max-width: 575px) {
    .testimonial .logo__carousel__item {
        width: 190px;
        padding: 0 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimonial__item.is-active {
        animation: none;
    }

    .testimonial .logo__carousel__track {
        animation: none;
    }
}
