/* Niftee Testimonial Carousel v1.2.0
 * Scoped styles. The widget is fully readable before JavaScript initialises.
 */

.ntc-wrapper {
    --ntc-accent: #109697;
    --ntc-text: #212529;
    --ntc-muted: #7a8188;
    --ntc-slides-per-view: 1;
    --ntc-space-between: 30;
    --ntc-slides-to-scroll: 1;
    --ntc-shadow-gutter: 24px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.ntc-wrapper *,
.ntc-wrapper *::before,
.ntc-wrapper *::after {
    box-sizing: border-box;
}

.ntc-editor-empty {
    padding: 30px;
    text-align: center;
    border: 2px dashed var(--ntc-accent);
    border-radius: 12px;
    color: var(--ntc-accent);
    background: #f1f6f6;
}

/* Carousel shell
 * Uses a native scroll-snap carousel rather than loading another library.
 * The grid is the permanent fail-safe: if JavaScript never runs, reviews stay visible. */
.ntc-carousel-container {
    position: relative;
    width: 100%;
    min-width: 0;
}

.ntc-track,
.ntc-static {
    position: relative;
    width: 100%;
    min-width: 0;
}

/* No-JS / pre-initialisation fallback. */
.ntc-track:not(.ntc-native-ready) {
    overflow: visible;
}

.ntc-track:not(.ntc-native-ready) .ntc-track-inner,
.ntc-static-wrapper {
    display: grid !important;
    grid-template-columns: repeat(var(--ntc-slides-per-view, 1), minmax(0, 1fr));
    gap: calc(var(--ntc-space-between, 30) * 1px);
    width: 100%;
    align-items: start;
}

.ntc-single-review .ntc-static-wrapper {
    grid-template-columns: minmax(0, 1fr) !important;
}

.ntc-track:not(.ntc-native-ready) .ntc-carousel-slide,
.ntc-static-slide {
    display: block !important;
    width: auto !important;
    min-width: 0;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Enhanced native carousel. JS only changes widths and scrolling; it never hides content. */
.ntc-track.ntc-native-ready {
    width: calc(100% + var(--ntc-shadow-gutter) + var(--ntc-shadow-gutter));
    margin: calc(0px - var(--ntc-shadow-gutter));
    padding: var(--ntc-shadow-gutter);
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--ntc-shadow-gutter);
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.ntc-track.ntc-native-ready.ntc-is-animating {
    scroll-snap-type: none;
}

.ntc-track.ntc-native-ready::-webkit-scrollbar {
    display: none;
}

.ntc-track.ntc-native-ready .ntc-track-inner {
    display: flex;
    width: max-content;
    min-width: 100%;
    align-items: flex-start;
}

.ntc-track.ntc-native-ready .ntc-carousel-slide {
    display: block;
    min-width: 0;
    height: auto;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    opacity: 1;
    visibility: visible;
}

.ntc-equal-height .ntc-track.ntc-native-ready .ntc-track-inner {
    align-items: stretch;
}

.ntc-equal-height .ntc-track:not(.ntc-native-ready) .ntc-track-inner,
.ntc-equal-height .ntc-static-wrapper {
    align-items: stretch;
}

.ntc-equal-height .ntc-track:not(.ntc-native-ready) .ntc-carousel-slide,
.ntc-equal-height .ntc-track.ntc-native-ready .ntc-carousel-slide,
.ntc-equal-height .ntc-static-slide {
    display: flex !important;
}

.ntc-equal-height .ntc-card {
    height: 100%;
}

.ntc-slide,
.ntc-card {
    min-width: 0;
}

.ntc-card {
    position: relative;
    width: 100%;
    height: auto;
    padding: 40px;
    border-radius: 12px;
    background: #fff;
    overflow: visible;
    transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.ntc-card-background-off .ntc-card,
.ntc-card-background-off .ntc-card:hover {
    background-color: transparent !important;
}

/* Reviewer / testimonial layout */
.ntc-content-layout {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 28px 36px;
    min-width: 0;
    align-items: start;
}

.ntc-reviewer-block { grid-area: reviewer; min-width: 0; }
.ntc-testimonial-block { grid-area: testimonial; min-width: 0; }

.ntc-testimonial-block,
.ntc-testimonial,
.ntc-testimonial p {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.ntc-reviewer-position-below .ntc-content-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "testimonial" "reviewer";
}

.ntc-reviewer-position-above .ntc-content-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "reviewer" "testimonial";
}

.ntc-reviewer-position-left .ntc-content-layout {
    grid-template-columns: minmax(170px, 28%) minmax(0, 1fr);
    grid-template-areas: "reviewer testimonial";
}

.ntc-reviewer-position-right .ntc-content-layout {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 28%);
    grid-template-areas: "testimonial reviewer";
}

.ntc-reviewer-position-hidden .ntc-content-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "testimonial";
}

.ntc-testimonial-row {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    min-width: 0;
}

.ntc-testimonial-text-col {
    flex: 1 1 auto;
    min-width: 0;
}

.ntc-testimonial {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 21px;
    line-height: 1.62;
    font-style: normal;
    color: var(--ntc-text);
}

.ntc-testimonial > :first-child { margin-top: 0; }
.ntc-testimonial > :last-child { margin-bottom: 0; }

.ntc-read-more-ready .ntc-testimonial-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--ntc-read-more-lines, 3);
    overflow: hidden;
}

.ntc-wrapper button.ntc-read-more-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    margin: 14px 0 0;
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    background-color: transparent;
    color: var(--ntc-accent);
    font: inherit;
    font-size: .88em;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    text-shadow: none;
}

.ntc-wrapper button.ntc-read-more-button[hidden] { display: none; }

.ntc-wrapper button.ntc-read-more-button:hover,
.ntc-wrapper button.ntc-read-more-button:focus,
.ntc-wrapper button.ntc-read-more-button:focus-visible {
    background-color: transparent;
    color: var(--ntc-text);
    box-shadow: none;
}

.ntc-wrapper button.ntc-read-more-button:focus-visible,
.ntc-wrapper button.ntc-read-more-close:focus-visible {
    outline: 2px solid var(--ntc-accent);
    outline-offset: 4px;
}

.ntc-review-divider {
    display: block;
    flex: 0 0 auto;
    width: 80px;
    height: 2px;
    min-height: 1px;
    margin: 28px 0 0;
    opacity: 1;
    visibility: visible;
    background-color: var(--ntc-accent, #109697);
}

/* Quote symbol */
.ntc-quote-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 52px;
    padding: 10px;
    border-radius: 999px;
    background: var(--ntc-accent);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    user-select: none;
}

.ntc-quote-container svg,
.ntc-quote-container i {
    display: block;
    width: 1em;
    height: 1em;
    color: currentColor;
    fill: currentColor;
}

.ntc-default-quote {
    display: block;
    width: 1em;
    height: .75em;
    overflow: visible;
}

.ntc-custom-quote-img {
    display: block;
    width: 1em;
    height: 1em;
    object-fit: contain;
}

.ntc-quote-corner {
    position: absolute;
    z-index: 0;
    opacity: .2;
    pointer-events: none;
}

.ntc-quote-top-left { top: 16px; left: 16px; }
.ntc-quote-top-right { top: 16px; right: 16px; }
.ntc-quote-bottom-left { bottom: 16px; left: 16px; }
.ntc-quote-bottom-right { right: 16px; bottom: 16px; }

/* Reviewer */
.ntc-reviewer-container {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.ntc-profile-img-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 2px solid transparent;
}

.ntc-profile-img-wrap img,
.ntc-profile-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ntc-shape-circle,
.ntc-shape-circle img { border-radius: 50%; }
.ntc-shape-rounded,
.ntc-shape-rounded img { border-radius: 8px; }
.ntc-shape-square,
.ntc-shape-square img { border-radius: 0; }

.ntc-img-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: var(--ntc-accent);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.ntc-img-error-fallback {
    position: absolute;
    inset: 0;
    display: none;
}

.ntc-profile-img-wrap.ntc-image-error > .ntc-profile-img {
    display: none;
}

.ntc-profile-img-wrap.ntc-image-error > .ntc-img-error-fallback {
    display: flex;
}

/* WPRS Read More is rendered by Niftee so the full review keeps this widget's styling. */
body.ntc-modal-open { overflow: hidden; }

.ntc-read-more-overlay {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(17, 24, 39, .26);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .18s ease;
}

.ntc-read-more-overlay.ntc-read-more-visible { opacity: 1; }

.ntc-read-more-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(82vh, 760px);
    padding: 36px;
    overflow: auto;
    border-radius: var(--ntc-modal-radius, 12px);
    background: var(--ntc-modal-background, #fff);
    color: var(--ntc-text);
    box-shadow: var(--ntc-modal-shadow, 0 22px 70px rgba(17, 24, 39, .2));
    transform: translateY(10px) scale(.985);
    transition: transform .18s ease;
    overscroll-behavior: contain;
}

.ntc-read-more-visible .ntc-read-more-dialog {
    transform: translateY(0) scale(1);
}

.ntc-wrapper button.ntc-read-more-close {
    appearance: none;
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 16px;
    display: inline-flex;
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(127, 127, 127, .1);
    color: var(--ntc-text);
    font: inherit;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    text-shadow: none;
}

.ntc-wrapper button.ntc-read-more-close:hover,
.ntc-wrapper button.ntc-read-more-close:focus,
.ntc-wrapper button.ntc-read-more-close:focus-visible {
    background-color: rgba(127, 127, 127, .18);
    color: var(--ntc-text);
    box-shadow: none;
}

.ntc-read-more-reviewer {
    margin: 0 44px 26px 0;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(127, 127, 127, .2);
}

.ntc-read-more-body .ntc-rating-wrapper { margin-bottom: 14px; }

.ntc-modal-testimonial {
    display: block;
    overflow: visible;
}

.ntc-read-more-body .ntc-modal-testimonial + .ntc-rating-wrapper {
    margin-top: 14px;
    margin-bottom: 0;
}

.ntc-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ntc-organisation-logo {
    display: block;
    width: auto;
    max-width: 90px;
    max-height: 46px;
    object-fit: contain;
    flex: 0 0 auto;
}

.ntc-reviewer-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ntc-reviewer-cite {
    display: contents;
    font-style: normal;
}

.ntc-reviewer-name,
.ntc-reviewer-name-org {
    font-size: 18px;
    font-weight: 700;
    color: var(--ntc-accent);
}

.ntc-reviewer-position,
.ntc-reviewer-position-org {
    font-size: 15px;
    font-weight: 600;
    color: #1f2528;
}

.ntc-reviewer-org {
    font-size: 14px;
    color: var(--ntc-muted);
}

.ntc-reviewer-location,
.ntc-reviewer-extra {
    font-size: 13px;
    color: #9ca3af;
}

.ntc-review-source {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Rating symbols. Filled layer clips over the empty layer, so half ratings work. */
.ntc-rating-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin: 0 0 12px;
}

.ntc-star-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    line-height: 1;
}

.ntc-star-layer {
    position: absolute;
    inset: 0 auto auto 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
}

.ntc-star-empty-layer {
    color: #e5e7eb;
}

.ntc-star-fill-layer {
    z-index: 1;
    color: #ffc107;
}

.ntc-star-layer svg,
.ntc-star-layer i,
.ntc-rating-default-symbol,
.ntc-rating-symbol-image {
    display: block;
    width: 100%;
    height: 100%;
    color: currentColor;
    fill: currentColor;
    font-size: inherit;
    line-height: 1;
    object-fit: contain;
}

/* Uploaded raster/SVG images retain their intrinsic colours. The colour controls
 * continue to apply to the default symbol and Elementor icon/SVG output. */
.ntc-rating-symbol-image {
    max-width: none;
}

/* Navigation */
.ntc-navigation {
    position: relative;
    z-index: 4;
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.ntc-nav-pos-footer-inline,
.ntc-nav-pos-below-right { justify-content: flex-end; }

.ntc-nav-pos-below-center { justify-content: center; }
.ntc-nav-pos-below-left { justify-content: flex-start; }

.ntc-nav-pos-outside {
    position: absolute;
    top: 50%;
    left: -58px;
    right: -58px;
    margin: 0;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.ntc-nav-pos-outside .ntc-nav-btn { pointer-events: auto; }

.ntc-nav-btn {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: #f1f6f6;
    color: var(--ntc-accent);
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.ntc-nav-btn:hover {
    background: var(--ntc-accent);
    color: #fff;
}

.ntc-nav-btn:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.ntc-nav-btn svg,
.ntc-nav-btn i {
    width: 14px;
    height: 14px;
    color: currentColor;
    fill: currentColor;
}

.ntc-nav-btn.ntc-button-disabled,
.ntc-nav-btn:disabled {
    opacity: .42;
    cursor: default;
}

/* Pagination */
.ntc-wrapper .ntc-pagination {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 28px;
    color: var(--ntc-muted);
}

.ntc-wrapper .ntc-pagination .ntc-pagination-dot {
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 50%;
    background: #d4e4e5;
    opacity: 1;
    transition: background-color .2s ease, transform .2s ease;
}

.ntc-wrapper .ntc-pagination button.ntc-pagination-dot {
    display: inline-block;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.ntc-pagination-fraction {
    display: inline-block;
}

.ntc-wrapper .ntc-pagination .ntc-pagination-dot.is-active {
    background: var(--ntc-accent);
}

.ntc-wrapper .ntc-pagination .ntc-pagination-dot:focus-visible {
    outline: 2px solid var(--ntc-accent);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .ntc-testimonial-row {
        gap: 18px;
    }

    .ntc-reviewer-position-left .ntc-content-layout,
    .ntc-reviewer-position-right .ntc-content-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "testimonial" "reviewer";
    }

    .ntc-reviewer-container {
        flex-wrap: wrap;
    }

    .ntc-nav-pos-outside {
        position: relative;
        inset: auto;
        right: auto;
        bottom: auto;
        margin-top: 20px;
        transform: none;
        justify-content: center;
        pointer-events: auto;
    }
}

@media (max-width: 520px) {
    .ntc-testimonial-row {
        flex-direction: column;
    }

    .ntc-quote-inline {
        min-width: 48px;
        min-height: 48px;
    }

    .ntc-read-more-overlay { padding: 16px; }

    .ntc-read-more-dialog {
        max-height: 88vh;
        padding: 30px 24px 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ntc-wrapper *,
    .ntc-wrapper *::before,
    .ntc-wrapper *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
