/* WE-ACTx Article Photo Grid — scoped so it works with any WordPress theme */
.weactx-pg-gallery {
    --weactx-pg-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--weactx-pg-cols), minmax(0,1fr));
    gap: clamp(12px, 1.65vw, 22px);
    margin: 28px 0 38px;
    align-items: start;
}
.weactx-pg-item { min-width: 0; margin: 0; padding: 0; }
.weactx-pg-link {
    display: flex; align-items: center; justify-content: center;
    position: relative; aspect-ratio: 4/3; overflow: hidden;
    border-radius: 13px; background: #eef2ed;
    border: 1px solid rgba(15,47,29,.06);
    transition: box-shadow .2s ease, transform .2s ease;
}
.weactx-pg-link:focus-visible { outline: 3px solid #08783e; outline-offset: 3px; }
@media (hover:hover) and (pointer:fine) {
    .weactx-pg-link:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(13,45,28,.13); }
}
.weactx-pg-image { display: block; width: 100% !important; height: 100% !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.weactx-pg-fit-contain .weactx-pg-image { object-fit: contain !important; }
.weactx-pg-fit-crop .weactx-pg-image { object-fit: cover !important; }
.weactx-pg-caption { padding: 10px 4px 0; margin: 0; text-align: center; color: #5f6e67; font: 500 13px/1.55 system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-wrap: anywhere; }
@media (max-width: 900px) { .weactx-pg-gallery { grid-template-columns: repeat(var(--weactx-pg-cols-tablet), minmax(0,1fr)); } }
@media (max-width: 540px) { .weactx-pg-gallery { grid-template-columns: minmax(0,1fr); gap: 20px; } }
/* Native <dialog> lightbox, enhanced when JS is enabled; image link still works without it. */
.weactx-pg-dialog { position: fixed; inset: 0; width: min(94vw, 1150px); max-width: 1150px; max-height: 94vh; margin: auto; border: 0; padding: 14px; background: #131b17; color: white; border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.weactx-pg-dialog::backdrop { background: rgba(3,12,7,.86); }
.weactx-pg-dialog-figure { margin: 0; }
.weactx-pg-dialog-image { display: block; max-width: 100%; max-height: calc(94vh - 100px); height: auto; width: auto; margin: 0 auto; object-fit: contain; }
.weactx-pg-dialog-caption { margin: 10px 42px 0 4px; color: #e7eee9; font: 500 14px/1.5 system-ui,sans-serif; }
.weactx-pg-dialog-close { position: absolute; z-index: 1; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #16351e; background: #fff; cursor: pointer; font-size: 24px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .weactx-pg-link { transition: none; } }
