/**
 * Review Components CSS
 * Styling for review integration system
 * Matches existing gold/black theme
 */

/* Prevent scrollbar issues */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Review Section Base Styles */
.reviews-section {
    margin: 40px 0 200px 0 !important; /* Massive bottom margin */
    padding: 30px 0 100px 0 !important; /* Massive bottom padding */
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2332 100%); /* Dark blue gradient */
    border-radius: 15px;
    position: relative;
    overflow: visible; /* Changed from hidden to visible */
    z-index: 1;
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #42A5F5, #FFFF00, #F44336); /* Multi-color gradient */
}

/* Review Header */
.reviews-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.reviews-header h2 {
    color: #42A5F5; /* Light blue accent */
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.stars {
    font-size: 2rem;
    color: #FFFF00; /* Yellow for stars */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.rating-text {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Review Container */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Review Card */
.review-card {
    background: rgba(66, 165, 245, 0.05); /* Light blue tint */
    border: 1px solid rgba(66, 165, 245, 0.3); /* Light blue border */
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.review-card:hover {
    transform: translateY(-5px);
    border-color: rgba(66, 165, 245, 0.6); /* Brighter light blue on hover */
    box-shadow: 0 10px 30px rgba(66, 165, 245, 0.3); /* Light blue shadow */
}

.review-card.yelp {
    border-left: 4px solid #FF1A1A;
}

.review-card.zocdoc {
    border-left: 4px solid #00A0DC;
}

.review-card.website {
    border-left: 4px solid #FFFF00;
}

.review-card.google {
    border-left: 4px solid #4285F4;
}

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

.review-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #42A5F5; /* Light blue accent */
}

.platform-icon {
    font-size: 1.1rem;
}

.platform-name {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-rating {
    font-size: 1.2rem;
    color: #FFFF00; /* Yellow for ratings */
}

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

.review-text {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* Review Footer */
.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(66, 165, 245, 0.2); /* Light blue border */
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reviewer-name {
    color: #42A5F5; /* Light blue accent */
    font-weight: 600;
    font-size: 0.95rem;
}

.reviewer-location {
    color: #cccccc;
    font-size: 0.85rem;
}

.review-date {
    color: #aaaaaa;
    font-size: 0.85rem;
}

/* Review Categories */
.review-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    background: rgba(66, 165, 245, 0.1); /* Light blue background */
    color: #42A5F5; /* Light blue text */
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(66, 165, 245, 0.3); /* Light blue border */
}

/* Fade Slider */
.reviews-slider-main {
    position: relative;
    margin: 30px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.slider-container {
    position: relative;
    width: 100%;
    min-height: 400px; /* Ensure enough height for 3x2 grid */
    margin-bottom: 100px !important; /* Massive bottom margin */
}

/* Fade Slides */
.reviews-fade-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.reviews-fade-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    min-height: 600px;
    margin-bottom: 20px; /* Reduced from 40px */
}

.reviews-grid .review-card {
    flex: none;
    margin: 0;
    min-width: auto;
    height: auto;
    min-height: 180px;
}

.reviews-grid .review-card.empty {
    background: transparent;
    border: none;
    visibility: hidden;
}

/* Pagination */
.reviews-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0; /* Reduced from 30px 0 */
    padding: 20px;
}

.pagination-btn {
    background: rgba(66, 165, 245, 0.1); /* Light blue background */
    border: 1px solid #42A5F5; /* Light blue border */
    color: #42A5F5; /* Light blue text */
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover {
    background: rgba(66, 165, 245, 0.2); /* Brighter light blue on hover */
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-info {
    color: #42A5F5; /* Light blue text */
    font-size: 0.9rem;
    margin: 0 15px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        min-height: 800px;
    }
}

@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(9, 1fr);
        min-height: 1400px;
    }
}

/* Category Slide Indicators */
.category-slide-indicator {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.category-slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(66, 165, 245, 0.3); /* Light blue background */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.category-slide-dot.active {
    background: #42A5F5; /* Light blue active */
    transform: scale(1.2);
}

.category-slide-dot::after {
    content: attr(data-category);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 27, 42, 0.95); /* Dark blue background */
    color: #42A5F5; /* Light blue text */
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.category-slide-dot:hover::after {
    opacity: 1;
}

/* View All Reviews Button */
.view-all-reviews {
    text-align: center;
    margin: 30px 0;
}

.view-all-btn {
    background: rgba(66, 165, 245, 0.1); /* Light blue background */
    border: 2px solid #42A5F5; /* Light blue border */
    color: #42A5F5; /* Light blue text */
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.view-all-btn:hover {
    background: rgba(66, 165, 245, 0.2); /* Brighter light blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 165, 245, 0.4); /* Light blue shadow */
}

/* All Reviews Container */
.all-reviews-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid rgba(66, 165, 245, 0.3); /* Light blue border */
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.slider-btn {
    background: rgba(66, 165, 245, 0.1); /* Light blue background */
    border: 2px solid #42A5F5; /* Light blue border */
    color: #42A5F5; /* Light blue text */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: rgba(66, 165, 245, 0.2); /* Brighter light blue on hover */
    transform: scale(1.1);
}

.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(66, 165, 245, 0.3); /* Light blue background */
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #42A5F5; /* Light blue active */
    transform: scale(1.2);
}

/* Filter Controls */
.review-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(66, 165, 245, 0.1); /* Light blue background */
    border: 1px solid rgba(66, 165, 245, 0.3); /* Light blue border */
    color: #42A5F5; /* Light blue text */
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(66, 165, 245, 0.2); /* Brighter light blue on hover/active */
    border-color: #42A5F5; /* Solid light blue border */
    transform: translateY(-2px);
}

/* Search Box */
.review-search {
    background: rgba(66, 165, 245, 0.05); /* Light blue tint */
    border: 1px solid rgba(66, 165, 245, 0.3); /* Light blue border */
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 25px;
    width: 300px;
    max-width: 100%;
    font-size: 1rem;
    margin: 20px auto;
    display: block;
}

.review-search::placeholder {
    color: #aaaaaa;
}

.review-search:focus {
    outline: none;
    border-color: #42A5F5; /* Light blue border on focus */
    box-shadow: 0 0 10px rgba(66, 165, 245, 0.4); /* Light blue glow */
}

/* No Reviews Message */
.no-reviews {
    text-align: center;
    color: #aaaaaa;
    font-style: italic;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reviews-header h2 {
        font-size: 2rem;
    }
    
    .reviews-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .slider-container .review-card {
        flex: 0 0 calc(100% - 20px);
        margin-right: 20px;
        min-width: 280px;
    }
    
    .review-filters {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .review-search {
        width: calc(100% - 30px);
        margin: 15px;
    }
    
    .rating-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .view-all-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .reviews-section {
        margin: 20px 0 150px 0 !important; /* Maintain bottom margin on mobile */
        padding: 20px 0 80px 0 !important; /* Maintain bottom padding on mobile */
    }
    
    .reviews-header h2 {
        font-size: 1.8rem;
    }
    
    .review-card {
        padding: 15px;
    }
    
    .review-text {
        font-size: 0.95rem;
    }
    
    .slider-container .review-card {
        min-width: 250px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.reviews-loading {
    text-align: center;
    padding: 40px;
    color: #42A5F5; /* Light blue text */
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(66, 165, 245, 0.3); /* Light blue border */
    border-top: 4px solid #42A5F5; /* Light blue top */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
