/* Fixes for testimonial Read More/Less buttons on Hostinger - JavaScript version */

/* Style the testimonial body */
.home-testimonial__body {
    position: relative;
    max-height: 8em;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

/* Add fade effect at bottom of truncated testimonials */
.home-testimonial__body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3em;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Styling for expanded testimonials */
.home-testimonial__body.expanded {
    max-height: 2000px !important;
}

.home-testimonial__body.expanded::after {
    opacity: 0 !important;
}

/* Style the toggle button */
.testimonial-toggle-btn {
    display: inline-flex;
    align-items: center;
    cursor: pointer !important;
    padding: 8px 15px !important;
    border-radius: 20px !important;
    background: transparent;
    border: none;
    color: #1abc9c;
    font-weight: 500;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Toggle button hover effect */
.testimonial-toggle-btn:hover {
    background-color: rgba(26, 188, 156, 0.2) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Ensure only one label is visible by default and when expanded */
.testimonial-toggle-btn .testimonial-toggle-btn__less {
    display: none !important;
}

.testimonial-toggle-btn[aria-expanded="true"] .testimonial-toggle-btn__more {
    display: none !important;
}

.testimonial-toggle-btn[aria-expanded="true"] .testimonial-toggle-btn__less {
    display: inline !important;
}

/* Force testimonials to a single column and always expanded on Hostinger */
.home-testimonials-grid {
    grid-template-columns: 1fr !important; /* Override any Tailwind or custom 2-col rules */
}

.home-testimonial__body {
    max-height: none !important; /* Show full content */
    overflow: visible !important;
}

.home-testimonial__body::after {
    display: none !important; /* Remove fade overlay */
}

.testimonial-toggle-btn {
    display: none !important; /* Hide Read more/less button */
}
