/**
 * TNG Testimonials Frontend Styles
 * Premium design for client testimonials
 */

/* Container Styles */
.tng-testimonials-container {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

/* Grid Layout */
.tng-testimonials-container.style-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.tng-testimonials-container.style-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tng-testimonials-container.style-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tng-testimonials-container.style-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* List Layout */
.tng-testimonials-container.style-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 2rem auto;
}

/* Slider Layout */
.tng-testimonials-container.style-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 #f0f0f0;
}

.tng-testimonials-container.style-slider .tng-testimonial-item {
    flex: 0 0 auto;
    width: min(90%, 500px);
    scroll-snap-align: center;
}

/* Testimonial Item */
.tng-testimonial-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tng-testimonial-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.tng-testimonial-item.is-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
}

.tng-testimonial-item.is-featured .tng-testimonial-quote p {
    color: #ffffff;
}

.tng-testimonial-item.is-featured .tng-testimonial-author-name,
.tng-testimonial-item.is-featured .tng-testimonial-author-meta {
    color: rgba(255, 255, 255, 0.95);
}

.tng-testimonial-item.is-featured .star.filled {
    color: #ffd700;
}

.tng-testimonial-item.is-featured .star {
    color: rgba(255, 255, 255, 0.4);
}

/* Rating Stars */
.tng-testimonial-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.tng-testimonial-rating .star {
    color: #e5e7eb;
    transition: color 0.2s;
}

.tng-testimonial-rating .star.filled {
    color: #fbbf24;
}

/* Quote */
.tng-testimonial-quote {
    flex-grow: 1;
    margin: 0 0 1.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    border-left: 4px solid #4a90e2;
}

.tng-testimonial-item.is-featured .tng-testimonial-quote {
    border-left-color: rgba(255, 255, 255, 0.5);
}

.tng-testimonial-quote p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    font-style: italic;
}

.tng-testimonial-quote::before {
    content: '"';
    position: absolute;
    left: -0.5rem;
    top: -0.5rem;
    font-size: 4rem;
    color: #4a90e2;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.tng-testimonial-item.is-featured .tng-testimonial-quote::before {
    color: rgba(255, 255, 255, 0.3);
}

/* Author Info */
.tng-testimonial-author {
    margin-bottom: 1rem;
}

.tng-testimonial-author-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.tng-testimonial-author-meta {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.tng-testimonial-author-meta .position {
    font-weight: 500;
}

.tng-testimonial-author-meta .company {
    font-weight: 600;
    color: #4a90e2;
}

.tng-testimonial-item.is-featured .tng-testimonial-author-meta .company {
    color: rgba(255, 255, 255, 0.95);
}

.tng-testimonial-author-meta .separator {
    margin: 0 0.25rem;
}

/* Company Logo */
.tng-testimonial-logo {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.tng-testimonial-item.is-featured .tng-testimonial-logo {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.tng-testimonial-logo img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.tng-testimonial-item:hover .tng-testimonial-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.tng-testimonial-item.is-featured .tng-testimonial-logo img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.tng-testimonial-item.is-featured:hover .tng-testimonial-logo img {
    opacity: 1;
}

/* List Style Specific */
.tng-testimonials-container.style-list .tng-testimonial-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 1.5rem;
}

.tng-testimonials-container.style-list .tng-testimonial-logo {
    order: -1;
    margin-right: 1.5rem;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
}

.tng-testimonials-container.style-list .tng-testimonial-logo img {
    max-width: 80px;
    max-height: 80px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .tng-testimonials-container.style-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .tng-testimonials-container.style-grid.columns-3,
    .tng-testimonials-container.style-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tng-testimonials-container {
        gap: 1.5rem;
    }
    
    .tng-testimonial-item {
        padding: 1.5rem;
    }
    
    .tng-testimonials-container.style-list .tng-testimonial-item {
        flex-direction: column;
    }
    
    .tng-testimonials-container.style-list .tng-testimonial-logo {
        order: 0;
        margin-right: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
    }
}

@media (max-width: 480px) {
    .tng-testimonials-container.style-grid.columns-2,
    .tng-testimonials-container.style-grid.columns-3,
    .tng-testimonials-container.style-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .tng-testimonial-quote p {
        font-size: 0.9375rem;
    }
    
    .tng-testimonial-author-name {
        font-size: 1rem;
    }
    
    .tng-testimonials-container.style-slider .tng-testimonial-item {
        width: 85%;
    }
}

/* Accessibility */
.tng-testimonial-item:focus-within {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .tng-testimonial-item {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .tng-testimonial-item.is-featured {
        background: #f3f4f6;
        color: #111827;
    }
}
