

/*
=========================================================
DECORATIONS CSS
=========================================================
 * Innehåller styling av dekorationer
 *
 * Copyright (C) Limepark AB.
 * https://limepark.se/licensvillkor
=========================================================*/


/*
---------------------------------------------------------
BILDPUFFAR
--------------------------------------------------------- */

.lp-boxes {
  display: grid;
  margin: var(--lp-spacing) 0;

  gap: var(--lp-spacing);
  grid-template-columns: var(--lp-grid-default);
}

.lp-boxes > div {
  border-radius: var(--lp-border-radius);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.lp-boxes > .sv-layout > .sv-text-portlet,
.lp-boxes > .sv-layout > .sv-layout {
  background-color: var(--lp-block--background);
  height: 100%;
  padding: var(--lp-spacing-small) var(--lp-spacing) var(--lp-spacing);
}

.lp-boxes .sv-text-portlet:not(:last-child) {
  margin: 0 0 1.5rem !important;
}

.lp-boxes h2.subheading,
.lp-boxes h3.heading3 {
  margin: 0 !important;
}

.lp-boxes h2.subheading a,
.lp-boxes h3.heading3 a {
  align-items: center;
  box-sizing: border-box;
  color: var(--lp-block--contrast);
  display: flex;
  font-size: var(--lp-font-size-medium);
}

/*
---------------------------------------------------------
VIKTIG RUTA
--------------------------------------------------------- */

.lp-important-box {
  background-color: var(--lp-color--pink);
  border-radius: var(--lp-border-radius);
  margin: var(--lp-spacing-large) 0;
  padding: var(--lp-spacing);
}

.lp-important-box .sv-text-portlet:last-child > .sv-text-portlet-content > .normal:last-child,
.lp-important-box .sv-text-portlet-content > .normal:last-child {
  margin-bottom: 0;
}

.lp-important-box .subheading,
.lp-important-box .heading3,
.lp-important-box .normal,
.lp-important-box .small,
.lp-important-box a:not(.env-button) {
  color: var(--lp-block--contrast);
}

.lp-important-box .subheading {
  font-size: var(--lp-font-size-large);
}

.lp-important-box .heading3 {
  font-size: var(--lp-font-size-medium);
}

.lp-important-box .sv-marketplace-sitevision-button:last-child {
  margin-bottom: 0;
  margin-top: var(--lp-spacing);
}

/*
---------------------------------------------------------
INFORUTA
--------------------------------------------------------- */

.lp-info-box {
  background-color: var(--lp-color--green-medium);
  border-radius: var(--lp-border-radius);
  margin: var(--lp-spacing-large) 0;
  padding: var(--lp-spacing);
}

.lp-info-box .sv-text-portlet:last-child > .sv-text-portlet-content > .normal:last-child,
.lp-info-box.sv-text-portlet > .sv-text-portlet-content > .normal:last-child {
  margin-bottom: 0;
}

.lp-info-box .subheading,
.lp-info-box .heading3,
.lp-info-box .normal,
.lp-info-box .small,
.lp-info-box a:not(.env-button) {
  color: var(--lp-font-color);
}

.lp-info-box .subheading {
  font-size: var(--lp-font-size-large);
}

.lp-info-box .heading3 {
  font-size: var(--lp-font-size-medium);
}

.lp-info-box .sv-marketplace-sitevision-button:last-child {
  margin-bottom: 0;
  margin-top: var(--lp-spacing);
}

.lp-info-box.sv-horizontal {
  align-items: center;
  gap: var(--lp-spacing);
}

.lp-info-box.sv-horizontal > .sv-image-portlet + .sv-text-portlet {
  flex: 1 1 1px;
  min-width: min(20rem, 100%);
}

.lp-info-box.sv-horizontal > .sv-image-portlet {
  margin-bottom: 0;
}

/*
---------------------------------------------------------
LISTA FEL ORDNING
--------------------------------------------------------- */

/* Fel ordning - Används i artikeln för tangentbordsnavigering */

ul.lp-link-arrow-list--wrongorder,
ul.lp-link-arrow-list--rightorder {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lp-link-arrow-list--wrongorder li,
.lp-link-arrow-list--rightorder li {
  margin: 0 2rem 0 0;
}

.lp-link-arrow-list--wrongorder a,
.lp-link-arrow-list--rightorder a {
  transition: all 0.3s ease;
}

.lp-link-arrow-list--wrongorder li:nth-child(1) {
  order: 5;
}

.lp-link-arrow-list--wrongorder li:nth-child(2) {
  order: 2;
}

.lp-link-arrow-list--wrongorder li:nth-child(3) {
  order: 1;
}

.lp-link-arrow-list--wrongorder li:nth-child(4) {
  order: 4;
}

.lp-link-arrow-list--wrongorder li:nth-child(5) {
  order: 3;
}

/*
---------------------------------------------------------
TEXT OCH STAPLADE BILDER
--------------------------------------------------------- */

.lp-stacked-images {
  align-items: start;
  display: grid;

  gap: var(--lp-spacing);
  grid-template-columns: 50% calc(49vw - var(--lp-spacing));
  margin: var(--lp-spacing-xxx-large) 0 !important;
}

.lp-stacked-images .sv-text-portlet .subheading {
  font-size: var(--lp-font-size-large);
  margin-top: 1.5em;
}

.lp-stacked-images .sv-text-portlet:first-child .subheading:first-child {
  margin-top: 0;
}

.lp-stacked-images .sv-text-portlet .normal {
  font-weight: 300;
}

.lp-stacked-images > .sv-layout:last-child {
  display: grid;

  grid-template-columns: repeat(6, 1fr);
  /* grid-template-rows: repeat(10, 1fr); */
  grid-auto-rows: auto;
}

.lp-stacked-images > .sv-layout:last-child .sv-image-portlet {
  grid-row: span 3;
}

.lp-stacked-images > .sv-layout:last-child .sv-image-portlet:first-child {
  grid-column: 2 / 6;
  /* grid-row: 1 / 4; */
}

.lp-stacked-images > .sv-layout:last-child .sv-image-portlet:nth-child(2) {
  grid-column: 1 / 5;
  /* grid-row: 4 / 7; */
}

.lp-stacked-images > .sv-layout:last-child .sv-image-portlet:nth-child(3) {
  grid-column: 2 / 7;
  /* grid-row: 7 / 10; */
}

.lp-stacked-images .sv-image-portlet {
  margin-left: auto;
  max-width: 50rem;
}

.lp-stacked-images .sv-image-portlet img {
  max-height: 100% !important;
  max-width: 100% !important;
  width: 100%;

  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.sv-edit-mode) .lp-stacked-images .sv-image-portlet {
    /* stylelint-disable */
    animation-name: stackedImage;
    animation-timeline: view();
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    animation-range-start: entry;
    animation-range-end: exit;
    animation-duration: 1ms;
    /* stylelint-enable */
  }

  html:not(.sv-edit-mode) .lp-stacked-images .sv-image-portlet:nth-child(2) {
    /* stylelint-disable */
    animation-range-start: entry 20%;
    animation-range-end: exit 20%;
    animation-direction: reverse;
    /* stylelint-enable */
  }

  html:not(.sv-edit-mode) .lp-stacked-images .sv-image-portlet:nth-child(3) {
    /* stylelint-disable */
    animation-range-start: entry 40%;
    animation-range-end: exit 40%;
    /* stylelint-enable */
  }
}

@keyframes stackedImage {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-5rem);
  }
}

/* Responsivt */

@media screen and (max-width: 650px) {
  .lp-stacked-images {
    margin: var(--lp-spacing-large) 0 !important;
  
    grid-template-columns: 100%;
  }
  
  .lp-stacked-images .sv-layout:nth-child(2) {
    grid-template-columns: 2rem auto 2rem;
    grid-template-rows: initial;
    order: -1;
  }

  .lp-stacked-images .sv-image-portlet {
    max-width: initial;
  }
  
  .lp-stacked-images > .sv-layout:last-child .sv-image-portlet:first-child,
  .lp-stacked-images > .sv-layout:last-child .sv-image-portlet:nth-child(3) {
    grid-column: 2 / 4;
    grid-row: initial;
  }
  
  .lp-stacked-images > .sv-layout:last-child .sv-image-portlet:nth-child(2) {
    grid-column: 1 / 3;
    grid-row: initial;
  }
  
  .lp-stacked-images > .sv-layout:last-child .sv-image-portlet:nth-child(2),
  .lp-stacked-images > .sv-layout:last-child .sv-image-portlet:nth-child(3) {
    margin-top: -2rem;
  }
  
  html:not(.sv-edit-mode) .lp-stacked-images .sv-image-portlet {
    animation: none;
  }
}



/*
---------------------------------------------------------
VANLIGA FRÅGOR
--------------------------------------------------------- */
.lp-questions {
  background-color: var(--lp-block--background);
  /* padding: var(--lp-spacing-x-large) 0; */
  display: grid;
  margin-bottom: var(--lp-spacing-large);
  padding: 0 var(--lp-spacing);
  position: relative;

  gap: var(--lp-spacing-small);
  grid-template-columns: calc(60% - var(--lp-spacing-small)) 40%;
  isolation: isolate;
}

.lp-questions:after {
  background-color: inherit;
  bottom: 0;
  content: '';
  left: calc(50% - 50vw);
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: -1;
}

/*
---------------------------------------------------------
FOKUS
--------------------------------------------------------- */

.lp-focus-section {
  background-color: var(--lp-block-primary--background);
  display: grid;
  margin: var(--lp-spacing-x-large) 0;
  margin-left: calc(50% - 50vw);
  width: 100vw;
  grid-auto-rows: 80vh;

  justify-content: center;
}

.sv-template-modul .lp-focus-section {
  margin-top: var(--lp-spacing-xx-large);
}

.lp-focus-section > .sv-layout {
  background-color: var(--lp-block-primary--background);
  display: grid;
  height: 100%;
  overflow: initial;

  grid-template-columns: calc(var(--lp-grid-margin) + var(--lp-grid-width--half)) var(--lp-grid-width--half);
}

.lp-focus-section > .sv-layout .sv-image-portlet {
  align-items: center;
  display: flex;
  flex-direction: column;

  justify-content: center;
  margin: 0;
}

.lp-focus-section > .sv-layout .sv-image-portlet img {
  background-color: var(--lp-color--olive-light);
  border: 1.5rem solid var(--lp-color--olive-light);
  border-radius: var(--lp-border-radius);
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

.lp-focus-section > .sv-layout > .sv-layout {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  padding: var(--lp-spacing-x-large) var(--lp-spacing) var(--lp-spacing-x-large) var(--lp-spacing-x-large);

  justify-content: center;
}

.lp-focus-section > .sv-layout .subheading {
  font-size: var(--lp-font-size-x-large);
  margin: 0 0 0.3em;
}

.lp-focus-section > .sv-layout .subheading a {
  text-decoration: none;
}

.lp-focus-section > .sv-layout .normal {
  font-size: clamp(1.5rem,1.8vw,1.8rem);
  margin-bottom: 0;
}

/* stylelint-disable */

/* Anpassning för animation och reduced motion */

@media (prefers-reduced-motion: no-preference) {
  html:not(.sv-edit-mode) .lp-focus-section {
    padding-bottom: 125vh;
    grid-auto-rows: 100vh;
  }

  html:not(.sv-edit-mode) .lp-focus-section > .sv-layout {
    height: 225vh;
    animation-name: zIndex;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-range-end: cover 100vh;
    animation-range-start: cover 100vh;
    animation-timeline: view();
    animation-duration: 1ms;
    z-index: 0;
  }

  html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > .sv-layout {
    background-color: var(--lp-block-primary--background);
    animation-range-end: cover 100vh;
    animation-range-start: cover 100vh;
    animation-timeline: view();
    animation-name: scrollFade;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-duration: 1ms;
    opacity: 0;
  }

  html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > .sv-image-portlet {
    background-color: var(--lp-block-primary--background);
    animation-range-end: cover 125vh;
    animation-range-start: cover 100vh;
    animation-timeline: view();
    animation-name: scrollFade;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-duration: 1ms;
    opacity: 0;
  }

  html:not(.sv-edit-mode) .lp-focus-section > .sv-layout:first-child > .sv-layout,
  html:not(.sv-edit-mode) .lp-focus-section > .sv-layout:first-child > .sv-image-portlet {
    animation-play-state: paused;
    opacity: 1 !important;
  }

  html:not(.sv-edit-mode) .lp-focus-section > .sv-layout > * {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

@keyframes scrollFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
    z-index: 1;
  }
}

@keyframes zIndex {
  from {
    z-index: 0;
  }
  to {
    z-index: 1;
  }
}

/* stylelint-enable */

/*
---------------------------------------------------------
VANLIGA FRÅGOR
--------------------------------------------------------- */

.lp-faq {
  background-color: var(--lp-block--background);
  display: grid;
  margin-bottom: var(--lp-spacing-large);
  padding: var(--lp-spacing-x-large) 0;
  position: relative;

  gap: var(--lp-spacing);
  grid-template-columns: calc(40% - var(--lp-spacing)) 60%;
  isolation: isolate;
}

.lp-faq:after {
  background-color: inherit;
  border-radius: var(--lp-border-radius);
  bottom: 0;
  content: '';
  display: block;
  left: calc(50% - 50vw + 2rem);
  position: absolute;
  right: calc(50% - 50vw + 2rem);
  top: 0;
  z-index: -1;
}

.lp-faq > .lp-expandable-content {
  margin-top: 1rem;
  margin-bottom: 0;
}

.lp-faq:has(+ .lp-image-section.lp-support) {
  margin-bottom: var(--lp-spacing-small);
}

.lp-faq > .sv-layout:first-child {
  position: sticky;
  top: var(--lp-spacing);
  align-self: start;
}

/* Responsivt */ 
@media screen and (max-width: 1200px) {
  .lp-faq {
    padding: var(--lp-spacing-large) var(--lp-spacing);
  }
}

@media screen and (max-width: 700px) {

  .lp-faq {
    padding: var(--lp-spacing-x-large) var(--lp-spacing);

    grid-template-columns: 100%;
  }

  .lp-faq > .sv-layout:first-child {
    position: static;
  }
}

/*
---------------------------------------------------------
KONTAKTKORT
--------------------------------------------------------- */

.lp-contact-card {
  display: grid;
  margin-bottom: var(--lp-spacing-large);

  gap: var(--lp-spacing-large) var(--lp-spacing-small);
  grid-template-columns: repeat(auto-fill,minmax(min(34rem,100%),1fr));
}

.lp-contact-card .sv-image-portlet {
  margin-bottom: var(--lp-spacing-x-small);
}

.lp-contact-card .sv-image-portlet img {
  max-height: 100% !important;
  max-width: 100% !important;
  width: 100%;

  aspect-ratio: 46 / 57;
}

.lp-contact-card h3.heading3 {
  font-size: clamp(2.2rem, 2.6vw, 2.8rem);
  font-weight: 500;
}

.lp-contact-card p.normal {
  font-weight: 300;
}

.lp-contact-card .sv-text-portlet:last-child .sv-text-portlet-content:last-child p.normal {
  margin-bottom: 0;
}

.lp-contact-card p.normal a:after {
  content: none;
}

.pagecontent .sv-layout.lp-contact-card {
  margin-bottom: var(--lp-spacing-x-large);
}

/*
---------------------------------------------------------
FLÖDA BILD HÖGER
--------------------------------------------------------- */

.lp-float-image-right {
  float: right;
  max-width: 40%;
  margin-left: var(--lp-spacing);
  margin-bottom: var(--lp-spacing);
}