   
/*
-------------------------------------------
wf-subarea-box.css
-------------------------------------------

  Beskrivning: Stilregler för att visa puffar med delområden
  Skapad av: Webbfröken AB
  Webbadress: https://webbfroken.se

------------------------------------------- */


/*
-------------------------------------------
Puffar med delområden
------------------------------------------- */

.wf-subarea-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--wf-spacing-40);
}

.wf-subarea-box > .sv-layout {
  position: relative;
}

.wf-subarea-box > .sv-layout > .sv-image-portlet {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}

.wf-subarea-box > .sv-layout > .sv-image-portlet > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wf-subarea-box > .sv-layout > .sv-text-portlet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.wf-subarea-box > .sv-layout > .sv-text-portlet .env-text-heading-03 {
  margin: 0;
}

.wf-subarea-box > .sv-layout > .sv-text-portlet a {
  display: block;
  padding: var(--wf-spacing-30) var(--wf-spacing-40);
  text-decoration: none;
}

.wf-subarea-box > .sv-layout > .sv-text-portlet a:hover {
  text-decoration: none;
}


/*
-------------------------------------------
Specifikt per delområde
------------------------------------------- */

/* Skeppsbron */
.wf-subarea-box > .sv-layout:nth-child(1) {
  grid-row: span 2;
  grid-column: 1;
  height: clamp(360px, 45vw, 688px);
}

.wf-subarea-box > .sv-layout:nth-child(1) > .sv-text-portlet a {
  background-color: var(--skeppsbron-color-brand);
  color: var(--skeppsbron-color-brand-contrast);
}

/* Solåsen/Fridhem */
.wf-subarea-box > .sv-layout:nth-child(2) {
  grid-row: 1;
  grid-column: 2;
}

.wf-subarea-box > .sv-layout:nth-child(2) > .sv-text-portlet a {
  background-color: var(--solasen-fridhem-color-brand);
  color: var(--solasen-fridhem-color-brand-contrast);
}

/* Munksjöstaden */
.wf-subarea-box > .sv-layout:nth-child(3) {
  grid-row: 1;
  grid-column: 3;
}

.wf-subarea-box > .sv-layout:nth-child(3) > .sv-text-portlet a {
  background-color: var(--munksjostaden-color-brand);
  color: var(--munksjostaden-color-brand-contrast);
}

/* Östra Munksjön */
.wf-subarea-box > .sv-layout:nth-child(4) {
  grid-row: 2;
  grid-column: 2;
}

.wf-subarea-box > .sv-layout:nth-child(4) > .sv-text-portlet a {
  background-color: var(--ostra-munksjon-color-brand);
  color: var(--ostra-munksjon-color-brand-contrast);
}

/* Stationsområdet*/
.wf-subarea-box > .sv-layout:nth-child(5) {
  grid-row: 2;
  grid-column: 3;
}

.wf-subarea-box > .sv-layout:nth-child(5) > .sv-text-portlet a {
  background-color: var(--stationsomradet-color-brand);
  color: var(--stationsomradet-color-brand-contrast);
}


/*
-------------------------------------------
Animeringar
------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .wf-subarea-box > .sv-layout {
    transition: var(--wf-block-transition);
  }

  .wf-subarea-box > .sv-layout:hover {
    transform: var(--wf-block-transform);
  }
}


/*
-------------------------------------------
Mobil
------------------------------------------- */

@media screen and (max-width: 767px) {
  
  .wf-subarea-box {
    display: flex;
    flex-direction: column;
  }
  
  .wf-subarea-box > .sv-layout {
    min-height: 260px;
  }

  .wf-subarea-box > .sv-layout:nth-child(1) {
    height: unset;
  }

}

