.kajahdus-references,
.kajahdus-reference-single {
  --kref-btn1-bg: #333333;
  --kref-btn1-color: #F7F4EC;
  --kref-btn2-border: #333333;
  --kref-btn2-color: #333333;
  --kref-btn-padding: 16px 28px;
  --kref-btn-padding-m: 16px 24px;
  --kref-btn-gap: 12px;
  --kref-btn-font-size: 16px;
  --kref-btn-font-size-m: 16px;
  --kref-btn-font-weight: 800;
  --kref-btn-text-transform: none;
  --kref-btn-radius: 999px;
  --kref-btn-ring-gap: 7px;
  --kref-btn-ring-width: 1px;
  --kref-btn-ring-color: #333333;
  --kref-btn-ring-fade: 0.62s;
  --kref-btn-arrow-gap: 24px;
  box-sizing: border-box;
}

.kajahdus-references *,
.kajahdus-reference-single * {
  box-sizing: border-box;
}

.kref-grid-list {
  display: grid;
  grid-template-columns: repeat(var(--kref-cols, 3), minmax(0, 1fr));
  gap: var(--kref-gap, 40px);
  align-items: stretch;
}

.kref-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--kref-card-radius, 24px);
  min-height: 100%;
  transform: translateZ(0) scale(1);
  transition: transform 280ms ease, box-shadow 280ms ease;
  background: var(--kref-text-bg, #F7F4EC);
  isolation: isolate;
}

.kref-card:hover,
.kref-card:focus-within {
  transform: translateZ(0) scale(1.018);
}

.kref-card-image-area {
  background: var(--kref-image-bg, #E2EBF2);
  padding: var(--kref-image-padding, 34px 36px 34px);
}

.kref-card-image-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--kref-image-radius, 12px);
  background: rgba(255,255,255,0.55);
  text-decoration: none !important;
}

.kref-card-image,
.kref-card-image-link img,
.kref-card-placeholder {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.kref-card-placeholder {
  background: rgba(255,255,255,0.35);
}

.kref-card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--kref-text-padding, 34px 36px 36px);
  background: var(--kref-text-bg, #F7F4EC);
}

.kref-card-title,
.kref-card-title a {
  margin: 0 !important;
  color: inherit !important;
  text-decoration: none !important;
}

.kref-card-title {
  font-size: var(--kref-title-size-d, 32px) !important;
  line-height: var(--kref-title-line-d, 1) !important;
  letter-spacing: var(--kref-title-letter-d, normal) !important;
  font-weight: var(--kref-title-weight-d, 900) !important;
}


.kref-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kref-category-pill-gap, 8px);
  margin-top: 14px;
}

.kref-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border: 1px solid var(--kref-category-pill-border, #333333);
  border-radius: var(--kref-category-pill-radius, 999px);
  background: var(--kref-category-pill-bg, transparent);
  color: var(--kref-category-pill-color, #333333) !important;
  font-size: var(--kref-category-pill-font-size, 12px) !important;
  font-weight: var(--kref-category-pill-weight, 700) !important;
  letter-spacing: var(--kref-category-pill-letter, 0.02em) !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.kref-category-pill-link {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.kref-category-pill-link:hover,
.kref-category-pill-link:focus-visible {
  background: var(--kref-category-pill-hover-bg, #333333);
  color: var(--kref-category-pill-hover-color, #F7F4EC) !important;
  border-color: var(--kref-category-pill-hover-border, #333333);
  transform: translateY(-1px);
}

.kref-card-desc {
  margin: 22px 0 0 0 !important;
  font-size: var(--kref-text-size-d, 18px) !important;
  line-height: var(--kref-text-line-d, 1) !important;
  letter-spacing: var(--kref-text-letter-d, normal) !important;
  font-weight: var(--kref-text-weight-d, 400) !important;
  color: inherit !important;
}

.kref-buttons {
  display: flex;
  align-items: center;
  gap: var(--kref-btn-gap, 12px);
  flex-wrap: wrap;
}

.kref-card-buttons {
  margin-top: auto;
  padding-top: var(--kref-card-button-space, 42px);
}

.kref-card-buttons {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.kref-card-buttons .kref-btn {
  flex: 0 0 auto;
  min-width: 0;
}

@media (max-width: 1500px) and (min-width: 1000px) {
  .kref-card-buttons {
    gap: min(var(--kref-btn-gap, 12px), 10px);
  }
  .kref-card-buttons .kref-btn {
    padding: 14px 20px !important;
    gap: 16px !important;
    font-size: min(var(--kref-btn-font-size, 16px), 15px) !important;
  }
  .kref-card-buttons .kref-btn svg {
    width: 24px;
  }
}


.kref-btn,
body .kref-btn,
.nectar-button.kref-btn {
  position: relative;
  z-index: 1;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--kref-btn-arrow-gap, 24px) !important;
  min-height: 0 !important;
  padding: var(--kref-btn-padding, 16px 28px) !important;
  border-radius: var(--kref-btn-radius, 999px) !important;
  border: 2px solid transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
  line-height: 1 !important;
  font-size: var(--kref-btn-font-size, 16px) !important;
  font-weight: var(--kref-btn-font-weight, 800) !important;
  letter-spacing: normal !important;
  text-transform: var(--kref-btn-text-transform, none) !important;
  white-space: nowrap;
  max-width: 100%;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, transform 220ms ease !important;
  overflow: visible;
}

.kref-btn span {
  display: inline-block;
  line-height: 1 !important;
}

.kref-btn svg {
  display: block;
  width: 28px;
  height: auto;
  flex: 0 0 auto;
}

.kref-btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--kref-btn-ring-gap, 7px));
  border: var(--kref-btn-ring-width, 1px) solid var(--kref-btn-ring-color, #333333);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.kref-btn:hover::after,
.kref-btn:focus-visible::after {
  animation: kref-ring-fade var(--kref-btn-ring-fade, 0.62s) ease-out both;
}

@keyframes kref-ring-fade {
  0% { opacity: 0; transform: scale(0.988); }
  14% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.012); }
}

.kref-btn-primary,
body .kref-btn-primary {
  background: var(--kref-btn1-bg, #333333) !important;
  color: var(--kref-btn1-color, #F7F4EC) !important;
  border: 2px solid var(--kref-btn1-bg, #333333) !important;
}

.kref-btn-primary:hover,
.kref-btn-primary:focus-visible {
  background: transparent !important;
  color: var(--kref-btn2-color, #333333) !important;
  border: 2px solid var(--kref-btn2-border, #333333) !important;
}

.kref-btn-secondary,
body .kref-btn-secondary {
  background: transparent !important;
  color: var(--kref-btn2-color, #333333) !important;
  border: 2px solid var(--kref-btn2-border, #333333) !important;
}

.kref-btn-secondary:hover,
.kref-btn-secondary:focus-visible {
  background: var(--kref-btn1-bg, #333333) !important;
  color: var(--kref-btn1-color, #F7F4EC) !important;
  border: 2px solid var(--kref-btn1-bg, #333333) !important;
}

.kref-load-sentinel {
  width: 100%;
  min-height: var(--kref-lazy-reserve, 980px);
  height: auto;
  display: block;
}

@media (max-width: 999px) {
  .kref-load-sentinel {
    min-height: var(--kref-lazy-reserve-mobile, 1180px);
  }
}

.kref-card.kref-card-loading {
  opacity: 0;
  transform: translateY(12px);
  animation: kref-card-in 380ms ease forwards;
}

@keyframes kref-card-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Single reference page */
body.kref-single-body #header-outer,
body.kref-single-body #header-outer header#top,
body.kref-single-body #header-outer #top,
body.kref-single-body #header-outer .container {
  background: var(--kref-header-bg, #E2EBF2) !important;
  background-color: var(--kref-header-bg, #E2EBF2) !important;
}

body.kref-single-body #header-outer {
  transition: background-color 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}


@media (min-width: 1000px) {
  body.kref-single-body.kref-desktop-header-scrolled #header-outer,
  body.kref-single-body.kref-desktop-header-scrolled #header-outer header#top,
  body.kref-single-body.kref-desktop-header-scrolled #header-outer #top,
  body.kref-single-body.kref-desktop-header-scrolled #header-outer .container,
  body.kref-single-body #header-outer.small-nav,
  body.kref-single-body #header-outer.small-nav header#top,
  body.kref-single-body #header-outer.small-nav #top,
  body.kref-single-body #header-outer.small-nav .container,
  body.kref-single-body #header-outer.scrolled-down,
  body.kref-single-body #header-outer.scrolled-down header#top,
  body.kref-single-body #header-outer.scrolled-down #top,
  body.kref-single-body #header-outer.scrolled-down .container,
  body.kref-single-body #header-outer.detached,
  body.kref-single-body #header-outer.detached header#top,
  body.kref-single-body #header-outer.detached #top,
  body.kref-single-body #header-outer.detached .container {
    background: var(--kref-header-scrolled-bg, #F7F4EC) !important;
    background-color: var(--kref-header-scrolled-bg, #F7F4EC) !important;
  }
}


body.kref-single-body #ajax-content-wrap {
  overflow: visible;
}

.kajahdus-reference-single {
  margin: 0;
  padding: 0;
  color: #333333;
  background: var(--kref-single-content-bg, #F7F4EC);
}

.kref-single-wrap {
  width: min(100% - 160px, 1480px);
  margin: 0 auto;
}

.kref-single-hero {
  background: var(--kref-single-hero-bg, #E2EBF2);
  padding: var(--kref-single-hero-padding-top-d, 70px) 0 72px;
}

.kref-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  align-items: center;
  gap: var(--kref-hero-gap, clamp(36px, 4vw, 76px));
}

.kref-main-visual {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

.kref-main-visual img,
.kref-main-visual .kref-single-placeholder {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.kref-single-placeholder {
  background: rgba(255,255,255,0.5);
}

.kref-mobile-mockup {
  width: min(100%, 260px);
  aspect-ratio: var(--kref-mobile-aspect-ratio, 930 / 1922);
  justify-self: var(--kref-mobile-desktop-align, start);
  overflow: hidden;
  border-radius: var(--kref-single-mobile-radius, 47px);
  background: rgba(255,255,255,0.55);
}

.kref-mobile-mockup img,
.kref-mobile-mockup video {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.kref-mobile-inline {
  display: none;
}

.kref-single-content-section {
  background: var(--kref-single-content-bg, #F7F4EC);
  padding: clamp(70px, 8vw, 120px) 0 clamp(70px, 8vw, 120px);
}

.kref-single-title {
  width: min(66.66%, 980px);
  margin: 0 0 54px 0 !important;
  font-size: var(--kref-single-title-size-d, 5rem) !important;
  line-height: var(--kref-single-title-line-d, 1) !important;
  letter-spacing: var(--kref-single-title-letter-d, normal) !important;
  font-weight: var(--kref-single-title-weight-d, 900) !important;
  color: inherit !important;
}

.kref-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
}

.kref-main-text {
  min-width: 0;
}

.kref-single-ingress {
  margin: 0 0 44px 0 !important;
  font-size: var(--kref-ingress-size-d, 20px) !important;
  line-height: var(--kref-ingress-line-d, 1.4) !important;
  letter-spacing: var(--kref-ingress-letter-d, normal) !important;
  font-weight: var(--kref-ingress-weight-d, 800) !important;
  color: inherit !important;
}

.kref-single-bodytext,
.kref-single-bodytext p,
.kref-single-bodytext li {
  font-size: var(--kref-body-size-d, inherit) !important;
  line-height: var(--kref-body-line-d, inherit) !important;
  letter-spacing: var(--kref-body-letter-d, normal) !important;
}

.kref-single-bodytext p:last-child {
  margin-bottom: 0;
}

.kref-single-buttons {
  margin-top: 58px;
}

.kref-work-list {
  min-width: 0;
  align-self: start;
  padding-top: 0;
}

.kref-work-title {
  margin: 0 0 30px 0 !important;
}


.kref-work-content ul,
.kref-work-content ol {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.kref-work-content li {
  position: relative;
  list-style: none !important;
  margin: 0 0 var(--kref-work-item-gap-d, 24px) 0 !important;
  padding: 0 0 0 46px !important;
  min-height: 28px;
}

.kref-work-content li:last-child {
  margin-bottom: 0 !important;
}

.kref-work-content li > p:last-child {
  margin-bottom: 0 !important;
}

.kref-work-list-custom-items .kref-work-content,
.kref-work-list-custom-items .kref-work-content p,
.kref-work-list-custom-items .kref-work-content a,
.kref-work-list-custom-items .kref-work-content li {
  color: var(--kref-work-item-color, inherit) !important;
  font-size: var(--kref-work-item-size-d, inherit) !important;
  letter-spacing: var(--kref-work-item-letter-d, inherit) !important;
  font-weight: var(--kref-work-item-weight-d, inherit) !important;
}

.kref-work-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 28px;
  height: 28px;
  background: var(--kref-work-icon-color, #93BFFF);
  -webkit-mask-image: var(--kref-work-icon-url);
  mask-image: var(--kref-work-icon-url);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.kref-work-content p {
  margin: 0 0 16px 0;
}

.kref-gallery-section {
  background: var(--kref-single-gallery-bg, #E2EBF2);
  padding: var(--kref-gallery-padding-top, 80px) 0 var(--kref-gallery-padding-bottom, 80px);
}

.kref-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--kref-gallery-column-gap, 40px);
  row-gap: var(--kref-gallery-row-gap, 40px);
}

.kref-gallery-item {
  margin: 0 !important;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--kref-gallery-radius, 20px);
  background: rgba(255,255,255,0.45);
  box-shadow: var(--kref-gallery-shadow, 0 12px 30px rgba(0,0,0,0.13));
}

.kref-gallery-item img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 520ms cubic-bezier(.2,.7,.2,1);
  transform-origin: center center;
}

@media (hover: hover) and (pointer: fine) {
  .kref-gallery-item:hover img,
  .kref-gallery-item:focus-within img {
    transform: scale(var(--kref-gallery-hover-scale, 1.035));
  }
}

.kref-back-button-wrap {
  display: flex;
  justify-content: center;
  padding-top: var(--kref-back-spacing-top, 80px);
  padding-bottom: var(--kref-back-spacing-bottom, 80px);
}

.kref-back-btn {
  --kref-btn-padding: 18px 34px;
}


.kref-card-buttons .kref-btn {
  max-width: 100%;
}

.kref-card-buttons .kref-btn span {
  overflow: visible;
  text-overflow: clip;
}

/* Gallery lightbox */
.kref-gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
}

.kref-gallery-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kref-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(0,0,0,0.82);
}

.kref-lightbox.kref-lightbox-open {
  display: flex;
}

.kref-lightbox-inner {
  position: relative;
  max-width: min(1200px, 92vw);
  max-height: 88vh;
}

.kref-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.kref-lightbox-caption {
  display: none;
  margin: 18px auto 0;
  max-width: 900px;
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
}

.kref-lightbox-caption:not(:empty) {
  display: block;
}

.kref-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #333333;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .kajahdus-references.kref-cols-4 .kref-grid-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .kajahdus-references.kref-cols-3 .kref-grid-list,
  .kajahdus-references.kref-cols-4 .kref-grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 999px) {
  .kref-single-wrap {
    width: min(100% - 48px, 1480px);
  }
  .kref-hero-layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .kref-mobile-desktop {
    display: none;
  }
  .kref-mobile-inline {
    display: block;
    margin: 50px auto 0;
  }
  .kref-single-title {
    width: 100%;
  }
  .kref-content-layout {
    grid-template-columns: 1fr;
    gap: 52px;
  }
}

@media (max-width: 767px) {
  .kref-grid-list {
    grid-template-columns: 1fr;
    gap: clamp(24px, 7vw, var(--kref-gap, 40px));
  }
  .kref-card-image-area {
    padding: 28px 24px 26px;
  }
  .kref-card-content {
    padding: 32px 26px 34px;
  }
  .kref-card-title {
    font-size: var(--kref-title-size-m, 28px) !important;
    line-height: var(--kref-title-line-m, 1) !important;
    letter-spacing: var(--kref-title-letter-m, normal) !important;
    font-weight: var(--kref-title-weight-m, 900) !important;
  }
  
.kref-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kref-category-pill-gap, 8px);
  margin-top: 14px;
}

.kref-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border: 1px solid var(--kref-category-pill-border, #333333);
  border-radius: var(--kref-category-pill-radius, 999px);
  background: var(--kref-category-pill-bg, transparent);
  color: var(--kref-category-pill-color, #333333) !important;
  font-size: var(--kref-category-pill-font-size, 12px) !important;
  font-weight: var(--kref-category-pill-weight, 700) !important;
  letter-spacing: var(--kref-category-pill-letter, 0.02em) !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.kref-category-pill-link {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.kref-category-pill-link:hover,
.kref-category-pill-link:focus-visible {
  background: var(--kref-category-pill-hover-bg, #333333);
  color: var(--kref-category-pill-hover-color, #F7F4EC) !important;
  border-color: var(--kref-category-pill-hover-border, #333333);
  transform: translateY(-1px);
}

.kref-card-desc {
    font-size: var(--kref-text-size-m, 16px) !important;
    line-height: var(--kref-text-line-m, 1.1) !important;
    letter-spacing: var(--kref-text-letter-m, normal) !important;
    font-weight: var(--kref-text-weight-m, 400) !important;
  }
  .kref-card-buttons {
    padding-top: clamp(30px, 8vw, var(--kref-card-button-space, 42px));
  }
  .kref-buttons {
    align-items: stretch;
  }
  .kref-card-buttons {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
  }
  .kref-card-buttons .kref-btn {
    flex: 0 0 auto;
  }
  .kref-btn,
  body .kref-btn {
    width: auto;
    max-width: 100%;
    gap: 24px !important;
    font-size: var(--kref-btn-font-size-m, var(--kref-btn-font-size, 16px)) !important;
    padding: var(--kref-btn-padding-m, var(--kref-btn-padding, 16px 24px)) !important;
  }
  .kref-single-hero {
    padding: var(--kref-single-hero-padding-top-m, 52px) 0 46px;
  }
  .kref-single-content-section {
    padding: 58px 0 66px;
  }
  .kref-single-title {
    margin-bottom: 38px !important;
    font-size: var(--kref-single-title-size-m, 3.2rem) !important;
    line-height: var(--kref-single-title-line-m, 1) !important;
    letter-spacing: var(--kref-single-title-letter-m, normal) !important;
    font-weight: var(--kref-single-title-weight-m, 900) !important;
  }
  .kref-single-ingress {
    margin-bottom: 32px !important;
    font-size: var(--kref-ingress-size-m, 18px) !important;
    line-height: var(--kref-ingress-line-m, 1.35) !important;
    letter-spacing: var(--kref-ingress-letter-m, normal) !important;
    font-weight: var(--kref-ingress-weight-m, 800) !important;
  }
  .kref-single-bodytext,
  .kref-single-bodytext p,
  .kref-single-bodytext li {
    font-size: var(--kref-body-size-m, inherit) !important;
    line-height: var(--kref-body-line-m, inherit) !important;
    letter-spacing: var(--kref-body-letter-m, normal) !important;
  }
  .kref-work-list-custom-items .kref-work-content,
  .kref-work-list-custom-items .kref-work-content p,
  .kref-work-list-custom-items .kref-work-content a,
  .kref-work-list-custom-items .kref-work-content li {
    font-size: var(--kref-work-item-size-m, var(--kref-work-item-size-d, inherit)) !important;
    letter-spacing: var(--kref-work-item-letter-m, var(--kref-work-item-letter-d, inherit)) !important;
    font-weight: var(--kref-work-item-weight-m, var(--kref-work-item-weight-d, inherit)) !important;
  }
  .kref-work-content li {
    margin-bottom: var(--kref-work-item-gap-m, var(--kref-work-item-gap-d, 24px)) !important;
  }

  .kref-work-content li:last-child {
    margin-bottom: 0 !important;
  }
  .kref-single-buttons {
    margin-top: 42px;
  }
  .kref-mobile-mockup {
    width: min(70vw, 260px);
  }
  .kref-gallery-grid {
    grid-template-columns: 1fr;
  }
  .kref-gallery-section {
    padding-top: clamp(48px, 12vw, var(--kref-gallery-padding-top, 80px));
  }
  .kref-back-button-wrap {
    padding-top: clamp(42px, 11vw, var(--kref-back-spacing-top, 80px));
  }
}

@media (max-width: 520px) {
  .kref-lightbox {
    padding: 24px;
  }
  .kref-lightbox-img {
    max-height: 72vh;
  }
  .kref-lightbox-close {
    top: 10px;
    right: 10px;
  }
}
html.kref-lightbox-active,
html.kref-lightbox-active body {
  overflow: hidden;
}

/* 1.0.20: restore and harden main image frame rendering */
.kajahdus-reference-single .kref-main-visual {
  position: relative;
  border-radius: var(--kref-single-main-radius, 45px) !important;
}

.kajahdus-reference-single .kref-main-visual:not(.kref-main-visual-framed) {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.kajahdus-reference-single .kref-main-visual:not(.kref-main-visual-framed) > img,
.kajahdus-reference-single .kref-main-visual:not(.kref-main-visual-framed) > .kref-single-placeholder {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.kajahdus-reference-single .kref-main-visual.kref-main-visual-framed {
  aspect-ratio: var(--kref-main-frame-ratio, 2000 / 1165) !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.kajahdus-reference-single .kref-main-visual-framed .kref-main-visual-screen {
  position: absolute !important;
  inset: var(--kref-main-frame-inset, 4.2% 2.45% 4.0% 2.5%) !important;
  z-index: 1 !important;
  overflow: hidden !important;
  border-radius: 2px;
  background: rgba(255,255,255,0.65);
}

.kajahdus-reference-single .kref-main-visual-framed .kref-main-visual-screen > img,
.kajahdus-reference-single .kref-main-visual-framed .kref-main-visual-screen > .kref-single-placeholder {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: var(--kref-main-frame-fit, cover) !important;
  object-position: var(--kref-main-frame-position, center center) !important;
}

.kajahdus-reference-single .kref-main-visual.kref-main-visual-framed {
  isolation: isolate !important;
}

.kajahdus-reference-single .kref-main-visual-framed .kref-main-visual-screen > img,
.kajahdus-reference-single .kref-main-visual-framed .kref-main-visual-screen > .kref-single-placeholder {
  position: relative !important;
  z-index: 1 !important;
}

.kajahdus-reference-single .kref-main-visual-framed > .kref-main-visual-frame {
  position: absolute !important;
  inset: 0 !important;
  z-index: 999 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 100% 100% !important;
  pointer-events: none !important;
  user-select: none !important;
}


/* 1.0.24: force responsive reference listing columns.
   Mobile should always be one column; tablet can be two columns. */
@media (min-width: 768px) and (max-width: 1024px) {
  body .kajahdus-references .kref-grid-list,
  body .kajahdus-references[class*="kref-cols-"] .kref-grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  body .kajahdus-references,
  body .kajahdus-references .kref-grid-list,
  body .kajahdus-references .kref-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body .kajahdus-references .kref-grid-list,
  body .kajahdus-references[class*="kref-cols-"] .kref-grid-list,
  body .wpb_wrapper .kajahdus-references .kref-grid-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 1.0.26: work-list spacing fields control the gap between list items, not text line-height. */

/* Archive override */
.kref-archive-page {
  background: var(--kref-archive-bg, #F7F4EC);
  padding-top: var(--kref-archive-padding-top, 80px);
  padding-bottom: var(--kref-archive-padding-bottom, 100px);
}
.kref-archive-inner {
  max-width: var(--kref-archive-container, 1600px);
  margin: 0 auto;
  padding-left: 80px;
  padding-right: 80px;
}
.kref-archive-title {
  margin: 0 !important;
  font-size: var(--kref-archive-title-size-d, 5rem) !important;
  line-height: var(--kref-archive-title-line-d, 1) !important;
  font-weight: var(--kref-archive-title-weight-d, 900) !important;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.kref-archive-description {
  max-width: 900px;
  margin: 28px 0 0;
  font-size: var(--kref-archive-description-size-d, inherit);
}
.kref-archive-list {
  width: 100%;
  margin-top: var(--kref-archive-title-cards-gap-d, 80px);
}
@media (max-width: 999px) {
  .kref-archive-inner {
    padding-left: 34px;
    padding-right: 34px;
  }
}
@media (max-width: 690px) {
  .kref-archive-page {
    padding-top: 52px;
    padding-bottom: 70px;
  }
  .kref-archive-inner {
    padding-left: 22px;
    padding-right: 22px;
  }
  .kref-archive-title {
    font-size: min(var(--kref-archive-title-size-m, var(--kref-archive-title-size-d, 2.8rem)), var(--kref-archive-title-max-m, 10vw)) !important;
    line-height: var(--kref-archive-title-line-m, var(--kref-archive-title-line-d, 1)) !important;
    overflow-wrap: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
  .kref-archive-description {
    font-size: var(--kref-archive-description-size-m, var(--kref-archive-description-size-d, inherit));
    margin-top: 24px;
  }
  .kref-archive-list {
    margin-top: var(--kref-archive-title-cards-gap-m, var(--kref-archive-title-cards-gap-d, 52px));
  }
}
