/* ============================================================
   Carousel - Testimonials — guest testimonials (Figma 1192:460).
   Eyebrow + serif heading + ornamental divider over a Swiper of testimonials.
   Each slide pairs a PHOTO (outside the border) with a BORDERED quote card
   (name, icon, quote): desktop lays them side-by-side (photo left), mobile
   stacks them (card above photo). Prev/next arrows flank the stage; engraved
   navy leaves frame the sides (desktop) / centre (mobile). The card border
   reuses the shared .est-frame (main.css).
   ============================================================ */
.testimonials {
  --dpx: calc(100vw / 1920);
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: calc(80 / var(--root-font-size) * 1rem) calc(24 / var(--root-font-size) * 1rem) calc(72 / var(--root-font-size) * 1rem);
}
@media screen and (max-width: 767px) {
  .testimonials { padding-bottom: calc(40 / var(--root-font-size) * 1rem); }
}

/* ---- engraved navy leaves ---- */
.testimonials__leaf {
  position: absolute;
  z-index: 1;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}
/* tall pre-oriented strips at the left/right edges (285×853 & 273×853), the
   same decals as Cards - Tabs, framing the carousel */
.testimonials__leaf--l,
.testimonials__leaf--r {
  top: 50%;
  transform: translateY(-50%);
  height: calc(853 * var(--dpx));
}
.testimonials__leaf--l { left: 0; width: calc(285 * var(--dpx)); background-position: left center; }
.testimonials__leaf--r { right: 0; width: calc(273 * var(--dpx)); background-position: right center; }
.testimonials__leaf--c { display: none; }
@media screen and (max-width: 1024px) {
  .testimonials__leaf--l,
  .testimonials__leaf--r { display: none; }
  /* extra space below the head so the decal clears it. Higher specificity
     (.testimonials prefix) so it beats the base .testimonials__head rule that
     appears later in the file. Net clearance = 80 - 20 (leaf top) = ~60px. */
  .testimonials .testimonials__head { margin-bottom: calc(80 / var(--root-font-size) * 1rem); }
  /* single landscape branch (297×131), centred above the card */
  .testimonials__leaf--c {
    display: block;
    position: relative;
    z-index: 1;
    width: calc(250 / var(--root-font-size) * 1rem);
    height: calc(110 / var(--root-font-size) * 1rem);
    /* top margin sets clearance below the head; BOTTOM margin lifts the decal
       off the card (raising it relative to the card, not just sliding the whole
       block up) */
    margin: calc(-60 / var(--root-font-size) * 1rem) auto calc(0 / var(--root-font-size) * 1rem);
    background-position: center;
  }
}

/* ---- head ---- */
.testimonials__head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(15 / var(--root-font-size) * 1rem);
  text-align: center;
  margin-bottom: calc(40 / var(--root-font-size) * 1rem);
}
.testimonials__eyebrow {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-size: calc(15 / var(--root-font-size) * 1rem);
  line-height: calc(30 / var(--root-font-size) * 1rem);
  letter-spacing: calc(3.6 / var(--root-font-size) * 1rem);
  text-transform: uppercase;
  color: #3F434B;
  margin: 0;
}
.testimonials__title {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-size: calc(50 / var(--root-font-size) * 1rem);
  line-height: calc(60 / var(--root-font-size) * 1rem);
  color: #3F434B;
  margin: 0;
}
@media screen and (max-width: 1024px) {
  .testimonials__title {
    font-size: calc(35 / var(--root-font-size) * 1rem);
    line-height: calc(40 / var(--root-font-size) * 1rem);
  }
}
.testimonials__divider {
  display: inline-flex;
  align-items: center;
  gap: calc(12 / var(--root-font-size) * 1rem);
  margin-top: calc(6 / var(--root-font-size) * 1rem);
}
.testimonials__divider .line {
  display: block;
  width: calc(56 / var(--root-font-size) * 1rem);
  height: 1px;
  background: #B58C21;
}
.testimonials__divider .diamond {
  display: block;
  width: calc(10 / var(--root-font-size) * 1rem);
  height: calc(10 / var(--root-font-size) * 1rem);
  background: #B58C21;
  transform: rotate(45deg);
}

/* ---- stage (swiper + arrows) ---- */
.testimonials__stage {
  position: relative;
  z-index: 2;
  max-width: calc(1180 / var(--root-font-size) * 1rem);
  margin: 0 auto;
}
.testimonials__viewport { overflow: hidden; }
.testimonials__slide { height: auto; }

/* ---- one testimonial: photo (outside border) + bordered quote card ---- */
.testimonial {
  position: relative;
  margin: 0;
  display: flex;
  align-items: stretch;
}
/* desktop only: the slide sits inside a woven tartan outer frame — the tartan
   fills the box and an inset white ::before leaves it showing as a border; the
   photo and quote card sit on the white card above it (mirrors the footer).
   Mobile has no tartan: just the framed quote card above the photo. */
@media screen and (min-width: 1025px) {
  .testimonial {
    background: url('../../assets/images/tartan-light.jpg') center / calc(200 / var(--root-font-size) * 1rem) auto repeat;
    padding: calc(24 / var(--root-font-size) * 1rem);
  }
  .testimonial::before {
    content: "";
    position: absolute;
    inset: calc(24 / var(--root-font-size) * 1rem);
    background: #fff;
    z-index: 0;
  }
}
.testimonial__media {
  position: relative;
  z-index: 1;
  flex: 0 0 40%;
  align-self: stretch;
}
.testimonial__card { position: relative; z-index: 1; }
.testimonial__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(360 / var(--root-font-size) * 1rem);
  object-fit: cover;
}
.testimonial__card {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid #B58C21;   /* gold border around the content section */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(56 / var(--root-font-size) * 1rem) calc(64 / var(--root-font-size) * 1rem);
}
/* inner frame: an inset gold rectangle whose lines BLEED past the corners (the
   estate frame's default) so the verticals/horizontals overshoot and cross;
   keep the inward triangle indents at the top/bottom centres, drop only the
   corner diamonds. */
.testimonial__card .est-frame { --est-inset: calc(22 / var(--root-font-size) * 1rem); }
.testimonial__card .est-frame .n-tl,
.testimonial__card .est-frame .n-tr,
.testimonial__card .est-frame .n-bl,
.testimonial__card .est-frame .n-br { display: none; }
/* vertical-line triangle indents — desktop keeps the top/bottom ones, so these
   are hidden here and swapped in on mobile (see the mobile block). */
.testimonial__vindent { display: none; }
.testimonial__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.testimonial__name {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-size: calc(32 / var(--root-font-size) * 1rem);
  line-height: calc(40 / var(--root-font-size) * 1rem);
  color: #3F434B;
  margin: 0 0 calc(12 / var(--root-font-size) * 1rem);
}
@media screen and (max-width: 1024px) {
  .testimonial__name {
    font-size: calc(24 / var(--root-font-size) * 1rem);
    line-height: calc(30 / var(--root-font-size) * 1rem);
  }
}
.testimonial__icon {
  display: block;
  width: calc(64 / var(--root-font-size) * 1rem);   /* trimmed rings (ratio ~1.22) */
  height: auto;
  margin: 0 auto calc(12 / var(--root-font-size) * 1rem);
}
.testimonial__icon img { display: block; width: 100%; height: auto; }
.testimonial__quote {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-size: calc(18 / var(--root-font-size) * 1rem);
  line-height: calc(36 / var(--root-font-size) * 1rem);
  color: #000;
  margin: 0;
}
.testimonial__quote p { margin: 0; }
.testimonial__quote p + p { margin-top: calc(18 / var(--root-font-size) * 1rem); }
@media screen and (max-width: 1024px) {
  .testimonial__quote {
    font-size: calc(16 / var(--root-font-size) * 1rem);
    line-height: calc(30 / var(--root-font-size) * 1rem);
  }
}

/* ---- prev / next arrows — square framed buttons (Figma "Arrow" component:
   thin estate border, inset white panel, slim long arrow). Hover inverts to a
   navy fill with a white border and white arrow. ---- */
.testimonials__nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: calc(63 / var(--root-font-size) * 1rem);
  height: calc(63 / var(--root-font-size) * 1rem);
  padding: 0;
  border: 0;
  background: transparent no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='63' height='63' viewBox='0 0 63 63' fill='none'%3E%3Cpath d='M62.5 0.5V62.5H0.5V0.5H62.5Z' stroke='%233F434B'/%3E%3Cpath d='M59 4V59H4V4H59Z' fill='%23fff'/%3E%3Cpath d='M46.8592 31.8271L37.3452 40.8662C37.1575 41.0446 36.8445 41.0446 36.6567 40.8662C36.4689 40.6878 36.4689 40.3905 36.6567 40.2121L45.2944 31.946H15.5007C15.1878 31.946 15 31.7676 15 31.4703C15 31.2324 15.1878 30.9945 15.5007 30.9945H45.2944L36.6567 22.7879C36.4689 22.6095 36.4689 22.3122 36.6567 22.1338C36.8445 21.9554 37.1575 21.9554 37.3452 22.1338L46.8592 31.1729C47.0469 31.3513 47.0469 31.6487 46.8592 31.8271Z' fill='%233F434B'/%3E%3C/svg%3E");
  cursor: pointer;
}
/* the inverted hover art crossfades in over the default on a soft 0.3s ease */
.testimonials__nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='63' height='63' viewBox='0 0 63 63' fill='none'%3E%3Cpath d='M62.5 0.5V62.5H0.5V0.5H62.5Z' stroke='%233F434B'/%3E%3Cpath d='M59 4V59H4V4H59Z' fill='%233F434B'/%3E%3Cpath d='M46.8592 31.8271L37.3452 40.8662C37.1575 41.0446 36.8445 41.0446 36.6567 40.8662C36.4689 40.6878 36.4689 40.3905 36.6567 40.2121L45.2944 31.946H15.5007C15.1878 31.946 15 31.7676 15 31.4703C15 31.2324 15.1878 30.9945 15.5007 30.9945H45.2944L36.6567 22.7879C36.4689 22.6095 36.4689 22.3122 36.6567 22.1338C36.8445 21.9554 37.1575 21.9554 37.3452 22.1338L46.8592 31.1729C47.0469 31.3513 47.0469 31.6487 46.8592 31.8271Z' fill='%23fff'/%3E%3C/svg%3E");
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.testimonials__nav:hover::before,
.testimonials__nav:focus-visible::before { opacity: 1; }
.testimonials__nav--prev { left: calc(-120 / var(--root-font-size) * 1rem); transform: translateY(-50%) rotate(180deg); }
.testimonials__nav--next { right: calc(-120 / var(--root-font-size) * 1rem); }
.testimonials__nav.swiper-button-disabled { opacity: 0.35; }

/* pagination dots — mobile only (see the mobile block below); hidden on desktop */
.testimonials__pagination { display: none; }

/* ---- mobile: stack card above photo; arrows on the card's side edges ---- */
@media screen and (max-width: 1024px) {
  .testimonials__stage { max-width: calc(560 / var(--root-font-size) * 1rem); }
  .testimonial {
    flex-direction: column-reverse;
    gap: calc(40 / var(--root-font-size) * 1rem);
  }
  .testimonial__media { flex: 0 0 auto; align-self: auto; }
  .testimonial__media img {
    min-height: 0;
    aspect-ratio: 326 / 290;
  }
  .testimonial__card {
    padding: calc(44 / var(--root-font-size) * 1rem) calc(32 / var(--root-font-size) * 1rem);
  }

  /* tighter gap between the outer card border and the inner frame on mobile */
  .testimonial__card .est-frame { --est-inset: calc(12 / var(--root-font-size) * 1rem); }

  /* mobile: move the triangle indents onto the vertical (left/right) lines.
     top/bottom go solid (no break/arrow); the verticals break at the centre
     and a chevron sits in each gap. */
  .testimonial__card .est-frame .n-t::after,
  .testimonial__card .est-frame .n-b::after { display: none; }
  .testimonial__card .est-frame .n-t,
  .testimonial__card .est-frame .n-b { background: #B58C21; }
  .testimonial__card .est-frame::before,
  .testimonial__card .est-frame::after {
    background: linear-gradient(to bottom,
      #B58C21 0,
      #B58C21 calc(50% - (8 / var(--root-font-size) * 1rem)),
      transparent calc(50% - (8 / var(--root-font-size) * 1rem)),
      transparent calc(50% + (8 / var(--root-font-size) * 1rem)),
      #B58C21 calc(50% + (8 / var(--root-font-size) * 1rem)),
      #B58C21 100%);
  }
  .testimonial__vindent {
    display: block;
    position: absolute;
    z-index: 1;
    top: 50%;
    width: calc(11 / var(--root-font-size) * 1rem);
    height: calc(11 / var(--root-font-size) * 1rem);
  }
  .testimonial__vindent--l {
    left: calc(12 / var(--root-font-size) * 1rem);
    transform: translate(-50%, -50%) rotate(45deg);
    border-top: 1px solid #B58C21;
    border-right: 1px solid #B58C21;
  }
  .testimonial__vindent--r {
    right: calc(12 / var(--root-font-size) * 1rem);
    transform: translate(50%, -50%) rotate(45deg);
    border-bottom: 1px solid #B58C21;
    border-left: 1px solid #B58C21;
  }

  /* mobile navigates with diamond dots, not arrows */
  .testimonials__nav { display: none; }
  .testimonials .testimonials__pagination.swiper-pagination {
    display: flex;
    position: static;
    justify-content: center;
    gap: calc(20 / var(--root-font-size) * 1rem);
    margin-top: calc(34 / var(--root-font-size) * 1rem);
  }
  .testimonials__pagination .swiper-pagination-bullet {
    width: calc(9 / var(--root-font-size) * 1rem);
    height: calc(9 / var(--root-font-size) * 1rem);
    margin: 0 !important;
    background: transparent;
    border: 1px solid #3F434B;
    border-radius: 0;
    transform: rotate(45deg);
    opacity: 1;
    transition: background 200ms ease-out;
  }
  .testimonials__pagination .swiper-pagination-bullet-active {
    background: #3F434B;
  }
}
