/* ===================================================================
   CSS DEDYKOWANY DLA STRONY WSZYSTKICH OPINII (wszystkie-opinie.php)
   Atlas Nieruchomości - Wszystkie opinie
   =================================================================== */

/* NAGŁÓWEK STRONY */
.page-header {
    padding: 80px 0 60px 0;
    background: linear-gradient(135deg, #1c3e5f 0%, #173049 100%);
    color: white;
    text-align: center;
    margin-top: 5rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 710px;
    margin: 0 auto;
    line-height: 1.6;
}

/* SEKCJA OPINII GOOGLE */
.google-reviews-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.google-reviews-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.google-reviews-section .section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 40px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Kontener opinii */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Karty opinii */
.testimonial-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 300px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc05 75%, #ea4335 100%);
    border-radius: 15px 15px 0 0;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Struktura opinii */
.testimonial-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f1f3f4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.testimonial-rating i {
    color: #ffc107;
    font-size: 0.9rem;
    margin-right: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.testimonial-rating .far {
    color: #e9ecef;
}

.review-date {
    font-size: 0.85rem;
    color: #adb5bd;
    font-weight: 500;
    margin-left: -6.3rem;

}

/* Tekst opinii */
.testimonial-text {
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    font-style: normal;
    flex: 1;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.testimonial-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    line-clamp: 7;
    overflow: hidden;
    max-height: 11.2em;
    position: relative;
}

.testimonial-text.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 1.6em;
    background: linear-gradient(to right, transparent, #fff 50%);
    pointer-events: none;
}

/* Przycisk rozwiń/zwiń */
.expand-toggle {
    color: #0a2342;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    background: none;
    padding: 8px 16px;
    margin-top: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 20px;
    display: inline-block;
    background-color: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.2);
    min-width: 100px;
    text-align: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.expand-toggle:hover {
    color: #ffffff;
    background-color: #0a2342;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.expand-toggle:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
    border-radius: 20px;
}

.expand-toggle:active {
    transform: translateY(0);
}

/* SORTOWANIE I FILTRY */
.filters-section {
    background: #ffffff;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-controls label {
    font-weight: 600;
    color: #2c3e50;
}

.sort-controls select {
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    min-width: 150px;
}

/* KOMUNIKAT BRAKU OPINII */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 40px 0;
}

.no-results p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.no-results small {
    color: #adb5bd;
    font-style: italic;
}

/* RESPONSYWNOŚĆ - WSZYSTKIE OPINIE */
@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 20px;
        min-height: 250px;
    }
    
    .google-reviews-section .section-title {
        font-size: 2rem;
    }
    
    .google-reviews-section .section-subtitle {
        font-size: 1.1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .testimonial-text.collapsed {
        max-height: 10.5em;
        -webkit-line-clamp: 7;
        line-clamp: 7;
    }
    
    .testimonial-text.collapsed::after {
        width: 50%;
        height: 1.5em;
    }
    
    .expand-toggle {
        font-size: 0.85rem;
        padding: 6px 12px;
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .testimonial-text.collapsed {
        max-height: 9.8em;
        -webkit-line-clamp: 7;
        line-clamp: 7;
    }
    
    .testimonial-text.collapsed::after {
        width: 60%;
        height: 1.4em;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .avatar-placeholder {
        font-size: 1rem;
    }
    
    .sort-controls select {
        min-width: 120px;
    }
}

/* ANIMACJE WSZYSTKIE OPINIE */
.testimonial-text.expanding {
    max-height: none !important;
    -webkit-line-clamp: none !important;
    line-clamp: none !important;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

.testimonial-card {
    animation: slideInUp 0.6s ease-out;
}

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

/* SEKCJA FILTRÓW */
.filter-bar {
    padding: 30px 0;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}
