/* ┬  ┌─┐┬ ┬┌─┐┬ ┬┌┬┐ */
/* │  ├─┤└┬┘│ ││ │ │  */
/* ┴─┘┴ ┴ ┴ └─┘└─┘ ┴  */
#benefits {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--default-background-color);
  flex-direction: column;
}

#benefits p {
  margin-bottom: 3em;
  width: 60%;
  max-width: 600px;
  text-align: center;
}

#benefits > div {
  --gap: 40px;
  --nb-columns: 3;
  --block-width: calc(100% / var(--nb-columns) - var(--gap) * calc(var(--nb-columns) - 1) / var(--nb-columns));
  --block-ratio: calc(280 / 160);

  position: relative;
  width: 80%;
  max-width: 800px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--gap);
}


/* ┬ ┬┌┐┌┌─┐┌─┐┬  ┌┬┐┬┌┐┌┌─┐  ┌┬┐┌─┐┌┬┐┌─┐┬┬  ┌─┐ */
/* │ ││││├┤ │ ││   │││││││ ┬   ││├┤  │ ├─┤││  └─┐ */
/* └─┘┘└┘└  └─┘┴─┘─┴┘┴┘└┘└─┘  ─┴┘└─┘ ┴ ┴ ┴┴┴─┘└─┘ */
#benefits details {
  flex: 0 0 var(--block-width);
  aspect-ratio: var(--block-ratio);
  background-color: var(--secondary-background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

#benefits details summary {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-weight: lighter;
  line-height: 1.5em;
}

#benefits details summary img {
  height: 35px;
  width: auto;
}

#benefits details summary span {
  font-size: calc(1.35 * var(--default-font-size));
}


#benefits details > div {
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  border: none;
  padding: 0px 2em;
}

#benefits details[open].closing > div {
  padding: 0;
}

#benefits details > div nav span {
  font-size: 1.2em;
}

#benefits details > div ul {
  text-align: justify;
}

#benefits details:nth-child(n)[open] > div {
  left: 0;
}

#benefits details:nth-child(3n+1) > div, #benefits details.closing:nth-child(3n+1) > div {
  left: calc(100% / var(--nb-columns) * 0.5);
}

#benefits details:nth-child(3n+2) > div, #benefits details.closing:nth-child(3n+2) > div {
  left: calc(100% / var(--nb-columns) * 1.5);
}

#benefits details:nth-child(3n+3) > div, #benefits details.closing:nth-child(3n+3) > div {
  left: calc(100% / var(--nb-columns) * 2.5);
}

#benefits figure {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

#benefits blockquote {
  height: auto;
  flex-basis: 50%;
  text-align: end;
  font-size: 0.9em;
  font-style: italic;
}
#benefits blockquote:before {
  content: url("../img/icons/ui/quote.dd2f24796f39.svg");
  display: inline-block;
  width: .6em;
  height: .6em;
  vertical-align: super;
}

#benefits blockquote:after {
  content: url("../img/icons/ui/quote180.6d3967d93f87.svg");
  display: inline-block;
  width: .6em;
  height: .6em;
  vertical-align: sub;
}

#benefits figcaption {
  flex-basis: 40%;
}

#benefits figcaption span {
  font-weight: bold;
  font-size: 120%;
}


/*---------MOBILE---------*/
@media (max-width:800px) {
  #benefits {
    padding-bottom: 50px;
  }
  #benefits > div {
    --nb-columns: 2;
    --gap: 20px;
    --block-ratio: 1;
  }
  /* #benefits details summary { */
  /*   line-height: 1.3em; */
  /* } */
  #benefits details summary img {
    height: 25px;
    margin-bottom: .5em;
  }

  /* #benefits details > div strong { */
  /*   font-size: 0.8em; */
  /* } */
  /* #benefits p { */
  /*   margin-top: 20px; */
  /*   width: 250px; */
  /*   font-size: medium; */
  /*   text-align: center; */
  /* } */
  #benefits figure {
    flex-direction: column;
  }

  /* override */
  #benefits details:nth-child(2n+1) > div, #benefits details.closing:nth-child(2n+1) > div {
    left: calc(100% / var(--nb-columns) * 0.5);
  }
  
  #benefits details:nth-child(2n+2) > div, #benefits details.closing:nth-child(2n+2) > div {
    left: calc(100% / var(--nb-columns) * 1.5);
  }

}
