/* ============================================
   Michalis Massage - Reviews Showcase
   Elegant Design Matching Prototype
   ============================================ */

/* CSS Variables */
:root {
    /* Brand Colors */
    --color-bg: #FAFAF8;
    --color-text: #2D3748;
    --color-text-muted: #718096;
    --color-text-light: #A0AEC0;
    --color-accent: #3D6B64;
    --color-secondary: #5B8A82;

    /* Source Colors */
    --color-google: #4285F4;
    --color-treatwell: #5B8A82;
    --color-facebook: #1877F2;

    /* Star Color */
    --color-star: #D4A853;

    /* Quote Icon */
    --color-quote: #5B8A82;

    /* Card */
    --card-bg: #FFFFFF;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    --card-radius: 16px;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Layout */
    --max-width: 1200px;
}

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600&display=swap');

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Header - Elegant Light Design
   ============================================ */
.header {
    background: linear-gradient(180deg, #F5F5F0 0%, #FAFAF8 100%);
    padding: var(--spacing-xxl) var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative dots */
.header::before,
.header::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D4D4C8;
    opacity: 0.6;
}

.header::before {
    top: 60px;
    left: 15%;
}

.header::after {
    top: 120px;
    right: 10%;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

/* Profile Photo */
.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 4px solid white;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Star Rating at top */
.header-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.header-stars {
    display: flex;
    gap: 4px;
}

.header-stars .star {
    color: var(--color-star);
    font-size: 1.25rem;
}

.rating-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Main Title - Clean Sans-Serif */
.header-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.header-title-highlight {
    font-weight: 300;
}

/* Subtitle */
.header-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.trust-badge svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-light);
}

/* ============================================
   Main Content
   ============================================ */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

/* Reviews Counter */
.reviews-counter {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-lg);
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 640px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Review Card - New Design
   ============================================ */
.review-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: var(--spacing-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent grid blowout from long content */
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Header - Quote Icon + Source Badge */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

/* Quote Icon - Hidden */
.quote-icon {
    display: none;
}

/* Source Badge with Icon */
.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    background: #F0F7FF;
    color: var(--color-google);
}

.source-badge.treatwell {
    background: #F0F7F6;
    color: var(--color-treatwell);
}

.source-badge.facebook {
    background: #E7F0FE;
    color: var(--color-facebook);
}

.source-badge svg,
.source-badge img {
    width: 14px;
    height: 14px;
}

/* Google G icon */
.google-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-icon::before {
    content: 'G';
    font-weight: 700;
    font-size: 12px;
    color: var(--color-google);
}

/* Review Text */
.review-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.review-text::before {
    content: '"';
}

.review-text::after {
    content: '"';
}

.review-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--color-secondary);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
    display: inline-block;
}

.read-more:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Card Footer - Avatar, Name, Date, Stars */
.card-footer {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid #F0F0F0;
}

/* Avatar - Hidden (no actual photos) */
.reviewer-avatar {
    display: none;
}

/* Reviewer Info */
.reviewer-info {
    flex-grow: 1;
    min-width: 0; /* Allow text truncation */
    overflow: hidden;
}

.reviewer-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-date {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Stars in footer */
.footer-stars {
    display: flex;
    gap: 2px;
}

.footer-stars .star {
    color: var(--color-star);
    font-size: 0.9rem;
}

.footer-stars .star.empty {
    color: #E0E0E0;
}

/* ============================================
   Loading State
   ============================================ */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl);
    color: var(--color-text-muted);
}

.loading.visible {
    display: flex;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #E0E0E0;
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--spacing-sm);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--color-accent);
    color: white;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 2px solid white;
    border-radius: 24px;
    display: inline-block;
    transition: all 0.2s ease;
}

.footer a:hover {
    background: white;
    color: var(--color-accent);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .profile-photo {
        width: 100px;
        height: 100px;
    }

    .header-title {
        font-size: 1.75rem;
    }

    .header-subtitle {
        font-size: 0.95rem;
    }

    .trust-badges {
        gap: var(--spacing-md);
    }

    .trust-badge {
        font-size: 0.85rem;
    }

    .review-card {
        padding: var(--spacing-md);
    }

    .quote-icon {
        font-size: 2rem;
    }
}

/* No reviews state */
.no-reviews {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--color-text-muted);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Filter buttons (hidden for now but keeping for functionality) */
.filters {
    display: none;
}

/* ============================================
   Rating-Only Reviews Section
   ============================================ */
.rating-only-section {
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid #E8E8E4;
}

.rating-only-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.rating-only-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.rating-only-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.rating-only-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

@media (min-width: 640px) {
    .rating-only-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .rating-only-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.rating-only-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
}

.rating-only-stars {
    display: flex;
    gap: 1px;
}

.rating-only-stars .star {
    color: var(--color-star);
    font-size: 0.75rem;
}

.rating-only-name {
    font-size: 0.85rem;
    color: var(--color-text);
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-only-source {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rating-only-source.google {
    background: #F0F7FF;
    color: var(--color-google);
}

.rating-only-source.treatwell {
    background: #F0F7F6;
    color: var(--color-treatwell);
}

.rating-only-source.facebook {
    background: #E7F0FE;
    color: var(--color-facebook);
}
