/* ============================================================
   S.T Contracts Ltd - REVIEWS STYLESHEET
   Kept separate from the global file so the review block is
   easy to find and update. Loaded on pages that show reviews.

   SECTIONS
     1. REVIEW PILL   - compact Google rating pill (.st-review-pill*)
                        variants: --light / --dark / --colour
     2. REVIEWS SLIDER- horizontal review cards + nav (.st-reviews*, .st-review*)
   ============================================================ */


/* ============================================================
   1. REVIEW PILL   (source: review-pill.css)
   Compact "Google 5.0 (NN reviews)" pill used in page heroes.
   The rating/count TEXT lives in the markup (includes/review-pill.php),
   not here - this section only styles it.
   ============================================================ */
.st-review-pill {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: 'Mulish', sans-serif;
    line-height: 1;
    white-space: nowrap;
}

/* Google logo sits on its own white chip so the full-colour mark
   reads correctly on light, dark and orange pills alike. */
.st-review-pill__g {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(20, 26, 32, .18);
}
.st-review-pill__g svg { display: block; }

.st-review-pill__stars {
    display: inline-flex;
    gap: 2px;
    color: #f5b50a;
    font-size: 14px;
}

.st-review-pill__rating {
    font-size: 14px;
    font-weight: 800;
}

.st-review-pill__count {
    font-size: 13px;
    font-weight: 600;
}
.st-review-pill__count a { color: inherit; text-decoration: none; }
.st-review-pill__count a:hover { text-decoration: underline; }

/* ---- Variant: light (white pill, for dark backgrounds) ---- */
.st-review-pill--light {
    background: #ffffff;
    border-color: #e6e8eb;
    box-shadow: 0 3px 12px rgba(16, 24, 32, .12);
}
.st-review-pill--light .st-review-pill__rating { color: #23282d; }
.st-review-pill--light .st-review-pill__count  { color: #5b636b; }

/* ---- Variant: dark (charcoal pill, for light backgrounds) ---- */
.st-review-pill--dark {
    background: #23282d;
    border-color: rgba(255, 255, 255, .12);
}
.st-review-pill--dark .st-review-pill__rating { color: #ffffff; }
.st-review-pill--dark .st-review-pill__count  { color: rgba(255, 255, 255, .72); }

/* ---- Variant: colour (orange pill, accent) ---- */
.st-review-pill--colour {
    background: #F28823;
    border-color: #F28823;
    box-shadow: 0 6px 18px rgba(242, 136, 35, .32);
}
.st-review-pill--colour .st-review-pill__stars  { color: #ffffff; }
.st-review-pill--colour .st-review-pill__rating { color: #ffffff; }
.st-review-pill--colour .st-review-pill__count  { color: rgba(255, 255, 255, .92); }

@media (max-width: 420px) {
    .st-review-pill { padding: .45rem .75rem; gap: .5rem; }
    .st-review-pill__count { font-size: 12px; }
    .st-review-pill__g { width: 24px; height: 24px; }
}

/* ============================================================
   2. REVIEWS SLIDER   (source: reviews.css)
   ============================================================ */
/* Start: Reviews Section */
.st-reviews-section {
    padding: 80px 0;
    position: relative;
}

/* Background Options */
.st-reviews-bg-white {
    background-color: #ffffff;
}

.st-reviews-bg-grey {
    background-color: #f3f3f3;
}

/* Container */
.st-reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* Heading with centered underline */
.st-reviews-heading {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin: 0 auto 50px;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.st-reviews-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #F28823;
}

/* Horizontal Reviews Slider */
.st-reviews-slider {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    position: relative;
    padding-bottom: 15px; /* Room for scrollbar */
    scroll-snap-type: x mandatory; /* Enable scroll snapping */
}

.st-reviews-slider::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Reviews Row */
.st-reviews-row {
    display: flex;
    gap: 25px;
    padding: 10px 5px 30px; /* Added bottom padding for navigation arrows */
    width: fit-content;
}

/* Review Card - Increased size */
.st-review-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 25px;
    transition: all 0.3s ease;
    width: 350px; /* Fixed width for consistent sizing */
    min-width: 350px; /* Ensure cards don't shrink */
    max-width: 350px;
    scroll-snap-align: center; /* Ensures card snaps to center */
    position: relative;
    overflow: visible; /* Changed from hidden to visible to allow content to expand */
}

/* Expanded card state */
.st-review-card[data-expanded="true"] {
    height: auto !important; /* Override any inline height */
    z-index: 5; /* Bring expanded card to front */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.st-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Review Header */
.st-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Google Icon */
.st-review-google {
    display: flex;
    align-items: center;
}

.st-review-google-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Stars */
.st-review-stars {
    color: #F28823;
    font-size: 14px;
}

/* Review Content */
.st-review-content {
    margin-bottom: 20px;
    position: relative;
}

.st-review-text {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    overflow: visible; /* Allow text to be visible when expanded */
}

/* Expanded card's review text */
.st-review-card[data-expanded="true"] .st-review-text {
    max-height: none;
}

/* Read More Button */
.st-review-expand-btn {
    background-color: transparent;
    color: #F28823;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline-block;
    transition: color 0.3s ease;
    margin-top: 5px;
}

.st-review-expand-btn:hover {
    color: #d97415;
    text-decoration: underline;
}

/* Review Author */
.st-review-author p {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
    margin: 0;
}

/* Navigation Arrows - REPOSITIONED */
.st-reviews-nav {
    position: absolute;
    bottom: -5px; /* Adjusted from -20px to -5px */
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
}

.st-reviews-arrow {
    background-color: #F28823;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    transition: all 0.3s ease;
}

.st-reviews-arrow:hover {
    background-color: #d97415;
}

.st-reviews-prev {
    left: 10px;
}

.st-reviews-next {
    right: 10px;
}

/* Scroll Indicators - Updated with orange styling */
.st-reviews-dots {
    display: flex;
    justify-content: center;
    margin-top: 50px; /* Increased from 30px to 50px to make room for buttons */
    gap: 8px;
    flex-wrap: wrap; /* Allow dots to wrap on smaller screens */
    padding: 0 20px;
}

.st-reviews-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 5px;
}

.st-reviews-dot.active {
    background-color: #F28823; /* Orange for active dot */
}

.st-reviews-dot:hover:not(.active) {
    background-color: #e6e6e6; /* Slightly darker on hover for inactive dots */
}

/* Full content (hidden by default) */
.st-review-full-content {
    display: none; /* Hide by default and use JS to show/hide */
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .st-reviews-section {
        padding: 60px 0;
    }
    
    .st-reviews-heading {
        font-size: 32px;
    }
    
    .st-review-card {
        width: 320px;
        min-width: 320px;
    }
    
    /* Keep navigation arrows at bottom on tablet */
    .st-reviews-nav {
        bottom: -5px;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .st-reviews-section {
        padding: 50px 0;
    }
    
    .st-reviews-heading {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .st-review-card {
        width: 280px;
        min-width: 280px;
        padding: 20px; /* Slightly reduced padding to allow more content space */
    }
    
    /* Special handling for expanded cards on mobile */
    .st-review-card[data-expanded="true"] {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
    
    .st-review-text {
        font-size: 14px; /* Slightly smaller font on mobile */
    }
    
    .st-reviews-nav {
        display: none; /* Hide arrows on mobile for cleaner swipe interface */
    }
    
    .st-reviews-dots {
        margin-top: 30px; /* Return to original spacing since arrows are hidden */
    }
}
