.reviews-slider {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 60px;
  overflow: hidden;
}

.reviews-slider__container {
  display: flex;
  transition: transform 0.4s ease;
  overflow: visible;
}

.reviews-slider__slide {
  flex: 0 0 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .reviews-slider__slide {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .reviews-slider__slide {
    flex: 0 0 33.333%;
  }
}

.review-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.review-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.review-card__image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review-card__image-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--main) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
}

.review-card__author {
  flex: 1;
  min-width: 0;
}

.review-card__name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-card__job {
  font-size: 13px;
  color: #666;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-card__content {
  flex: 1;
  margin-bottom: 16px;
}

.review-card__text {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-card__date {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}

.review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #eee;
  margin-top: auto;
}

.review-card__platform {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-card__platform-icon {
  width: 24px;
  height: 24px;
}

.review-card__platform-name {
  font-size: 12px;
  color: #888;
}

.review-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #0077b5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.review-card__link:hover {
  color: #005885;
  text-decoration: underline;
}

.review-card__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}

.review-card__star {
  color: #fbbf24;
  font-size: 14px;
}

/* Navigation */
.reviews-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.reviews-slider__nav:hover {
  background: #f5f5f5;
  transform: translateY(-50%) scale(1.05);
}

.reviews-slider__nav:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.reviews-slider__nav--prev { left: 10px; }
.reviews-slider__nav--next { right: 10px; }

.reviews-slider__nav svg {
  width: 20px;
  height: 20px;
  color: #333;
}

/* Dots */
.reviews-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.reviews-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.reviews-slider__dot:hover { background: #bbb; }
.reviews-slider__dot--active {
  background: var(--main);
  transform: scale(1.2);
}


@media (max-width: 900px) {
  div#sliderDots { display: none; }
  .section-header h2 { font-size: 21px; }
  #opiniones .section-header { max-width: 90%; margin: auto; }
}

/* ───────── Botón "Ver todas" debajo del carrusel ───────── */
.reviews-verall {
  display: flex;
  justify-content: center;
  margin: 24px auto 0;
}
.reviews-verall__btn {
  background: var(--main);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.reviews-verall__btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

/* ───────── Vista rejilla (oculta por defecto) ───────── */
.reviews-allview { display: none; }
.reviews-allview.is-active { display: block; }

.reviews-controls {
  max-width: 1200px;
  margin: 0 auto 8px;
  padding: 0 60px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.reviews-controls__search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}
.reviews-controls__select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}
.reviews-controls__count {
  font-size: 13px;
  color: #666;
  min-width: 130px;
}
.reviews-controls__close {
  padding: 10px 16px;
  border: 1px solid var(--main);
  background: #fff;
  color: var(--main);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}
.reviews-controls__close:hover {
  background: var(--main);
  color: #fff;
}

.reviews-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.reviews-grid__item {
  flex: 0 0 calc(33.333% - 14px);
  display: block;
}
.reviews-grid__item.is-hidden { display: none; }

.reviews-grid__empty {
  flex: 1;
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}

.reviews-loadmore {
  display: flex;
  justify-content: center;
  margin: 8px auto 24px;
}
.reviews-loadmore__btn {
  background: var(--secondary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.reviews-loadmore__btn:hover {
  background: var(--main);
  transform: translateY(-1px);
}
.reviews-loadmore[hidden] { display: none; }

@media (max-width: 1023px) {
  .reviews-grid__item { flex: 0 0 calc(50% - 10px); }
}
@media (max-width: 767px) {
  .reviews-controls { padding: 0 16px; flex-direction: column; align-items: stretch; }
  .reviews-controls__count { text-align: center; }
  .reviews-grid { padding: 20px 16px; }
  .reviews-grid__item { flex: 0 0 100%; }
}

/* Tarjeta clicable */
.review-card { cursor: pointer; }

/* Popup */
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.review-modal[hidden] { display: none; }
.review-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.review-modal__box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.review-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}
.review-modal__close:hover { color: #333; }

.review-modal .review-card { box-shadow: none; cursor: default; padding: 0; }
.review-modal .review-card:hover { transform: none; box-shadow: none; }
.review-modal .review-card__text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  white-space: pre-line;
}
.review-modal .review-card__name { white-space: normal; }
.review-modal .review-card__job {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
div#reviewsContainer {
    width: 120ch;
    margin: auto;
    max-width: 90%;
}