/* Testimonials Page Specific Styles */

.testimonial-intro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 2rem;
    max-width: 1300px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(231, 76, 60, 0.1) 100%);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08), 0 0 10px rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.testimonial-intro-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.testimonial-intro-container::after {
    content: '"';
    position: absolute;
    bottom: -20px;
    right: 20px;
    font-size: 8rem;
    font-family: Georgia, serif;
    color: rgba(249, 115, 22, 0.05);
    line-height: 1;
    z-index: 0;
}

.testimonial-intro-container:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 15px rgba(52, 152, 219, 0.2);
    transform: translateY(-5px);
}

.testimonial-intro-container .section-intro {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem;
    margin: 0 0 1rem 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-intro-container .section-intro:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.testimonial-intro-container + .section-intro {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-intro-container + .section-intro:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.testimonials h2 {
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
}

.testimonials h2::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: Georgia, serif;
}

/* Testimonial Cards Styling */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1300px;
    margin: 3rem auto;
}

.testimonial-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }
.testimonial-card:nth-child(4) { animation-delay: 0.4s; }
.testimonial-card:nth-child(5) { animation-delay: 0.5s; }
.testimonial-card:nth-child(6) { animation-delay: 0.6s; }

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: rgba(52, 152, 219, 0.1);
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.15), 0 0 5px rgba(139, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #e8f4fc 100%);
    border-color: rgba(139, 0, 0, 0.2);
}

.testimonial-card:hover::before {
    opacity: 1;
}

.testimonial-rating {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
}

.testimonial-rating .material-icons {
    font-size: 1.2rem;
    margin-right: 0.2rem;
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-rating .material-icons {
    transform: scale(1.2);
    animation: pulse 1s infinite alternate;
    color: #f97316;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.testimonial-text {
    flex-grow: 1;
    position: relative;
    padding-left: 10px;
    border-left: 3px solid var(--accent-color);
    margin-left: 5px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-style: italic;
    z-index: 1;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.testimonial-card:hover .testimonial-author {
    color: var(--secondary-color);
}

.testimonial-location {
    color: var(--secondary-color);
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
}

.testimonial-location::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-location::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-intro-container {
        flex-direction: column;
        padding: 1.5rem; /* Reduced padding from 2.5rem */
    }
    
    .section-intro {
        margin: 0 auto 1.5rem;
        padding-left: 1rem;
        padding: 1rem; /* Reduced padding from 1.5rem */
    }
    
    .testimonial-intro-container .section-intro {
        padding: 1rem; /* Reduced padding for nested section-intro */
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.8rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-intro-container {
        padding: 1rem; /* Further reduced padding for smaller screens */
    }
    
    .section-intro {
        padding: 0.8rem; /* Further reduced padding for smaller screens */
    }
    
    .testimonial-intro-container .section-intro {
        padding: 0.8rem; /* Further reduced padding for nested section-intro */
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-rating .material-icons {
        font-size: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        padding-left: 8px;
    }
}