/**
 * Gallery & Modula Styles
 * Loaded on: is_page('gallery'), pages with Modula galleries
 *
 * @package MCJ Child Theme
 * @version 1.0.0
 */

/* 3 Image Grid */
.img-grid .et_pb_column.et_pb_column_single,
.et-db #et-boc .et-l .img-grid .et_pb_column.et_pb_column_single {
     width: 32%;
     margin: 0;
}

.img-grid .et_pb_column.et_pb_specialty_column,
.et-db #et-boc .et-l .img-grid .et_pb_column.et_pb_specialty_column {
     width: 75%;
     margin: 0 0 0 -10%;
}

.img-grid .et_pb_column:first-child {
     padding-right: 4%;
}

.img-grid .et_pb_column.et_pb_column_single .img-grid {
     margin-top: 0;
}

.img-grid.dark-bg .et_pb_column:first-child {
     position: relative;
     z-index: 1;
}

@media (max-width: 980px) {
     .img-grid,
     .et-db #et-boc .et-l .img-grid {
          flex-direction: row !important;
     }

     .img-grid-heading .et_pb_row,
     .img-grid-heading h2,
     .et-db #et-boc .et-l .img-grid-heading .et_pb_row,
     .et-db #et-boc .et-l .img-grid-heading h2 {
          text-align: center !important;
     }

     .img-grid-btn .et_pb_button,
     .et-db #et-boc .et-l .img-grid-btn .et_pb_button {
          margin: 0 auto !important;
     }

     .img-grid .et_pb_row.et_pb_gutters2,
     .et-db #et-boc .et-l .img-grid .et_pb_row.et_pb_gutters2 {
          gap: 10px;
          justify-content: center;
          flex-wrap: wrap;
     }
}

@media (max-width: 767px) {
     .img-grid,
     .et-db #et-boc .et-l .img-grid {
          flex-direction: column !important;
     }

     .img-grid .et_pb_column.et_pb_column_single,
     .et-db #et-boc .et-l .img-grid .et_pb_column.et_pb_column_single {
          width: 100%;
          margin-bottom: 15px;
     }

     .img-grid .et_pb_column.et_pb_specialty_column,
     .et-db #et-boc .et-l .img-grid .et_pb_column.et_pb_specialty_column {
          width: 100%;
          margin: 0;
     }

     .img-grid .et_pb_image {
          margin-bottom: 0;
     }

     .img-grid .et_pb_column .et_pb_divider {
          display: none;
     }
}

/* Modula Gallery */
.modula-items .modula-item .jtg-title {
     display: none;
}

.modula-gallery .modula-item:hover .jtg-title {
     display: block;
     transition: ease-in-out .1s;
}

.modula-items .modula-item .figc,
.modula-item .jtg-title,
.modula-item .description {
     text-align: center;
}

.modula-items .description {
     text-wrap: balance;
}

.modula-items .modula-item:hover .figc {
     transition: ease-in-out .1s;
}

.modula-items .modula-item:nth-child(odd):hover .figc {
     background: #ecf5e0e8;
}

.modula-items .modula-item:nth-child(even):hover .figc {
     background: #fffde9e3;
}

.modula .modula-item.effect-pufrobo:hover .jtg-title::after {
     display: none;
}

@media screen and (max-width: 900px) {
     html body .modula .modula-item.effect-pufrobo p.description {
          opacity: 1 !important;
     }
}

.modula-caption,
.modula-fancybox-caption__body {
     background-color: rgba(0, 255, 255, 0.8);
     color: white;
     padding: 5px;
     position: absolute;
     bottom: 0;
     width: 100%;
     text-align: center;
}

@media (max-width: 991px) {
     .modula-item .figc {
          background: #fff;
          background: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 30%, rgba(243, 190, 24, 0) 50%);
          visibility: visible;
          content: '';
          z-index: 1;
          width: 100%;
          height: 100%;
          display: block;
          position: absolute;
     }

     .modula-item .figc .description {
          line-height: 1.1em !important;
          margin-bottom: 5px;
     }

     .modula-best-grid-gallery .is-compact .fancybox__footer .fancybox__caption {
          text-align: center;
     }
}
