/* Custom CSS for Santé Mentale 360° - SEO Optimized */

/* Critical Path CSS Optimizations */
.hero-section {
    contain: layout style paint;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure hero section is always visible on mobile */
@media (max-width: 767.98px) {
    .hero-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        contain: none !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

.book-cover-holder {
    contain: layout style paint;
    aspect-ratio: 3/4;
}

.book-cover {
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
}

/* Performance improvements for CLS (Cumulative Layout Shift) */
.quotes-carousel {
    min-height: 200px;
    contain: layout style paint;
}

.carousel-item {
    will-change: transform;
}

/* Global Mobile Section Headings - Larger Font Size */
@media (max-width: 768px) {
    .section-heading {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
    }
}

/* Mobile hero section optimizations */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        contain: none;
    }
    
    .hero-section .container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .hero-section .row {
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
    }
    
    .hero-section .col-12 {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-section .promo {
        padding: 0 !important;
        text-align: center !important;
    }
    
    .hero-section .headline {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section .subheadline {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-section .book-cover-holder {
        text-align: center !important;
        margin: 0 auto !important;
        max-width: 250px !important;
    }
    
    .hero-section .book-cover {
        width: 100% !important;
        height: auto !important;
        max-width: 250px !important;
    }
    
    /* Reduce spacing between CTA buttons on mobile */
    .cta-holder.row {
        --bs-gutter-y: 0.75rem !important;
        gap: 0.75rem !important;
    }
    
    .cta-holder .col-12 {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* LEO Enhancement: Improved content structure and readability */
.faq-section .faq-content p {
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.faq-section .faq-content p strong {
    color: #2c5282;
    font-weight: 600;
}

/* LEO: Better visual hierarchy for AI parsing */
.faq-section .faq-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.faq-section .faq-content ul li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

/* LEO: Enhanced focus states for accessibility and AI understanding */
.faq-toggle:focus,
.faq-toggle:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* LEO: Improved button contrast and readability */
#toggle-more-faqs:focus,
#toggle-more-faqs:focus-visible {
    outline: 2px solid #2c5282;
    outline-offset: 2px;
}

/* LEO: Better spacing for content blocks */
.faq-content .p-3 {
    padding: 1.25rem !important;
}

/* Core Web Vitals Optimizations */
.hero-quotes {
    transform: translateZ(0);
}

/* Font loading optimization for Core Web Vitals */
/* Note: These @font-face rules are placeholders for font optimization */
/* Actual font files would be loaded via Google Fonts or local files */

/* Existing responsive optimizations */
.logo-responsive {
    height: 80px;
    width: auto;
    max-width: 100%;
    transition: all 0.3s ease;
}

.logo-wrapper {
    padding: 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-responsive {
        height: 60px;
    }
    
    .logo-wrapper {
        padding: 0.5rem 0;
    }
    
    /* LEO: Mobile FAQ improvements */
    .faq-section .faq-content .p-3 {
        padding: 1rem !important;
    }
    
    /* Mobile performance optimizations - removed problematic contain: strict */
}

@media (max-width: 480px) {
    .logo-responsive {
        height: 50px;
    }
    
    /* Small Mobile Section Headings */
    .section-heading {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
    }
    
    /* LEO: Smaller mobile spacing */
    .faq-section .faq-content .p-3 {
        padding: 0.875rem !important;
    }
    
    /* Additional mobile hero section fixes */
    .hero-section {
        padding: 1.5rem 0 !important;
        display: block !important;
        min-height: auto !important;
        contain: none !important;
    }
    
    .hero-section .headline {
        font-size: 1.5rem !important;
        line-height: 1.1 !important;
    }
    
    .hero-section .subheadline {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-section .cta-holder .btn {
        font-size: 0.9rem !important;
        padding: 0.75rem 1.5rem !important;
    }
}

@media (max-width: 320px) {
    .logo-responsive {
        height: 40px;
    }
    
    /* Extra Small Mobile Section Headings */
    .section-heading {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
    }
    
    /* Extra small mobile hero optimizations */
    .hero-section {
        padding: 1rem 0 !important;
    }
    
    .hero-section .headline {
        font-size: 1.3rem !important;
    }
    
    .hero-section .subheadline {
        font-size: 0.85rem !important;
    }
    
    .hero-section .book-cover-holder {
        max-width: 200px !important;
    }
}

/* SEO-optimized book badge styling */
.book-badge {
    position: absolute;
    right: -10px;
    top: 20px;
    width: 90px !important;
    height: 90px !important;
    background: #5cb377;
    border-radius: 50%;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-family: 'Quicksand', sans-serif;
    padding-top: 22px !important;
    font-size: 0.65rem !important;
    line-height: 1.1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    transform: translateZ(0);
}

/* Responsive book badge adjustments */
@media (max-width: 768px) {
    .book-badge {
        width: 80px !important;
        height: 80px !important;
        right: -5px;
        top: 15px;
        padding-top: 20px !important;
        font-size: 0.6rem !important;
    }
}

@media (max-width: 480px) {
    .book-badge {
        width: 70px !important;
        height: 70px !important;
        right: 0px;
        top: 10px;
        padding-top: 18px !important;
        font-size: 0.55rem !important;
    }
}

/* Enhanced book badge specificity for SEO */
.book-cover-holder .book-badge.d-inline-block.shadow {
    position: absolute !important;
    right: 10px !important;
    top: 35px !important; 
    width: 70px !important;
    height: 70px !important;
    background: rgba(92, 179, 119, 0.9) !important;
    border-radius: 50% !important;
    text-align: center !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-family: 'Quicksand', sans-serif !important;
    padding-top: 16px !important;
    font-size: 0.6rem !important;
    line-height: 1.1 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    z-index: 5 !important;
    display: inline-block !important;
    opacity: 0.85 !important;
    will-change: transform !important;
}

/* Mobile responsive for book badge */
@media (max-width: 768px) {
    .book-cover-holder .book-badge.d-inline-block.shadow {
        width: 60px !important;
        height: 60px !important;
        right: 12px !important;
        top: 30px !important;
        padding-top: 14px !important;
        font-size: 0.55rem !important;
    }
}

@media (max-width: 480px) {
    .book-cover-holder .book-badge.d-inline-block.shadow {
        width: 50px !important;
        height: 50px !important;
        right: 15px !important;
        top: 25px !important;
        padding-top: 12px !important;
        font-size: 0.5rem !important;
    }
}

/* Positioning optimizations */
.book-cover-holder + .text-center {
    margin-top: calc(-1rem + 4px) !important;
    margin-bottom: 1rem !important;
}

.book-cover-holder {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .book-cover-holder + .text-center {
        margin-top: -0.5rem !important;
    }
}

.col-12.col-md-5.mb-5.align-self-center {
    margin-bottom: 0 !important;
}

@media (max-width: 767.98px) {
    #quotes-carousel {
        margin-bottom: 0 !important;
    }
}

/* Customer reviews carousel optimizations */
#customer-reviews-carousel {
    position: relative;
    contain: layout style paint;
}

/* Desktop: Fixed height carousel behavior */
@media (min-width: 991px) {
    #customer-reviews-carousel {
        height: 470px !important;
        overflow: hidden;
        transition: none !important;
    }
    
    #customer-reviews-carousel.carousel {
        height: 470px !important;
        max-height: 470px !important;
        min-height: 470px !important;
    }
    
    #customer-reviews-carousel.carousel.slide {
        height: 470px !important;
    }
}

/* Large desktop: More carousel space */
@media (min-width: 1200px) {
    #customer-reviews-carousel,
    #customer-reviews-carousel.carousel,
    #customer-reviews-carousel.carousel.slide {
        height: 520px !important;
        max-height: 520px !important;
        min-height: 520px !important;
    }
}

/* Reviews section: Natural height on mobile, fixed on desktop */
#customer-reviews-section {
    position: relative;
}

/* CRITICAL: Ensure "Voir tous les avis" button is ALWAYS visible on ALL devices */
#customer-reviews-section .text-center.mt-4 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
    clear: both !important;
    margin-top: 2rem !important;
    padding: 1rem 0 !important;
    background: transparent !important;
    width: 100% !important;
}

#customer-reviews-section .btn-primary {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
    clear: both !important;
    margin: 0.5rem auto !important;
    padding: 0.75rem 2rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease !important;
}

#customer-reviews-section .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
}

/* Desktop: Fixed section height with accommodation for longer content */
@media (min-width: 991px) {
    #customer-reviews-section {
        height: 650px !important;
        max-height: 650px !important;
        min-height: 650px !important;
        overflow: hidden !important;
        contain: layout style paint !important;
        transition: none !important;
    }
    
    #customer-reviews-section .container {
        height: 100% !important;
        overflow: visible !important;
        position: relative !important;
    }
    
    /* Desktop button visibility */
    #customer-reviews-section .text-center.mt-4 {
        position: relative !important;
        z-index: 999 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        clear: both !important;
        margin-top: 1.5rem !important;
    }
    
    #customer-reviews-section .btn-primary {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 999 !important;
        position: relative !important;
    }
}

/* Large desktop: Even more space for JC review */
@media (min-width: 1200px) {
    #customer-reviews-section {
        height: 800px !important;
        max-height: 800px !important;
        min-height: 800px !important;
        overflow: visible !important;
        position: relative !important;
    }
    
    /* Large desktop button visibility and enhanced styling */
    #customer-reviews-section .text-center.mt-4 {
        position: relative !important;
        z-index: 999 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        clear: both !important;
        margin-top: 2.5rem !important;
        padding: 1.5rem 0 !important;
        background: transparent !important;
    }
    
    #customer-reviews-section .btn-primary {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 999 !important;
        position: relative !important;
        padding: 1rem 3rem !important;
        font-size: 1.125rem !important;
        font-weight: 600 !important;
        border-radius: 2rem !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-decoration: none !important;
        background: #ed6524 !important;
        border: none !important;
        color: #fff !important;
        letter-spacing: 0.5px !important;
        text-transform: none !important;
        min-width: 220px !important;
    }
    
    #customer-reviews-section .btn-primary:hover {
        transform: translateY(-3px) scale(1.02) !important;
        box-shadow: 0 10px 30px rgba(237,101,36,0.3) !important;
        background: #e55713 !important;
        color: #fff !important;
    }
    
    #customer-reviews-section .btn-primary:focus,
    #customer-reviews-section .btn-primary:focus-visible {
        outline: 3px solid rgba(237,101,36,0.3) !important;
        outline-offset: 3px !important;
        box-shadow: 0 6px 20px rgba(237,101,36,0.2), 0 0 0 3px rgba(237,101,36,0.1) !important;
        background: #e55713 !important;
        color: #fff !important;
    }
    
    #customer-reviews-section .btn-primary:active {
        transform: translateY(-1px) scale(0.98) !important;
        transition: transform 0.1s ease !important;
        background: #d94e0f !important;
        color: #fff !important;
    }
    
    /* Enhanced text styling for the section on large desktop */
    #customer-reviews-section .text-muted small {
        font-size: 0.9rem !important;
        color: #6c757d !important;
        margin-bottom: 1rem !important;
        display: block !important;
    }
    
    /* Large desktop: Enhanced carousel bottom spacing for button area */
    #customer-reviews-carousel .carousel-inner {
        margin-bottom: 80px !important;
    }
    
    /* Large desktop: Improved container layout for button area */
    #customer-reviews-section .container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        height: 100% !important;
        position: relative !important;
    }
    
    /* Large desktop: Ensure proper spacing between carousel and button */
    #customer-reviews-section > .container > h2.section-heading {
        margin-bottom: 1.5rem !important;
    }
    
    #customer-reviews-section > .container > .section-intro {
        margin-bottom: 2rem !important;
    }
    
    /* Large desktop: Position button area at bottom with proper spacing */
    #customer-reviews-section .text-center.mt-4 {
        margin-top: auto !important;
        padding-top: 2rem !important;
        padding-bottom: 1rem !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 1000 !important;
        background: #f8f9fa !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Large desktop: Ensure container doesn't clip button */
    #customer-reviews-section .container {
        overflow: visible !important;
        padding-bottom: 2rem !important;
    }
    
    /* Large desktop: Alternative positioning if flexbox fails */
    #customer-reviews-section {
        padding-bottom: 3rem !important;
    }
    
    /* Large desktop: Force button outside carousel area if needed */
    #customer-reviews-section .text-center.mt-4 {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 2rem 0 1rem 0 !important;
        background: #f8f9fa !important;
        z-index: 1001 !important;
        width: 100% !important;
        transform: translateY(0) !important;
    }
    
    /* Large desktop: Ensure carousel doesn't overlap button */
    #customer-reviews-carousel {
        margin-bottom: 120px !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

#customer-reviews-section .container {
    position: relative;
}

/* Desktop: Carousel inner height consistency */
@media (min-width: 991px) {
    #customer-reviews-carousel .carousel-inner {
        margin-bottom: 60px;
        height: 400px !important;
        position: relative;
        overflow: hidden;
    }
    
    #customer-reviews-carousel .carousel-item {
        height: 400px !important;
        position: absolute !important;
        width: 100%;
        top: 0;
        left: 0;
        opacity: 0;
        transition: opacity 0.6s ease-in-out;
        overflow: hidden;
    }
    
    #customer-reviews-carousel .carousel-item.active {
        opacity: 1;
    }
    
    #customer-reviews-carousel .carousel-item .row {
        height: 400px !important;
        align-items: flex-start;
        overflow: hidden;
    }
}

/* Large desktop: More inner space */
@media (min-width: 1200px) {
    #customer-reviews-carousel .carousel-inner {
        height: 450px !important;
    }
    
    #customer-reviews-carousel .carousel-item {
        height: 450px !important;
    }
    
    #customer-reviews-carousel .carousel-item .row {
        height: 450px !important;
    }
}

#customer-reviews-carousel .carousel-control-prev,
#customer-reviews-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(44, 82, 130, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    will-change: transform;
}

#customer-reviews-carousel .carousel-control-prev {
    left: -30px;
}

#customer-reviews-carousel .carousel-control-next {
    right: -30px;
}

#customer-reviews-carousel .carousel-control-prev:hover,
#customer-reviews-carousel .carousel-control-next:hover {
    background-color: rgba(44, 82, 130, 1);
    transform: translateY(-50%) scale(1.1);
}

#customer-reviews-carousel .carousel-control-prev-icon,
#customer-reviews-carousel .carousel-control-next-icon {
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
}

#customer-reviews-carousel .carousel-indicators {
    bottom: -50px;
    margin-bottom: 0;
}

/* Mobile carousel indicators positioning */
@media (max-width: 768px) {
    #customer-reviews-carousel .carousel-indicators {
        bottom: -60px !important;
        position: absolute !important;
    }
}

@media (max-width: 480px) {
    #customer-reviews-carousel .carousel-indicators {
        bottom: -80px !important;
    }
}

#customer-reviews-carousel .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(44, 82, 130, 0.4);
    border: 0;
    margin: 0 8px;
    transition: all 0.3s ease;
}

#customer-reviews-carousel .carousel-indicators .active {
    background-color: #2c5282;
    transform: scale(1.2);
}

#customer-reviews-carousel .item-inner {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    will-change: transform;
}

/* Mobile item height consistency */
@media (max-width: 768px) {
    #customer-reviews-carousel .item-inner {
        min-height: 250px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    #customer-reviews-carousel .item-inner {
        min-height: 200px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin-bottom: 2rem !important;
    }
}

#customer-reviews-carousel .quote {
    flex-grow: 1;
    display: flex;
    align-items: center;
    margin-bottom: 1rem !important;
}

/* Prevent scroll interference during carousel transitions */
#customer-reviews-carousel.carousel.slide {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Force hardware acceleration for smooth transitions */
#customer-reviews-carousel .carousel-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* MOBILE + MEDIUM: Show only Slide 1 (Florian + Chichi + JC) to prevent height variations */
@media (max-width: 990px) {
    /* Hide Slide 2 completely on mobile */
    #customer-reviews-carousel .carousel-item:nth-child(2) {
        display: none !important;
    }
    
    /* Hide carousel controls and indicators on mobile since only one slide */
    #customer-reviews-carousel .carousel-control-prev,
    #customer-reviews-carousel .carousel-control-next,
    #customer-reviews-carousel .carousel-indicators {
        display: none !important;
    }
    
    /* Make Slide 1 always visible and static on mobile */
    #customer-reviews-carousel .carousel-item:nth-child(1) {
        position: static !important;
        opacity: 1 !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Disable carousel functionality on mobile */
    #customer-reviews-carousel {
        contain: layout style paint !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    #customer-reviews-carousel .carousel-inner {
        height: auto !important;
        overflow: visible !important;
        margin-bottom: 2rem !important;
    }
}

/* Small mobile: Single slide layout - optimized spacing */
@media (max-width: 767px) {
    /* Section uses natural height since only one slide */
    #customer-reviews-section {
        height: auto !important;
        overflow: visible !important;
        padding-bottom: 2rem !important;
    }
    
    #customer-reviews-section .container {
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Carousel uses natural height on mobile */
    #customer-reviews-carousel .carousel-inner {
        margin-bottom: 1rem !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Reduce spacing between reviews on mobile */
    #customer-reviews-carousel .item {
        margin-bottom: 1rem !important;
        padding: 0.25rem !important;
    }
    
    /* Button visibility for small mobile screens */
    #customer-reviews-section .text-center.mt-4 {
        margin-top: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding-top: 0.5rem !important;
        z-index: 999 !important;
        position: relative !important;
        clear: both !important;
    }
    
    #customer-reviews-section .btn-primary {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 0.25rem !important;
        z-index: 999 !important;
        position: relative !important;
        clear: both !important;
    }
}
    
    #customer-reviews-carousel .carousel-control-prev,
    #customer-reviews-carousel .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    #customer-reviews-carousel .carousel-control-prev {
        left: -15px;
    }
    
    #customer-reviews-carousel .carousel-control-next {
        right: -15px;
    }
    
    #customer-reviews-carousel .carousel-control-prev-icon,
    #customer-reviews-carousel .carousel-control-next-icon {
        width: 20px;
        height: 20px;
        background-size: 20px 20px;
    }
    
    #customer-reviews-carousel .item {
        margin-bottom: 2rem;
    }
    
    /* Ensure mobile reviews have proper spacing and readability */
    #customer-reviews-carousel .item .quote {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        padding: 0.5rem 0 !important;
    }
    
    #customer-reviews-carousel .item .source-info {
        margin-top: 1rem !important;
    }
    
    #customer-reviews-carousel .item-inner {
        min-height: 200px !important;
        height: auto;
        max-height: 300px;
        overflow: hidden;
    }

@media (max-width: 480px) {
    /* Small mobile: Compact single-slide layout */
    #customer-reviews-carousel .item {
        margin-bottom: 0.75rem !important;
        padding: 0.125rem !important;
    }
    
    #customer-reviews-carousel .item-inner {
        padding: 0.875rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Reduce bottom spacing after last review */
    #customer-reviews-section {
        padding-bottom: 1rem !important;
    }
    
    #customer-reviews-section .text-center.mt-4 {
        margin-top: 0.75rem !important;
        padding-top: 0.25rem !important;
    }
    
    #customer-reviews-carousel .carousel-control-prev,
    #customer-reviews-carousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #customer-reviews-carousel .carousel-control-prev {
        left: -5px;
    }
    
    #customer-reviews-carousel .carousel-control-next {
        right: -5px;
    }
    
    #customer-reviews-carousel .carousel-control-prev-icon,
    #customer-reviews-carousel .carousel-control-next-icon {
        width: 16px;
        height: 16px;
        background-size: 16px 16px;
    }
}

/* Responsive grid optimizations */
@media (min-width: 991px) {
    #customer-reviews-carousel .item.col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        display: flex !important;
        align-items: stretch !important;
    }
    
    /* Ensure all review cards have equal height on large screens */
    #customer-reviews-carousel .item-inner {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 320px !important;
    }
    
    /* Make quote section flexible to accommodate different text lengths */
    #customer-reviews-carousel .quote {
        flex-grow: 1 !important;
        display: flex !important;
        align-items: flex-start !important;
        margin-bottom: 1rem !important;
    }
    
    /* Fix JC review layout specifically for longer content */
    #customer-reviews-carousel .quote.small {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        text-align: justify !important;
        hyphens: auto !important;
        word-break: break-word !important;
    }
    
    /* Ensure equal height cards on large screens */
    #customer-reviews-carousel .carousel-item .row {
        display: flex !important;
        align-items: stretch !important;
    }
    
    /* Better text distribution in review cards */
    #customer-reviews-carousel .item-inner {
        justify-content: space-between !important;
    }
    
    #customer-reviews-carousel .source {
        margin-top: auto !important;
    }
}

/* Medium-large screens: Smaller JC text for better fit */
@media (min-width: 990px) and (max-width: 1199px) {
    #customer-reviews-carousel .quote.small {
        font-size: 0.8rem !important;
        line-height: 1.35 !important;
        text-align: justify !important;
        hyphens: auto !important;
    }
    
    #customer-reviews-carousel .item-inner {
        min-height: 340px !important;
        padding: 1.25rem !important;
    }
}

/* Extra large screens: More space for content */
@media (min-width: 1200px) {
    #customer-reviews-carousel .item-inner {
        min-height: 380px !important;
        padding: 1.5rem !important;
    }
    
    #customer-reviews-carousel .quote.small {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
}

/* Medium screens: Single slide like mobile (768px-990px) */
@media (min-width: 768px) and (max-width: 990px) {
    /* Hide Slide 2 completely on medium screens */
    #customer-reviews-carousel .carousel-item:nth-child(2) {
        display: none !important;
    }
    
    /* Hide carousel controls and indicators on medium screens */
    #customer-reviews-carousel .carousel-control-prev,
    #customer-reviews-carousel .carousel-control-next,
    #customer-reviews-carousel .carousel-indicators {
        display: none !important;
    }
    
    /* Make Slide 1 static on medium screens */
    #customer-reviews-carousel .carousel-item:nth-child(1) {
        position: static !important;
        opacity: 1 !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Medium screen layout: 2+1 grid for the 3 reviews */
    #customer-reviews-carousel .item.col-lg-4:nth-child(1),
    #customer-reviews-carousel .item.col-lg-4:nth-child(2) {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1.5rem !important;
        padding: 0.5rem !important;
    }
    
    #customer-reviews-carousel .item.col-lg-4:nth-child(3) {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1.5rem !important;
        padding: 0.5rem !important;
    }
    
    #customer-reviews-carousel .item-inner {
        padding: 1.125rem !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    #customer-reviews-carousel .quote {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        flex-grow: 1 !important;
    }
    
    /* JC review specific styling for medium screens */
    #customer-reviews-carousel .quote.small {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        text-align: justify !important;
    }
    
    /* Natural height for medium screens */
    #customer-reviews-section {
        height: auto !important;
        overflow: visible !important;
    }
    
    #customer-reviews-carousel {
        height: auto !important;
        overflow: visible !important;
    }
    
    #customer-reviews-carousel .carousel-inner {
        height: auto !important;
        overflow: visible !important;
        margin-bottom: 2rem !important;
    }
}

/* Medium screens: 2+1 layout with single slide */
@media (min-width: 768px) and (max-width: 990px) {
    /* Section uses natural height */
    #customer-reviews-section {
        height: auto !important;
        overflow: visible !important;
        padding-bottom: 2.5rem !important;
    }
    
    #customer-reviews-section .container {
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Carousel uses natural height */
    #customer-reviews-carousel .carousel-inner {
        margin-bottom: 1.5rem !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Reduce spacing between reviews on medium screens */
    #customer-reviews-carousel .item {
        margin-bottom: 1.25rem !important;
        padding: 0.5rem !important;
    }
    
    /* Button visibility for medium screens */
    #customer-reviews-section .text-center.mt-4 {
        margin-top: 1.25rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 999 !important;
        position: relative !important;
        clear: both !important;
    }
    
    #customer-reviews-section .btn-primary {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 999 !important;
        position: relative !important;
    }
}

/* Small mobile screens: Single column layout */
@media (max-width: 767px) {
    #customer-reviews-carousel .item.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem !important;
        padding: 0.25rem !important;
    }
    
    /* Better mobile review card styling */
    #customer-reviews-carousel .item-inner {
        padding: 1rem !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        margin-bottom: 0.5rem !important;
    }
    
    #customer-reviews-carousel .quote {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
}

#customer-reviews-carousel .carousel-inner {
    margin-bottom: 60px;
}

/* Button margin optimizations */
@media (min-width: 765px) and (max-width: 990px) {
    .btn.btn-secondary.scrollto {
        margin-top: 3px;
    }
}

/* Content section layout optimizations for large screens */
@media (min-width: 992px) {
    #content-section .single-col-max {
        max-width: none;
    }
    
    #content-section .container {
        max-width: 1400px;
    }
    
    #content-section .row {
        align-items: center;
    }
    
    #content-section .col-md-6:first-child {
        flex: 0 0 35%;
        max-width: 35%;
    }
    
    #content-section .col-md-6:last-child {
        flex: 0 0 65%;
        max-width: 65%;
        padding-left: 3rem;
    }
    
    #content-section .figure-holder img {
        transform: scale(0.9);
        transform-origin: center;
        will-change: transform;
    }
    
    #content-section .key-points-list {
        columns: 2;
        column-gap: 3rem;
        column-fill: balance;
    }
    
    #content-section .key-points-list li {
        break-inside: avoid;
        margin-bottom: 0.75rem;
        page-break-inside: avoid;
    }
}

/* Extra large screen optimizations */
@media (min-width: 1200px) {
    #content-section .container {
        max-width: 1600px;
    }
    
    #content-section .col-md-6:last-child {
        padding-left: 4rem;
    }
    
    #content-section .key-points-list {
        column-gap: 3.5rem;
    }
    
    #content-section .key-points-list li {
        margin-bottom: 1rem;
    }
}

/* Mobile content layout */
@media (max-width: 991.98px) {
    #content-section .key-points-list {
        columns: 1;
    }
}

/* Mobile spacing fix for audience section icons */
@media (max-width: 768px) {
    #audience-section .item-icon i {
        margin-left: 2px;
    }
}

/* Medium screen content optimizations */
@media (min-width: 768px) and (max-width: 991.98px) {
    #content-section .single-col-max {
        max-width: none;
    }
    
    #content-section .container {
        max-width: 1200px;
    }
    
    #content-section .row {
        align-items: center;
    }
    
    #content-section .col-md-6:first-child {
        flex: 0 0 35%;
        max-width: 35%;
    }
    
    #content-section .col-md-6:last-child {
        flex: 0 0 65%;
        max-width: 65%;
        padding-left: 2rem;
    }
    
    #content-section .figure-holder img {
        transform: scale(0.9);
        transform-origin: center;
    }
    
    #content-section .key-points-list {
        columns: 2;
        column-gap: 2rem;
        column-fill: balance;
    }
    
    #content-section .key-points-list li {
        break-inside: avoid;
        margin-bottom: 0.75rem;
        page-break-inside: avoid;
    }
}

/* Custom styling for the specific paperback image - 20% larger on tablet and desktop */
@media (min-width: 768px) {
    #content-section .figure-holder img[src="assets/sante-mentale-360-front-paperback-rightview.png"] {
        transform: scale(1.2) !important;
        transform-origin: center !important;
        transition: transform 0.3s ease !important;
        will-change: transform !important;
    }
}

/* Ensure the container can accommodate the larger image without overflow */
@media (min-width: 768px) {
    #content-section .figure-holder {
        overflow: visible !important;
        padding: 1rem !important;
    }
}

/* Enhanced left spacing for the paperback image on medium to large screens */
@media (min-width: 960px) and (max-width: 1652px) {
    #content-section .col-md-6:first-child {
        padding-left: 2rem !important;
    }
    
    #content-section .figure-holder {
        margin-left: 1rem !important;
        padding-left: 1rem !important;
    }
}

/* Updates Section Responsive Styling - Shortened Version */
.updates-section {
    contain: layout style paint;
}

.updates-content {
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.updates-content:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px);
}

.benefit-item {
    transition: all 0.2s ease;
    padding: 0.25rem 0;
}

.benefit-item:hover {
    transform: translateX(3px);
}

.update-badge {
    transition: all 0.3s ease;
}

.update-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.updates-guarantee {
    transition: all 0.3s ease;
}

.updates-guarantee:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Updates Section - Adjust font size for "Mises à jour automatiques incluses" */
.updates-section .h4 {
    font-size: 1.25rem !important;
}

/* Updates Section CTA Button */
.updates-section .btn-primary {
    transition: all 0.3s ease;
    text-decoration: none;
}

.updates-section .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25) !important;
    text-decoration: none;
}

.updates-section .btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    transition: transform 0.1s ease;
}

/* Mobile responsive for updates section - Shortened */
@media (max-width: 768px) {
    .updates-section {
        padding: 2.5rem 0 !important;
    }
    
    .updates-content {
        padding: 1.25rem !important;
        margin: 0 0.5rem;
    }
    
    .updates-section .section-heading {
        margin-bottom: 0.75rem !important;
    }
    
    .updates-section .section-intro {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .benefit-item {
        margin-bottom: 0.5rem !important;
        font-size: 0.85rem;
    }
    
    .benefit-item span {
        line-height: 1.3;
    }
    
    .updates-visual {
        margin-top: 1.5rem;
        padding: 0.75rem !important;
    }
    
    .update-badge {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .update-badge i {
        font-size: 1.2rem !important;
    }
    
    .updates-cta {
        margin-top: 1.5rem !important;
        padding-top: 1.5rem !important;
    }
    
    .updates-guarantee {
        padding: 0.75rem !important;
        font-size: 0.85rem;
    }
    
    /* Mobile CTA button styling */
    .updates-section .btn-primary {
        padding: 0.875rem 2rem !important;
        font-size: 0.95rem !important;
        border-radius: 25px !important;
    }
    
    /* Mobile - adjust "Mises à jour automatiques incluses" */
    .updates-section .h4 {
        font-size: 1.15rem !important;
    }
}

@media (max-width: 480px) {
    .updates-section {
        padding: 1.5rem 0 !important;
    }
    
    .updates-content {
        padding: 1rem !important;
        margin: 0 0.25rem;
    }
    
    .updates-section .section-heading {
        line-height: 1.2;
    }
    
    .updates-section .section-intro {
        font-size: 0.8rem !important;
    }
    
    .benefit-item {
        font-size: 0.8rem;
        margin-bottom: 0.4rem !important;
    }
    
    .updates-guarantee {
        padding: 0.6rem !important;
        font-size: 0.8rem;
    }
    
    .updates-guarantee p {
        margin-bottom: 0 !important;
    }
    
    /* Small mobile CTA button styling */
    .updates-section .btn-primary {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
        border-radius: 20px !important;
    }
    
    /* Small mobile - adjust "Mises à jour automatiques incluses" */
    .updates-section .h4 {
        font-size: 1.05rem !important;
    }
}

/* Medium screens optimization - Shortened */
@media (min-width: 768px) and (max-width: 991.98px) {
    .updates-content {
        padding: 1.75rem !important;
    }
    
    .updates-visual {
        margin-top: 1rem;
    }
    
    .benefit-item {
        font-size: 0.9rem;
    }
}

/* Large screens optimization - Shortened */
@media (min-width: 1200px) {
    .updates-section .container {
        max-width: 1200px;
    }
    
    .updates-content {
        padding: 2.5rem !important;
    }
    
    .benefit-item {
        font-size: 0.95rem;
        margin-bottom: 0.6rem !important;
    }
    
    .updates-guarantee {
        padding: 1.25rem !important;
        font-size: 0.95rem;
    }
}

/* Enhanced Expert Profiles - Better UX/UI Design */
#reviews-section .item-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#reviews-section .item-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: rgba(44, 82, 130, 0.2);
}

#reviews-section .item-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2c5282, #667eea, #5cb377, #f6ad55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#reviews-section .item-inner:hover::before {
    opacity: 1;
}

#reviews-section .expert-profile {
    flex-grow: 1;
    padding: 0.5rem 0;
}

#reviews-section .expert-header {
    margin-bottom: 1.5rem !important;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

#reviews-section .expert-photo img {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#reviews-section .expert-photo:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.2);
}

#reviews-section .expert-name {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 0.25rem !important;
}

#reviews-section .expert-name a {
    transition: color 0.2s ease;
}

#reviews-section .expert-name a:hover {
    color: #667eea !important;
}

#reviews-section .expert-title {
    font-size: 0.9rem !important;
    color: #6c757d !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.3px;
}

#reviews-section .expert-contribution p {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: #495057 !important;
}

#reviews-section .expert-contribution p strong {
    color: #2c5282 !important;
    font-weight: 600 !important;
}

#reviews-section .expert-contribution em {
    color: #6c757d !important;
    font-size: 0.85rem !important;
    font-style: italic;
    line-height: 1.5 !important;
}

#reviews-section .expert-social-links {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex !important;
    gap: 0.75rem !important;
}

#reviews-section .expert-social-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: rgba(44, 82, 130, 0.06) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    opacity: 0.7 !important;
}

#reviews-section .expert-social-links a:hover {
    background: rgba(44, 82, 130, 0.12) !important;
    color: #2c5282 !important;
    opacity: 1 !important;
    transform: scale(1.05) !important;
}

#reviews-section .expert-social-links a i {
    font-size: 0.75rem !important;
    color: #6c757d !important;
    transition: color 0.2s ease !important;
}

#reviews-section .expert-social-links a:hover i {
    color: #2c5282 !important;
}

/* Enhanced Icon Holders for Expert Cards */
#reviews-section .icon-holder {
    position: absolute !important;
    top: -15px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #2c5282 0%, #667eea 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3) !important;
    border: 3px solid #fff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10 !important;
}

#reviews-section .icon-holder:hover {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 6px 25px rgba(44, 82, 130, 0.4) !important;
}

#reviews-section .icon-holder i {
    color: #fff !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
}

#reviews-section .icon-holder:hover i {
    transform: scale(1.1) !important;
}

/* Specific icon colors for each expert */
#reviews-section .item:nth-child(1) .icon-holder {
    background: linear-gradient(135deg, #e74c3c 0%, #ff6b6b 100%) !important;
}

#reviews-section .item:nth-child(2) .icon-holder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

#reviews-section .item:nth-child(3) .icon-holder {
    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%) !important;
}

#reviews-section .item:nth-child(4) .icon-holder {
    background: linear-gradient(135deg, #5cb377 0%, #4a9960 100%) !important;
}

#reviews-section .item:nth-child(5) .icon-holder {
    background: linear-gradient(135deg, #4ECDC4 0%, #2c5282 100%) !important;
}

/* Responsive icon holders */
@media (max-width: 768px) {
    #reviews-section .icon-holder {
        top: -10px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
        border-width: 2px !important;
    }
    
    #reviews-section .icon-holder i {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    #reviews-section .icon-holder {
        top: -8px !important;
        right: 12px !important;
        width: 35px !important;
        height: 35px !important;
    }
    
    #reviews-section .icon-holder i {
        font-size: 0.9rem !important;
    }
}

/* Desktop: 3+2 layout - First 3 experts in first row, Florence and Nadia in second row */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Standard container for medium desktop */
    #reviews-section .container {
        max-width: 1200px !important;
    }
    
    #reviews-section .row {
        margin: 0 -10px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    /* First 3 experts: full width for proper spacing */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(1),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(2),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(3) {
        flex: 0 0 calc(33.333% - 20px) !important;
        max-width: calc(33.333% - 20px) !important;
        padding: 0 10px !important;
        margin-bottom: 2rem !important;
    }
    
    /* Last 2 experts (Florence and Nadia): centered in second row */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(4),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(5) {
        flex: 0 0 calc(50% - 40px) !important;
        max-width: calc(50% - 40px) !important;
        padding: 0 20px !important;
        margin-bottom: 2rem !important;
    }
    
    #reviews-section .item-inner {
        min-height: 420px !important;
        padding: 1.5rem 1.25rem !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    #reviews-section .expert-header {
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
        flex-shrink: 0;
    }
    
    #reviews-section .expert-contribution {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    #reviews-section .expert-contribution p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem !important;
    }
    
    #reviews-section .expert-contribution em {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    #reviews-section .expert-social-links {
        margin-top: auto !important;
        padding-top: 0.75rem !important;
        flex-shrink: 0;
    }
}

/* Large Desktop: Maintain 3+2 layout with enhanced spacing and typography */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* Enhanced container for large desktop 3+2 layout */
    #reviews-section .container {
        max-width: 1300px !important;
    }
    
    #reviews-section .row {
        margin: 0 -12px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    /* Create a centered group for the 4th and 5th cards */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(4) {
        margin-left: calc((100% - (33.333% * 2)) / 2) !important;
    }
    
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(5) {
        margin-right: calc((100% - (33.333% * 2)) / 2) !important;
    }
    
    /* First 3 experts: enhanced spacing for large screens */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(1),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(2),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(3) {
        flex: 0 0 calc(33.333% - 24px) !important;
        max-width: calc(33.333% - 24px) !important;
        padding: 0 12px !important;
        margin-bottom: 2rem !important;
    }
    
    /* Last 2 experts (Florence and Nadia): same width as others, centered as a group */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(4),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(5) {
        flex: 0 0 calc(33.333% - 24px) !important;
        max-width: calc(33.333% - 24px) !important;
        padding: 0 12px !important;
        margin-bottom: 2rem !important;
    }
    
    #reviews-section .item-inner {
        min-height: 460px !important;
        padding: 1.75rem 1.5rem !important;
    }
    
    #reviews-section .expert-name {
        font-size: 1.1rem !important;
    }
    
    #reviews-section .expert-title {
        font-size: 0.9rem !important;
    }
    
    #reviews-section .expert-contribution p {
        font-size: 0.9rem !important;
        line-height: 1.55 !important;
    }
    
    #reviews-section .expert-contribution em {
        font-size: 0.85rem !important;
    }
}

/* Extra Large Desktop: Premium 3+2 layout with maximum spacing and typography */
@media (min-width: 1400px) {
    /* Premium container for ultra-wide screens with 3+2 layout */
    #reviews-section .container {
        max-width: 1500px !important;
    }
    
    #reviews-section .row {
        margin: 0 -15px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    /* Create a perfectly centered group for the 4th and 5th cards */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(4) {
        margin-left: calc((100% - (33.333% * 2)) / 2) !important;
    }
    
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(5) {
        margin-right: calc((100% - (33.333% * 2)) / 2) !important;
    }
    
    /* First 3 experts: premium spacing for ultra-wide screens */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(1),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(2),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(3) {
        flex: 0 0 calc(33.333% - 30px) !important;
        max-width: calc(33.333% - 30px) !important;
        padding: 0 15px !important;
        margin-bottom: 2rem !important;
    }
    
    /* Last 2 experts (Florence and Nadia): same width as others, centered as a group */
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(4),
    #reviews-section .item.col-12.col-md-6.col-lg-3:nth-child(5) {
        flex: 0 0 calc(33.333% - 30px) !important;
        max-width: calc(33.333% - 30px) !important;
        padding: 0 15px !important;
        margin-bottom: 2rem !important;
    }
    
    #reviews-section .item-inner {
        min-height: 480px !important;
        padding: 2rem 1.75rem !important;
    }
    
    #reviews-section .expert-name {
        font-size: 1.15rem !important;
    }
    
    #reviews-section .expert-title {
        font-size: 0.95rem !important;
    }
    
    #reviews-section .expert-contribution p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    #reviews-section .expert-contribution em {
        font-size: 0.9rem !important;
    }
}

/* Tablet: Maintain Bootstrap col-md-6 behavior (50% each) */
@media (min-width: 768px) and (max-width: 991.98px) {
    #reviews-section .row {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        margin: 0 -15px !important;
    }
    
    /* Keep original tablet size (50% = col-md-6) */
    #reviews-section .item.col-12.col-md-6.col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 15px !important;
        margin-bottom: 2rem !important;
    }
    
    /* 5th card will naturally center itself since it's alone in the third row */
    
    #reviews-section .item-inner {
        min-height: 420px;
        padding: 2rem 1.5rem !important;
        border-radius: 12px !important;
    }
}

/* Mobile: Enhanced single column layout */
@media (max-width: 767.98px) {
    #reviews-section .item {
        margin-bottom: 2rem !important;
        padding: 0 10px !important;
    }
    
    #reviews-section .item-inner {
        min-height: auto;
        padding: 2rem 1.5rem !important;
        border-radius: 16px !important;
    }
    
    #reviews-section .expert-header {
        text-align: center !important;
        border-bottom: none !important;
        padding-bottom: 0.5rem !important;
    }
    
    #reviews-section .expert-photo {
        margin-right: 0 !important;
        margin-bottom: 1rem !important;
        text-align: center;
    }
    
    #reviews-section .expert-info {
        text-align: center !important;
    }
    
    #reviews-section .expert-name {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #reviews-section .expert-title {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    #reviews-section .expert-contribution {
        text-align: left !important;
        margin-top: 1rem !important;
    }
    
    #reviews-section .expert-contribution p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
    
    #reviews-section .expert-social-links {
        justify-content: center !important;
        margin-top: 2rem !important;
    }
} 