/**
 * TT Testimonials Styles
 */

.tt-testimonials-wrapper {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Column layouts */
.tt-testimonials-wrapper.columns-1 {
    grid-template-columns: 1fr;
}

.tt-testimonials-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tt-testimonials-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tt-testimonials-wrapper.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.tt-testimonials-wrapper.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Testimonial Card */
.tt-testimonial-card {
    background: #f8f9fa;
    border-left: 3px solid #073763;
    padding: 20px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.tt-testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Content */
.tt-testimonial-content {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tt-testimonial-content p {
    margin: 0 0 10px 0;
}

.tt-testimonial-content p:last-child {
    margin-bottom: 0;
}

/* Read More Link */
.tt-read-more {
    color: #14a14a;
    text-decoration: none;
    font-style: italic;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
}

.tt-read-more:hover {
    text-decoration: underline;
}

/* Author */
.tt-testimonial-author {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tt-testimonial-author .author-name {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    margin-bottom: 3px;
    font-style: italic;
}

.tt-testimonial-author .author-company {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Responsive */
/* For 5 columns - reduce to 4 on medium-large screens */
@media (max-width: 1400px) {
    .tt-testimonials-wrapper.columns-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* For 4-5 columns - reduce to 3 on smaller screens */
@media (max-width: 1200px) {
    .tt-testimonials-wrapper.columns-4,
    .tt-testimonials-wrapper.columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* For 3-5 columns - reduce to 2 on tablets */
@media (max-width: 992px) {
    .tt-testimonials-wrapper.columns-3,
    .tt-testimonials-wrapper.columns-4,
    .tt-testimonials-wrapper.columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* All multi-column layouts become single column on mobile */
@media (max-width: 768px) {
    .tt-testimonials-wrapper.columns-2,
    .tt-testimonials-wrapper.columns-3,
    .tt-testimonials-wrapper.columns-4,
    .tt-testimonials-wrapper.columns-5 {
        grid-template-columns: 1fr;
    }
    
    .tt-testimonial-card {
        min-height: auto;
    }
}

/* Modal Styles */
.tt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.tt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.tt-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.tt-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.2s ease;
    z-index: 1;
}

.tt-modal-close:hover {
    color: #333;
}

.tt-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tt-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.tt-modal-body {
    padding: 30px;
}

.tt-modal-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    white-space: pre-wrap;
}

.tt-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.tt-modal-close-btn {
    background: #14a14a;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tt-modal-close-btn:hover {
    background: #0f8a3d;
}

/* Modal responsive */
@media (max-width: 768px) {
    .tt-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .tt-modal-header,
    .tt-modal-body,
    .tt-modal-footer {
        padding: 20px;
    }
    
    .tt-modal-header h3 {
        font-size: 16px;
        padding-right: 30px;
    }
    
    .tt-modal-body p {
        font-size: 14px;
    }
}
