.rate-widget {
  width: 100%;
  margin: 32px 0;
  padding: 32px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.rate-widget,
.rate-widget * {
  box-sizing: border-box;
}

.rate-widget__head {
  margin-bottom: 20px;
  text-align:center;
}

.rate-widget__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  color: #222;
}

@media (min-width:600px) {
  .rate-widget__summary, .rate-widget__bar {
    width:60%;
    margin:0 auto;
  }
}

.rate-widget__summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.rate-widget__rating {
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  color: #222;
}
.rate-widget__rating span {
  color:#ffd700;
}

.rate-widget__count {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #444;
}

.rate-widget__label {
  font-size: 15px;
  line-height: 1.4;
  color: #777;
}

.rate-widget__bar {
  margin-bottom: 28px;
}

.rate-widget__bar-line {
  position: relative;
  width: 100%;
  height: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e9e9;
}

.rate-widget__bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #ffd700;
  transition: width 0.25s ease;
}

.rate-widget__bar-label {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #666;
  font-weight:700;
}

.rate-widget__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.rate-widget__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #fff;
}

.rate-widget__avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin-bottom: 14px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f2f2f2;
}

.rate-widget__avatar--image {
  display: block;
  object-fit: cover;
}

.rate-widget__avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--avatar-bg, #000000);
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.rate-widget__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.rate-widget__stars {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 1px;
  color: #ffd700;
  white-space: nowrap;
}

.rate-widget__desc {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: #333;
}

.rate-widget__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 14px;
  line-height: 1.4;
  color: #777;
}

.rate-widget__author {
  font-weight: 600;
  color: #333;
}

.rate-widget__date {
  color: #777;
}

.rate-widget__date::before {
  content: "•";
  margin-right: 10px;
  color: #bbb;
}

.rate-widget__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rate-widget__more:hover,
.rate-widget__more:focus {
  background: #000;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.rate-widget__more:focus-visible {
  outline: 2px solid #222;
  outline-offset: 3px;
}

@media (max-width: 1199px) {
  .rate-widget__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .rate-widget {
    margin: 24px 0;
    padding: 22px;
    border-radius: 12px;
  }

  .rate-widget__title {
    font-size: 24px;
  }

  .rate-widget__summary {
    flex-wrap: wrap;
  }

  .rate-widget__rating {
    font-size: 36px;
  }

  .rate-widget__items {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rate-widget__item {
    padding: 18px;
  }

  .rate-widget__desc {
    font-size: 14px;
  }
}
