/* COMPONENT: Testimonials / Reviews Carousel */
/* Pixel-perfect Google Reviews section */

/* ===================================================
   REVIEWS SECTION CONTAINER
   =================================================== */

.reviews-section {
    width: 100%;
    background-color: #00254D;
    overflow: hidden;
    position: relative;
}

.reviews-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 80px;
    position: relative;
}

/* ===================================================
   SECTION TITLE
   =================================================== */

.reviews-title {
    font-family: 'Bowlby One', cursive;
    font-size: clamp(24px, 4vw, 40px);
    color: #3DBF2B;
    text-align: center;
    margin: 0;
    padding-top: 150px;
    padding-bottom: 44px;
}

/* ===================================================
   CAROUSEL WRAPPER
   =================================================== */

/* Outer wrapper - contains arrows, no overflow hidden */
.reviews-carousel-outer {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 80px;
    overflow: visible !important;
}

/* Inner wrapper - has overflow hidden to clip cards */
.reviews-carousel-inner {
    width: 100%;
    overflow: hidden !important;
    position: relative;
    pointer-events: none;
}

/* Carousel viewport */
.reviews-carousel {
    width: 100%;
    overflow: hidden !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

/* Carousel track - slides horizontally */
.reviews-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: all;
}

/* Disable transition during resize/repositioning */
.reviews-track.no-transition {
    transition: none;
}

/* ===================================================
   REVIEW CARD - RESPONSIVE FLEX-BASED SIZING
   =================================================== */

.review-card {
    flex: 0 0 auto;
    min-width: 0;
    background-color: #FFFFFF;
    border-radius: 25px;
    padding: 32px 32px 35px 32px;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    pointer-events: all;
}

/* Card widths will be set dynamically by JavaScript based on viewport */

/* ===================================================
   PROFILE IMAGE
   =================================================== */

.review-card__profile {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.review-card__profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback profile icon (initials or default) */
.review-card__profile-fallback {
    width: 100%;
    height: 100%;
    background-color: #4285F4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Carlito', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}

/* ===================================================
   TEXT CONTENT
   =================================================== */

/* Reviewer Name */
.review-card__name {
    font-family: 'Carlito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* Time Ago */
.review-card__time {
    font-family: 'Carlito', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #555555;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* ===================================================
   STAR RATING
   =================================================== */

.review-card__stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.review-card__star {
    width: 12px;
    height: 12px;
    fill: #FDBA00;
}

/* Empty star for ratings less than 5 */
.review-card__star--empty {
    fill: #DDDDDD;
}

/* ===================================================
   REVIEW TEXT
   =================================================== */

.review-card__text-wrapper {
    width: 100%;
    text-align: center;
}

.review-card__text {
    font-family: 'Carlito', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    line-height: 1.4;
    margin: 0;
    text-align: center;
    
    /* Collapsed state - max 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(14px * 1.4 * 3); /* ~3 lines at 14px font with 1.4 line-height = 58.8px */
    transition: max-height 0.3s ease;
}

/* Expanded state */
.review-card__text.expanded {
    -webkit-line-clamp: unset;
    max-height: 500px; /* Large enough for any text */
    overflow: visible;
}

/* See More/Less Link */
.review-card__see-more {
    font-family: 'Carlito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #00254D;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
    text-decoration: none;
    display: inline-block;
    transition: color 0.15s ease;
}

.review-card__see-more:hover {
    color: #3DBF2B;
}

.review-card__see-more:focus-visible {
    outline: 2px solid #3DBF2B;
    outline-offset: 2px;
}

/* Hide see more button if text doesn't overflow */
.review-card__see-more.hidden {
    display: none;
}

/* ===================================================
   GOOGLE LOGO
   =================================================== */

.review-card__google-logo {
    width: 14px;
    height: 14px;
    margin-top: auto;
}

.review-card__google-logo img,
.review-card__google-logo svg {
    width: 100%;
    height: 100%;
}

/* ===================================================
   NAVIGATION ARROWS
   =================================================== */

/* Carousel arrows - positioned outside overflow container */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    pointer-events: all;
    flex-shrink: 0 !important;
}

.carousel-arrow:hover {
    background-color: #F5F5F5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow:focus-visible {
    outline: 3px solid #3DBF2B;
    outline-offset: 2px;
}

/* Left Arrow */
.carousel-arrow.left {
    left: -60px;
}

/* Right Arrow */
.carousel-arrow.right {
    right: -60px;
}

/* Legacy class support */
.reviews-nav-btn--prev {
    left: -60px;
}

.reviews-nav-btn--next {
    right: -60px;
}

/* Arrow Icon */
.reviews-nav-btn__icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #00254D;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===================================================
   CAROUSEL INDICATORS (Optional - dots)
   =================================================== */

.reviews-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-bottom: 40px;
}

.reviews-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.reviews-indicator:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.reviews-indicator.active {
    background-color: #3DBF2B;
    transform: scale(1.2);
}

.reviews-indicator:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* ===================================================
   RESPONSIVE STYLES
   =================================================== */

/* ===== RESPONSIVE STYLES ===== */

/* Desktop spacing (≥1280px) */
@media screen and (min-width: 1280px) {
    .reviews-container {
        padding: 0 80px;
    }
    
    .carousel-arrow.left {
        left: -60px;
    }
    
    .carousel-arrow.right {
        right: -60px;
    }
}

/* Mid tablet spacing (913px - 1279px) */
@media screen and (min-width: 913px) and (max-width: 1279px) {
    .reviews-container {
        padding: 0 60px;
    }
    
    .reviews-title {
        padding-bottom: 40px;
    }
    
    .carousel-arrow.left {
        left: -50px;
    }
    
    .carousel-arrow.right {
        right: -50px;
    }
}

/* Small tablet spacing (541px - 912px) */
@media screen and (min-width: 541px) and (max-width: 912px) {
    .reviews-container {
        padding: 0 50px;
    }
    
    .reviews-title {
        padding-top: 80px;
        padding-bottom: 35px;
    }
    
    .reviews-carousel-outer {
        padding-bottom: 60px;
    }
    
    .carousel-arrow {
        width: 44px;
        height: 44px;
    }
    
    .carousel-arrow.left {
        left: -35px;
    }
    
    .carousel-arrow.right {
        right: -35px;
    }
}

/* Mobile spacing (≤540px) */
@media screen and (max-width: 540px) {
    .reviews-container {
        padding: 0 40px;
    }
    
    .reviews-title {
        padding-top: 60px;
        padding-bottom: 30px;
    }
    
    .reviews-carousel-outer {
        padding-bottom: 50px;
        padding-left: 32px !important;
        padding-right: 32px !important;
        overflow: visible !important;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Position arrows OUTSIDE card area to prevent overlap */
    .carousel-arrow.left {
        left: -24px !important;
    }
    
    .carousel-arrow.right {
        right: -24px !important;
    }
    
    .reviews-nav-btn__icon {
        width: 14px;
        height: 14px;
    }
}

/* Small mobile refinements (≤400px) */
@media screen and (max-width: 400px) {
    .reviews-container {
        padding: 0 30px;
    }
    
    .reviews-carousel-outer {
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
    
    .carousel-arrow {
        width: 36px;
        height: 36px;
    }
    
    /* Keep arrows outside card area */
    .carousel-arrow.left {
        left: -22px !important;
    }
    
    .carousel-arrow.right {
        right: -22px !important;
    }
    
    .reviews-nav-btn__icon {
        width: 12px;
        height: 12px;
    }
    
    .review-card {
        padding: 20px 16px 24px 16px;
        gap: 10px;
    }
    
    .review-card__profile {
        width: 44px;
        height: 44px;
    }
    
    /* Keep base font size for consistency */
    
    .review-card__star {
        width: 10px;
        height: 10px;
    }
}

/* Ultra small mobile (≤320px) */
@media screen and (max-width: 320px) {
    .reviews-container {
        padding: 0 25px;
    }
    
    .reviews-title {
        padding-top: 40px;
        padding-bottom: 20px;
    }
    
    .reviews-carousel-outer {
        padding-bottom: 40px;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
    
    .carousel-arrow {
        width: 32px;
        height: 32px;
    }
    
    /* Keep arrows outside card area even on smallest screens */
    .carousel-arrow.left {
        left: -20px !important;
    }
    
    .carousel-arrow.right {
        right: -20px !important;
    }
    
    .review-card {
        padding: 18px 14px 22px 14px;
    }
}

/* ===================================================
   DESKTOP SPACING REDUCTION - REDUCE TOP WHITESPACE
   =================================================== */

/* Nest Hub and larger tablets (≥1024px) - Reduce excessive top spacing */
@media screen and (min-width: 1024px) {
    .reviews-section {
        padding-top: 40px !important;
    }
    
    .reviews-title {
        margin-top: 0 !important;
        padding-top: 60px;
    }
}

/* Desktop 1920 and similar (≥1440px) - Further reduce spacing */
@media screen and (min-width: 1440px) {
    .reviews-section {
        padding-top: 32px !important;
    }
    
    .reviews-title {
        padding-top: 50px;
    }
}

/* 4K and ultrawide displays (≥2560px) - Minimal top spacing */
@media screen and (min-width: 2560px) {
    .reviews-section {
        padding-top: 24px !important;
    }
    
    .reviews-title {
        padding-top: 40px;
    }
}
