/* 7.6. Koenig Styles
/* ---------------------------------------------------------- */

.kg-image {
  max-width: 100%;
  margin: auto;
  height: auto;
}

figure.kg-card.kg-image-card {
  display: grid;
  justify-content: center;
  margin-bottom: 2.5rem;
}

figure.kg-card.kg-image-card.kg-width-wide {
  display: grid;
  justify-content: center;
  margin-bottom: 2.5rem;
}

figure.kg-card.kg-image-card.kg-width-full {
  display: grid;
  justify-content: center;
  margin-bottom: 2.5rem;
}

/* Preventing full-width image overlap with post image.  */
.kg-content *:first-child .kg-image {
  width: 100%;
}

.kg-width-wide .kg-image {
  min-width: 40vw;
}

.kg-width-full .kg-image {
  min-width: 60vw;
}

.kg-width-full figcaption {
  padding: 8px;
}

.kg-embed-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100%;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  max-width: 1040px;
  width: 100%;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.kg-gallery-image img {
  display: block;
  margin: 0;
  width: 100%;
  height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
  margin: 0.75em 0 0 0;
}

.kg-gallery-image:not(:first-of-type) {
  margin: 0 0 0 0.75em;
}

.kg-gallery-card+.kg-image-card.kg-width-wide,
.kg-gallery-card+.kg-gallery-card,
.kg-image-card.kg-width-wide+.kg-gallery-card,
.kg-image-card.kg-width-wide+.kg-image-card.kg-width-wide {
  margin: -2.25em 0 3em;
  text-align: center;
}

/* Used in ai-economist */
.kg-img-row-standard {
  display: flex;
  justify-content: center;
}

.kg-img-column-standard {
  flex: 33.33%;
  padding: 0px 5px 0px 5px;
}

/* Add bookmark css to compatible with Ghost 4.0 */
.kg-bookmark-card {
  width: 100%;
  margin: 0 0 2em;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  min-height: 10em;
  overflow: hidden;
}

.kg-bookmark-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: flex-start;
  justify-content: start;
  padding: 1.5em;
}

.kg-bookmark-title {
  font-size: 0.75em;
  line-height: 2em;
  font-weight: 700;
}

.kg-bookmark-description {
  display: -webkit-box;
  font-size: 0.75em;
  line-height: 1.66666em;
  font-weight: 400;
  margin: 0.5em 0 1em;
  max-height: 3.33333em;
  overflow-y: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.kg-bookmark-thumbnail {
  position: relative;
  min-width: 33%;
  max-height: 100%;
}

.kg-bookmark-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  font-size: 0.75em;
  line-height: 1.66666em;
  font-weight: 400;
  margin-top: 1em;
  flex-wrap: wrap;
}

.kg-bookmark-icon {
  width: 1.33333em;
  height: 1.33333em;
  margin: 0 0.75em 0 0;
}

.kg-bookmark-author:after {
  content: "•";
  margin: 0 0.33333em;
}

.kg-bookmark-publisher {
  font-weight: normal;
}

@media only screen and (max-width: 600px) {
  .kg-bookmark-container {
    flex-direction: column;
  }

  .kg-bookmark-thumbnail {
    order: 1;
    width: 100%;
    min-height: 160px;
  }

  .kg-bookmark-thumbnail img {
    border-radius: 3px 3px 0 0;
  }

  .kg-bookmark-content {
    order: 2
  }
}

/* Used in ai-economist */
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .kg-image-standard {
    height: auto;
    margin: auto;
    width: 100%;
  }

  .kg-image-three-rows {
    height: auto;
    margin: auto;
    width: 100%;
  }

  .kg-gif-standard {
    height: auto;
    margin: auto;
    width: 100%;
  }

}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  .kg-image-standard {
    height: auto;
    margin: auto;
    width: 100%;
  }

  .kg-image-three-rows {
    height: auto;
    margin: auto;
    width: 100%;
  }

  .kg-gif-standard {
    height: auto;
    margin: auto;
    width: 100%;
  }

}

/* Large devices (laptops/desktops, 1000px and up) */
@media only screen and (min-width: 1000px) {
  .kg-image-standard {
    height: 260px;
    width: auto;
  }

  .kg-image-three-rows {
    height: 610px;
    width: auto;
  }

  .kg-gif-standard {
    height: 158px;
    width: auto;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  .kg-image-standard {
    height: 310px;
    margin: auto;
    width: auto;
  }

  .kg-image-three-rows {
    height: 660px;
    margin: auto;
    width: auto;
  }

  .kg-gif-standard {
    height: 190px;
    width: auto;
  }

  .kg-width-full .kg-image {
    height: auto;
    width: 90vw;
  }
}

@media only screen and (min-width: 1400px) {
  .kg-image-standard {
    height: 360px;
    width: auto;
  }

  .kg-image-three-rows {
    height: 710px;
    margin: auto;
    width: auto;
  }

  .kg-gif-standard {
    height: 220px;
    width: auto;
  }
}