/* styles for about.html */

#about-content {
    padding: 0;
}

.page-title-section {
    padding: 100px 0 60px;
    text-align: center;
    background-color: var(--color-bg-white);
}

.page-title-section h1 {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.page-title-section p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Ensure the Why Choose section has enough contrast if needed, 
   though it already has its own styles in style.css */
.why-choose-section {
    padding: 60px 0; /* Balanced padding */
}

/* =========================================
   Mobile Optimization
   ========================================= */
@media (max-width: 768px) {
    .page-title-section {
        padding: 60px 0 40px;
    }

    .page-title-section h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .page-title-section p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .why-choose-section {
        padding: 40px 0;
    }

    .why-title {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
        text-align: center;
    }

    .why-text {
        font-size: 0.95rem !important;
        text-align: center;
        padding: 0 10px;
    }

    .image-frame-placeholder {
        min-height: 300px !important; /* Smaller placeholder on mobile */
    }
}

/* =========================================
   Testimonials Section
   ========================================= */
.testimonials-section {
    background-color: var(--color-primary); /* Fond bleu */
    padding: 60px 0;
}

.testimonials-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.testimonial-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 24px;
    width: 100%;
    max-width: 450px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Roboto', Arial, sans-serif;
}

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

.testimonial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-bg-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.user-info {
    flex-grow: 1;
}

.user-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.user-info .title {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.stars {
    color: #FFD700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.testimonial-card .comment {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--color-text-main);
    line-height: 1.5;
    font-style: italic;
    
    /* Initially hidden for smooth transition */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

/* Class toggled by JavaScript */
.testimonial-card.show-comment .comment {
    max-height: 200px;
    opacity: 1;
    margin-top: 20px;
}

/* =========================================
   Flash Cards Slider
   ========================================= */
.why-choose-slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    min-height: 400px;
}

.stacked-cards {
    position: relative;
    width: 320px;
    height: 350px;
    perspective: 1000px;
}

.flash-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    /* Transition for layout positioning */
    transition: all 0.5s ease-in-out;
    transform-origin: center bottom;
}

.card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
}

.card-content {
    padding: 30px;
    z-index: 2;
}

.card-content .badge-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #fff;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.card-content h3 {
    font-size: 1.8rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* Base stack states - Default classes */
.flash-card.card-front {
    transform: translateY(0) scale(1) rotate(0);
    z-index: 3;
    opacity: 1;
}

.flash-card.card-middle {
    transform: translateY(20px) scale(0.9) rotate(-3deg);
    z-index: 2;
    opacity: 0.9;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.flash-card.card-back {
    transform: translateY(40px) scale(0.8) rotate(3deg);
    z-index: 1;
    opacity: 0.8;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Animating states */
.flash-card.slide-out {
    transform: translateX(-150%) rotate(-15deg);
    opacity: 0;
    z-index: 3;
}
.flash-card.slide-out-right {
    transform: translateX(150%) rotate(15deg);
    opacity: 0;
    z-index: 3;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 440px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 0;
    z-index: 10;
    pointer-events: none;
}

.slider-btn {
    pointer-events: auto;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.slider-btn:hover {
    background-color: var(--color-btn);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .why-choose-slider-container {
        margin-top: 40px;
        min-height: 380px;
    }
    .stacked-cards {
        width: 280px;
        height: 300px;
    }
    .flash-card.card-middle {
        transform: translateY(15px) scale(0.9) rotate(-2deg);
    }
    .flash-card.card-back {
        transform: translateY(30px) scale(0.8) rotate(2deg);
    }
    .slider-controls {
        display: none;
    }
}
