.dfg {
  width: 100%;
  box-sizing: border-box;
}
.dfg * {
  box-sizing: border-box;
}
.dfg-filters {
  display: flex;
  justify-content: var(--dfg-align);
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 28px;
}
.dfg .dfg-filters button {
  appearance: none;
  border: 1px solid #ddd;
  border-radius: 0;
  background: var(--dfg-bg);
  color: var(--dfg-text);
  font: inherit;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: none;
  text-transform: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.dfg .dfg-filters button[aria-selected="true"],
.dfg .dfg-filters button:hover {
  background: var(--dfg-accent);
  border-color: var(--dfg-accent);
  color: #fff;
}
.dfg button:focus-visible,
.dfg a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.dfg-panel[hidden] {
  display: none !important;
}
.dfg-ready .dfg-panel:not([hidden]) {
  animation: dfg-in 0.25s ease-out;
}
.dfg-intro {
  text-align: center;
  margin: 0 auto 28px;
  max-width: 900px;
}
.dfg-intro h2,
.dfg-intro h3,
.dfg-intro h4 {
  margin: 0 0 14px;
}
.dfg-grid {
  display: grid;
 grid-template-columns: repeat(var(--dfg-cols), minmax(0, 1fr));
  gap: var(--dfg-gap);
/*
  display: flex;
  flex-wrap: wrap;*/
}
.dfg-image {
  display: block;
  overflow: hidden;
  border-radius: var(--dfg-radius);
  text-decoration: none;
  cursor: zoom-in;
/*
  flex: 1;
  min-width: 300px;
  max-width: 300px;*/
}
.dfg-grid .dfg-image {
  aspect-ratio: var(--dfg-ratio);
}
.dfg .dfg-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  transition: transform 0.25s;
}
.dfg-grid .dfg-image img {
  height: 100%;
  object-fit: cover;
}
.dfg-image:hover img {
  transform: scale(1.035);
}
.dfg-masonry {
  column-count: var(--dfg-cols);
  column-gap: var(--dfg-gap);
}
.dfg-masonry .dfg-image {
  break-inside: avoid;
  margin-bottom: var(--dfg-gap);
}
.dfg-lightbox:not([open]) {
  display: none;
}
.dfg-lightbox[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: rgba(0, 0, 0, 0.94);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 55px;
  z-index: 99999;
}
.dfg-lightbox::backdrop {
  background: #000;
}
.dfg-lightbox figure {
  margin: 0;
  text-align: center;
  max-width: 100%;
  max-height: 100%;
}
.dfg-lightbox figure img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
}
.dfg-lightbox figcaption {
  color: white;
  margin-top: 12px;
}
.dfg .dfg-lightbox button {
  position: absolute;
  background: transparent;
  color: white;
  border: 0;
  font-size: 42px;
  padding: 8px;
  cursor: pointer;
  line-height: 1;
  box-shadow: none;
}
.dfg-close {
  top: 10px;
  right: 15px;
}
.dfg-prev {
  left: 8px;
}
.dfg-next {
  right: 8px;
}
@keyframes dfg-in {
  from {
    opacity: 0.25;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 800px) {
  .dfg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dfg-masonry {
    column-count: 2;
  }
}
@media (max-width: 480px) {
  .dfg-grid {
    grid-template-columns: 1fr;
  }
  .dfg-masonry {
    column-count: 1;
  }
  .dfg .dfg-filters button {
    padding: 8px 12px;
  }
  .dfg-lightbox[open] {
    padding: 45px 35px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dfg * {
    animation: none !important;
    transition: none !important;
  }
}
.dfg:not(.dfg-ready) .dfg-panel {
  margin-bottom: 28px;
}
.dfg [hidden] {
  display: none !important;
}
.dfg[style*="--dfg-ratio:auto"] .dfg-grid .dfg-image img {
  height: auto;
  object-fit: contain;
}
