/* Hero Section */
.testimonial-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    z-index: 1;
}

.testimonial-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.testimonial-page-title {
    font-size: 4.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: capitalize;
    letter-spacing: 2px !important;
}

.testimonial-page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Testimonial Cards Specifics */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    margin-top: 45px;
    padding: 2.5rem 1.5rem 2rem !important;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12) !important;
}

/* Testimonial Section Shared Fixes */
.testimonial-carousel .owl-stage {
    display: flex !important;
}
.testimonial-carousel .owl-item {
    display: flex !important;
    height: auto !important;
}

.testimonial-card .card-body-content {
    position: relative;
    z-index: 1;
}

.testimonial-card:hover .read-story-link {
    color: #0b5ed7 !important;
}

.testimonial-card:hover .read-story-link i {
    transform: translateX(6px);
}

.read-story-link i {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.testimonial-text-container {
    position: relative;
}

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

/* Fallback Initial Avatar Styling */
.testimonial-initial-avatar {
    width: 90px;
    height: 90px;
    background-color: #0d6efd;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    transition: transform 0.4s ease;
}

.testimonial-card .list-avatar {
    transition: transform 0.4s ease;
    border: 4px solid #fff;
}

.testimonial-card:hover .testimonial-initial-avatar,
.testimonial-card:hover .list-avatar {
    transform: scale(1.05);
}

/* Detail View Customizations */
.testimonial-detail-main {
    min-height: 70vh;
}

.testimonial-detail-card {
    border: 1px solid rgba(0,0,0,0.04);
}

.back-link {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color, #0d6efd) !important;
}

.back-link:hover i {
    transform: translateX(-4px);
    transition: transform 0.3s ease;
}

.back-link i {
    transition: transform 0.3s ease;
}

/* Professional Fallback Colors (cycles every 4 cards) */
.col-lg-4:nth-child(4n+1) .testimonial-initial-avatar { background-color: #1e3a8a; } /* Navy Blue */
.col-lg-4:nth-child(4n+2) .testimonial-initial-avatar { background-color: #065f46; } /* Emerald Green */
.col-lg-4:nth-child(4n+3) .testimonial-initial-avatar { background-color: #92400e; } /* Amber/Brown */
.col-lg-4:nth-child(4n) .testimonial-initial-avatar { background-color: #5b21b6; }   /* Indigo Purple */

@media (max-width: 768px) {
    .testimonial-page-title {
        font-size: 2.5rem;
    }
}
