/*
	Abstracts are helpers, variables and functions
	for scss compliation.
*/
/*
	@TODO: Add to theme: new division fix for updated sass package.
*/
/**==================================================================================================================================
BREAKPOINT
@TODO: remove? What is use case?? either use simple global points or write custom line. why does first breakpoint have to be 0?
 ==================================================================================================================================*/
/**==================================================================================================================================
BREAKPOINT ENDS
==================================================================================================================================*/
span.edit-link {
  display: inline-block;
  background-color: yellow;
  font-weight: 700;
  position: fixed;
  left: 0;
  bottom: 3.125rem;
  transform: translateX(-45px);
  transition: all 0.2s;
}

span.edit-link a {
  display: block;
  padding: 0.9375rem;
}

span.edit-link:hover {
  transform: translateX(0);
}

/*
	Variables for compliation
	NB! Colors should be added to base/config file as css root variable.
*/
/**
 * Block section background colors.
 * Include the background options ACF fields group to use these.
 */
/**
 *	Fluid sized fonts
 *	Read more here:
 *	https://css-tricks.com/snippets/css/fluid-typography/
 */
/*
 * makes ul/ol as a dropdown select (normaly in mobile)
 * Structure: div > title > list > li > a
*/
/*
	Variables for legacy dc plugins
*/
section.link-cards h1 {
  margin-bottom: 2rem;
}

section.link-cards .stm-button {
  flex-shrink: 0;
}

section.link-cards ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

section.link-cards ul li {
  width: 100%;
  margin-bottom: 1.25rem;
}

@media screen and (min-width: 850px) {
  section.link-cards ul.card-grid-2, section.link-cards ul.card-grid-3, section.link-cards ul.card-grid-4 {
    gap: var(--spacing-grid-gap);
    flex-wrap: nowrap;
  }
  section.link-cards ul.card-grid-2 li, section.link-cards ul.card-grid-3 li, section.link-cards ul.card-grid-4 li {
    width: 50%;
    aspect-ratio: 1/1;
  }
  section.link-cards ul.card-grid-2 .btn-icon, section.link-cards ul.card-grid-3 .btn-icon, section.link-cards ul.card-grid-4 .btn-icon {
    display: none;
  }
}
@media screen and (min-width: 850px) and (min-width: 850px) {
  section.link-cards ul.card-grid-2 p, section.link-cards ul.card-grid-3 p, section.link-cards ul.card-grid-4 p {
    max-width: 70%;
  }
}
@media screen and (min-width: 1000px) {
  section.link-cards ul.card-grid-3, section.link-cards ul.card-grid-4 {
    gap: var(--spacing-grid-gap);
    flex-wrap: nowrap;
  }
  section.link-cards ul.card-grid-3 li, section.link-cards ul.card-grid-4 li {
    width: 33%;
    aspect-ratio: 1/1;
  }
  section.link-cards ul.card-grid-3 .card-text, section.link-cards ul.card-grid-4 .card-text {
    display: flex;
    justify-content: space-between;
  }
  section.link-cards ul.card-grid-3 .card-text p, section.link-cards ul.card-grid-4 .card-text p {
    margin: 0;
  }
}
@media screen and (min-width: 1440px) {
  section.link-cards ul.card-grid-4 {
    gap: var(--spacing-grid-gap);
    flex-wrap: nowrap;
  }
  section.link-cards ul.card-grid-4 li {
    width: 25%;
    aspect-ratio: 1/1.5;
  }
  section.link-cards ul.card-grid-4 .card-text {
    justify-content: flex-end;
  }
  section.link-cards ul.card-grid-4 .card-text div.heading-size-smaller {
    display: none;
  }
}
@media screen and (max-width: 999px) {
  section.link-cards .card-text {
    aspect-ratio: 1/1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
  }
  section.link-cards .card-text div.heading-size-smaller {
    display: none;
  }
}
section.link-cards li {
  position: relative;
  border-radius: var(--element-border-radius);
  overflow: hidden;
  margin: 0;
  padding: 2.5rem 1.625rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

section.link-cards li:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1A152E;
  opacity: 0.7;
  z-index: 6;
}

section.link-cards li:hover img, section.link-cards li:focus img {
  max-height: 110%;
  max-width: 110%;
}

section.link-cards li:hover .stm-button, section.link-cards li:focus .stm-button {
  background-color: var(--color__grey-dark);
  color: var(--color__grey-lighter);
  transition: all 350ms ease-out;
}

section.link-cards li:hover .btn-icon, section.link-cards li:focus .btn-icon {
  animation-name: arrow-woosh;
  animation-duration: 300ms;
}

section.link-cards img {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  max-height: 100%;
  max-width: 100%;
  height: 120%;
  width: 120%;
  transform-origin: center;
}

section.link-cards.should-animate img {
  transition: all 350ms ease-out;
}

section.link-cards h2 {
  margin-top: 0;
}

section.link-cards h2,
section.link-cards p {
  color: var(--color__grey-lighter);
}

section.link-cards h2,
section.link-cards p,
section.link-cards a {
  position: relative;
  z-index: 10;
}
