.il-popup-gallery a:not(:first-child) {
  display: none;
}

.il-reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.portfolio-filter button {
  border: 1px solid currentColor;
  background: transparent;
  padding: 8px 16px;
}

.portfolio-filter button.active {
  font-weight: 700;
}

.il-more-images img,
.il-reference-card img {
  max-width: 100%;
  height: auto;
}

.gallery-card.style2 .il-icon-btn.icon-btn {
  top: 35px;
  right: 5px;
  left: unset;
  width: auto;
  height: 30px;
  padding: 0 10px;
  border-radius: 20px;
  line-height: 30px;
  --btn-size: 30;
}

.gallery-card .box-text {
  margin-bottom: 0;
}

.gallery-card .box-text p {
  margin-bottom: 0;
  color: var(--theme-color);
}

.il-sutter-reference-detail {
  --il-reference-accent: var(--theme-color, #f2c300);
  --il-reference-ink: var(--title-color, #171717);
  --il-reference-muted: #6c6863;
  --il-reference-surface: #f7f4ee;
  padding-top: clamp(32px, 6vw, 80px);
}

.il-reference-intro {
  margin-bottom: clamp(48px, 7vw, 88px);
}

.il-reference-hero-image {
  aspect-ratio: 7 / 5;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--il-reference-surface);
}

.il-reference-hero-image__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.il-reference-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  padding: clamp(30px, 4vw, 58px);
  background: var(--il-reference-surface);
}

.il-reference-details--without-image {
  max-width: 900px;
  min-height: 0;
  margin: 0 auto;
  text-align: center;
}

.il-reference-kicker,
.il-reference-content__kicker {
  margin: 0 0 8px;
  color: var(--il-reference-accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.il-reference-title {
  margin: 0;
  color: var(--il-reference-ink);
  font-size: clamp(2rem, 3.8vw, 3.8rem);
  line-height: 1.06;
}

.il-reference-meta {
  margin: clamp(26px, 4vw, 44px) 0 0;
  padding: 0;
  border-top: 1px solid rgb(23 23 23 / 14%);
}

.il-reference-meta > div {
  padding: 16px 0;
  border-bottom: 1px solid rgb(23 23 23 / 14%);
}

.il-reference-meta dt {
  margin-bottom: 4px;
  color: var(--il-reference-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.il-reference-meta dd {
  margin: 0;
  color: var(--il-reference-ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.il-reference-gallery {
  margin: 0 0 clamp(64px, 9vw, 112px);
}

.il-reference-gallery__viewport {
  position: relative;
  overflow: hidden;
  background: var(--il-reference-surface);
  touch-action: pan-y;
}

.il-reference-gallery__track {
  display: flex;
  width: 100%;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.il-reference-gallery__slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 7 / 5;
  margin: 0;
  overflow: hidden;
}

.il-reference-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.il-reference-gallery__slide figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 38px 22px 16px;
  color: #fff;
  font-size: 0.9rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 70%));
}

.il-reference-gallery__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #171717;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 8px 28px rgb(0 0 0 / 16%);
  cursor: pointer;
  place-items: center;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.il-reference-gallery__arrow:hover,
.il-reference-gallery__arrow:focus-visible {
  color: #171717;
  background: var(--il-reference-accent);
  transform: translateY(-50%) scale(1.06);
}

.il-reference-gallery__arrow span {
  margin-top: -4px;
  font-size: 2.4rem;
  line-height: 1;
}

.il-reference-gallery__arrow--prev {
  left: 22px;
}

.il-reference-gallery__arrow--next {
  right: 22px;
}

.il-reference-gallery__counter {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: rgb(0 0 0 / 68%);
}

.il-reference-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.il-reference-gallery__thumb {
  flex: 0 0 116px;
  height: 78px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0.62;
  transition: border-color 180ms ease, opacity 180ms ease;
}

.il-reference-gallery__thumb:hover,
.il-reference-gallery__thumb:focus-visible,
.il-reference-gallery__thumb.is-active {
  border-color: var(--il-reference-accent);
  opacity: 1;
}

.il-reference-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.il-reference-gallery.is-single .il-reference-gallery__arrow,
.il-reference-gallery.is-single .il-reference-gallery__counter,
.il-reference-gallery.is-single .il-reference-gallery__thumbs {
  display: none;
}

.il-reference-photo-credit {
  margin: 6px 0 0;
  color: var(--il-reference-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: right;
}

.il-reference-main {
  align-items: flex-start;
  margin-bottom: clamp(56px, 8vw, 96px);
}

.il-reference-content {
  margin: 0;
}

.il-reference-content h2 {
  max-width: 820px;
  margin: 0 0 24px;
  color: var(--il-reference-ink);
  font-size: clamp(1.9rem, 3.5vw, 3.5rem);
  line-height: 1.1;
}

.il-reference-content__text {
  color: var(--body-color, #4f4b47);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.8;
}

.il-reference-content__text > :last-child {
  margin-bottom: 0;
}

.il-reference-why {
  width: 100%;
}

.il-reference-testimonial {
  max-width: 1100px;
  margin: 0 auto clamp(64px, 9vw, 120px);
  padding: clamp(36px, 6vw, 72px);
  background: var(--il-reference-surface);
}

.il-reference-testimonial__header {
  margin-bottom: clamp(28px, 4vw, 48px);
  text-align: center;
}

.il-reference-testimonial__header h2 {
  margin: 0;
  color: var(--il-reference-ink);
  font-size: clamp(1.9rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.il-reference-testimonial__header h2 span {
  color: var(--il-reference-accent);
}

.il-reference-testimonial__card {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.il-reference-testimonial__quote {
  width: 52px;
  margin: 0 auto 22px;
}

.il-reference-testimonial__quote img {
  display: block;
  width: 100%;
  height: auto;
}

.il-reference-testimonial__text {
  color: var(--il-reference-ink);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
  text-align: center;
}

.il-reference-testimonial__text > :last-child {
  margin-bottom: 0;
}

.il-reference-testimonial__profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  font-style: normal;
  text-align: left;
}

.il-reference-testimonial__portrait {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 50%;
}

.il-reference-testimonial__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.il-reference-testimonial__profile cite,
.il-reference-testimonial__profile span {
  display: block;
}

.il-reference-testimonial__profile cite {
  color: var(--il-reference-ink);
  font-weight: 700;
  font-style: normal;
}

.il-reference-testimonial__profile span {
  color: var(--il-reference-muted);
  font-size: 0.9rem;
}

@media (max-width: 1199px) {
  .il-reference-details {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  .il-sutter-reference-detail {
    padding-top: 24px;
  }

  .il-reference-gallery__slide {
    aspect-ratio: 4 / 3;
  }

  .il-reference-gallery__arrow {
    width: 42px;
    height: 42px;
  }

  .il-reference-gallery__arrow--prev {
    left: 10px;
  }

  .il-reference-gallery__arrow--next {
    right: 10px;
  }

  .il-reference-gallery__counter {
    right: 10px;
    bottom: 10px;
  }

  .il-reference-gallery__thumb {
    flex-basis: 92px;
    height: 64px;
  }

  .il-reference-testimonial {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .il-reference-gallery__track,
  .il-reference-gallery__arrow,
  .il-reference-gallery__thumb {
    transition: none;
  }
}
