/* ========================================================================
   SMG TESTIMONIALS WIDGET
   Kundenbewertungen mit Slider und Grid-Layout
   ======================================================================== */

.smg-testimonials-widget {
    padding: 6rem 0;
    background: radial-gradient(ellipse at center, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.smg-testimonials-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
    animation: float-background 25s ease-in-out infinite;
    z-index: 1;
}

.smg-testimonials-widget > * {
    position: relative;
    z-index: 2;
}

.smg-testimonials-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fade-in-up 1s ease-out;
}

.smg-testimonials-title {
    /* Use unified title system from common.css */
    font-family: var(--font-secondary);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--smg-space-lg);
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: var(--smg-gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.smg-testimonials-subtitle {
    /* Use unified subtitle system from common.css */
    font-size: var(--smg-text-xl);
    color: var(--smg-text-light-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
    animation: fade-in-up 1s ease-out 0.2s both;
}

.smg-testimonials-container.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.smg-testimonials-container.layout-slider {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.smg-testimonials-slider {
    position: relative;
}

.smg-testimonial-item {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    animation: card-float 7s ease-in-out infinite;
    animation-delay: calc(var(--card-index, 0) * 0.5s);
}

/* Individual colors for testimonial cards */
.smg-testimonial-item:nth-child(1) {
    --testimonial-color: #dc2626;
    --testimonial-bg: #fef2f2;
    --card-index: 0;
}

.smg-testimonial-item:nth-child(2) {
    --testimonial-color: #2563eb;
    --testimonial-bg: #eff6ff;
    --card-index: 1;
}

.smg-testimonial-item:nth-child(3) {
    --testimonial-color: #16a34a;
    --testimonial-bg: #f0fdf4;
    --card-index: 2;
}

.smg-testimonial-item:nth-child(4) {
    --testimonial-color: #d97706;
    --testimonial-bg: #fffbeb;
    --card-index: 3;
}

.smg-testimonial-item:nth-child(5) {
    --testimonial-color: #7c3aed;
    --testimonial-bg: #faf5ff;
    --card-index: 4;
}

.smg-testimonial-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--testimonial-color, var(--primary-red));
    border-radius: 24px 24px 0 0;
    animation: pulse-glow 2s ease-in-out infinite;
}

.smg-testimonial-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--testimonial-bg, #f8fafc);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.smg-testimonials-container.layout-slider .smg-testimonial-item {
    display: none;
}

.smg-testimonials-container.layout-slider .smg-testimonial-item:first-child {
    display: block;
}

.smg-testimonial-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    animation-play-state: paused;
}

.smg-testimonial-item:hover::after {
    opacity: 0.4;
}

.smg-testimonial-item > * {
    position: relative;
    z-index: 2;
}

/* Quote Style Variant */
.smg-testimonials-widget.style-quote .smg-testimonial-item::before {
    content: '';
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--testimonial-color, var(--primary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    z-index: 3;
    opacity: 0.1;
    animation: icon-pulse 3s ease-in-out infinite;
}

.smg-testimonials-widget.style-quote .smg-testimonial-item::before {
    content: '"';
    font-family: var(--font-secondary);
    line-height: 1;
}

/* Star Rating */
.smg-testimonial-rating {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 2rem;
    animation: fade-in-up 0.6s ease-out 0.2s both;
}

.smg-star {
    color: #fbbf24;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: star-twinkle 3s ease-in-out infinite;
    animation-delay: calc(var(--star-index, 0) * 0.2s);
}

@keyframes star-twinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.smg-star:nth-child(1) { --star-index: 0; }
.smg-star:nth-child(2) { --star-index: 1; }
.smg-star:nth-child(3) { --star-index: 2; }
.smg-star:nth-child(4) { --star-index: 3; }
.smg-star:nth-child(5) { --star-index: 4; }

.smg-star:not(.filled) {
    color: #e5e7eb;
    animation: none;
}

.smg-star:hover {
    transform: scale(1.2) rotate(15deg);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

/* Testimonial Text */
.smg-testimonial-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 2.5rem;
    font-style: italic;
    font-weight: 500;
    position: relative;
    animation: fade-in-up 0.6s ease-out 0.4s both;
}

.smg-testimonial-text::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: -0.75rem;
    font-size: 3rem;
    color: var(--testimonial-color, var(--primary-red));
    font-family: var(--font-secondary);
    line-height: 1;
    opacity: 0.3;
}

/* Customer Info */
.smg-customer-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: fade-in-up 0.6s ease-out 0.6s both;
}

.smg-customer-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--testimonial-color, var(--primary-red));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.smg-customer-photo::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--testimonial-color, var(--primary-red)), transparent, var(--testimonial-color, var(--primary-red)));
    z-index: -1;
    animation: border-spin 4s linear infinite;
}

@keyframes border-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.smg-customer-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.smg-customer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.smg-customer-info:hover .smg-customer-photo img {
    filter: brightness(1.1) contrast(1.05);
}

.smg-customer-details {
    flex: 1;
}

.smg-customer-name {
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.smg-customer-position {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.smg-customer-company {
    color: var(--testimonial-color, var(--primary-red));
    font-weight: 700;
    font-size: 1rem;
}

/* Project Type Badge */
.smg-project-type {
    display: inline-block;
    background: var(--testimonial-color, var(--primary-red));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smg-project-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Slider Controls */
.smg-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.smg-slider-prev,
.smg-slider-next {
    background: var(--primary-red);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

.smg-slider-prev::before,
.smg-slider-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.smg-slider-prev:hover::before,
.smg-slider-next:hover::before {
    left: 100%;
}

.smg-slider-prev:hover,
.smg-slider-next:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.4);
}

.smg-slider-dots {
    display: flex;
    gap: 0.75rem;
}

.smg-slider-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.smg-slider-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.smg-slider-dot.active {
    background: var(--primary-red);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.smg-slider-dot:hover {
    background: var(--primary-red);
    transform: scale(1.1);
}

/* Customer Logos Section */
.smg-customer-logos {
    margin-top: 5rem;
    text-align: center;
}

.smg-logos-title {
    font-size: 1.3rem;
    color: #6b7280;
    margin-bottom: 3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.smg-logos-carousel {
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 2rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.smg-logos-track {
    display: flex;
    animation: scroll-logos 40s linear infinite;
    gap: 3rem;
}

.smg-logos-track:hover {
    animation-play-state: paused;
}

.smg-logo-item {
    flex-shrink: 0;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.smg-logo-item img {
    max-height: 70px;
    max-width: 140px;
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(100%) brightness(0.8);
}

.smg-logo-item:hover img {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Quote Symbol */
.smg-testimonial-quote {
    font-family: var(--font-secondary);
    font-size: 5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: -1rem;
    left: -1rem;
    z-index: 1;
    pointer-events: none;
}

/* RESPONSIVE STYLES
   ======================================================================== */

@media (max-width: 768px) {
    .smg-testimonials-widget {
        padding: 4rem 0;
    }

    .smg-testimonials-container.layout-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .smg-testimonial-item {
        padding: 2rem;
    }

    .smg-customer-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .smg-customer-photo {
        width: 60px;
        height: 60px;
    }

    .smg-slider-controls {
        gap: 2rem;
    }

    .smg-slider-prev,
    .smg-slider-next {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .smg-testimonials-title {
        font-size: 2rem;
    }

    .smg-testimonial-item {
        padding: 1.5rem;
    }

    .smg-testimonial-text {
        font-size: 1.1rem;
    }

    .smg-customer-logos {
        margin-top: 3rem;
    }

    .smg-logos-title {
        font-size: 1.1rem;
    }
} 