/**
 * Testimonials Slider Styles
 * Following design colors and layout
 */

/* Design colors from the mockup */
:root {
    --green-primary: #006a3c;
    --orange-accent: #f7b119;
    --light-gray: #f5f6f6;
    --dark-text: #252525;
    --light-green: #b0cfc1;
}

.testimonials-section {
    padding: 40px 0;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 50px;
}

.testimonials-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--dark-text);
    margin: 0;
    line-height: 1.2;
}

.testimonials-slider-container {
    position: relative;
    width: 100%; /* Full width container */
    margin: 0;
    padding: 0 20px;
    overflow: hidden; /* Hide the left overflow while allowing visual effect */
}

.testimonials-slider {
    display: flex;
    align-items: stretch; /* Make all cards equal height */
    transition: transform 0.5s ease-in-out;
    margin-left: 0; /* Let JavaScript handle positioning for proper centering */
}

.testimonial-slide {
    flex-shrink: 0;
    display: flex; /* Make slide a flex container */
    padding: 0 15px;
    box-sizing: border-box;
}

/* Mobile responsive - 1 card per scroll */
@media (max-width: 768px) {
    .testimonials-slider-container {
        padding: 0 15px;
    }
    
    .testimonials-slider {
        margin-left: -10px;
    }
    
    .testimonial-slide {
        width: 80%;
        padding: 0 10px;
    }
}

/* Tablet responsive - 2 cards visible */
@media (min-width: 769px) and (max-width: 1024px) {
    .testimonial-slide {
        width: 40%;
        padding: 0 15px;
    }
}

/* Desktop responsive - 1.5 cards visible with overflow for extremely wide cards */
@media (min-width: 1025px) {
    .testimonial-slide {
        width: calc(100% / 1.5 * 0.8);
        padding: 0 15px;
    }
    
    .testimonials-slider {
        margin-left: 0; /* Let JavaScript handle positioning for proper centering */
    }
    
    .testimonials-slider-container {
        padding: 0 40px; /* More padding to accommodate the overflow */
        width: 100%; /* Maintain full width on large screens */
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .testimonials-slider {
        margin-left: 0; /* Let JavaScript handle positioning for proper centering */
    }
    
    .testimonials-slider-container {
        padding: 0 60px; /* More padding for extra large screens */
        width: 100%; /* Maintain full width on extra large screens */
    }
}

.testimonial-card {
    /* Reset any theme interference */
    all: unset;
    box-sizing: border-box;
    
    /* Apply only our defined styles */
    background: white;
    border-radius: 12px;
    padding: 40px 50px;
    min-height: 250px; /* Minimum height, but can grow */
    width: 100%; /* Fill the slide container */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    
    /* Ensure clean styling */
    border: none;
    margin: 0;
    text-align: left;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    word-spacing: normal;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.testimonial-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    justify-content: flex-start;
    margin-left: 25px; /* Align with content after the line */
}

.star-icon {
    width: 20px;
    height: 20px;
    opacity: 1;
}

.star-icon.inactive {
    opacity: 0.3;
}

.testimonial-content {
    /* Reset all default blockquote styles */
    all: unset;
    box-sizing: border-box;
    
    /* Apply only our defined styles */
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-text);
    margin: 0 0 30px 0;
    padding: 15px 0 0 25px;
    font-style: italic;
    flex-grow: 1;
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: flex-start;
    
    /* Ensure no theme interference */
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    word-spacing: normal;
    white-space: normal;
    quotes: none;
}

.testimonial-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15px;
    width: 4px;
    height: 50px; /* Short vertical line like in original design */
    background-color: var(--dark-text);
}

.testimonial-author {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--dark-text);
    text-align: left;
    margin-bottom: 8px;
    margin-top: 20px;
    margin-left: 25px; /* Align with content after the line */
}

.testimonial-course {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    color: var(--green-primary);
    text-align: left;
    line-height: 1.4;
    margin-top: 5px;
    margin-left: 25px; /* Align with content after the line */
}

/* Mobile card adjustments */
@media (max-width: 768px) {
    .testimonials-slider-container {
        padding: 0 10px;
    }
    
    .testimonial-slide {
        padding: 0 8px;
    }
    
    .testimonial-card {
        /* Ensure mobile resets first */
        all: unset;
        box-sizing: border-box;
        
        /* Apply mobile-specific styles */
        background: white;
        border-radius: 12px;
        padding: 25px 20px; /* Comfortable mobile padding */
        min-height: 400px; /* Minimum height, but can grow on mobile */
        width: 100%; /* Fill the slide container */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border: none;
        margin: 0;
        text-align: left;
    }
    
    .testimonial-content {
        /* Mobile content resets first */
        all: unset;
        box-sizing: border-box;
        
        /* Apply mobile content styles */
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        font-size: 0.95rem; /* Slightly smaller on mobile */
        line-height: 1.5;
        color: var(--dark-text);
        margin: 0 0 20px 0;
        padding: 10px 0 0 18px; /* Adjusted for mobile */
        font-style: italic;
        flex-grow: 1;
        position: relative;
        min-height: 100px; /* Adjusted for mobile */
        display: flex;
        align-items: flex-start;
        background: none;
        border: none;
        text-align: left;
        quotes: none;
        text-decoration: none;
        text-transform: none;
    }
    
    .testimonial-content::before {
        height: 40px; /* Shorter line on mobile */
        top: 10px;
    }
    
    .testimonial-rating {
        margin-bottom: 15px; /* Less space on mobile */
        margin-left: 18px; /* Align with content after the line on mobile */
    }
    
    .testimonial-author {
        font-size: 1rem; /* Adjusted for mobile */
        margin-top: 15px;
        margin-bottom: 6px;
        margin-left: 18px; /* Align with content after the line on mobile */
    }
    
    .testimonial-course {
        font-size: 1rem; /* Smaller on mobile */
        margin-left: 18px; /* Align with content after the line on mobile */
    }
}

.testimonials-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.testimonial-nav {
    background: transparent;
    border: none;
    padding: 0;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-nav:hover {
    transform: translateY(-2px);
}

.testimonial-nav:active {
    transform: translateY(0);
}

.testimonial-nav img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.testimonial-nav:hover img {
    transform: scale(1.1);
}

.testimonial-nav.disabled,
.testimonial-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.testimonial-nav.disabled:hover,
.testimonial-nav:disabled:hover {
    transform: none;
}

/* Slider positioning */
.testimonials-slider-wrapper {
    overflow: hidden;
    position: relative;
}

/* Smooth transitions */
.testimonials-slider.transitioning {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Loading state */
.testimonials-section.loading .testimonial-card {
    opacity: 0.7;
    pointer-events: none;
}

/* Accessibility 
.testimonial-nav:focus {
    outline: 3px solid var(--orange-accent);
    outline-offset: 2px;
}
    */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .testimonial-card {
        border: 2px solid var(--dark-text);
    }
    
    .testimonial-nav {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .testimonials-slider,
    .testimonial-card,
    .testimonial-nav {
        transition: none;
    }
}

/* Print styles */
@media print {
    .testimonials-navigation {
        display: none;
    }
    
    .testimonials-slider {
        display: block;
    }
    
    .testimonial-slide {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}
