/* ============================================================
   Advanced Testimonial Slider Pro — Stylesheet
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
.atsp-wrapper {
    --atsp-glow-primary:   99, 102, 241;
    --atsp-glow-secondary: 168, 85, 247;
    --atsp-gold:           245, 158, 11;
    --atsp-overlay-start:  rgba(0, 0, 0, 0);
    --atsp-overlay-end:    rgba(10, 10, 20, 0.75);
    position: relative;
    overflow: hidden;
    background-color: #0a0a14;
    border-radius: 32px;
    padding: 60px;
    /* Subtle mesh background */
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(var(--atsp-glow-primary), 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(var(--atsp-glow-secondary), 0.06) 0%, transparent 60%);
}

/* Glowing grid lines */
.atsp-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.atsp-swiper-container {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* ---------- Slide Layout ---------- */
.atsp-slider-inner {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 32px;
    align-items: center;
}


@media (max-width: 600px) {
    .atsp-wrapper {
        padding: 28px 16px 40px;
        border-radius: 20px;
    }
}

/* ---------- Image Column ---------- */
.atsp-image-col {
    position: relative;
}

.atsp-image-wrapper {
    position: relative;
    width: 100%;
    height: 540px;
    overflow: hidden;
    border-radius: 24px;
    background: #111124;
}

.atsp-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.6s ease;
    transform-origin: center center;
}

/* Image shimmer on slide change */
.swiper-slide-active .atsp-featured-img {
    animation: atsp-img-reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes atsp-img-reveal {
    0%   { transform: scale(1.06); opacity: 0; }
    100% { transform: scale(1);    opacity: 1; }
}

/* Overlay */
.atsp-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--atsp-overlay-start) 0%, var(--atsp-overlay-end) 100%);
    pointer-events: none;
    border-radius: inherit;
}

/* Glowing border effect on image */
.atsp-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(var(--atsp-glow-primary), 0.2);
    pointer-events: none;
    z-index: 2;
}

/* ---------- Trusted Banner ---------- */
.atsp-trusted-banner {
    position: absolute;
    bottom: -24px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(20, 20, 35, 0.9);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(var(--atsp-glow-primary), 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    z-index: 10;
    white-space: nowrap;
    max-width: calc(100% - 48px);
}

/* Banner animations */
.atsp-banner-anim-float {
    animation: atsp-float 3s ease-in-out infinite;
}

.atsp-banner-anim-fade {
    animation: atsp-fade-in 0.8s ease forwards;
}

.atsp-banner-anim-slide {
    animation: atsp-slide-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes atsp-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
}

@keyframes atsp-fade-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes atsp-slide-up {
    0%   { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

.atsp-banner-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.atsp-banner-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #1a1a2e;
    flex-shrink: 0;
    display: block;
    transition: transform 0.2s ease;
}

.atsp-banner-avatar:not(:first-child) {
    margin-left: -8px;
}

.atsp-banner-avatar:hover {
    transform: scale(1.15) translateY(-2px);
    z-index: 1;
}

.atsp-banner-text {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

/* ---------- Card Column ---------- */
.atsp-card-col {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.atsp-testimonial-card {
    position: relative;
    background: linear-gradient(135deg, #16162a 0%, #0d0d1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px;
    box-shadow:
        0 40px 80px rgba(var(--atsp-glow-primary), 0.15),
        0 0 0 1px rgba(var(--atsp-glow-primary), 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Glow orb inside card */
.atsp-testimonial-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(var(--atsp-glow-primary), 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.atsp-testimonial-card > * {
    position: relative;
    z-index: 1;
}

/* ---------- Slide Content Animations ---------- */
.atsp-slide-content {
    opacity: 0;
    transform: translateY(24px);
    transition: none;
}

.swiper-slide-active .atsp-slide-content {
    animation: atsp-content-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes atsp-content-up {
    0%   { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Staggered children */
.swiper-slide-active .atsp-quote-icon  { animation-delay: 0.15s; }
.swiper-slide-active .atsp-stars       { animation-delay: 0.25s; }
.swiper-slide-active .atsp-testimonial-text { animation-delay: 0.35s; }
.swiper-slide-active .atsp-author-row  { animation-delay: 0.45s; }

/* ---------- Quote Icon ---------- */
.atsp-quote-icon {
    font-size: 40px;
    color: #6366f1;
    margin-bottom: 24px;
    line-height: 1;
    display: block;
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.swiper-slide-active .atsp-quote-icon {
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.atsp-quote-icon i,
.atsp-quote-icon svg {
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

/* ---------- Stars ---------- */
.atsp-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.swiper-slide-active .atsp-stars {
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.atsp-stars i {
    font-size: 18px;
    line-height: 1;
}

.atsp-star-filled {
    color: rgb(var(--atsp-gold));
    filter: drop-shadow(0 0 4px rgba(var(--atsp-gold), 0.5));
}

.atsp-star-empty {
    color: rgba(255, 255, 255, 0.2);
}

/* ---------- Testimonial Text ---------- */
.atsp-testimonial-text {
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 28px;
    flex: 1;
    font-style: italic;
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.swiper-slide-active .atsp-testimonial-text {
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

/* ---------- Author Row ---------- */
.atsp-author-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.swiper-slide-active .atsp-author-row {
    opacity: 0;
    animation: atsp-content-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.atsp-author-image {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--atsp-glow-primary), 0.5);
    box-shadow: 0 0 0 4px rgba(var(--atsp-glow-primary), 0.08);
    flex-shrink: 0;
    background: #1a1a2e;
}

.atsp-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.atsp-author-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    display: block;
}

.atsp-author-designation {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
    display: block;
}

/* ---------- Navigation Dots ---------- */
.atsp-nav-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    position: relative;
    z-index: 2;
}

/* Swiper pagination override */
.atsp-nav-dots.swiper-pagination {
    position: relative;
    bottom: auto;
    left: auto;
    width: auto;
}

.atsp-nav-dots .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    border-radius: 40px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    margin: 0;
}

.atsp-nav-dots .swiper-pagination-bullet-active {
    background: rgb(var(--atsp-glow-primary));
    width: 28px;
    box-shadow: 0 0 12px rgba(var(--atsp-glow-primary), 0.6);
}

/* Custom dot classes for manual override */
.atsp-dot {
    display: inline-block;
    height: 8px;
    min-width: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 40px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.atsp-dot.atsp-dot--active {
    background: rgb(var(--atsp-glow-primary));
    min-width: 28px;
    box-shadow: 0 0 12px rgba(var(--atsp-glow-primary), 0.6);
}

/* ---------- Navigation Arrows ---------- */
.atsp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(20, 20, 40, 0.8);
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    outline: none;
}

.atsp-arrow:hover {
    background: rgba(var(--atsp-glow-primary), 0.3);
    border-color: rgba(var(--atsp-glow-primary), 0.5);
    color: #fff;
    box-shadow: 0 0 20px rgba(var(--atsp-glow-primary), 0.3);
}

.atsp-arrow--prev { left: 16px; }
.atsp-arrow--next { right: 16px; }

.atsp-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

/* ---------- Swiper Overrides ---------- */
.atsp-swiper-container .swiper-slide {
    opacity: 0 !important;
    transition: opacity 0s !important;
    height: auto;
}

.atsp-swiper-container .swiper-slide.swiper-slide-active {
    opacity: 1 !important;
    transition: opacity 0.8s ease !important;
}

/* ---------- Hover Effects ---------- */
.atsp-testimonial-card:hover {
    box-shadow:
        0 40px 80px rgba(var(--atsp-glow-primary), 0.22),
        0 0 0 1px rgba(var(--atsp-glow-primary), 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
    transition: box-shadow 0.4s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .atsp-testimonial-card { padding: 36px; }
    .atsp-image-wrapper    { height: 460px; }
}

@media (max-width: 1024px) {
    .atsp-wrapper { padding: 40px 32px 48px; }
    .atsp-slider-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .atsp-image-wrapper { height: 380px; }
    .atsp-trusted-banner {
        bottom: -20px;
        left: 16px;
        right: auto;
        max-width: calc(100% - 32px);
    }
    .atsp-card-col { margin-top: 36px; }
}

@media (max-width: 768px) {
    .atsp-wrapper { padding: 32px 20px 44px; }
    .atsp-testimonial-card { padding: 28px 20px; }
    .atsp-image-wrapper { height: 280px; border-radius: 18px; }
    .atsp-trusted-banner {
        left: 12px;
        right: 12px;
        max-width: calc(100% - 24px);
        bottom: -18px;
        white-space: normal;
    }
    .atsp-card-col { margin-top: 30px; }
    .atsp-testimonial-text { font-size: 15px; }
    .atsp-nav-dots { margin-top: 24px; }
}

@media (max-width: 480px) {
    .atsp-wrapper {
        padding: 24px 14px 36px;
        border-radius: 20px;
    }
    .atsp-testimonial-card {
        padding: 22px 16px;
        border-radius: 16px;
    }
    .atsp-image-wrapper {
        height: 220px;
        border-radius: 14px;
    }
    .atsp-trusted-banner {
        left: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
        bottom: -16px;
        padding: 8px 12px;
        gap: 8px;
    }
    .atsp-banner-avatar {
        width: 28px !important;
        height: 28px !important;
    }
    .atsp-banner-text { font-size: 11px; }
    .atsp-quote-icon { font-size: 28px; margin-bottom: 16px; }
    .atsp-testimonial-text { font-size: 14px; line-height: 1.65; margin-bottom: 20px; }
    .atsp-author-name { font-size: 14px; }
    .atsp-author-designation { font-size: 12px; }
    .atsp-author-image { width: 42px; height: 42px; }
    .atsp-card-col { margin-top: 24px; }
    .atsp-nav-dots { margin-top: 20px; }
    .atsp-arrow { width: 36px; height: 36px; font-size: 12px; }
    .atsp-arrow--prev { left: 8px; }
    .atsp-arrow--next { right: 8px; }
}

@media (max-width: 360px) {
    .atsp-wrapper {
        padding: 20px 12px 32px;
        border-radius: 16px;
    }
    .atsp-testimonial-card {
        padding: 18px 14px;
    }
    .atsp-image-wrapper { height: 180px; }
    .atsp-testimonial-text { font-size: 13px; }
}

/* ---------- Elementor Editor Fixes ---------- */
.elementor-editor-active .atsp-slide-content,
.elementor-editor-active .atsp-quote-icon,
.elementor-editor-active .atsp-stars,
.elementor-editor-active .atsp-testimonial-text,
.elementor-editor-active .atsp-author-row {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

.elementor-editor-active .atsp-swiper-container .swiper-slide {
    opacity: 1 !important;
}

/* ---------- Accessibility ---------- */
.atsp-arrow:focus-visible {
    outline: 2px solid rgb(var(--atsp-glow-primary));
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .atsp-banner-anim-float { animation: none; }
    .atsp-banner-anim-slide { animation: none; }
    .atsp-featured-img      { transition: opacity 0.3s ease; }
    .atsp-slide-content,
    .atsp-quote-icon,
    .atsp-stars,
    .atsp-testimonial-text,
    .atsp-author-row        {
        animation: atsp-fade-only 0.4s ease forwards !important;
    }
}

@keyframes atsp-fade-only {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
