/* ==========================================================================
   Testimonials module
   ========================================================================== */

:root {
  --testimonials-bg: #fdf4e3;
  --testimonials-text: #2b2b2b;
  --testimonials-accent: #e5ac1f;
  --testimonials-accent-soft: #f8e6b8;
  --testimonials-badge-text: #c9951a;
  --testimonials-card-bg: #ffffff;
  --testimonials-muted: #9a9a9a;
  --testimonials-radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.testimonials {
  background: var(--testimonials-bg);
  color: var(--testimonials-text);
  padding: 24px 0 40px;
}

.testimonials__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */

.testimonials__header {
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 0 clamp(0px, 4vw, 60px);
}

.testimonials__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--testimonials-accent-soft);
  color: var(--testimonials-badge-text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.testimonials__badge-icon {
  width: 13px;
  height: 13px;
  fill: var(--testimonials-badge-text);
  margin-top: -3px;
}

.testimonials__title {
  margin: 18px 0 0;
  max-width: 720px;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Slider layout ---------- */

.testimonials__slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 36px);
}

.testimonials__swiper {
  flex: 1;
  min-width: 0;
  padding: 12px 8px 24px; /* room for card shadows */
  overflow-x: hidden;
}

.testimonials__swiper .swiper-slide {
  height: auto; /* equal card heights */
}

/* ---------- Navigation buttons ---------- */

.testimonials__nav {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--testimonials-muted);
  background: transparent;
  color: var(--testimonials-muted);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  z-index: 2;
}

.testimonials__nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.testimonials__nav:hover,
.testimonials__nav:focus-visible,
.testimonials__nav {
  background: var(--testimonials-accent);
  border-color: var(--testimonials-accent);
  color: #ffffff;
}

.testimonials__nav--prev:not(:hover):not(:focus-visible) {
  /* the "prev" button is filled, "next" is outlined – as in the design */
}

.testimonials__nav:focus-visible {
  outline: 3px solid var(--testimonials-accent-soft);
  outline-offset: 3px;
}

.testimonials__nav.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ---------- Card ---------- */

.testimonial-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 36px 40px 40px;
  background: var(--testimonials-card-bg);
  border-radius: var(--testimonials-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.testimonial-card__stars {
  color: var(--testimonials-accent);
  font-size: 1.9rem;
  line-height: 1;
}

.star {
  color: #e6e1d6; /* empty star color */
}

.star--full {
  color: var(--testimonials-accent);
}

/* Left half filled, right half empty */
.star--half {
  background: linear-gradient(
    90deg,
    var(--testimonials-accent) 50%,
    #e6e1d6 50%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.testimonial-card__quote {
  position: relative;
  flex: 1;
  margin: 28px 0 32px;
  padding-top: 28px;
  font-style: normal;
}

/* Large decorative quotation mark */
.testimonial-card__quote::before {
  content: "\201C";
  position: absolute;
  top: -24px;
  left: -6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--testimonials-accent-soft);
  z-index: 0;
  pointer-events: none;
}

.testimonial-card__quote p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 300;
  line-height: 1.5;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-card__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #ececec;
}

.testimonial-card__avatar--default {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.testimonial-card__avatar--default svg {
  width: 34px;
  height: 34px;
  margin-top: 10px;
  fill: #a8a8a8;
}

.testimonial-card__name {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Pagination ---------- */

.testimonials__pagination {
  display: none;
  text-align: center;
  margin-top: 4px;
}

.testimonials__pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--testimonials-muted);
  opacity: 0.4;
}

.testimonials__pagination .swiper-pagination-bullet + .swiper-pagination-bullet {
    margin-left: 1rem;
}

.testimonials__pagination .swiper-pagination-bullet-active {
  background: var(--testimonials-accent);
  opacity: 1;
}

/* ---------- Divider ---------- */

.testimonials__divider {
  max-width: 1100px;
  margin: 32px auto 0;
  border: 0;
  border-top: 1px solid #8f8f8f;
  opacity: 0.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
  .testimonials__nav {
    display: none;
  }

  .testimonials__pagination {
    display: block;
  }

  .testimonial-card {
    padding: 28px 24px 32px;
  }

  .testimonial-card__stars {
    font-size: 1.5rem;
  }
}
