/* Reviews block */
.mad-section {
  padding: 10px 0 20px;
}

.mad-page-title.with-carousel {
  margin-bottom: 28px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark-grey);
}

.mad-reviews-row {
  row-gap: 24px;
}

.mad-reviews-layout {
  display: block;
}

.mad-review {
  height: 100%;
  margin-top: 13%;
  padding: 24px 22px;
  border: 1px solid #edf1f6;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.mad-review .content-element,
.mad-review .content-element-2 {
  margin-bottom: 18px;
}

.mad-review .content-element:last-child,
.mad-review .content-element-2:last-child {
  margin-bottom: 0;
}

.mad-review-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mad-review-source {
  flex: 1 1 120px;
}

.mad-review-source__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #f8f4eb;
}

.mad-review-source__item img {
  width: auto;
  max-width: 96px;
  max-height: 28px;
  object-fit: contain;
}

.mad-review-source__item p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #4b4234;
}

.mad-testimonials {
  position: relative;
}

.mad-testimonials-head {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.mad-testimonials-head--summary {
  justify-content: flex-end;
  margin: 0 0 12px;
}

.mad-testimonials-nav {
  display: flex;
  gap: 8px;
  min-height: 40px;
}

.mad-testimonials-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e4e9f1;
  border-radius: 50%;
  background: #f7f9fc;
  color: #374151;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.mad-testimonials-btn:hover {
  background: #eef3f9;
  border-color: #d7dfeb;
  transform: translateY(-1px);
}

.mad-testimonials-btn:focus-visible {
  outline: 2px solid #9db1d3;
  outline-offset: 3px;
}

.mad-testimonials-btn i {
  display: block;
  line-height: 1;
}

.mad-testimonials-inner {
  position: relative;
}

.mad-testimonials-inner .slick-list {
  margin: 0 -12px;
}

.mad-testimonials-inner .slick-track {
  display: flex;
}

.mad-testimonials-inner .slick-slide {
  height: auto;
  padding: 0 12px;
}

.mad-testimonials-inner .mad-grid-item {
  height: 100%;
}

.mad-testimonial-info {
  height: 100%;
}

.mad-testimonial {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 24px 22px 18px;
  border: 1px solid #edf1f6;
  border-radius: 20px;
  background: #ffffff;
}

.mad-testimonial blockquote:not(.learts-blockquote):not(.learts-blockquote2){
		margin-left: 0;
	}

.mad-testimonial__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mad-testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mad-testimonial__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: #2f5aac;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mad-testimonial__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mad-testimonial__meta {
  min-width: 0;
}

.mad-testimonial-title {
  margin-bottom: 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mad-testimonial__source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f7f7fb;
  color: #4285f4;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(66, 133, 244, 0.08);
}

.mad-testimonial__source img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.mad-testimonial__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mad-testimonial-rating {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.mad-testimonial__date {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1.2;
  color: #7a8291;
  white-space: nowrap;
}

.mad-testimonial-text {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #2b2f38;
}

.mad-review-toggle {
  align-self: flex-start;
  margin-top: -6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mad-testimonial__footer {
  margin-top: auto;
  padding-top: 8px;
}

.mad-testimonial__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #e4ebff 0%, #d8e1ff 100%);
  color: #2f3d8f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.mad-testimonial__cta:hover,
.mad-testimonial__cta:focus-visible {
  color: #24306e;
  transform: translateY(-1px);
}

.mad-testimonial__cta:focus-visible {
  outline: 2px solid rgba(47, 61, 143, 0.35);
  outline-offset: 2px;
}

.mad-rating {
  position: relative;
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 2px;
  color: #d6cdbd;
}

.mad-rating__back,
.mad-rating__front {
  display: block;
  white-space: nowrap;
}

.mad-rating__front {
  position: absolute;
  inset: 0 auto auto 0;
  overflow: hidden;
  width: var(--rating-percent, 0%);
  color: #f59e0b !important;
}

.mad-rating.size-big {
  font-size: 28px;
}

.mad-rating.size-2 {
  font-size: 16px !important;
}

.mad-testimonials .slick-dots,
.mad-testimonials .owl-dots,
.mad-testimonials .slick-arrow {
  display: none !important;
}

.testimonial_text {
  margin-top: 14px;
  text-align: center;
  color: #8e8576;
}

.testimonial_text small {
  font-size: 13px;
  letter-spacing: 0.02em;
}

@media only screen and (max-width: 991px) {
  .mad-page-title.with-carousel {
    font-size: 26px;
  }

  .mad-review,
  .mad-testimonial {
    padding: 22px;
  }
}

@media only screen and (max-width: 767px) {
  .mad-review {
    margin-top: 0;
  }
}

@media only screen and (max-width: 575px) {
  .mad-testimonial__head {
    gap: 12px;
  }

  .mad-testimonial__line {
    gap: 10px;
  }

  .mad-testimonial__source {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .mad-testimonial-title {
    font-size: 16px;
  }

  .mad-testimonial__date {
    font-size: 12px;
  }

  .mad-testimonial-text {
    font-size: 15px;
  }

  .mad-testimonial__cta {
    min-height: 38px;
    font-size: 14px;
  }
}

@media only screen and (max-width: 767px) {
  .mad-section {
    padding: 8px 0 10px;
  }

  .mad-page-title.with-carousel {
    font-size: 24px;
    text-align: center;
  }

  .mad-testimonials-head {
    justify-content: center;
  }

  .mad-testimonials-head--summary {
    justify-content: flex-end;
    margin-top: 0;
  }

  .mad-testimonials .owl-nav {
    justify-content: center;
  }

  .mad-review-source {
    flex-basis: 100%;
  }

  .mad-testimonials .slick-prev,
  .mad-testimonials .slick-next {
    top: -58px;
  }
}
