/* filter */
.mdc-filter-form { display:flex; gap:8px; margin-bottom:12px; align-items:center; }
#mdc_search_input { flex:1; padding:8px; border:1px solid #ccc; border-radius:4px; }
#mdc_search_btn, #mdc_reset_btn { padding:8px 12px; border:1px solid #ccc; border-radius:4px; background:#fff; cursor:pointer; }

/* grid */
.member-directory-list { display:flex; flex-wrap:wrap; gap:20px; }
.mdc-member-card { width:calc(33.33% - 13.33px); box-sizing:border-box; border:1px solid #eee; padding:14px; border-radius:8px; background:#fff; cursor:pointer; text-align:center; transition:box-shadow .2s; }
.mdc-member-card:hover { box-shadow:0 8px 24px rgba(0,0,0,.08); transform:translateY(-4px); }
.mdc-thumb img { max-width:100%; height:auto; border-radius:6px; margin-bottom:10px; display:block; margin-left:auto; margin-right:auto; }
.mdc-title { margin:6px 0 10px; font-size:1.1em; font-weight:600; }

/* icons & text */
.mdc-icon-links { display:flex; gap:8px; justify-content:center; margin-bottom:8px; }
.mdc-icon-link { width:36px; height:36px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:#f7f7f7; color:#333; text-decoration:none; transition:all .15s; }
.mdc-icon-link:hover { background:#0073aa; color:#fff; transform:scale(1.05); }
.mdc-text-fields { margin-bottom:8px; text-align:left; }
.mdc-text-item { margin-bottom:6px; font-size:0.95em; color:#333; display:flex; gap:8px; align-items:center; }
.mdc-text-item i { color:#0073aa; }

/* excerpt */
.mdc-excerpt { color:#555; font-size:0.9em; }

/* modal overlay */
#mdc-member-modal { position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:99999; display:none; align-items:center; justify-content:center; padding:20px; }
#mdc-member-modal.show { display:flex; }

/* modal content */
#mdc-member-modal .mdc-modal-content { background:#fff; border-radius:12px; padding:24px; width:100%; max-width:720px; box-shadow:0 10px 40px rgba(0,0,0,.2); max-height:90vh; overflow-y:auto; position:relative; }
#mdc-member-modal .mdc-close { position:absolute; top:10px; right:14px; font-size:22px; cursor:pointer; color:#333; background:none; border:none; }

/* popup layout */
.mdc-popup-card { background:#f6f0e8; border-radius:10px; padding:18px; box-shadow:none; }
.mdc-popup-header { display:flex; gap:18px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.mdc-popup-photo img { width:120px; height:120px; border-radius:8px; object-fit:cover; }
.mdc-popup-info { flex:1; }
.mdc-popup-name { margin:0 0 6px; color:#7a0c0c; font-size:1.4em; }
.mdc-popup-phone a { color:#000; text-decoration:none; font-weight:600; display:inline-block; margin-bottom:6px; }
.mdc-popup-text { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; margin-bottom:12px; }
.mdc-popup-item { font-size:0.95em; color:#333; }
.mdc-popup-item i { margin-right:8px; color:#0073aa; }
.mdc-popup-icons { display:flex; justify-content:center; gap:10px; margin:12px 0; }
.mdc-popup-icons a { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#f4f4f4; color:#333; text-decoration:none; }
.mdc-popup-icons a:hover { background:#0073aa; color:#fff; }

/* responsive */
@media (max-width:768px) {
  .mdc-member-card { width:calc(50% - 10px); }
  .mdc-popup-text { grid-template-columns:1fr; }
}
@media (max-width:500px) {
  .mdc-member-card { width:100%; }
}


/* === Modal Overlay (Perfect Centered) === */
/* Modal wrapper */
#mdc-member-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

/* Center the modal box */
.mdc-modal-content {
    position: relative;
    max-width: 600px;
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Fade animation */
#mdc-member-modal.show .mdc-modal-content {
    opacity: 1;
    transform: translateY(0);
}

#mdc-member-modal .mdc-modal-content {
    opacity: 0;
    transform: translateY(-20px);
}


.mdc-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #444;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Optional fade-out animation */
.mdc-fade-out {
  animation: fadeOutScale 0.3s ease forwards;
}

@keyframes fadeOutScale {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}


/* === Smooth Popup Animation === */
#mdc-member-modal.show .mdc-modal-content {
  animation: fadeZoomIn 0.25s ease forwards;
}
#mdc-member-modal.closing .mdc-modal-content {
  animation: fadeZoomOut 0.25s ease forwards;
}

@keyframes fadeZoomIn {
  from { opacity: 0; transform: scale(0.92) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeZoomOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.92) translateY(-10px); }
}

/* Preloader (smooth, no layout shift) */
.mdc-loading {
  text-align: center;
  padding: 40px 20px;
}
.mdc-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




.mdc-pagination {
    text-align: center;
    margin: 20px 0;
}

.mdc-pagination a,
.mdc-pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ccc;
    background: #fff;
    text-decoration: none;
}

.mdc-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}




