/* Testimonials Styling - Custom CSS without Bootstrap */
.testimonials-container {
    margin: 20px 0;
}

/* Custom Tab Navigation */
.testimonial-tabs {
    border-bottom: 2px solid #ff8800;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.testimonial-tabs .tab-button {
    border: none;
    color: #666;
    font-weight: 600;
    padding: 15px 25px;
    background: transparent;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    outline: none;
}

.testimonial-tabs .tab-button:hover {
    color: #ff8800;
    background: #ffd1a680;
}

.testimonial-tabs .tab-button.active {
    color: #ff8800;
    background: white;
    border-bottom: 3px solid #ff8800;
}

/* Tab Content */
.testimonial-tab-content {
    padding-top: 20px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

/* Custom Grid System */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
}

.testimonial-item {
    display: flex;
    flex-direction: column;
}

.testimonial-card {
    background: #fafafa;
    border-radius: 20px;
    padding: 40px 30px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 400px;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.testimonial-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
}

.testimonial-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    justify-content: flex-start;
}

.testimonial-rating .star {
    font-size: 22px;
    color: #ff8800;
    display: inline-block;
    line-height: 1;
}

.testimonial-rating .star.filled {
    color: #ff8800;
}

.testimonial-rating .star.empty {
    color: #ddd;
}

.testimonial-content {
    flex-grow: 1;
    margin-bottom: 40px;
    position: relative;
}

.testimonial-content blockquote {
    font-style: normal;
    font-size: 18px;
    line-height: 1.6;
    color: #4a4a4a;
    margin: 0;
    padding: 0;
    border: none;
    font-weight: 400;
    text-align: left;
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.testimonial-content.truncated blockquote {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-content.truncated blockquote::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    background: #fafafa;
    padding-left: 10px;
    color: #666;
    font-weight: bold;
}

.read-more-btn {
    background: #ff8800;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #4a7ba7;
    transform: translateY(-1px);
}

.testimonial-content blockquote:before,
.testimonial-content blockquote:after {
    display: none;
}

.testimonial-author {
    display: block;
    text-align: left;
}

.author-photo {
    display: none; /* Hide photos to match screenshot */
}

.author-details .author-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #ff8800;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.author-details .author-subtitle {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-tabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        border-bottom: 2px solid #ff8800;
        margin-bottom: 30px;
    }
    
    .testimonial-tabs .tab-button {
        padding: 16px 12px;
        font-size: 16px;
        text-align: center;
        border-radius: 8px 8px 0 0;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .testimonial-card {
        padding: 25px 20px;
        height: auto;
        min-height: 350px;
        max-width: none;
    }
    
    .testimonial-content blockquote {
        font-size: 18px;
        line-height: 1.6;
        max-height: 140px;
    }
    
    .testimonial-content.truncated blockquote {
        -webkit-line-clamp: 5;
        line-clamp: 5;
    }
    
    .testimonial-rating .star {
        font-size: 24px;
    }
    
    .author-details .author-name {
        font-size: 18px;
    }
    
    .author-details .author-subtitle {
        font-size: 16px;
    }
    
    .read-more-btn {
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .testimonial-tabs {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .testimonial-tabs .tab-button {
        padding: 14px 8px;
        font-size: 15px;
        min-height: 48px;
    }
    
    .testimonial-card {
        padding: 20px 15px;
        min-height: 320px;
    }
    
    .testimonial-content blockquote {
        font-size: 17px;
        line-height: 1.5;
        max-height: 130px;
    }
    
    .testimonial-content.truncated blockquote {
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
    
    .testimonial-rating .star {
        font-size: 22px;
    }
    
    .author-details .author-name {
        font-size: 17px;
    }
    
    .author-details .author-subtitle {
        font-size: 15px;
    }
    
    .read-more-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
}

/* Improved responsive grid for larger screens */
@media (min-width: 1200px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading state */
.testimonials-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Empty state */
.testimonials-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-style: italic;
}

/* Testimonial Popup Modal */
.testimonial-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.testimonial-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@media (max-width: 768px) {
    .testimonial-modal-content {
        padding: 30px 20px;
        margin: 10px;
        border-radius: 15px;
        max-height: 90vh;
    }
    
    .testimonial-modal-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }
    
    .testimonial-modal .testimonial-content blockquote {
        font-size: 18px;
        line-height: 1.6;
    }
    
    .testimonial-modal .testimonial-rating .star {
        font-size: 24px;
    }
    
    .testimonial-modal .author-details .author-name {
        font-size: 18px;
    }
    
    .testimonial-modal .author-details .author-subtitle {
        font-size: 16px;
    }
}

.testimonial-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.testimonial-modal-close:hover {
    color: #333;
    background-color: #ffd1a680;
    border-radius: 50%;
}

.testimonial-modal .modal-testimonial-title {
    margin-bottom: 20px;
}

.testimonial-modal .modal-testimonial-title h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
}

.testimonial-modal .testimonial-rating {
    margin-bottom: 20px;
}

.testimonial-modal .testimonial-content {
    margin-bottom: 30px;
}

.testimonial-modal .testimonial-content blockquote {
    max-height: none;
    overflow: visible;
    font-size: 20px;
    line-height: 1.7;
}

.testimonial-modal .testimonial-author {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}