/* Variables now live inside this class only */
.testimonial_scope {
    --primary: #4C2A4F;
    --primary-light: #6B3E6F;
    --primary-dark: #331D35;
    --accent: #E8B4A8;
    --bg: #FAF8F6;
    --card-bg: #FFFFFF;
    --text-primary: #2D1F31;
    --text-secondary: #6B5B6F;
    --shadow: rgba(76, 42, 79, 0.12);
    
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

/* Scoped Reset: Replaces the '*' selector safely */
.testimonial_scope, 
.testimonial_scope *, 
.testimonial_scope *::before, 
.testimonial_scope *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.testimonial_scope .container {
/*     max-width: 1200px; */
/*     margin: 0 auto; */
/*     padding: 60px 24px; */
}

/* Updated hero section to match reference design */
.testimonial_scope .testimony {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 100px 80px;
    margin-bottom: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    min-height: 500px;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

/* Dark overlay for better text contrast - matches reference */
.testimonial_scope .testimony::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right, 
        rgba(25, 40, 50, 0.1) 0%, 
        rgba(25, 40, 50, 0.1) 50%, 
        rgba(25, 40, 50, 0.1) 100%
    );
    z-index: 1;
}

.testimonial_scope .banner-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding-left: 20px;
}

.testimonial_scope .testimony h1 {
    font-family: var(--Red-Hat-Display);
    font-size: 70px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.testimonial_scope .testimony p {
    font-family: var(--Neue-Montreal-Regular);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    line-height: 1.6;
}

.testimonial_scope .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    animation: fadeIn 1s ease-out 0.3s both;
	width: 80%;
    justify-self: center;
	padding-bottom: 40px;
}

.testimonial_scope .testimonial-card {
    font-family: var(--Neue-Montreal-Regular);
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.testimonial_scope .testimonial-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial_scope .testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial_scope .testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(76, 42, 79, 0.2);
}

.testimonial_scope .quote-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 20px;
}

.testimonial_scope .testimonial-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.testimonial_scope .testimonial-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.testimonial_scope .show-more-btn {
    background: none; border: none;
    color: var(--primary);
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
	margin-top: auto;
}

.testimonial_scope .show-more-btn:hover {
    color: var(--primary-light);
    gap: 10px;
}

.testimonial_scope .show-more-btn::after {
    content: '→';
    font-size: 16px;
    transition: transform 0.3s ease;
}

.testimonial_scope .show-more-btn:hover::after {
    transform: translateX(4px);
}

/* Modal Styles - Prefixed with .testimonial_scope to ensure no conflict */
.testimonial_scope .modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45, 31, 49, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 24px;
}

.testimonial_scope .modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.testimonial_scope .modal {
	font-family: var(--Neue-Montreal-Regular);
    background: var(--card-bg);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(76, 42, 79, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.testimonial_scope .modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.testimonial_scope .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 48px 40px;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.testimonial_scope .modal-name {
    font-size: 36px;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: 1;
}

.testimonial_scope .modal-body {
    padding: 40px;
}

.testimonial_scope .modal-text {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-primary);
}

.testimonial_scope .close-btn {
    position: absolute;
    top: 24px; right: 24px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Animations - names kept same as yours */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Stagger animations for cards */
.testimonial_scope .testimonial-card:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s both; }
.testimonial_scope .testimonial-card:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.testimonial_scope .testimonial-card:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.3s both; }

/* Tab View (Tablets) */
@media (max-width: 1024px) {
    .testimonial_scope .testimonials-grid {
        /* Force exactly 2 columns */
        grid-template-columns: repeat(2, 1fr); 
        width: 90%; /* Wider width for better fit on tablets */
    }

    .testimonial_scope .testimony {
        padding: 80px 40px;
        min-height: 450px;
    }

    .testimonial_scope .testimony h1 {
        font-size: 56px;
    }
}
@media (max-width: 767px) {
	.testimonial_scope .testimony {
        padding: 60px 24px;
        background-size: cover;
        text-align: left;
        justify-content: center;
        min-height: 400px;
    }
    
/*     .testimonial_scope .testimony::before {
        background: rgba(25, 40, 50, 0.8);
    } */
    
    .testimonial_scope .banner-content {
        max-width: 100%;
        padding-left: 0;
    }
    
    .testimonial_scope .testimony h1 { 
        font-size: 42px;
        letter-spacing: -0.5px;
		text-align: center;
    }
    
    .testimonial_scope .testimony p {
        font-size: 18px;
    }
    
   .testimonial_scope .testimonials-grid {
        /* Switch to 1 column for small screens */
        grid-template-columns: 1fr;
        width: 95%;
	    padding: 0px 20px;
    }
}