/* =============================================
   MFIN Leadership — Redesign
   ============================================= */

.mfin-leadership {
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Tabs (underline style) --- */
.mfin-leadership__tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  border-bottom: 2px solid #e0e0e0;
  position: relative;
}

.mfin-leadership .mfin-leadership__tab,
.mfin-leadership .mfin-leadership__tab:hover,
.mfin-leadership .mfin-leadership__tab:focus,
.mfin-leadership .mfin-leadership__tab:active {
  all: unset;
  display: inline-block;
  color: var(--e-global-color-4ddd075, #5F657D);
  padding: 12px 4px 16px;
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  line-height: 1;
  transition: color 0.25s ease;
  box-sizing: border-box;
}

.mfin-leadership .mfin-leadership__tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--e-global-color-primary, #04588C);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.mfin-leadership .mfin-leadership__tab.is-active,
.mfin-leadership .mfin-leadership__tab:hover {
  color: var(--e-global-color-primary, #04588C);
}

.mfin-leadership .mfin-leadership__tab.is-active::after {
  transform: scaleX(1);
}

/* --- Tab Panels (crossfade) --- */
.mfin-leadership__panel {
  display: none;
  opacity: 0;
  animation: mfin-fadeIn 0.35s ease forwards;
}

.mfin-leadership__panel.is-active {
  display: block;
}

@keyframes mfin-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Grid --- */
.mfin-leadership__grid {
  display: grid;
  grid-template-columns: repeat(var(--leadership-cols, 4), 1fr);
  gap: 32px 24px;
}

/* --- Cards --- */
.mfin-leadership__card {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.mfin-leadership__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mfin-leadership__card--has-bio {
  cursor: pointer;
}

.mfin-leadership__photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e9ecef;
}

.mfin-leadership__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mfin-leadership__placeholder {
  width: 100%;
  height: 100%;
  background: #dee2e6;
}

.mfin-leadership__info {
  padding: 16px 20px 20px;
}

.mfin-leadership__name {
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--e-global-color-primary, #1a1a1a);
  margin: 0 0 4px;
  line-height: 1.3;
}

.mfin-leadership__title {
  font-family: var(--e-global-typography-text-font-family);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--e-global-color-4ddd075, #5F657D);
  margin: 0 0 12px;
  line-height: 1.4;
}

.mfin-leadership__bio-btn {
  display: inline-block;
  background: none;
  border: none;
  color: var(--e-global-color-accent, #0057B8);
  font-family: var(--e-global-typography-text-font-family);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.mfin-leadership__bio-btn:hover {
  color: var(--e-global-color-primary, #003d82);
}

/* --- Slide-in Drawer --- */
.mfin-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  visibility: hidden;
  pointer-events: none;
}

.mfin-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mfin-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.35s ease;
}

.mfin-drawer.is-open .mfin-drawer__overlay {
  background: rgba(0, 0, 0, 0.5);
}

.mfin-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 550px;
  max-width: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.mfin-drawer.is-open .mfin-drawer__panel {
  transform: translateX(0);
}

.mfin-drawer__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  transition: color 0.2s;
  z-index: 1;
}

.mfin-drawer__close:hover {
  color: #1a1a1a;
}

.mfin-drawer__header {
  padding: 40px 40px 0;
  text-align: center;
}

.mfin-drawer__photo {
  width: 180px;
  height: 180px;
  margin: 0 auto 20px;
  overflow: hidden;
  background: #e9ecef;
}

.mfin-drawer__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mfin-drawer__name {
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 2rem;
  font-weight: 700;
  color: var(--e-global-color-primary, #1a1a1a);
  margin: 0 0 6px;
  line-height: 1.2;
}

.mfin-drawer__title {
  font-family: var(--e-global-typography-text-font-family);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--e-global-color-4ddd075, #5F657D);
  margin: 0;
  line-height: 1.4;
}

.mfin-drawer__content {
  padding: 32px 40px 40px;
  font-family: var(--e-global-typography-text-font-family);
  font-size: var(--e-global-typography-text-font-size, 1rem);
  line-height: var(--e-global-typography-text-line-height, 1.7);
  color: #333;
  flex: 1;
}

.mfin-drawer__content p {
  margin: 0 0 16px;
}

.mfin-drawer__content p:last-child {
  margin-bottom: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .mfin-leadership__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .mfin-leadership__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }

  .mfin-leadership__tabs {
    gap: 24px;
    margin-bottom: 32px;
  }

  .mfin-leadership__tab {
    font-size: 1rem;
  }

  .mfin-drawer__panel {
    width: 100%;
  }

  .mfin-drawer__header {
    padding: 32px 24px 0;
  }

  .mfin-drawer__photo {
    width: 140px;
    height: 140px;
  }

  .mfin-drawer__content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .mfin-leadership__grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }

  .mfin-leadership__tabs {
    gap: 20px;
  }

  .mfin-leadership__tab {
    font-size: 0.9rem;
  }
}

/* Body lock when drawer is open */
body.mfin-drawer-open {
  overflow: hidden;
}
