/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BASE
========================= */
body {
  font-family: Inter, sans-serif;
  font-size: 20px;
  background: #fff;
  color: #000;
}

.reviews-page {
  max-width: 900px;
  margin: auto;
  padding: 0 20px;  /* ← добавить это */
}

/* =========================
   HEADER
========================= */
.reviews-header {
  text-align: center;
}

.reviews-header h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.reviews-description {
  margin-top: 25px;
  color: #666;
}

/* =========================
   RATING BLOCK
========================= */
.reviews-top {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  margin-top: 20px;
}

.rating-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

.rating-number {
  font-family: "Zero Cool", sans-serif;
  font-weight: 800;
  font-size: 100px;
  color: #0a5b59;
  line-height: 1;
}

.rating-text {
  color: #777;
  margin-top: 8px;
  font-size: 16px;
}

/* =========================
   BUTTONS
========================= */
.reviews-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  min-width: 320px;
  transform: translateX(-10px);
}

.reviews-buttons button {
  font-family: Inter, sans-serif !important;
  background: #0a5b59;
  color: #fff;
  border: none;

  height: 60px;

  width: 100%;
  min-width: 320px;
  max-width: 420px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  font-weight: 500;

  cursor: pointer;
  border-radius: 14px;
}

/* =========================
   FILTERS
========================= */
.filters {
  margin-top: 40px;
  display: flex;
  gap: 15px;
}

.filters select {
  width: 100%;
  max-width: 260px;
  height: 60px;

  padding: 0 44px 0 18px;

  font-size: 20px;
  font-weight: 500;
  font-family: Inter, sans-serif;

  color: #2d2d2d;

  background-color: #fff;

  border: 2px solid var(--primary);
  border-radius: 14px;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%230A5B59' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;

  transition: all 0.2s ease;
}

/* =========================
   REVIEWS
========================= */
.review-card {
  background: #efeff4;
  margin-top: 20px;
  border-radius: 15px;
  padding: 20px;
}

.review-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stars {
  color: #f5b400;
  font-size: 20px;
  margin-bottom: 12px;
}

.review-date {
  color: #888;
  font-size: 14px;
}

/* =========================
   MODAL
========================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 95%;
  max-width: 500px;
  background: #fff;
  border-radius: 15px;
  padding: 25px;
  position: relative;
}

.close-btn {
    background: #efeff4;
    border: none;
    outline: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;

    position: absolute;
    top: 25px;
    right: 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    cursor: pointer;
    z-index: 10;

    transition: background .3s;
}

.close-btn svg path {
    transition: stroke .3s;
}

.close-btn:hover {
    background: #0a5b59;
}

.close-btn:hover svg path {
    stroke: #fff;
}

.modal input,
.modal textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.modal textarea {
  height: 140px;
  resize: none;
}

/* =========================
   RATING PICKER
========================= */
.rating-picker {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom:10px;
}

.rating-picker span {
  font-size: 34px;
  cursor: pointer;
  color: #d3d1dd;
  transition: transform .2s ease, color .2s ease;
  user-select: none;
}

.rating-picker span.active {
  color: #0A5B59;
}

.rating-picker span:hover {
  transform: scale(1.15);
}

/* =========================
   MARQUEE
========================= */
.marquee {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
  background: transparent;
}

.marquee .track {
  display: flex;
  width: max-content;
  gap: 50px;
}

/* общий текст */
.marquee .track span {
  white-space: nowrap;
  font-family: "Zero Cool", sans-serif;
  font-weight: 400;
  color: #0a5b59;
  font-size: 150px;
  letter-spacing: 1px;
}

/* анимации */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-top .track {
  animation: scroll 60s linear infinite;
}

.marquee-bottom .track {
  animation: scroll 90s linear infinite;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

  .reviews-header h1 {
    font-size: 32px;
  }

  .reviews-buttons {
    align-items: stretch;
    transform: none;
    width: 100%;
  }

  .reviews-buttons button {
    min-width: 100%;
    max-width: 100%;
  }

  .filters {
    flex-direction: column;
  }

  .marquee .track span {
    font-size: 90px;
  }
}

@media (max-width: 480px) {
  .marquee .track span {
    font-size: 80px;
  }
}

.select-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
  }

.select-wrap select {
  width: 100%;
  height: 60px;

  padding: 0 30px 0 12px;

  font-size: 18px;
  font-weight: 500;

  color: #2d2d2d;

  background: #fff;

  border: 2px solid var(--primary);
  border-radius: 14px;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
}

.select-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.modal-content h2 {
    font-family: 'Zero Cool', sans-serif;
    font-weight: 400;
    font-size: 40px;
    color: #000;

    margin-bottom: 20px;
    line-height: 1;
}

.modal input,
.modal textarea {
    width: 100%;
    background: #efeff4;
    border: none;
    border-radius: 14px;

    padding: 18px;

    font-family: Inter, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 120%;

    color: #2d2d2d;

    outline: none;
    margin-bottom: 10px;
}

.modal textarea {
    min-height: 120px;
    resize: none;
}

.modal input::placeholder,
.modal textarea::placeholder {
    color: #2d2d2d;
    opacity: 1;
}

/* Кнопка Отправить */

.modal .btn-primary {
    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);
    color: #fff;

    border: none;
    border-radius: 14px;

    font-family: Inter, sans-serif !important;
    font-size: 20px;
    font-weight: 500;

    cursor: pointer;

    transition: opacity .3s ease;
}

.modal .btn-primary:hover {
    opacity: .9;
}

.modal .btn-primary:active {
    opacity: .8;
}

@media (max-width: 768px) {

  .reviews-top {
    flex-direction: row;   /* оставляем как на десктопе */
    align-items: center;
    gap: 12px;
  }

  .rating-number {
    font-size: 88px; /* было 100px */
  }

  .rating-text {
    font-size: 14px;
  }
}

@media (max-width: 768px) {

  .reviews-buttons {
    min-width: 0;        /* важно */
    transform: none;
  }

  .reviews-buttons button {
    height: 48px;
    font-size: 16px;

    width: auto;         /* 🔥 ключевое */
    min-width: 0;        /* убираем старое ограничение */
    max-width: 240px;    /* 🔥 вот это делает их уже */

    padding: 0 16px;     /* чтобы текст не прилипал */
  }
}

@media (max-width: 768px) {

  .reviews-top {
    justify-content: space-between; /* вернуть расстояние как в десктопе */
    align-items: center;
  }

  .reviews-buttons {
    align-items: flex-end; /* прижать вправо */
  }
  
  .filters select {
  font-size: 16px;
  }
}

.rating-text {
  white-space: nowrap;
}

@media (max-width: 768px) {

  .filters {
    flex-direction: row;   /* вернуть в одну строку */
    flex-wrap: nowrap;     /* запрет переноса */
    gap: 10px;
  }

  .select-wrap {
    flex: 1;
    min-width: 0;
    max-width: none;/* важно, чтобы не ломалось */
  }

  .filters select {
    font-size: 16px;
    max-width: none;
  }
}

.review-top strong {
  font-family: "Zero Cool", sans-serif;
  font-size: 20px;
  color: #000;
}

.review-date {
  font-size: 13px;
  color: #888;
}