/* Extracted styles from mechanism.html */
/* Intro Top Section - page scoped styles */
.intro-top-section {
  background-color: #ffffff;
  margin-top: 46px;
  margin-bottom: 46px;
}
.intro-article h1 {
  font-weight: 600;
  font-size: 40px;
  line-height: 125%;
  letter-spacing: 0;
}
.intro-article .lead {
  font-weight: 400;
  font-size: 18px;
  line-height: 150%;
  letter-spacing: 0;
  color: #4a4a4a;
}
@media (min-width: 992px) {
  .intro-article {
    padding-right: 2rem;
  }
}
.intro-title {
  display: block;
}
.intro-title-icon {
  width: 48px;
  height: 48px;
}
.intro-title .intro-highlight::after {
  content: "";
  display: inline-block;
  width: 48px;
  height: 48px;
  background-image: url("/icons/cc-blue-icon.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  vertical-align: middle;
  margin-left: 10px;
}

.staff-area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 16px;
  align-items: center;
  justify-items: center;
}
.staff-area-mobile {
  display: none;
}
.staff-area .staff-card {
  width: 200px;
  max-width: 100%;
  background: #fff;
  padding: 16px;
  text-align: center;
}
.staff-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  margin-bottom: 12px;
}
.avatar-hidden {
  display: none;
}
.staff-cell-1 .consultant-avatar-frame {
  width: 140px;
  height: 140px;
}
.staff-cell-1 .staff-avatar {
  width: 138px !important;
  height: 138px !important;
}
.staff-cell-2 .consultant-avatar-frame {
  width: 168px;
  height: 168px;
}
.staff-cell-2 .staff-avatar {
  width: 166px !important;
  height: 166px !important;
}
.staff-cell-3 .consultant-avatar-frame {
  width: 140px;
  height: 140px;
}
.staff-cell-3 .staff-avatar {
  width: 138px !important;
  height: 138px !important;
}

.staff-title,
.staff-role {
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 150%;
  letter-spacing: 0;
  color: #666;
}
.read-more-cell {
  justify-self: end;
}
.read-more-btn {
  display: inline-block;
  letter-spacing: 0.06rem;
  background-image: url("/icons/readmore-bg.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border: none;
  width: 170px;
  height: 170px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  flex-direction: column;
  gap: 8px;
}
.read-more-btn:hover {
  background-image: url("/icons/readmore-bg-hover.svg");
  color: #ffffff;
}
.read-more-btn-icon {
  width: 20px;
  height: auto;
}
.staff-name-and-title {
  vertical-align: middle;
  display: inline-block;
  font-weight: 600;
  font-size: 20px;
  line-height: 125%;
  letter-spacing: 0;
  color: #4a4a4a;
  width: 100%;
}
.staff-role {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0;
  text-align: center;
  color: #717171;
}
@media (min-width: 992px) {
  .staff-cell-1 {
    grid-column: 2;
    grid-row: 1;
  }
  .staff-cell-2 {
    grid-column: 1;
    grid-row: 2;
  }
  .read-more-cell {
    grid-column: 3;
    grid-row: 2;
  }
  .staff-cell-3 {
    grid-column: 2;
    grid-row: 3;
  }
}
@media (max-width: 991.98px) {
  .staff-area {
    display: none;
  }
  .staff-area-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: center;
    justify-items: center;
    margin-top: 60px;
    margin-bottom: 60px;
  }
  .staff-area-mobile .staff-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .read-more-cell {
    justify-self: center;
  }
  .staff-cell-2-m .consultant-avatar-frame {
    width: 140px;
    height: 140px;
  }
  .staff-cell-2-m .staff-avatar {
    width: 138px !important;
    height: 138px !important;
  }
  .staff-cell-1-m .consultant-avatar-frame {
    width: 100px;
    height: 100px;
  }
  .staff-cell-1-m .staff-avatar {
    width: 98px !important;
    height: 98px !important;
  }
  .staff-cell-3-m .consultant-avatar-frame {
    width: 100px;
    height: 100px;
  }
  .staff-cell-3-m .staff-avatar {
    width: 98px !important;
    height: 98px !important;
  }
  .staff-area-mobile .read-more-btn {
    width: 140px;
    height: 140px;
  }
}

.intro-highlight {
  color: #00a9e0;
  font-weight: 600;
}

/* Paginated Consultant Section */
.consultant-section {
  padding: 40px 0;
}
.consultant-header {
  color: #4a4a4a;
  font-weight: 600;
  margin-bottom: 20px;
}
.consultant-grid {
  position: relative;
}
.consultant-rows {
  display: grid;
  grid-template-rows: repeat(2, auto);
  gap: 16px;
}
.consultant-row {
  overflow: hidden;
}
.consultant-row-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  will-change: scroll-position;
  transform: translateX(-24px);
}
.consultant-card {
  flex: 0 0 calc((100% - 48px) / 4);
  max-width: calc((100% - 48px) / 4);
  background: #fff;
  text-align: center;
  padding: 16px;
}
.consultant-card .consultant-avatar-frame {
  width: 188px;
  height: 188px;
}
.consultant-avatar-wrap .staff-avatar {
  width: 186px !important;
  height: 186px !important;
  max-height: 100%;
}
.consultant-controls {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 8px;
}
.consultant-scroll-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 16px;
  background-color: #e7e7e7;
  border: 1px solid #e7e7e7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.consultant-scroll-btn:hover:not(:disabled) {
  background-color: #f4f4f4;
}

.consultant-scroll-btn:active:not(:disabled) {
  background-color: #e7e7e7;
}

.consultant-scroll-btn:focus {
  outline: none;
}

.consultant-scroll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Consultant card hover overlay and motto dialog */
.consultant-card {
  position: relative;
  overflow: visible;
}
.consultant-card:hover {
  z-index: 5000;
}
.consultant-avatar-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.consultant-avatar-wrap .staff-avatar,
.consultant-avatar-wrap .consultant-modal-avatar,
.consultant-avatar-wrap .consultant-modal-nav-avatar {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  width: 138px;
  height: 138px;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.consultant-avatar-wrap .consultant-modal-nav-avatar {
  width: 80px;
  height: 80px;
}
.consultant-avatar-frame {
  position: relative;
  background-image: url("/cc-images/FinallyNicePerfectAvatarFrame.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 3;
}
.consultant-avatar-wrap:hover {
  cursor: pointer;
}

/* Ensure spacing comes from wrapper, not the image, to avoid overlay gaps */
.consultant-avatar-wrap .staff-avatar,
.consultant-avatar-wrap .consultant-modal-avatar {
  margin-bottom: 0;
}
.consultant-card .consultant-avatar-wrap,
.consultant-modal-left .consultant-avatar-wrap {
  margin-bottom: 12px;
}
.consultant-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
  margin: 1px;
}
.consultant-overlay .overlay-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: 0.06rem;
  font-size: 20px;
}
.consultant-avatar-wrap:hover .consultant-overlay {
  opacity: 1;
}
.consultant-motto-dialog {
  position: relative;
  background: #efc315;
  color: #4a4a4a;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 50px;
  box-shadow: none;
  border: 1px solid #efc315;
  margin-top: 8px;
  left: 35px;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
  z-index: 1000;
  white-space: nowrap;
  width: -webkit-fit-content;
  width: fit-content;
}
@media (max-width: 991.98px) {
  .consultant-motto-dialog {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
#consultant-row-top > .consultant-card.is-rightmost .consultant-motto-dialog,
#consultant-row-bottom
  > .consultant-card.is-rightmost
  .consultant-motto-dialog {
  left: auto;
  right: 35px;
  position: absolute;
}
.consultant-motto-dialog::before {
  display: none;
}
.consultant-motto-tail {
  position: absolute;
  bottom: 100%;
  left: 28px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #efc315;
  z-index: 6000;
}
#consultant-row-top > .consultant-card.is-rightmost .consultant-motto-tail,
#consultant-row-bottom > .consultant-card.is-rightmost .consultant-motto-tail {
  left: auto;
  right: 28px;
}
.consultant-card:hover .consultant-motto-dialog {
  opacity: 1;
  transform: translateY(0);
}

/* Hide the yellow motto dialog on mobile/tablet devices */
@media (max-width: 991.98px) {
  .consultant-motto-dialog {
    display: none !important;
  }
  .consultant-card:hover .consultant-motto-dialog {
    display: none !important;
  }
  .consultant-rows {
    gap: 0;
  }
}

/* Modal */
.consultant-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
.consultant-modal-backdrop.open {
  display: flex;
}
.consultant-modal {
  background: #fff;
  border-radius: 12px;
  /* width: calc(100% - 32px); */
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  grid-template-rows: auto 1fr;
  background: #fff;
  margin: 16px;
}
.consultant-modal-nav {
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  align-self: center;
  justify-self: center;
  grid-row: 1 / span 2;
}
.consultant-modal-prev {
  grid-column: 1;
}
.consultant-modal-next {
  grid-column: 3;
}
.consultant-modal-header,
.consultant-modal-body {
  grid-column: 2;
}
.consultant-modal-header {
  grid-row: 1;
}
.consultant-modal-body {
  grid-row: 2;
}
.consultant-modal-nav-arrow {
  width: 18px;
  height: 18px;
}
.consultant-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.consultant-modal-title {
  font-weight: 600;
  color: #4a4a4a;
}
.consultant-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #4a4a4a;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.consultant-modal-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 70px;
  margin-right: 54px;
  margin-left: 54px;
  margin-bottom: 120px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.consultant-modal .consultant-avatar-frame {
  width: 188px;
  height: 188px;
}
.consultant-modal .consultant-avatar-wrap .staff-avatar,
.consultant-modal .consultant-avatar-wrap .consultant-modal-avatar {
  width: 186px !important;
  height: 186px !important;
}

.consultant-modal-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.consultant-modal-exp-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 125%;
  letter-spacing: 0;
  color: #4a4a4a;
  margin-top: 24px;
}
.consultant-modal-row {
  color: #4a4a4a;
}
.consultant-modal-name-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 125%;
  letter-spacing: 0;
  color: #4a4a4a;
  margin-top: 8px;
}
.consultant-modal-role {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0;
  color: #717171;
}
.consultant-modal-motto {
  font-weight: 600;
  font-size: 24px;
  line-height: 125%;
  letter-spacing: 0;
  color: #4a4a4a;
  text-align: center;
}
.consultant-modal-motto::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 8px auto;
  background-image: url("/cc-images/icon-quote.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}
.consultant-modal-experience {
  font-weight: 400;
  font-size: 18px;
  line-height: 150%;
  letter-spacing: 0;
  color: #4a4a4a;
  margin-left: 24px;
}
@media (max-width: 575.98px) {
  .consultant-modal-body {
    grid-template-columns: 1fr;
  }
  .consultant-modal .consultant-avatar-frame {
    width: 140px;
    height: 140px;
  }
  .consultant-modal .consultant-avatar-wrap .consultant-modal-avatar {
    width: 138px !important;
    height: 138px !important;
  }
  .consultant-modal-left {
    justify-self: center;
  }
  .consultant-modal-left {
    align-items: center;
  }
}
.consultant-modal-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.consultant-modal-name-title,
.consultant-modal-role {
  text-align: center;
}

.consultant-modal-nav .consultant-avatar-frame {
  width: 80px;
  height: 80px;
}
@media (max-width: 991.98px) {
  .consultant-modal-nav .consultant-avatar-wrap {
    display: none;
  }
}

@media (min-width: 992px) {
  .consultant-modal-bg {
    width: 550px;
  }
}
@media (max-width: 991.98px) {
  .consultant-row-inner {
    transform: none;
  }
  .consultant-card {
    flex: 0 0 calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
  }
  .consultant-card .consultant-avatar-frame {
    width: 140px;
    height: 140px;
  }
  .consultant-avatar-wrap .staff-avatar {
    width: 138px !important;
    height: 138px !important;
    max-height: 98% !important;
    max-width: 98% !important;
  }
  .consultant-card .staff-name-and-title {
    font-size: 18px;
  }
  .consultant-card .staff-role {
    font-size: 14px;
  }
}

.consultant-modal-bg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 550px;
  height: auto;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 575.98px) {
  .consultant-modal-bg {
    width: 360px;
  }
  .consultant-modal {
    grid-template-columns: 30px 1fr 30px;
  }
  .consultant-modal-body {
    margin-top: 50px;
    margin-right: 5px;
    margin-left: 5px;
    margin-bottom: 80px;
    max-height: calc(80vh - 150px);
  }
}
