/* Блок оценок Google / Яндекс */
.ac-ratings {
    padding-top: 3rem;
    padding-bottom: 0.75rem;
}

.ac-ratings__wrap {
    max-width: 870px;
    margin-left: auto;
    margin-right: auto;
}

.ac-ratings__head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.ac-ratings__title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #2c2b3c;
}

.ac-ratings__subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #6b7280;
}

.ac-ratings__panel {
    display: flex;
    flex-direction: column;
    border-radius: 0.875rem;
    background: #fff;
    box-shadow: 0 8px 28px rgba(44, 43, 60, 0.08);
    overflow: hidden;
}

.ac-ratings__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    padding: 1.25rem 1rem 1.375rem;
    color: #2c2b3c;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease;
}

.ac-ratings__item + .ac-ratings__item {
    border-top: 1px solid #ececf0;
}

.ac-ratings__item:focus-visible {
    color: #2c2b3c;
    background: #fafafb;
}

.ac-ratings__item--google::before,
.ac-ratings__item--yandex::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ac-ratings__item--google::before {
    background: #4285f4;
}

.ac-ratings__item--yandex::before {
    background: #fc3f1d;
}

.ac-ratings__item:focus-visible::before {
    opacity: 1;
}

@media (hover: hover) {
    .ac-ratings__item:hover {
        color: #2c2b3c;
        background: #fafafb;
    }

    .ac-ratings__item:hover::before {
        opacity: 1;
    }
}

.ac-ratings__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.ac-ratings__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(44, 43, 60, 0.1);
}

.ac-ratings__icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.ac-ratings__item--google .ac-ratings__icon {
    background: #fff;
}

.ac-ratings__item--yandex .ac-ratings__icon {
    background: #fc3f1d;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.ac-ratings__name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.ac-ratings__score {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.625rem;
    margin-bottom: 0.375rem;
}

.ac-ratings__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.ac-ratings__stars {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
}

.ac-ratings__star {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ac-ratings__star--empty {
    color: #d1d5db;
}

.ac-ratings__star--full,
.ac-ratings__star--partial {
    color: #fabb05;
}

.ac-ratings__star--partial {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
}

.ac-ratings__star--partial svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
}

.ac-ratings__star--partial .ac-ratings__star-empty {
    color: #d1d5db;
}

.ac-ratings__star--partial .ac-ratings__star-fill {
    color: #fabb05;
    clip-path: inset(0 40% 0 0);
}

.ac-ratings__count {
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #6b7280;
}

.ac-ratings__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    color: #2563eb;
    transition: color 0.2s ease;
}

.ac-ratings__item:focus-visible .ac-ratings__cta {
    color: #1d4ed8;
}

@media (hover: hover) {
    .ac-ratings__item--google:hover .ac-ratings__cta {
        color: #4285f4;
    }

    .ac-ratings__item--yandex:hover .ac-ratings__cta {
        color: #fc3f1d;
    }
}

@media (min-width: 576px) {
    .ac-ratings {
        padding-top: 3.5rem;
        padding-bottom: 1rem;
    }

    .ac-ratings__head {
        margin-bottom: 1.5rem;
    }

    .ac-ratings__title {
        font-size: 1.625rem;
    }

    .ac-ratings__panel {
        flex-direction: row;
    }

    .ac-ratings__item + .ac-ratings__item {
        border-top: 0;
        border-left: 1px solid #ececf0;
    }

    .ac-ratings__item {
        padding: 1.5rem 1.25rem 1.625rem;
    }

    .ac-ratings__value {
        font-size: 2.25rem;
    }

    .ac-ratings__star,
    .ac-ratings__star--partial,
    .ac-ratings__star--partial svg {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 992px) {
    .ac-ratings {
        padding-top: 4rem;
        padding-bottom: 1rem;
    }

    .ac-ratings__title {
        font-size: 1.75rem;
    }

    .ac-ratings__item {
        padding: 1.75rem 1.5rem 1.875rem;
    }

    .ac-ratings__icon {
        width: 44px;
        height: 44px;
    }

    .ac-ratings__icon svg {
        width: 24px;
        height: 24px;
    }

    .ac-ratings__item--yandex .ac-ratings__icon {
        font-size: 1.375rem;
    }

    .ac-ratings__value {
        font-size: 2.5rem;
    }
}

@media (min-width: 1200px) {
    .ac-ratings:not(.ac-ratings--compact) {
        padding-top: 4rem;
    }
}

.ac-ratings--compact {
    padding-top: 1.25rem;
    padding-bottom: 0.5rem;
}

@media (min-width: 576px) {
    .ac-ratings--compact {
        padding-top: 1.5rem;
        padding-bottom: 0.75rem;
    }
}

@media (min-width: 992px) {
    .ac-ratings--compact {
        padding-top: 1.75rem;
        padding-bottom: 0.75rem;
    }

    .ac-ratings--compact .ac-ratings__head {
        margin-bottom: 1.25rem;
    }
}
