.wp-block-madatours-testimonials {
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: 96px 0;
  background: rgb(var(--color-ivory));
}

.madatours-testimonials__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.madatours-testimonials__content,
.madatours-testimonials__header {
  max-width: 896px;
  margin: 0 auto !important;
  text-align: center;
}

.madatours-testimonials__header > * {
  margin-block-start: 0 !important;
}

.madatours-testimonials__header p:first-child {
  margin: 0;
  color: rgb(var(--color-earth));
  font-size: 12px;
  font-weight: 700;
  line-height: 1rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.madatours-testimonials__header h2 {
  margin: 16px 0 0;
  color: rgb(var(--color-charcoal));
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
}

.madatours-testimonials__header p:not(:first-child) {
  max-width: 672px;
  margin: 20px auto 0;
  color: rgb(var(--color-charcoal) / 55%);
  font-size: 14px;
  line-height: 1.75rem;
}

.madatours-testimonials__carousel {
  position: relative;
  margin-top: 48px;
  padding: 0 20px;
}

.madatours-testimonials__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.madatours-testimonials__track::-webkit-scrollbar {
  display: none;
}

.madatours-testimonials__card {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  flex-direction: column;
  scroll-snap-align: start;
  border: 1px solid rgb(0 0 0 / 5%);
  border-radius: 16px;
  background: #fff;
  padding: 28px;
}

.madatours-testimonials__top,
.madatours-testimonials__person,
.madatours-testimonials__rating {
  display: flex;
  align-items: center;
}

.madatours-testimonials__top {
  justify-content: space-between;
  gap: 16px;
}

.madatours-testimonials__person {
  gap: 12px;
  min-width: 0;
}

.madatours-testimonials__avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

.madatours-testimonials__avatar--empty {
  background: rgb(var(--color-earth) / 12%);
}

.madatours-testimonials__person h3 {
  margin: 0;
  color: rgb(var(--color-charcoal));
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.madatours-testimonials__source {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(var(--color-ivory));
  color: rgb(var(--color-forest));
}

.madatours-testimonials__source img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.madatours-testimonials__rating {
  gap: 4px;
  margin-top: 20px;
  color: #f59e0b;
}

.madatours-testimonials__rating svg {
  width: 16px;
  height: 16px;
}

.madatours-testimonials__rating svg.is-muted {
  opacity: .22;
}

.madatours-testimonials__rating span {
  margin-left: 4px;
  color: rgb(var(--color-charcoal) / 55%);
  font-size: 12px;
  font-weight: 600;
}

.madatours-testimonials__quote {
  flex: 1;
  margin-top: 20px;
  color: rgb(var(--color-charcoal) / 70%);
  font-size: 16px;
  line-height: 1.75rem;
}

.madatours-testimonials__read {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgb(var(--color-forest));
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.madatours-testimonials__read:hover {
  color: rgb(var(--color-earth));
}

.madatours-testimonials__read svg {
  width: 16px;
  height: 16px;
}

.madatours-testimonials__controls {
  pointer-events: none;
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.madatours-testimonials__controls button {
  pointer-events: auto;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 999px;
  background: #fff;
  color: rgb(var(--color-forest));
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.madatours-testimonials__controls button:hover {
  background: rgb(var(--color-forest));
  color: #fff;
}

.madatours-testimonials__controls svg {
  width: 20px;
  height: 20px;
}

.madatours-testimonials__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.madatours-testimonials__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--color-charcoal) / 18%);
  cursor: pointer;
  transition: width .15s ease, background-color .15s ease;
}

.madatours-testimonials__dot.is-active {
  width: 24px;
  background: rgb(var(--color-earth));
}

.madatours-testimonials__modal[hidden] {
  display: none;
}

.madatours-testimonials__modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgb(22 31 28 / 68%);
  padding: 20px;
}

.madatours-testimonials__modal-dialog {
  position: relative;
  width: min(100%, 680px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 16px;
  background: #fff;
  padding: 40px 28px 28px;
  box-shadow: 0 24px 72px rgb(0 0 0 / 28%);
}

.madatours-testimonials__modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 999px;
  background: #fff;
  color: rgb(var(--color-charcoal));
  cursor: pointer;
}

.madatours-testimonials__modal-close svg {
  width: 18px;
  height: 18px;
}

.madatours-testimonials__modal-dialog h2 {
  margin: 0;
  color: rgb(var(--color-charcoal));
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
}

.madatours-testimonials__modal-content {
  margin-top: 20px;
  color: rgb(var(--color-charcoal) / 75%);
  font-size: 16px;
  line-height: 1.8;
}

.madatours-testimonials__modal-content > :first-child {
  margin-top: 0;
}

.madatours-testimonials__modal-status {
  margin: 20px 0 0;
  color: rgb(var(--color-earth));
  font-size: 14px;
  font-weight: 600;
}

@media (min-width: 640px) {
  .wp-block-madatours-testimonials {
    padding-top: 112px;
    padding-bottom: 112px;
  }

  .madatours-testimonials__inner {
    padding-right: 24px;
    padding-left: 24px;
  }

  .madatours-testimonials__header h2 {
    font-size: 48px;
  }

  .madatours-testimonials__carousel {
    padding-right: 24px;
    padding-left: 24px;
  }

  .madatours-testimonials__card {
    min-width: calc((100% - 20px) / 2);
    padding: 32px;
  }
}

@media (min-width: 1024px) {
  .madatours-testimonials__inner {
    padding-right: 32px;
    padding-left: 32px;
  }

  .madatours-testimonials__carousel {
    padding-right: 24px;
    padding-left: 24px;
  }

  .madatours-testimonials__card {
    min-width: calc((100% - 40px) / 3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .madatours-testimonials__controls button,
  .madatours-testimonials__dot {
    transition: none;
  }
}
