@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Playfair+Display:ital,wght@1,600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #e6edf1;
  --heading: #022337;
  --link: #2286b5;
  --body: #4d4d4d;
  --accent: #2aa8e2;
  --btn-prev: #cddae2;
  --btn-next: #b3c8d4;
  --font-body: 'DM Sans', sans-serif;
  --font-disp: 'Playfair Display', serif;
}

.s2 {
  --s2-inset: max(20px, calc((100vw - 1240px) / 2 + 20px));
  background: var(--bg);
  width: 100%;
  overflow: hidden;
  padding: 110px 0;
}

.s2-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header — desktop: headline + nav in one row (unchanged). Mobile: see max-width:767 block. */
.s2-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 60px;
}

.s2-headline-block {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.s2-headline {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.15;
  color: var(--heading);
}

.s2-headline-line {
  display: block;
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  color: inherit;
}

.s2-headline .ib,
.s2-headline .italic-accent {
  font-family: var(--font-disp);
/*   font-style: italic; */
  font-weight: 600;
  color: var(--link);
}

.s2-subtext {
  font-family: var(--font-body);
  font-weight: 300;
  font: var(--text-lg);
  line-height: 28px;
  color: var(--body);
}

.s2-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  padding-top: 8px;
}

.nav-btn {
  width: 68px;
  height: 46px;
  border-radius: 23px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter .2s, transform .15s;
  flex-shrink: 0;
}

.nav-btn.prev {
  background: var(--btn-prev);
}

.nav-btn.next {
  background: var(--btn-next);
}

.nav-btn:hover {
  filter: brightness(.9);
  transform: scale(.96);
}

.nav-btn svg {
  width: 20px;
  height: 14px;
}

/* Carousel — full-width strip; track scroll is left-aligned with header (JS), cards unchanged */
.s2-carousel-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.s2-carousel-outer {
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  padding-left: var(--s2-inset);
  box-sizing: border-box;
}

.s2-carousel-outer.dragging {
  cursor: grabbing;
}

.s2-track {
  display: flex;
  gap: 20px;
  will-change: transform;
}

.s2-track.animated {
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

/* Cards */
.testi-card {
  background: rgba(255, 255, 255, .38);
  border: 1px solid var(--accent);
  border-radius: 24px;
  padding: 28px;
  flex: 0 0 715px;
  width: 715px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: .5;
  transform: scale(.94);
  transition: opacity .45s ease, box-shadow .45s ease, transform .45s ease;
}

.testi-card.active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 16px 30px 0 rgba(42, 168, 226, .14);
  background: rgba(255, 255, 255, .75);
}

.testi-quote-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.testi-quote-body {
  min-height: 0;
}

.testi-quote-wrap--long .testi-quote-body {
  max-height: 192px;
  overflow: hidden;
}

.testi-quote-wrap--long.is-expanded .testi-quote-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.testi-quote-wrap--long.is-expanded .testi-quote-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  /* Hide scrollbar — Chrome, Safari, Edge */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge legacy */
}

/* Hide scrollbar — WebKit browsers */
.testi-quote-wrap--long.is-expanded .testi-quote-body::-webkit-scrollbar {
  display: none;
}

.testi-quote-wrap--long.is-expanded .testi-quote-body::-webkit-scrollbar {
  width: 6px;
}

.testi-quote-wrap--long.is-expanded .testi-quote-body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.testi-quote--full {
  display: none;
}

.testi-quote-wrap--long.is-expanded .testi-quote--preview {
  display: none;
}

.testi-quote-wrap--long.is-expanded .testi-quote--full {
  display: block;
}

.testi-read-more {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  color: var(--link);
  cursor: pointer;
  flex-shrink: 0;
}

.testi-read-more:hover,
.testi-read-more:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}

.testi-quote {
  font-family: var(--font-body) !important;
  font-weight: 300 !important;
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 32px;
  color: var(--body);
  margin: 0;
}

.testi-bar,
.testi-stars,
.testi-author {
  flex-shrink: 0;
}

.testi-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.testi-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  line-height: 0;
}

.testi-star img {
  display: block;
  width: 18px;
  height: 18px;
}

.testi-star--half {
  position: relative;
  overflow: hidden;
  width: 9px;
}

.testi-star--half img {
  position: relative;
  left: 0;
  width: 18px;
  height: 18px;
}

.testi-star--empty::before {
  content: '\2606';
  display: block;
  font-size: 17px;
  line-height: 1;
  color: var(--btn-next);
}

.testi-bar {
  width: 53px;
  height: 4px;
  background: var(--accent);
  border-radius: 52px;
  flex-shrink: 0;
}

.testi-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.author-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--btn-prev);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--link);
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-family: var(--font-body);
  font-weight: 500 !important;
  line-height: 26px;
  color: var(--body);
  font: var(--text-lg);
}

.author-role {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 24px;
  color: var(--body);
  font: var(--text-md);
}

.quote-icon {
  font-family: var(--font-disp);
  font-size: 40px;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

/* Dots */
.s2-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--btn-next);
  cursor: pointer;
  transition: background .2s, width .2s;
  border: none;
}

.dot.active {
  background: var(--link);
  width: 24px;
  border-radius: 4px;
}

/* ── RESPONSIVE ── */
@media(max-width:1100px) {
  .s2 {
    --s2-inset: 32px;
  }

  .s2-inner {
    padding: 0 32px;
  }

  .s2-headline {
    font-size: 36px;
  }

  .testi-card {
    flex: 0 0 calc(60% - 10px);
    width: calc(60% - 10px);
    min-height: unset;
    max-height: unset;
  }
}

@media(max-width:767px) {
  .s2 {
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    --s2-inset: 0;
    --s2-card-width: calc(100vw - 40px);
  }

  .s2-inner {
    display: contents;
  }

  .s2-header {
    display: contents;
  }

  .s2-headline-block {
    order: 1;
    margin-bottom: 32px;
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  .s2-carousel-wrap {
    order: 2;
  }

  .s2-nav {
    order: 3;
    margin-top: 24px;
    padding: 0 20px;
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 10px;
  }

  .s2-headline {
    font-size: 28px;
    line-height: 1.2;
  }

  .s2-subtext {
    font-size: 15px;
    line-height: 24px;
  }

  .nav-btn {
    width: 48px;
    height: 38px;
  }

  .s2-carousel-outer {
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .testi-card {
    flex: 0 0 var(--s2-card-width);
    width: var(--s2-card-width);
    max-width: 100%;
    min-height: unset;
    max-height: unset;
    border-radius: 18px;
    padding: 22px;
    gap: 16px;
    box-sizing: border-box;
    transform: none;
  }

  .testi-card.active {
    transform: none;
  }

  .testi-quote {
    font-size: 16px;
    line-height: 28px;
  }

  .testi-quote-wrap--long .testi-quote-body {
    max-height: 140px;
  }

  .testi-read-more {
    font-size: 14px;
  }

  .author-avatar {
    width: 46px;
    height: 46px;
    font-size: 14px;
  }

  .author-name {
    font-size: 15px;
  }

  .author-role {
    font-size: 13px;
  }

  .quote-icon {
    font-size: 32px;
  }
}

@media(max-width:480px) {
  .s2-headline {
    font-size: 24px;
  }

  .s2 {
    --s2-card-width: calc(100vw - 40px);
  }
}