@import url('https://fonts.googleapis.com/css2?family=Commissioner:wght@600;700&family=Ubuntu:wght@400;500;700&display=swap');

* { box-sizing: border-box; }

.google-reviews-container {
    font-family: 'Ubuntu', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0;
    overflow: hidden; /* Фіксація горизонтальної прокрутки */
}

.widget-main-title {
    font-family: 'Commissioner', sans-serif;
    text-align: center;
    font-size: 28px;
    color: #202124;
    margin-bottom: 40px;
}

/* --- HEADER --- */
.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px 30px 50px;
    max-width: 1240px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.google-logo-text { font-family: 'Commissioner', sans-serif; font-size: 26px; font-weight: 700; }
.brand-text { font-size: 20px; font-weight: 500; margin-left: 8px; }

.header-rating-row { display: flex; align-items: center; gap: 12px; margin-top: 5px; }
.rating-big { font-size: 36px; font-weight: 700; color: #202124; }
.header-stars-main { color: #EA4335; font-size: 22px; }

.review-btn-header {
    background: #EA4335;
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 700;
    transition: 0.3s;
}

/* --- SLIDER AREA (ФІКСАЦІЯ СТРІЛОК) --- */
.reviews-slider {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 60px; /* Місце для стрілок */
    width: 100%;
}

.reviews-track {
    display: flex;
    gap: 24px;
    padding: 20px 0 40px 0;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- CARDS --- */
.review-card {
    flex: 0 0 320px;
    width: 320px;
    background: white;
    border-radius: 6px;
    padding: 25px 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    height: 400px; /* Фіксована початкова висота */
    transition: height 0.3s ease;
    position: relative;
}

.review-card.expanded { height: auto; min-height: 400px; }

/* ЗІРКИ ЧЕРВОНОГО КОЛЬОРУ */
.review-card-stars { color: #EA4335; font-size: 24px; margin-bottom: 15px; text-align: center; }

.review-content-wrapper { flex-grow: 1; margin-bottom: 20px; text-align: center; }

.review-card-text {
    font-size: 15px;
    line-height: 1.6;
    color: #3C4043;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-card.expanded .review-card-text { display: block; overflow: visible; -webkit-line-clamp: initial; }

.read-more-btn { color: #9AA0A6; font-size: 13px; cursor: pointer; text-decoration: underline; margin-top: 5px; }

/* --- AUTHOR BLOCK --- */
.review-author-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
    margin-top: auto; /* Притискає автора до низу картки */
}

.author-avatar-container { width: 50px; height: 50px; margin-top: -45px; margin-bottom: 10px; }

.author-initials {
    width: 100%; height: 100%; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; border: 4px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.author-photo {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 4px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.author-name { font-size: 16px; color: #202124; margin-bottom: 2px; }
.review-date { font-size: 12px; color: #9AA0A6; }

/* ЛОГОТИП GOOGLE (СИНІЙ ТЕКСТ ПОПРАВЛЕНО НА ЧЕРВОНИЙ) */
.google-source { display: flex; align-items: center; gap: 5px; font-size: 11px; margin-top: 5px; color: #9AA0A6; }

/* --- СТРІЛКИ (ЖОРСТКЕ ПОЗИЦІЮВАННЯ) --- */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: white;
    z-index: 100;
    cursor: pointer;
    display: flex; /* Буде переключено на none/flex через JS */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.slider-btn:hover { background: #EA4335; color: white; border-color: #EA4335; }

.slider-btn-prev { left: 10px !important; right: auto !important; }
.slider-btn-next { right: 10px !important; left: auto !important; }

@media (max-width: 768px) {
    .slider-btn { display: none !important; }
    .review-card { flex: 0 0 280px; width: 280px; }
}