/**
 * Блок «Avis»: слайдер отзывов и модальное окно (js/reviews.js).
 */

.RWreviews-container {
  margin: 0 auto;
  padding: 20px 20px 80px 20px;
  position: relative;
  overflow: hidden;
  width: 70%;
  touch-action: pan-x;
}

.RWreviews-wrapper {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  gap: 2%;
}

.RWreviews-wrapper.RWgrabbing {
  cursor: grabbing;
  transition: none;
}

.RWreview-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 100%;
  min-width: 100%;
  min-height: 300px;
  max-height: 500px;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.RWreview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.RWreview-avatar {
  width: 0px;
  height: 0px;
  border-radius: 0%;
  overflow: hidden;
  margin-bottom: 0px;
  border: 0px solid #f0f0f0;
}

.RWreview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.RWreview-name {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
  text-align: center;
}

.RWreview-text {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  text-align: center;
  flex: 1;
  position: relative;
  padding: 0 4px;
  margin-bottom: 16px;
  max-height: 200px;
  overflow: hidden;
  -webkit-user-select: text;
  user-select: text;
}

.RWreview-text.RWcollapsed {
  max-height: 120px;
  position: relative;
  width: 105%;
}

.RWreview-text.RWcollapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

.RWreviews-nav {
  position: absolute;
  bottom: 0px;
  left: 0%;
  transform: translateX(-50%);
  display: none;
  gap: 0px;
  z-index: 0;
  width: 0px;
  font-size: 0px;
}

.RWnav-button {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.3s ease;
  font-size: 20px;
  font-weight: bold;
  -webkit-tap-highlight-color: transparent;
}

.RWnav-button:hover {
  background: #f8f8f8;
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.RWnav-button:active {
  transform: scale(0.95);
}

.RWnav-button.RWdisabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.RWpagination-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.RWdot {
  width: 8px;
  height: 8px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.RWdot.RWactive {
  background: #333;
  transform: scale(1.3);
}

.RWscroll-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #888;
  opacity: 0.8;
  animation: RWfadeInOut 3s infinite;
}

@keyframes RWfadeInOut {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
}

.RWmodal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: RWfadeIn 0.3s ease;
}

.RWmodal.RWactive {
  display: block;
}

@keyframes RWfadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.RWmodal-content {
  background-color: #fefefe;
  margin: 50px auto;
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  animation: RWslideIn 0.3s ease;
}

@keyframes RWslideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.RWmodal-header {
  padding: 20px;
  background: #134fa9;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.RWmodal-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.RWclose {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.RWclose:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.RWmodal-body {
  position: relative;
  height: 70vh;
  overflow: hidden;
}

.RWmodal-reviews-wrapper {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.RWmodal-review-card {
  flex: 0 0 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  overflow-y: auto;
}

.RWmodal-review-name {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 24px;
  color: #333;
  text-align: center;
}

.RWmodal-review-text {
  font-size: 18px;
  line-height: 1.7;
  color: #555;
  text-align: left;
  max-width: 600px;
  width: 100%;
}

.RWmodal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.RWmodal-nav.RWleft {
  left: 20px;
}

.RWmodal-nav.RWright {
  right: 20px;
}

.RWmodal-nav-button {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: #333;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.RWmodal-nav-button:hover {
  background: white;
  transform: scale(1.1);
}

.RWmodal-nav-button.RWdisabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.RWmodal-nav-button.RWdisabled:hover {
  transform: none;
}

.RWmodal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.RWmodal-dot.RWactive {
  background: #667eea;
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .RWmodal-content {
    margin: 5% auto;
    width: 95%;
    height: 95%;
  }
  .RWmodal-review-card {
    padding: 15px 50px;
    height: 90%;
  }
  .RWmodal-review-name {
    font-size: 18px;
    margin-bottom: 5px;
  }
  .RWmodal-review-text {
    font-size: 15px;
    line-height: 1.6;
  }
  .RWmodal-nav-button {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .RWmodal-nav.RWleft {
    left: 5px;
  }
  .RWmodal-nav.RWright {
    right: 5px;
  }
}

@media (max-width: 480px) {
  .RWmodal-dots {
    bottom: 10px !important;
  }
  .RWreviews-container {
    padding: 16px 16px 4% 16px;
    width: 90%;
  }
  .RWreview-card {
    padding: 20px;
    border-radius: 10px;
    min-height: 250px;
  }
  .RWreview-name {
    font-size: 20px;
  }
  .RWreview-text {
    font-size: 15px;
    line-height: 1.5;
  }
  .RWnav-button {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

.RWreviews-container * {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.RWreview-text,
.RWmodal-review-text {
  -webkit-user-select: text;
  user-select: text;
}

.headerH1 {
  text-align: left;
  padding: 4px 12px 6px;
  background: #134fa9;
  border-radius: 4px;
  color: #fff;
  display: inline-block;
  font-weight: 600 !important;
  font-size: 12px !important;
  line-height: 1.1;
  font-family: "Gilroy";
  margin: 8% 1% 2% 1%;
}

.RWmodal-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

@media (max-width: 768px) {
  .RWmodal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
  }
  .RWmodal-header {
    padding: 15px;
    background: #134fa9;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .RWmodal-reviews-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .RWmodal-body {
    position: relative;
    height: 85%;
    overflow: hidden;
  }
  .headerH1 {
    padding: 4px 12px 6px;
    background: #134fa9;
    color: #fff;
    display: inline-block;
    font-weight: 600 !important;
    font-size: 10px !important;
    font-family: "Gilroy";
    margin: 0% 1% 4% 4%;
  }
}
