/* Local copy of Quarto's trestles layout so its breakpoint and sizing are yours. */
:root {
  --trestles-new-left-max: 320px;
  --trestles-new-image-max: 160px;
}

div.trestles-new {
  display: flex;
  flex-direction: row;
  padding-top: 3em;
  padding-bottom: 1em;
}

div.trestles-new .about-entity {
  flex: 0 0 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: 1em;
  width: 100%;
  max-width: var(--trestles-new-left-max);
}

div.trestles-new .about-entity > p:first-child {
  margin-bottom: 0;
}

div.trestles-new .about-entity .level1 {
  margin-top: 0;
}

div.trestles-new .about-image {
  object-fit: cover;
  margin-bottom: 1.2em;
  width: 100%;
  max-width: var(--trestles-new-image-max);
}

div.trestles-new .about-entity h1 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

div.trestles-new .about-entity .level1 > p {
  margin-bottom: 0.7rem;
}

div.trestles-new .about-links {
  width: 100%;
}

div.trestles-new .about-links p {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 5px;
  row-gap: 5px;
  margin: 0;
}

div.trestles-new .about-link {
  color: color-mix(in srgb, var(--bs-body-color) 80%, white);
  text-decoration: none;
  border: solid 1px;
  font-size: 0.8em;
  padding: 0.25em 0.5em;
  border-radius: 4px;
}

div.trestles-new .about-link:hover {
  color: var(--bs-link-color);
}

div.trestles-new .about-link-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

div.trestles-new .about-link i.bi {
  margin-right: 0.15em;
}

div.trestles-new .about-contents {
  flex-basis: 0;
  flex-grow: 1;
}

div.trestles-new .about-contents h2 {
  border-bottom: none;
}

div.trestles-new .about-contents {
  border-left: solid 1px var(--bs-border-color);
  padding-left: 1.5em;
}

/* Change this breakpoint if you want the stacked layout to start later or earlier. */
@media (max-width: 600px) {
  div.trestles-new {
    flex-direction: column;
    padding-top: 0;
  }

  div.trestles-new .about-entity {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
  }

  div.trestles-new .about-links {
    justify-content: center;
    width: 100%;
    padding-bottom: 1.5em;
  }

  div.trestles-new .about-link {
    font-size: 0.9em;
    padding: 0.28em 0.6em;
    border-radius: 6px;
  }

  div.trestles-new .about-contents {
    border-left: none;
    padding-left: 0;
  }
}
