/* GENERAL */
.icon-background {
  background: var(--main-color);
  border: 1px solid var(--main-color);
}
.icon-border {
  border: 1px solid var(--main-color);
}
.radius-0 { border-radius: 0; }
.radius-1 { border-radius: 50%; }


/* ICONBOX 1 */

figure.simple {
  position: relative;
  float: left;
  overflow: hidden;
  margin: 1em 0;
  min-width: 250px;
  max-width: 310px;
  width: 100%;
  background-color: var(--white);
  border-radius: 5px;
  border-top: 5px solid var(--main-color);
  color: var(--black);
  text-align: center;
  font-size: var(--fs-base);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

figure.simple *,
figure.simple *:before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.1s ease-out;
  transition: all 0.1s ease-out;
}

figure.simple figcaption {
  padding: 12% 10% 14%;
}

figure.simple picture {
  display: block;
  height: 120px;
  width: 120px;
  margin: 0 auto;
}


figure.simple img {
  width: 50%;
  max-width: 55%;
}

figure.simple h3 {
  color: var(--black);
  font-size: var(--fs-headline-h3);
  font-weight: 300;
  line-height: var(--fs-line-height);
  margin: 10px 0;
}

figure.simple p {
  font-size: var(--fs-base);
  font-weight: var(--fs-weight-light);
  margin: 0 0 20px;
}

figure.simple .btn {
  text-decoration: none;
  color: var(--white);
  padding: var(--padding-default);
  display: inline-block;
  position: relative;
  z-index: 1;
}


/* ICONBOX 2 */
.iconbox {
  cursor: pointer;
  margin: 50px;
  border-radius: 3px;
  perspective: 1000px;
}

.card__inner {
  background-color: #FFFFFF;
  color: #41295a;

  height: 350px;
  width: 300px;
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.iconbox:hover .card__inner {
  transform: rotateY(180deg);
}

.card__content {
  position: absolute;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
}
.card__content picture {
  display: block;
  text-align: center;
  margin-bottom: 1em;
}

.card__content picture img {
  width: 50%;
}

.card__content--back {
transform: rotateY(180deg);
} 
  

/* ICONBOX 3 */
.card-hover {
  width: 360px;
  height: 500px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 32px -10px rgba(0, 0, 0, 0.08);
}
.card-hover:has(.card-hover__link:hover) .card-hover__extra {
  transform: translateY(0);
  transition: transform 0.35s;
}
.card-hover:hover .card-hover__content {
  background-color: #DEE8C2;
  bottom: 100%;
  transform: translateY(100%);
  padding: 50px 60px;
  transition: all 0.35s cubic-bezier(0.1, 0.72, 0.4, 0.97);
}
.card-hover:hover .card-hover__link {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: all 0.3s 0.35s cubic-bezier(0.1, 0.72, 0.4, 0.97);
}
.card-hover:hover img {
  transform: scale(1);
  transition: 0.35s 0.1s transform cubic-bezier(0.1, 0.72, 0.4, 0.97);
}
.card-hover__content {
  width: 100%;
  text-align: center;
  background-color: #86B971;
  padding: 0 60px 50px;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translateY(0);
  transition: all 0.35s 0.35s cubic-bezier(0.1, 0.72, 0.4, 0.97);
  will-change: bottom, background-color, transform, padding;
  z-index: 1;
}
.card-hover__content::before, .card-hover__content::after {
  content: '';
  width: 100%;
  height: 120px;
  background-color: inherit;
  position: absolute;
  left: 0;
  z-index: -1;
}
.card-hover__content::before {
  top: -80px;
  clip-path: ellipse(60% 80px at bottom center);
}
.card-hover__content::after {
  bottom: -80px;
  clip-path: ellipse(60% 80px at top center);
}
.card-hover__title {
  font-size: 1.5rem;
  margin-bottom: 1em;
}
.card-hover__title span {
  color: #2d7f0b;
}
.card-hover__text {
  font-size: 0.75rem;
}
.card-hover__link {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translate(-50%, 10%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  text-decoration: none;
  color: #2d7f0b;
  opacity: 0;
  padding: 10px;
  transition: all 0.35s;
}
.card-hover__link:hover svg {
  transform: translateX(4px);
}
.card-hover__link svg {
  width: 18px;
  margin-left: 4px;
  transition: transform 0.3s;
}
.card-hover__extra {
  height: 50%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  font-size: 1.5rem;
  text-align: center;
  background-color: #86b971;
  padding: 80px;
  bottom: 0;
  z-index: 0;
  color: #dee8c2;
  transform: translateY(100%);
  will-change: transform;
  transition: transform 0.35s;
}
.card-hover__extra span {
  color: #2d7f0b;
}
.card-hover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  transform: scale(1.2);
  transition: 0.35s 0.35s transform cubic-bezier(0.1, 0.72, 0.4, 0.97);
}

/* ICONBOX 4*/

article {
  --img-scale: 1.001;
  --title-color: black;
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;
  border-radius: 16px;
  box-shadow: none;
  background: #fff;
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
}

article a::after {
  position: absolute;
  inset-block: 0;
  inset-inline: 0;
  cursor: pointer;
  content: "";
}

/* basic article elements styling */
article h2 {
  margin: 0 0 18px 0;
  font-family: "Bebas Neue", cursive;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  color: var(--title-color);
  transition: color 0.3s ease-out;
}

article figure {
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

article img {
  max-width: 100%;
  transform-origin: center;
  transform: scale(var(--img-scale));
  transition: transform 0.4s ease-in-out;
}

.article-body {
  padding: 24px;
}

article a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #28666e;
}

article a:focus {
  outline: 1px dotted #28666e;
}

article a .icon {
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-left: 5px;
  transform: translateX(var(--link-icon-translate));
  opacity: var(--link-icon-opacity);
  transition: all 0.3s;
}

/* using the has() relational pseudo selector to update our custom properties */
article:has(:hover, :focus) {
  --img-scale: 1.1;
  --title-color: #28666e;
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

.articles {
  display: grid;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

@media screen and (max-width: 960px) {
  article {
    container: card/inline-size;
  }
  .article-body p {
    display: none;
  }
}

@container card (min-width: 380px) {
  .article-wrapper {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  .article-body {
    padding-left: 0;
  }
  article figure {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  article figure img {
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }
}
