/* ============================================================
   Aha Orbit Testimonials PRO – Carousel Spotlight Layout
   ============================================================ */

.otp-layout-carousel-spotlight {
    --ot-text-primary: #1e293b;
    --ot-text-secondary: #64748b;
    --ot-accent-color: #3b82f6;
    --ot-card-bg: #ffffff;
    --ot-name-color: var(--ot-accent-color);
    --ot-role-color: var(--ot-text-secondary);
    --ot-quote-color: var(--ot-text-secondary);
    --ot-arrow-color: var(--ot-text-primary);
    --ot-bullet-color: var(--ot-text-secondary);
    --ot-bullet-active-color: var(--ot-accent-color);

    --otp-transition-speed: 500ms;
    --otp-carousel-gap: 24px;
    --ot-carousel-cols: 1;

    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--ot-text-primary);
}

.otp-layout-carousel-spotlight *,
.otp-layout-carousel-spotlight *::before,
.otp-layout-carousel-spotlight *::after {
    box-sizing: border-box;
}

/* ── Container & Track ────────────────────────────────────── */
.otp-spotlight-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: var(--otp-carousel-gap, 24px);
    position: relative;
}

.otp-spotlight-track-wrapper {
    flex-grow: 1;
    overflow: hidden;
    cursor: grab;
    padding: 10px 0;
    container-type: inline-size;
    container-name: spotlight-wrapper;
}

.otp-spotlight-track-wrapper.ot-is-dragging {
    cursor: grabbing;
}

.otp-spotlight-track {
    display: flex;
    gap: var(--otp-carousel-gap, 24px);
    transition: transform var(--otp-transition-speed) cubic-bezier(0.34, 1.2, 0.64, 1);
    will-change: transform;
    /* Calculated in JS based on index, cols, gap, and drag offset */
    transform: translateX(calc(-1 * var(--otp-carousel-index, 0) * (100% + var(--otp-carousel-gap, 24px)) / var(--ot-carousel-cols, 1) + var(--otp-carousel-drag-offset, 0px)));
}

.otp-spotlight-track-wrapper.ot-is-dragging .otp-spotlight-track {
    transition: none !important;
}

/* ── Slides ────────────────────────────────────────────────── */
.otp-spotlight-slide {
    flex: 0 0 calc((100% - (var(--ot-carousel-cols, 1) - 1) * var(--otp-carousel-gap, 24px)) / var(--ot-carousel-cols, 1));
    min-width: calc((100% - (var(--ot-carousel-cols, 1) - 1) * var(--otp-carousel-gap, 24px)) / var(--ot-carousel-cols, 1));
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
    transform: scale(0.95);
    display: flex;
    flex-direction: column;
}

.otp-spotlight-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* ── Card & Content ────────────────────────────────────────── */
.otp-spotlight-card {
    background: var(--ot-card-bg, #ffffff);
    border-radius: 24px;
    padding: 5.5rem 3rem 3rem 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Watermark: SVG quote via mask-image — inherits theme color */
.otp-spotlight-card::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    width: 72px;
    height: 72px;
    background-color: var(--ot-name-color, #e65100);
    opacity: 0.15;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.otp-spotlight-content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

.otp-spotlight-text-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left !important;
}

.otp-spotlight-image-column {
    flex-shrink: 0;
    width: 200px;
    /* Fixed width for avatar */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Text Elements ─────────────────────────────────────────── */
.otp-spotlight-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--ot-text-primary);
    margin: 0;
    font-weight: 500;
    min-height: 3.2rem;
    text-align: left !important;
}

.otp-spotlight-inline-quote {
    color: var(--ot-quote-color);
    font-family: Georgia, serif;
    font-size: 1.8rem;
    line-height: 0;
    vertical-align: -0.2rem;
    margin: 0 2px;
}

.otp-spotlight-author-info {
    margin-top: 0.5rem;
    min-height: 3.5rem;
    text-align: left !important;
}

.otp-spotlight-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ot-name-color);
    margin: 0 0 0.25rem 0;
    min-height: 1.43rem;
    text-align: left !important;
}

.otp-spotlight-role {
    font-size: 0.85rem;
    color: var(--ot-role-color);
    margin: 0;
    letter-spacing: 0.5px;
    font-weight: 500;
    min-height: 1.3rem;
    text-align: left !important;
}

.otp-spotlight-company-logo {
    display: block;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    width: auto;
    max-width: 120px;
    margin-top: 0.75rem;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.otp-spotlight-company-logo.ot-is-empty {
    opacity: 0;
    visibility: hidden;
}

.otp-spotlight-star-rating {
    display: flex;
    gap: 4px;
    margin-top: 0.5rem;
    min-height: 1.56rem;
    transition: opacity 0.2s ease;
    justify-content: flex-start !important;
}

.otp-spotlight-star-rating.ot-is-empty {
    opacity: 0;
    visibility: hidden;
}

.otp-spotlight-star {
    font-size: 1.25rem;
    color: #d1d5db;
}

.otp-spotlight-star--filled {
    color: #f59e0b;
}

.otp-spotlight-star--half {
    position: relative;
    display: inline-block;
    color: #d1d5db;
}

.otp-spotlight-star--half::after {
    content: "\2605";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f59e0b;
}

/* ── Avatar Elements ───────────────────────────────────────── */
.otp-spotlight-avatar-wrap {
    position: relative;
    width: 200px;
    height: 200px;
}

.otp-spotlight-avatar-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    border: 2px solid var(--ot-name-color, var(--ot-accent-color, #3b82f6)) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    box-sizing: border-box !important;
}

.otp-spotlight-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4776e6, #8e54e9);
    /* fallback — overridden by nth-child below */
    color: #fff;
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    user-select: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--ot-name-color, var(--ot-accent-color, #3b82f6));
    box-sizing: border-box;
}

/* Cycling gradients per slide — same palette as Orbit Premium */
.otp-spotlight-slide:nth-child(6n+1) .otp-spotlight-avatar-initials {
    background: linear-gradient(135deg, #4776e6, #8e54e9);
}

.otp-spotlight-slide:nth-child(6n+2) .otp-spotlight-avatar-initials {
    background: linear-gradient(135deg, #0ba360, #3cba92);
}

.otp-spotlight-slide:nth-child(6n+3) .otp-spotlight-avatar-initials {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

.otp-spotlight-slide:nth-child(6n+4) .otp-spotlight-avatar-initials {
    background: linear-gradient(135deg, #f953c6, #b91d73);
}

.otp-spotlight-slide:nth-child(6n+5) .otp-spotlight-avatar-initials {
    background: linear-gradient(135deg, #1a85ff, #00c6fb);
}

.otp-spotlight-slide:nth-child(6n+6) .otp-spotlight-avatar-initials {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* Quote Badge over Avatar */
.otp-spotlight-quote-badge {
    position: absolute;
    bottom: 5%;
    left: -5%;
    width: 60px;
    height: 60px;
    background: var(--ot-quote-color, #17a2b8);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--ot-card-bg, #fff);
    z-index: 5;
}

.otp-spotlight-quote-badge svg {
    width: 28px;
    height: 28px;
}

/* Social Badges */
.otp-spotlight-social-badge-link {
    display: block;
    text-decoration: none;
}

.otp-spotlight-social-badge {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--ot-card-bg, #fff);
    z-index: 6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #555;
    color: #fff;
    transition: transform 0.2s ease;
}

.otp-spotlight-social-badge svg {
    width: 18px;
    height: 18px;
}

.otp-spotlight-social-badge--facebook {
    background: #1877f2;
}

.otp-spotlight-social-badge--instagram {
    background: radial-gradient(circle at 30% 110%, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.otp-spotlight-social-badge--linkedin {
    background: #0a66c2;
}

.otp-spotlight-social-badge--twitter {
    background: #000;
}

.otp-spotlight-social-badge--youtube {
    background: #ff0000;
}

.otp-spotlight-social-badge--tiktok {
    background: #010101;
}

/* ── Navigation ────────────────────────────────────────────── */
.otp-spotlight-nav-btn {
    background: var(--ot-card-bg) !important;
    border: 1px solid color-mix(in srgb, var(--ot-text-primary, #1e293b) 12%, transparent) !important;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
    color: var(--ot-arrow-color) !important;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.otp-spotlight-nav-btn svg {
    width: 28px !important;
    height: 28px !important;
    stroke-width: 2.5px !important;
}

.otp-spotlight-nav-btn:focus,
.otp-spotlight-nav-btn:active {
    background: var(--ot-card-bg) !important;
    color: var(--ot-arrow-color) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
    outline: none !important;
}

.otp-spotlight-nav-btn:hover,
.otp-spotlight-nav-btn:focus:hover {
    background: var(--ot-bullet-active-color) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ot-bullet-active-color) 40%, transparent) !important;
}

.otp-spotlight-pagination-bullets {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.otp-spotlight-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--ot-bullet-color);
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.otp-spotlight-bullet.active {
    background-color: var(--ot-bullet-active-color);
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

/* ── Container Queries for Responsive Cards ────────────────── */
@container spotlight-wrapper (max-width: 650px) {
    .otp-spotlight-content-wrapper {
        flex-direction: column-reverse;
        /* Avatar on top */
        gap: 2rem;
        text-align: center !important;
    }

    .otp-spotlight-text-column {
        text-align: center !important;
    }

    .otp-spotlight-image-column {
        width: 150px;
    }

    .otp-spotlight-avatar-wrap {
        width: 150px;
        height: 150px;
    }

    .otp-spotlight-avatar-initials {
        font-size: 3rem;
    }

    .otp-spotlight-quote-badge {
        width: 45px;
        height: 45px;
        bottom: 0;
        left: 0;
        border-width: 3px;
    }

    .otp-spotlight-quote-badge svg {
        width: 20px;
        height: 20px;
    }

    .otp-spotlight-card {
        padding: 2rem 1.5rem;
    }

    .otp-spotlight-text {
        font-size: 1.1rem;
        text-align: center !important;
    }

    .otp-spotlight-author-info {
        text-align: center !important;
    }

    .otp-spotlight-name {
        text-align: center !important;
    }

    .otp-spotlight-role {
        text-align: center !important;
    }

    .otp-spotlight-company-logo {
        margin: 0.75rem auto 0;
    }

    .otp-spotlight-star-rating {
        justify-content: center !important;
    }
}

/* ── Standard Mobile Media Queries ─────────────────────────── */
@media (max-width: 768px) {
    .otp-layout-carousel-spotlight {
        --ot-carousel-cols: 1 !important;
    }

    .otp-spotlight-container {
        gap: 0;
    }

    .otp-spotlight-card {
        width: 90% !important;
        margin: 0 auto !important;
    }

    .otp-spotlight-nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 40px;
        height: 40px;
    }

    .otp-spotlight-nav-btn:hover,
    .otp-spotlight-nav-btn:focus:hover,
    .otp-spotlight-nav-btn:active,
    .otp-spotlight-nav-btn:focus {
        transform: translateY(-50%) !important;
    }

    .otp-spotlight-nav-btn svg {
        width: 20px !important;
        height: 20px !important;
        stroke-width: 2.5px !important;
    }

    .otp-spotlight-prev {
        left: 0.5rem;
    }

    .otp-spotlight-next {
        right: 0.5rem;
    }
}

/* ── Theme / builder resilience & CLS prevention ────────────── */
.otp-spotlight-track {
    transition: transform var(--otp-transition-speed) cubic-bezier(0.34, 1.2, 0.64, 1) !important;
}

.otp-spotlight-track-wrapper.ot-is-dragging .otp-spotlight-track {
    transition: none !important;
}

.otp-spotlight-slide {
    transition: opacity 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
}

.otp-spotlight-nav-btn {
    transition: all 0.25s ease !important;
}

.otp-spotlight-bullet {
    transition: all 0.3s ease !important;
}