/* ===== Gallery ===== */
.eacfmgv12{
  --eacf-cols-d: 4;
  --eacf-cols-t: 2;
  --eacf-cols-m: 1;
  --eacf-gap: 10px;
  --eacf-radius: 0px;
  --eacf-fit: cover;
  --eacf-img-ratio: auto;
  --eacf-vid-ratio: auto;
}

/* GRID */
.eacfmgv12.eacfmgv12--grid{
  display:grid;
  grid-template-columns: repeat(var(--eacf-cols-d), minmax(0, 1fr));
  column-gap: var(--eacf-gap);
  row-gap: var(--eacf-gap);
  align-items:start;
  justify-content:start;
}
@media (max-width:1024px){
  .eacfmgv12.eacfmgv12--grid{
    grid-template-columns: repeat(var(--eacf-cols-t), minmax(0, 1fr));
  }
}
@media (max-width:767px){
  .eacfmgv12.eacfmgv12--grid{
    grid-template-columns: repeat(var(--eacf-cols-m), minmax(0, 1fr));
  }
}

/* MASONRY (CSS columns) */
.eacfmgv12.eacfmgv12--masonry{
  column-count: var(--eacf-cols-d);
  column-gap: var(--eacf-gap);
}
@media (max-width:1024px){
  .eacfmgv12.eacfmgv12--masonry{ column-count: var(--eacf-cols-t); }
}
@media (max-width:767px){
  .eacfmgv12.eacfmgv12--masonry{ column-count: var(--eacf-cols-m); }
}

.eacfmgv12 figure{
  margin:0;
  align-self:start;
}
.eacfmgv12--masonry figure{
  break-inside: avoid;
  margin: 0 0 var(--eacf-gap) 0 !important;
  display:block;
  width:100%;
}

.eacfmgv12 img,
.eacfmgv12 video{
  width:100%;
  display:block;
}

.eacfmgv12 .wp-video,
.eacfmgv12 .mejs-container{
  margin:0 !important;
  padding:0 !important;
  line-height:0;
  max-width:100% !important;
}

.eacfmgv12.eacfmgv12--radius img,
.eacfmgv12.eacfmgv12--radius video,
.eacfmgv12.eacfmgv12--radius .wp-video,
.eacfmgv12.eacfmgv12--radius .mejs-container{
  border-radius: var(--eacf-radius);
  overflow:hidden;
}

.eacfmgv12.eacfmgv12--img-ratio img{
  aspect-ratio: var(--eacf-img-ratio);
  object-fit: var(--eacf-fit);
}
.eacfmgv12.eacfmgv12--vid-ratio video{
  aspect-ratio: var(--eacf-vid-ratio);
  object-fit: var(--eacf-fit);
}
.eacfmgv12.eacfmgv12--vid-ratio .wp-video,
.eacfmgv12.eacfmgv12--vid-ratio .mejs-container{
  aspect-ratio: var(--eacf-vid-ratio);
}

.eacfmgv12.eacfmgv12--hide-vol .mejs-volume-button,
.eacfmgv12.eacfmgv12--hide-vol .mejs-horizontal-volume-total,
.eacfmgv12.eacfmgv12--hide-vol .mejs-horizontal-volume-current,
.eacfmgv12.eacfmgv12--hide-vol .mejs-horizontal-volume-slider{
  display:none !important;
}

/* ===== Loader ===== */
.eacfmgv12-loader{
  width:100%;
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  padding: 18px 0;
}
.eacfmgv12-loader[aria-hidden="true"]{
  display:none !important;
}
.eacfmgv12-spinner{
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: eacfmgv12spin 0.8s linear infinite;
}
@keyframes eacfmgv12spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
.eacfmgv12-loader-text{
  line-height:1.2;
}
