/* ==========================================================================
   Reviews Section (Parallax Background)
   ========================================================================== */
.reviews-section {
    position: relative;
    padding: 6rem 0 7rem 0;
    min-height: 75vh;
    display: flex;
    align-items: center;
    background-color: #F4F1EA !important;
    margin-bottom: 0 !important;
    /* Static fixed background image across desktop and mobile */
    background-image: url("../../images/reviews-bg.webp");
    background-size: cover;
    background-position: center center;
    background-attachment: fixed !important;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dark overlay for better text contrast */
.reviews-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.reviews-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Reviews Heading - positioned higher */
.reviews-heading-area {
    margin-bottom: 3rem;
    margin-top: -40px; /* Move up ~1cm */
    padding-top: 0;
}

.reviews-heading-area h2 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95) !important;
    letter-spacing: -0.5px;
    margin-bottom: 0;
}

.reviews-heading-area h2 span {
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.reviews-info-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 0.8rem 1.8rem;
    gap: 0.8rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 0 10px rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reviews-info-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), inset 0 0 15px rgba(255,255,255,0.2);
}

.reviews-info-pill .stars {
    font-size: 1.4rem;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.6);
}

.reviews-info-pill .info-text {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Marquee Controls */
.reviews-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.review-ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.review-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.review-ctrl-btn:active {
    transform: scale(0.95);
}

.review-ctrl-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* Single Row Marquee */
.reviews-marquee-container {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%); /* Full bleed */
    margin-top: 40px; /* moved 1cm down */
    padding: 1.5rem 0; /* extra padding to prevent shadow clipping */
}

.marquee-track-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    width: max-content;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
}

.marquee-content {
    display: flex;
    gap: 1.5rem;
    padding-right: 1.5rem; /* Match gap for seamless loop */
    align-items: stretch;
}

/* Animation directions */
.track-left {
    animation: scrollLeft 40s linear infinite;
}

/* Paused state */
.marquee-track.is-paused {
    animation-play-state: paused !important;
}

@keyframes scrollLeft {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

/* Professional Review Cards */
.review-card {
    width: 380px;
    height: auto;
    min-height: 342px; /* Reduced by 10% from 380px */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border-radius: 16px;
    padding: 1.5rem; /* slightly reduced padding to fit content in smaller height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: grab;
}

.review-card:active {
    cursor: grabbing;
}

.review-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.review-stars {
    font-size: 1.05rem;
}

/* Bigger Google logo */
.google-bug {
    width: 36px;
    height: 36px;
    opacity: 1;
    transition: transform 0.3s ease;
}

.review-card:hover .google-bug {
    transform: scale(1.1);
}

.review-text {
    color: #2d3748;
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    font-style: italic;
    flex-grow: 1;
    white-space: normal !important;
}

.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.author-info h6 {
    font-size: 0.95rem;
}

.author-info small {
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 739.98px) {
    .reviews-section {
        padding: 3rem 0 0.5rem 0 !important; /* Cropped bottom by an extra 1cm, moving boxes to bottom */
        min-height: auto !important; /* Removed tall min-height to save space */
        background-image: url("../../images/reviews-bg-mobile.webp") !important;
        background-attachment: fixed !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Left align heading and reviews count */
    .reviews-heading-area {
        text-align: left !important;
    }
    .reviews-heading-area .col-12 {
        align-items: flex-start !important;
        text-align: left !important;
    }
    .reviews-heading-area h2 {
        font-size: 2.85rem !important; /* Made Google Reviews text 30% bigger */
        text-align: left !important;
        padding-right: 50px; /* Space for pause button */
        margin-bottom: 0.5rem !important;
        margin-top: 1rem !important; /* Moved text down */
    }
    
    /* Make link text and stars smaller and force one line */
    .reviews-info-pill {
        transform: scale(0.78); /* Made 20% bigger than previous 0.65 scale */
        transform-origin: left center;
        white-space: nowrap !important; /* Force to one line */
        margin-left: -5px; /* Pull it slightly left to compensate for scale */
        margin-top: -0.5rem !important; /* Moved text 5mm up */
    }
    .reviews-info-pill .stars,
    .reviews-info-pill .info-text {
        white-space: nowrap !important;
    }
    
    /* Move pause button to top right */
    .reviews-heading-area .d-md-none {
        position: absolute;
        top: -4.5rem; /* Moved 3cm up */
        right: 35px; /* Moved 5mm left */
        margin-top: 0 !important;
    }
    
    /* Move the review boxes up slightly (by 2mm more) */
    .reviews-marquee-container {
        margin-top: -24px !important; /* Moved 2mm up from previous -16px */
    }
    
    /* Vertically smaller review boxes */
    .review-card {
        width: 320px;
        padding: 1.2rem !important;
        min-height: 295px !important; /* Made 1.5cm vertically longer */
        height: auto;
    }
    .review-text {
        font-size: 0.85rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.5 !important;
    }
    
    .marquee-content {
        gap: 1rem;
        padding-right: 1rem;
    }
    
    /* Bigger pause button on mobile */
    .review-ctrl-btn {
        width: 50px; /* Made bigger */
        height: 50px; /* Made bigger */
        font-size: 1.3rem; /* Bigger icon */
    }
}
