/* css/testimonials.css */
/* Isolated styles for Smart Review Cards */

/* Card Container */
.tm-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: default;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Hover Effect (Desktop) */
.tm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

/* Header Section */
.tm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tm-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.tm-stars {
    display: flex;
    gap: 2px;
    color: #facc15;
    /* Yellow-400 */
}

/* Content Area */
.tm-content {
    flex: 1;
    position: relative;
}

/* The Text with Line Clamp */
.tm-text {
    color: #475569;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    /* Space for button */

    /* Default State (Collapsed) */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;

    transition: all 0.4s ease-in-out;
}

/* "Read More" Button */
.tm-read-more {
    position: absolute;
    bottom: 0;
    right: 0;
    /* RTL context - right side */
    background: rgba(255, 255, 255, 0.95);
    color: #2563eb;
    /* Blue-600 */
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 -4px 10px rgba(255, 255, 255, 1);
    /* White fade effect above button */
    transition: opacity 0.2s;
}

.tm-read-more:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

/* --- INTERACTION STATES --- */

/* 1. Desktop Hover State */
@media (min-width: 1024px) {
    .tm-card:hover .tm-text {
        -webkit-line-clamp: unset;
        /* Show all text */
    }

    .tm-card:hover .tm-read-more {
        opacity: 0;
        pointer-events: none;
    }
}

/* 2. Mobile Expanded State (Class toggled by JS) */
.tm-card.is-expanded .tm-text {
    -webkit-line-clamp: unset;
}

/* Hide button when expanded */
.tm-card.is-expanded .tm-read-more {
    display: none;
}

/* Quote Icon Decoration - Watermark Style */
.tm-quote-icon {
    position: absolute;
    bottom: -15px;
    /* Aligned to bottom */
    left: 10px;
    /* Aligned to left */
    top: auto;
    /* Reset top */
    color: #cbd5e1;
    /* Lighter Slate-300 */
    width: 80px;
    /* Large decorative size */
    height: 80px;
    z-index: 0;
    opacity: 0.1;
    /* Very subtle, won't interfere with text */
    transform: rotate(10deg);
    pointer-events: none;
    /* Clicks pass through to text */
}

/* Logo small */
.tm-logo {
    height: 22px;
    /* Increased from 14px */
    opacity: 1;
    margin-bottom: 4px;
    display: block;
}

/* Rating Group Wrapper (Logo + Stars) */
.tm-rating-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align to the left (End) in RTL context */
    justify-content: center;
}