/* Force Elementor parent containers to allow overflow for our carousel */
.elementor-element:has(.er-carousel-outer) {
  overflow: visible !important;
}

.er-carousel-outer {
  position: relative;
  /* Break out of Elementor container to full viewport width */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.er-carousel-container {
}

.er-carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  cursor: grab;
  /* Horizontal padding pushes first card to container edge, allows last card to overflow */
  padding: 8px max(1.5rem, calc(50vw - 550px)) 20px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.er-carousel-track::-webkit-scrollbar {
  display: none;
}

.er-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

/* Review card */
.er-review-card {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e8ddd3;
  border-top: 3px solid #c49a6c;
  border-radius: 1rem;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
}

.er-card-name {
  font-family: 'Literata', serif;
  font-weight: 700;
  font-size: 18px;
  color: #2c2c2c;
  margin-bottom: 8px;
}

.er-card-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 20px;
}

.er-card-stars svg {
  width: 17px;
  height: 17px;
}

.er-card-text,
.er-card-text-wrap {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  color: #2c2c2c;
  flex: 1;
  margin-bottom: 12px;
}

.er-card-text-wrap.er-text-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.er-read-more {
  font-family: 'Source Sans 3', sans-serif;
  font-size: inherit;
  font-weight: 500;
  color: #c49a6c;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.er-read-more:hover {
  color: #a87d52;
}

.er-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: auto;
}

.er-card-date {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: #6b6560;
}

.er-card-author {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: #2c2c2c;
}

/* Arrow nav — sits above the cards, aligned to container width */
.er-carousel-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 0 1.5rem;
}

.er-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff !important;
  border: 1px solid #e8ddd3;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.er-arrow-btn.er-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.er-arrow-btn:hover {
  background-color: #f5f0eb !important;
  border-color: #c49a6c;
}

.er-arrow-btn:focus {
  outline: none;
  border-color: #c49a6c;
}

.er-arrow-btn svg {
  width: 20px;
  height: 20px;
  stroke: #2c2c2c;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Scroll indicator */
.er-progress-bar {
  max-width: 200px;
  height: 3px;
  background: #e8ddd3;
  border-radius: 2px;
  margin: 8px auto 0;
  overflow: hidden;
  display: none;
}

.er-progress-fill {
  height: 100%;
  background: #c49a6c;
  border-radius: 2px;
  transition: width 0.15s ease, left 0.15s ease;
  position: relative;
}

/* Responsive */
@media (max-width: 768px) {
  .er-review-card {
    width: 320px !important;
    padding: 28px 24px 24px;
  }

  .er-card-name {
    font-size: 16px;
  }

  .er-card-text,
  .er-card-text-wrap {
    font-size: 15px;
  }

  .er-arrow-btn {
    width: 40px;
    height: 40px;
  }

  .er-carousel-nav {
    display: none;
  }
}
