/**
 * @file
 * Enhanced Image alignment and theming presets.
 *
 * Note: All whitespace is set to 1em to facilitate
 * easy overriding via the theme.
 */

/**
 * Specify a consistent default figure & caption
 * style to apply to both frontend and backend.
 */
figure {
  text-align: inherit;
  border: 0;
  border-radius: 0;
  background: #efefef;
  background: rgba(0, 0, 0, 0.05);
  padding: 0;
  margin: 0 0 1em;
  display: inline-block;
  max-width: 100%;
}
figure > figcaption {
  text-align: inherit;
  display: block; /* For IE8 */
  margin: 0;
  padding: .3em 1em .6em;
}
figure img {
  margin: 0 auto;
  padding: 0;
  display: block;
}
/**
 * Enhanced Image adds line breaks around
 * the figcaption that may be converted to
 * <br> tags on the frontend in some cases
 * via the Drupal input format filtering
 * process. Thus we hide the extra br tags
 * with this CSS hack.
 */
figure > br {
  display: none;
}

/* Left and right aligned images. */
.align-left,
.align-right {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
.align-left {
  float: left;
  margin-right: 1em;
}
.align-right {
  float: right;
  margin-left: 1em;
}
/* A wrapper tag is used to center images. */
.align-center {
  text-align: center;
}
/**
 * Override block display of centered figure elements
 * made by some overzealous Normalize.css scripts.
 */
.align-center figure {
  display: inline-block;
}
/* Reset text alignment in center-aligned images with captions. */
.align-center figcaption {
  text-align: left; /* LTR */
}

/* Add whitespace below aligned images */
.align-left,
.align-right,
.align-center {
  margin-bottom: 1em;
}
/* Kill default whitespace on figure tag when configured with alignment. */
.align-left figure,
.align-right figure,
.align-center figure {
  margin-bottom: 0;
}

/* Placing 3 image in single row*/
.row-col3-img,
.row-col2-img {
  display: flex;
  flex-wrap: wrap;
  flex-flow: row;
  text-align: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.row-col3-img img {
  margin: 10px;
  width: auto !important;
  max-width: calc(100% / 3);
}
.row-col2-img img {
  margin: 10px;
  width: 100%;
  max-width: 50%;
}
@media (max-width: 480px){
  .row-col3-img,
  .row-col2-img {
    flex-flow: column;
  }
}

/*added custom class for text alignment*/
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.text-justify {
  text-align: justify;
}
