/* Rotary Members Directory */
.rotary-members-grid{
  display:grid;
  grid-template-columns:repeat(var(--rotary-member-cols, 4), 1fr);
  gap:28px;
  margin:32px 0;
}
.rotary-member-card{
  background:none; border:0; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:12px; border-radius:var(--rotary-radius);
  transition:background .15s ease;
  font-family:inherit;
}
.rotary-member-card:hover{ background:var(--rotary-bg-alt); }
.rotary-member-photo{
  width:120px; height:120px; border-radius:50%;
  overflow:hidden; display:block; background:var(--rotary-bg-alt);
  border:3px solid var(--rotary-border);
}
.rotary-member-photo img{ width:100%; height:100%; object-fit:cover; }
.rotary-member-name{ font-weight:600; color:var(--rotary-text); text-align:center; }

@media (max-width:900px){
  .rotary-members-grid{ grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:480px){
  .rotary-members-grid{ grid-template-columns:1fr 1fr; gap:16px; }
  .rotary-member-photo{ width:88px; height:88px; }
}

/* Shared modal system (also used by members).
   IMPORTANT: display:flex is scoped to :not([hidden]) — without this, the
   "hidden" attribute set by JS doesn't actually hide the overlay (an
   author stylesheet's display:flex overrides the browser's built-in
   [hidden]{display:none} rule), leaving an invisible, full-screen,
   click-blocking layer sitting on top of the ENTIRE site at all times —
   which is what broke every link/button on every page, not just Members. */
.rotary-modal-overlay{
  position:fixed; inset:0; z-index:9999;
  background:rgba(10,12,20,.6);
  align-items:center; justify-content:center;
  padding:20px;
  opacity:0; transition:opacity .2s ease;
}
.rotary-modal-overlay:not([hidden]){ display:flex; }
.rotary-modal-overlay[hidden]{ display:none; pointer-events:none; }
.rotary-modal-overlay.is-open{ opacity:1; }
.rotary-modal-box{
  background:var(--rotary-bg);
  border-radius:var(--rotary-radius);
  max-width:560px; width:100%;
  max-height:85vh; overflow-y:auto;
  padding:32px;
  position:relative;
  transform:translateY(12px);
  transition:transform .2s ease;
}
.rotary-modal-overlay.is-open .rotary-modal-box{ transform:translateY(0); }
.rotary-modal-close{
  position:absolute; top:14px; right:14px;
  width:34px; height:34px; border-radius:50%; border:0;
  background:var(--rotary-bg-alt); font-size:20px; line-height:1; cursor:pointer;
}
.rotary-member-modal-photo{ width:110px; height:110px; border-radius:50%; overflow:hidden; margin:0 auto 16px; }
.rotary-member-modal-photo img{ width:100%; height:100%; object-fit:cover; }
.rotary-member-modal-inner h3{ text-align:center; margin-bottom:4px; }
.rotary-member-office{ text-align:center; color:var(--rotary-primary); font-weight:600; margin:0 0 2px; }
.rotary-member-profession{ text-align:center; color:var(--rotary-text-light); margin:0 0 16px; }
.rotary-member-description{ margin-bottom:16px; }
.rotary-member-contact{ list-style:none; padding:0; margin:0 0 12px; display:flex; flex-direction:column; gap:6px; text-align:center; }
.rotary-member-years{ text-align:center; font-size:13px; color:var(--rotary-text-light); }
