/* public/assets/css/mcd-banner.css
   Banner tiles overlay + reveal (overlay only on hover/focus)
   Updated: show/hide behavior + pointer-events control via data-show-button
*/

.mcd-members-tiles.banner-style {
  display:grid;
  gap:22px;
  margin:0 auto;
  grid-auto-rows: 220px;
}

/* each tile */
.mcd-tile {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 220px;
  background-size: cover;
  background-position: center center;
  box-shadow: 0 9px 20px rgba(31,41,56,0.08);
  transition: transform .35s ease, box-shadow .25s ease;
}

/* profile link covers the whole tile (keeps accessibility / keyboard focus) */
.mcd-tile-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

/* overlay wrapper */
.mcd-tile-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none; /* default: overlay wrapper doesn't intercept clicks */
}

/* inner sliding panel that appears from bottom - its height is variable
   Hidden by translateY, revealed on hover/focus.
*/
.mcd-tile-overlay-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--mcd-overlay-height, 35%);
  box-sizing: border-box;
  padding: 18px;
  transform: translateY(calc(var(--mcd-overlay-height, 35%)));
  transition: transform .36s cubic-bezier(.22,.9,.32,1), opacity .24s;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--mcd-overlay-color, rgba(59,27,123,0.45)) 100%);
  opacity: 0.98;
  pointer-events: none; /* default: not interactable - controlled below by dataset */
}

/* reveal transform for visual (always transforms on hover/focus),
   but pointer-events is only enabled when dataset says show-button=1
*/
.mcd-tile:hover .mcd-tile-overlay-inner,
.mcd-tile:focus-within .mcd-tile-overlay-inner {
  transform: translateY(0%);
}

/* If show-button == 1 -> allow pointer events inside overlay (buttons clickable) */
.mcd-members-tiles[data-show-button="1"] .mcd-tile:hover .mcd-tile-overlay-inner,
.mcd-members-tiles[data-show-button="1"] .mcd-tile:focus-within .mcd-tile-overlay-inner {
  pointer-events: auto;
}

/* If show-button == 0 -> overlay still reveals visually, but clicks fall through to tile-link */
.mcd-members-tiles[data-show-button="0"] .mcd-tile-overlay-inner {
  pointer-events: none !important;
}

/* center mode: stack and center content */
.mcd-overlay-center .mcd-tile-overlay-inner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 8% 20px;
}

/* Meta & controls */
.mcd-tile-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  max-width: 65%;
}
.mcd-tile-name {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}
.mcd-tile-job {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
}
.mcd-tile-sub,
.mcd-tile-desc {
  font-size: 13px;
  opacity: 0.9;
}

/* controls on the right */
.mcd-tile-controls {
  display:flex;
  align-items:center;
  gap:12px;
}
.mcd-tile-socials a {
  margin-right:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: #fff;
  opacity: .95;
  text-decoration:none;
}
.mcd-tile-action .mcd-btn {
  display:inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
  color: #1c3a8a;
  font-weight:600;
  text-decoration:none;
  box-shadow: 0 6px 18px rgba(25,40,77,0.12);
}

/* hide action if data-show-button=0 */
.mcd-members-tiles[data-show-button="0"] .mcd-tile-action { display:none !important; }

/* layout grid (uses CSS var --mcd-tiles-cols set inline from PHP) */
.mcd-members-tiles {
  display: grid;
  grid-template-columns: repeat(var(--mcd-tiles-cols, 3), 1fr);
  gap: 28px;
  width: 100%;
  box-sizing: border-box;
  margin-left:auto;
  margin-right:auto;
}

/* responsive fallback */
@media (max-width: 900px) {
  .mcd-members-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .mcd-members-tiles { grid-template-columns: repeat(1, 1fr); }
}

/* centered overlay style specifics */
.mcd-tile-overlay-inner.mcd-center-text {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 6% 16px;
}

/* sub text classes */
.mcd-sub-selected { font-weight: 600; color: rgba(255,255,255,0.95); }
.mcd-sub-custom   { font-weight: 400; color: rgba(255,255,255,0.9); margin-top: 4px; font-size: 13px; }

/* small tweaks */
.mcd-tile-meta .mcd-tile-sub { margin-top: 4px; font-size: 13px; opacity: .95; }
