.e2-notes-gallery {
  display: grid;
  grid-gap: 0 20px;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
}

.e2-notes-gallery-2-rows {
  grid-template-rows: max-content;
}

.e2-notes-gallery-3-rows {
  grid-template-rows: max-content max-content;
}

.e2-notes-gallery-area {
  height: 100%;
}

.e2-notes-gallery-area-vrule {
  border-right: 1px var(--thinRuleColor) solid
}

.e2-notes-gallery-area-hrule {
  border-bottom: 1px var(--thinRuleColor) solid;
}

.e2-notes-gallery-item {
  margin-bottom: 24px;
}
.e2-notes-gallery-image {
  display: block;
  padding-bottom: 8px;
  margin: 0;
}
.e2-notes-gallery-image img {
  display: block;
  width: auto;
  height: auto;
}
.e2-notes-gallery-cover {
  width: 100%;
  height: 0;
  position: relative;
}
.e2-notes-gallery-cover img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.e2-notes-gallery-item-sided-l,
.e2-notes-gallery-item-sided-r {
  display: grid;
  grid-gap: 24px 20px;
  grid-template-columns: repeat(3, 1fr);
}

.e2-notes-gallery-item-sided-l .e2-notes-gallery-image {
  grid-area: 1/1;
}

.e2-notes-gallery-item-sided-l .e2-notes-gallery-text {
  grid-area: 1/2/1/4;
}

.e2-notes-gallery-item-sided-r .e2-notes-gallery-image {
  grid-area: 1/3;
}

.e2-notes-gallery-item-sided-r .e2-notes-gallery-text {
  grid-area: 1/1/1/3;
}

.e2-notes-gallery-item-sided-r  .e2-notes-gallery-image {
  padding-left: 20px;
  padding-right: 0;
}

.e2-notes-gallery-area-vrule .e2-notes-gallery-item-sided-r .e2-notes-gallery-image {
  padding-left: 0;
  padding-right: 20px;
}

.e2-notes-gallery-thumb img {
  max-width: 90px;
  max-height: 60px;
}
.e2-notes-gallery-text {
  word-break: break-word;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-right: 20px;
}
.e2-notes-gallery-item-title {
  color: var(--headingsColor); // for text-overflow: ellipsis dots color
  margin: 0 0 6px 0;
}
.e2-notes-gallery-item-title-large {
  font-weight: bold;
  font-size: var(--subHeadingFontSize);
  line-height: var(--subHeadingLineHeight);
}
.e2-notes-gallery-item-title-jumbo {
  font-weight: normal;
  font-size: 82px;
  line-height: 78px;
  margin: -8px 0 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 12px;
}
.e2-notes-gallery-item-title a {
  padding-top: .4em;
}
.e2-notes-gallery-item-title a,
.e2-notes-gallery-item-title a:visited {
  color: var(--headingsColor);
  border-color: var(--headingsUnderlineColor);
}
.e2-notes-gallery-item-title a:hover,
.e2-notes-gallery-item-title a.hover {
  color: var(--hoverColor);
  border-color: var(--hoverUnderlineColor);
}

.e2-notes-gallery-item-title+.e2-notes-gallery-item-summary {
  margin: -2px 0 6px 0;
}
.e2-notes-gallery-item-summary {
  margin: 0 0 6px 0;
}
.e2-notes-gallery-item-meta {
  margin: 0 0 6px 0;
  font-size: var(--smallFontSize);
  line-height: var(--smallLineHeight);
  font-family: var(--smallFontFamily);
}

@media #{$AreGalleriesVertical} {
  .e2-notes-gallery {
    display: block;
  }
  .e2-notes-gallery-item {
    margin-bottom: 18px;
  }
  .e2-notes-gallery-area {
    height: auto;
    margin-bottom: 24px;
    margin-bottom: 0;
  }
  .e2-notes-gallery-item-title-jumbo {
    font-weight: normal;
    font-size: 52px;
    line-height: 52px;
    padding-bottom: 8px;
  }

  .e2-notes-gallery-area-vrule {
    border-right: none;
  }

  .e2-notes-gallery-area-vrule .e2-notes-gallery-item-sided-r .e2-notes-gallery-image {
    padding-left: 20px;
    padding-right: 0;
  }

  .e2-notes-gallery-image {
    max-width: 90px;
  }

  .e2-notes-gallery-text {
    max-width: 75%;
  }

  .e2-notes-gallery-item-with-large-title .e2-notes-gallery-image {
    max-width: 270px;
  }

  .e2-notes-gallery-item-with-large-title .e2-notes-gallery-text {
    max-width: initial;
  }

}