/**
 * List Layout - Cleaned and Optimized
 */

/* Main container */
.glowrev-testimonials-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Testimonial item */
.glowrev-testimonial-list-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* Add quote mark before testimonial item in list layout */
.glowrev-testimonial-list-item:before {
    content: '\201C';
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 8rem;
    line-height: 1;
    color: #ffc107;
    font-family: Georgia, serif;
    z-index: 1;
    opacity: 0.3;
}

/* Inner grid layout */
.glowrev-testimonial-list-inner {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: 200px;
}

/* Media section */
.glowrev-testimonial-list-media {
    background: #f8f9fa;
    min-height: 100%;
    overflow: hidden;
    position: relative;
}

/* Avatar image */
.glowrev-testimonial-avatar {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
    border-radius: 0;
}

/* Avatar image fallback handling */
.glowrev-testimonial-avatar img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Default avatar fallback */
.glowrev-default-avatar {
    align-items: center;
    background: linear-gradient(135deg, #f6f9fc 0%, #f0f4f8 100%);
    color: #4a5568;
    display: flex;
    font-size: 3.5rem;
    font-weight: 600;
    height: 100%;
    justify-content: center;
    width: 100%;
    position: relative;
}

.glowrev-default-avatar img {
    border-radius: 50%;
    height: 80px;
    width: 80px;
    object-fit: cover;
}

/* Content section */
.glowrev-testimonial-list-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

/* Header section */
.glowrev-testimonial-header {
    margin-bottom: 1.25rem;
    text-align: left;
}

/* Author name */
.glowrev-testimonial-author {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove default h3 margins from testimonial author in list layout */
.glowrev-testimonials-list .glowrev-testimonial-author,
.glowrev-testimonials-list h3.glowrev-testimonial-author {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Company name */
.glowrev-testimonial-company {
    color: #4a5568;
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 5px 0;
}

/* Position */
.glowrev-testimonial-position {
    color: #4a5568;
    display: block;
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 5px 0;
}

/* Designation */
.glowrev-testimonial-designation {
    color: #4a5568;
    display: block;
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 5px 0;
}

/* Testimonial content */
.glowrev-testimonials-list .glowrev-testimonial-list-content {
    border-left: 3px solid #e2e8f0;
    color: #4a5568;
    flex: 1;
    font-size: 1rem;
    line-height: 1.7;
    margin: 5px 0;
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

/* Ensure header is contained */
.glowrev-testimonials-list .glowrev-testimonial-header {
    margin-bottom: 0.5rem;
    order: 1;
}

/* Ensure content is contained */
.glowrev-testimonials-list .glowrev-testimonial-content {
    order: 2;
    flex: 1;
    overflow-y: auto;
}

/* Ensure rating is contained */
.glowrev-testimonials-list .glowrev-testimonial-rating {
    order: 3;
    margin-top: 0.5rem;
}

/* Date container below rating within content */
.glowrev-testimonials-list .glowrev-testimonial-date-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    text-align: center;
    order: 4;                    /* Position below all other elements */
}

.glowrev-testimonial-date {
    font-size: 0.85rem;
    color: #95a5a6;
    font-style: italic;
}

/* Hover effects */
.glowrev-testimonial-list-item:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.glowrev-testimonial-avatar {
    transition: transform 0.5s ease;
}

.glowrev-testimonial-list-item:hover .glowrev-testimonial-avatar {
    transform: scale(1.03);
}

/* Responsive styles */
@media (max-width: 767px) {
    .glowrev-testimonials-list {
        padding: 0 15px;
    }
    
    .glowrev-testimonial-list-item {
        margin-bottom: 1.5rem;
    }
    
    .glowrev-testimonial-list-inner {
        grid-template-columns: 1fr;
    }
    
    .glowrev-testimonial-list-media {
        height: 250px;
        min-height: 250px;
    }
    
    .glowrev-testimonial-list-content {
        padding: 1.5rem;
    }
    
    .glowrev-testimonials-list .glowrev-testimonial-author {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
}

/* RTL support */
.rtl .glowrev-testimonial-list-inner {
    direction: rtl;
    text-align: right;
}
