/* ===== Reviews & Ratings Stylesheet (Google, Yelp, Trustpilot) ===== */

:root {
    --star-color: #ffc107;
    --star-glow: rgba(255, 193, 7, 0.3);
    --provider-color: #4285f4;
}

/* Provider Brand Classes */
.provider-google {
    --provider-color: #4285f4;
    --star-color: #fbbc05;
    --star-glow: rgba(251, 188, 5, 0.25);
}

.provider-yelp {
    --provider-color: #d32323;
    --star-color: #fbbc05;
    --star-glow: rgba(251, 188, 5, 0.25);
}

.provider-trustpilot {
    --provider-color: #00b67a;
    --star-color: #00b67a;
    --star-glow: rgba(0, 182, 122, 0.25);
}

/* Header Rating Badge */
.header-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 1.25rem;
}

.header-rating-badge:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.header-rating-badge i.brand-icon {
    color: var(--provider-color);
    font-size: 0.88rem;
}

.header-rating-badge .stars-mini {
    color: var(--star-color);
    display: inline-flex;
    gap: 1px;
    font-size: 0.7rem;
}

.header-rating-badge .badge-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
}

/* Homepage Testimonials Section */
.reviews-section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

/* Glassmorphic Carousel Container */
.reviews-carousel-container {
    position: relative;
    max-width: 1100px;
    margin: 2rem auto 0;
    padding: 0 40px;
}

.reviews-carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
}

.reviews-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    gap: 2rem;
}

/* Glassmorphic Review Card */
.review-card {
    flex: 0 0 calc(33.333% - 1.34rem);
    min-width: 280px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.review-card:hover {
    transform: translateY(-8px);
    background: #ffffff;
    border-color: var(--provider-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Card Quote Icon decoration */
.review-card::before {
    content: "“";
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 4rem;
    font-family: serif;
    color: rgba(0, 0, 0, 0.03);
    line-height: 1;
}

/* Author Info */
.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    border: 2px solid #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.review-meta {
    flex: 1;
}

.review-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.15rem;
}

.review-date {
    font-size: 0.78rem;
    color: #64748b;
}

/* Stars Rating */
.review-stars {
    color: var(--star-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 2px;
}

.review-stars i {
    text-shadow: 0 0 3px var(--star-glow);
}

/* Review Text */
.review-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #475569;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Provider Icon Stamp */
.provider-stamp {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 1.15rem;
    opacity: 0.9;
    color: var(--provider-color);
}

.review-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1.5rem;
}

/* Carousel Nav Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #334155;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.carousel-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--clr-primary);
    transform: translateY(-50%) scale(1.08);
}

.carousel-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }

/* Carousel Dots Indicator */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--clr-primary);
    transform: scale(1.3);
}

/* Floating/Footer Rating Badge (Enlarged) */
.rating-badge-footer {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    padding: 0.8rem 1.7rem 0.8rem 0.9rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.rating-badge-footer:hover {
    background: #f8fafc;
    border-color: var(--provider-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.rating-badge-footer .badge-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--provider-color);
}

.rating-badge-footer .badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.rating-badge-footer .badge-stars {
    color: var(--star-color);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.rating-badge-footer .badge-score {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
}

.rating-badge-footer .badge-count {
    font-size: 0.85rem;
    color: #64748b;
}

/* Stat Box Variant */
.hero-stat-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-stat-rating .num {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--star-color) !important;
}

/* Responsive adjustment */
@media (max-width: 1024px) {
    .review-card {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .review-card {
        flex: 0 0 100%;
    }
    .reviews-carousel-container {
        padding: 0 20px;
    }
    .carousel-btn.prev { left: -15px; }
    .carousel-btn.next { right: -15px; }
}

/* Floating Reputation Badge */
.floating-reputation-badge {
    position: fixed;
    bottom: 30px;
    left: -350px;
    width: 290px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 99997;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.4s ease;
    opacity: 0;
}

.floating-reputation-badge.visible {
    left: 24px;
    opacity: 1;
}

.reputation-badge-content {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.reputation-badge-content:hover {
    text-decoration: none !important;
}

.reputation-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.reputation-badge-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

.reputation-badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reputation-stars-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.rating-number {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.rating-stars {
    color: #ffb800;
    font-size: 0.82rem;
    display: flex;
    gap: 1px;
    line-height: 1;
}

.rating-stars i {
    text-shadow: 0 0 2px rgba(255, 184, 0, 0.3);
}

.rating-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.close-reputation-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
    transition: color 0.2s;
}

.close-reputation-badge:hover {
    color: #ffffff;
}

/* Mobile responsive styling */
@media (max-width: 768px) {
    .floating-reputation-badge {
        bottom: calc(54px + var(--cookie-banner-h, 0px));
        left: -350px;
    }
    .floating-reputation-badge.visible {
        left: 16px;
        width: calc(100% - 32px);
        max-width: 320px;
    }
}

