:root{
  --mzgm-blue:#1e3a78;
  --mzgm-blue-dark:#10254f;
  --mzgm-silver:#b9bdc3;
  --mzgm-border:#d9e1ec;
  --mzgm-muted:#5a6678;
}
.mzgm-gallery-wrap{width:100%;}
.mzgm-filter-panel{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff,#f7f9fc);border:1px solid var(--mzgm-border);border-radius:18px;padding:24px;margin:0 0 28px;box-shadow:0 12px 34px rgba(16,42,82,.08)}
.mzgm-filter-panel:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,var(--mzgm-blue),#355ba2,var(--mzgm-silver))}
.mzgm-filter-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}
.mzgm-filter-heading p{margin:0;color:var(--mzgm-blue);font-weight:800;text-transform:uppercase;letter-spacing:.12em;font-size:12px}
.mzgm-filter-heading h3{margin:0;color:var(--mzgm-blue-dark);font-size:26px;line-height:1.15;font-weight:800}
.mzgm-gallery-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.mzgm-filter{appearance:none;border:1px solid #cfd8e6;background:#fff;color:var(--mzgm-blue-dark);border-radius:13px;min-height:54px;padding:12px 14px;font-weight:800;font-size:14px;line-height:1.2;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;box-shadow:0 2px 8px rgba(0,0,0,.03);transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease,background .22s ease,color .22s ease}
.mzgm-filter span{min-width:30px;height:28px;border-radius:999px;background:#eef2f8;color:#55647a;font-size:13px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px}
.mzgm-filter:hover,.mzgm-filter:focus{border-color:var(--mzgm-blue);box-shadow:0 8px 18px rgba(30,58,120,.13);transform:translateY(-1px);outline:none}
.mzgm-filter.is-active{background:linear-gradient(135deg,var(--mzgm-blue),#315899);border-color:var(--mzgm-blue);color:#fff;box-shadow:0 10px 24px rgba(30,58,120,.24)}
.mzgm-filter.is-active span{background:rgba(255,255,255,.2);color:#fff}
.mzgm-gallery-grid{display:grid;grid-template-columns:repeat(var(--mzgm-columns,3),minmax(0,1fr));gap:24px}
.mzgm-gallery-item{display:block;position:relative;overflow:hidden;border-radius:18px;background:#fff;text-decoration:none!important;border:1px solid rgba(217,225,236,.9);box-shadow:0 12px 32px rgba(15,32,63,.08);transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;color:inherit}
.mzgm-gallery-item:hover,.mzgm-gallery-item:focus{transform:translateY(-4px);box-shadow:0 18px 44px rgba(15,32,63,.16);border-color:rgba(30,58,120,.28);outline:none}
.mzgm-image-frame{display:block;aspect-ratio:4/3;background:#eef2f8;overflow:hidden}
.mzgm-image-frame img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease,filter .35s ease}
.mzgm-gallery-item:hover img{transform:scale(1.055);filter:saturate(1.04)}
.mzgm-gallery-caption{display:block;padding:16px 18px 18px;background:linear-gradient(180deg,#fff,#f9fbff)}
.mzgm-gallery-caption strong{display:block;color:var(--mzgm-blue-dark);font-size:16px;line-height:1.3;font-weight:800;margin:0 0 6px}
.mzgm-gallery-caption em{display:inline-flex;align-items:center;border-radius:999px;background:#eef2f8;color:#53637c;font-size:12px;font-style:normal;font-weight:700;padding:5px 10px}
.mzgm-gallery-item.is-hidden{display:none!important}
.mzgm-empty{padding:18px;border:1px solid #e3e8f2;background:#fff;border-radius:12px;color:#4f5c72}
.mzgm-lightbox{position:fixed;inset:0;z-index:999999;background:rgba(5,13,30,.86);display:flex;align-items:center;justify-content:center;padding:28px;opacity:0;pointer-events:none;transition:opacity .2s ease}
.mzgm-lightbox.is-open{opacity:1;pointer-events:auto}
.mzgm-lightbox-inner{max-width:min(1100px,92vw);max-height:90vh;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 28px 80px rgba(0,0,0,.36);position:relative}
.mzgm-lightbox img{display:block;max-width:100%;max-height:78vh;object-fit:contain;background:#0b1730}
.mzgm-lightbox-caption{display:block;padding:13px 18px;color:#142c5c;font-weight:800;background:#fff}
.mzgm-lightbox-close{position:absolute;top:10px;right:10px;width:42px;height:42px;border-radius:999px;border:0;background:rgba(255,255,255,.94);color:#10254f;font-size:28px;line-height:1;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.2)}
@media (max-width:1024px){.mzgm-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mzgm-gallery-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.mzgm-filter-panel{padding:20px 16px}.mzgm-filter-heading{display:block}.mzgm-filter-heading h3{font-size:22px;margin-top:4px}.mzgm-gallery-filters{grid-template-columns:1fr}.mzgm-gallery-grid{grid-template-columns:1fr;gap:18px}}

/* v1.0.1 Compatibility fix: override legacy theme gallery span/img rules.
   The Machinezone clone theme has generic .mz-gallery-item span positioning for
   the old hardcoded gallery. This standalone plugin intentionally reuses the
   legacy wrapper class for backwards compatibility, so these rules must reset
   the legacy span styles inside the new managed gallery. */
.mzgm-gallery-wrap .mzgm-gallery-item,
.mzgm-gallery-wrap .mz-gallery-item.mzgm-gallery-item{
  display:block !important;
  min-height:0 !important;
  padding:0 !important;
  line-height:1.45 !important;
}
.mzgm-gallery-wrap .mzgm-gallery-item .mzgm-image-frame,
.mzgm-gallery-wrap .mz-gallery-item.mzgm-gallery-item .mzgm-image-frame{
  position:relative !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  display:block !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  background:#eef2f8 !important;
  color:inherit !important;
  overflow:hidden !important;
  aspect-ratio:4/3 !important;
}
.mzgm-gallery-wrap .mzgm-gallery-item .mzgm-image-frame img,
.mzgm-gallery-wrap .mz-gallery-item.mzgm-gallery-item .mzgm-image-frame img{
  position:relative !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  padding:0 !important;
  margin:0 !important;
  opacity:1 !important;
  visibility:visible !important;
}
.mzgm-gallery-wrap .mzgm-gallery-item .mzgm-gallery-caption,
.mzgm-gallery-wrap .mz-gallery-item.mzgm-gallery-item .mzgm-gallery-caption{
  position:static !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  display:block !important;
  padding:16px 18px 18px !important;
  margin:0 !important;
  background:linear-gradient(180deg,#fff,#f9fbff) !important;
  color:inherit !important;
  min-height:0 !important;
}
.mzgm-gallery-wrap .mzgm-gallery-item .mzgm-gallery-caption strong,
.mzgm-gallery-wrap .mz-gallery-item.mzgm-gallery-item .mzgm-gallery-caption strong{
  position:static !important;
  display:block !important;
  color:var(--mzgm-blue-dark) !important;
  padding:0 !important;
  margin:0 0 6px !important;
  background:transparent !important;
}
.mzgm-gallery-wrap .mzgm-gallery-item .mzgm-gallery-caption em,
.mzgm-gallery-wrap .mz-gallery-item.mzgm-gallery-item .mzgm-gallery-caption em{
  position:static !important;
  display:inline-flex !important;
  padding:5px 10px !important;
  margin:0 !important;
  background:#eef2f8 !important;
  color:#53637c !important;
}
