/* ====== DESKTOP — оставляем как есть ====== */

.rating-section {
  /* десктоп — без изменений */
}

.rating-container {
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rating-cards-container {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}


.rating-cards {
  display: flex;
  gap: 10px;
  margin: 0 auto;
  width: 100%;
}

.rating-card {
  max-width: 185px;
  /* height: 243px; */
  background-color: rgba(132, 168, 172, 0.2);
  border: 1px solid rgba(232, 230, 212, 0.2);
  border-radius: 6px;
  box-sizing: border-box;
  text-align: center;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, border-width 0.3s ease, box-shadow 0.3s ease;
  width: calc( 16.66666% - 10px );
  padding: 25px 0;
}



.rating-logo img {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
}

.rating-name {
  margin-bottom: 10px;
  display: inline-block;
  color: #18383C;
  text-align: center;
  font-size: 14px;
  background: #FFF;
  border-radius: 4px;
  padding: 4px 50px 4px  6px;
  position: relative;
  
}
.rating-name span{
  border-radius: 4px;
background: #76824A;
  color: var(--color-white);
   position: absolute;
  padding: 0 5px;
  font-size: 10px;
font-style: normal;
font-weight: 600;
  right: 0;
  top: 0;height: 100%;
  display: flex;
  align-items: center;
  
}
.rating-stars {
  font-size: 14px;
  color: #F8D341;
  margin-bottom: 15px;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block; /* для корректного трансформа */
  width: 100%;
}

/* Контейнер для звездочек с рейтингом */
.stars-container {
  position: relative;
  display: inline-block;
  width: 75px;
  height: 14px;
}

/* Фоновые звездочки (незакрашенные) */
.stars-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* SVG внутри фоновых звездочек - прозрачный фон с желтой обводкой */
.stars-background svg path {
  fill: transparent !important;
  stroke: #F8D341;
  stroke-width: 1px;
}

/* Закрашенные звездочки */
.stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%; /* Начальная ширина 0% */
  height: 100%;
  overflow: hidden;
  z-index: 2;
  transition: width 0.3s ease;
}

/* SVG внутри закрашенных звездочек */
.stars-fill svg {
  width: 75px;
  height: 14px;
}

.rating-btn a {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #E8E6D4;
  text-decoration: none;
  /* text-transform: uppercase; */
  display: inline-block;
}
.rating-btn a:hover{
  text-decoration: underline;
}
/* ====== MOBILE ONLY (до 478px) ====== */

@media screen and (max-width: 768px) {

  .rating-section {
    margin: 80px 0;
  }
  .rating-container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  
  .rating-cards-container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }

  .rating-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    flex-direction: column;
  }

  .rating-card {
    padding: 20px 0;
    background-color: rgba(132, 168, 172, 0.2);
    border: 1px solid rgba(232, 230, 212, 0.2);
    border-radius: 6px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  .rating-logo img {
    width: 50px;
    height: 50px;
    margin: 0 0 10px 0;
  }

  .rating-name {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .rating-stars {
    width: 80px;
    height: 14px;
    margin-bottom: 10px;
  }

  .rating-stars img {
    width: 100%;
    height: auto;
  }

  .rating-btn a {
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {

  .rating-section {
    margin: 80px 0;
  }
  .rating-container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .rating-text {
    width: 100%;
    padding: 0;
    text-align: center;
    margin-bottom: 0;
    display: block;
  }

  .rating-cards-container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }

  .rating-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    /* flex-direction: column; */
  }

  .rating-card {
    width: 100%;
    height: 193px;
    padding: 20px 0;
    background-color: rgba(132, 168, 172, 0.2);
    border: 1px solid rgba(232, 230, 212, 0.2);
    border-radius: 6px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
  }

  .rating-logo img {
    width: 50px;
    height: 50px;
    margin: 0 0 10px 0;
  }

  .rating-name {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .rating-stars {
    width: 80px;
    height: 14px;
    margin-bottom: 10px;
  }

  .rating-stars img {
    width: 100%;
    height: auto;
  }

  .rating-btn a {
    font-size: 14px;
  }
}