/* =========================================================================
   Team feature styles
   - Homepage "Meet the team" section (#home-meet-team)
   - Team page (#team-page): Leadership + The Team
   ====================================================================== */

:root {
  --team-blue: #243df6;
  --team-text: #1b1b1b;
  --team-muted: #5b6478;
  --team-card-bg: #ffffff;
  --team-photo-bg: #eceef3;
  --team-shadow: 0 18px 40px rgba(20, 28, 70, 0.08);
}

/* -------------------------------------------------------------------------
   Homepage: Meet the team
   ---------------------------------------------------------------------- */
#home-meet-team {
  padding: 60px 0;
}

#home-meet-team .meet-team-block {
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
  grid-template-rows: auto auto;
  gap: 24px 48px;
  align-items: center;
}

#home-meet-team .meet-team-intro {
  grid-column: 1;
  grid-row: 1;
}

#home-meet-team .meet-team-cta {
  grid-column: 1;
  grid-row: 2;
}

#home-meet-team .meet-team-cards {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 24px;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: flex-start;
}

#home-meet-team .meet-team-intro h2 {
  margin: 0 0 16px;
  line-height: 1.15;
}

#home-meet-team .meet-team-intro h2 a {
  color: var(--team-text);
  text-decoration: none;
}

#home-meet-team .meet-team-intro h2 a:hover {
  color: var(--team-blue);
}

#home-meet-team .meet-team-intro p,
#home-meet-team .meet-team-description {
  color: var(--team-muted);
  margin: 0;
}

#home-meet-team .meet-team-cta .btn {
  width: 168px;
  max-width: 100%;
  padding: 0 16px;
}

#home-meet-team .meet-team-cta {
  display: flex;
}

/* Stacked deck behind the dynamic (random) homepage card */
.team-card-stack {
  position: relative;
  display: inline-block;
  padding-right: 14px;
  padding-bottom: 14px;
}

.team-card-stack-layers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.team-card-stack .team-card--stack-layer {
  position: absolute;
  top: 0;
  left: 0;
}

.team-card-stack .team-card--stack-layer:nth-child(1) {
  transform: translate(7px, 7px);
  z-index: 0;
}

.team-card-stack .team-card--stack-layer:nth-child(2) {
  transform: translate(14px, 14px);
  z-index: -1;
}

.team-card-stack .team-card--stack-front {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------
   Shared simple card (homepage)
   ---------------------------------------------------------------------- */
.team-card--simple {
  width: 230px;
  max-width: 100%;
  background: var(--team-card-bg);
  border-radius: 14px;
  box-shadow: var(--team-shadow);
  overflow: hidden;
  text-align: center;
}

.team-card--simple .team-card-photo {
  background: var(--team-photo-bg);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.team-card--simple .team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card--simple .team-card-body {
  padding: 16px 14px 20px;
}

.team-card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--team-text);
}

.team-card-role {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--team-blue);
}

/* -------------------------------------------------------------------------
   Team page
   ---------------------------------------------------------------------- */
#team-page {
  padding: 40px 0 20px;
}

#team-page .team-section-heading {
  text-align: center;
  margin-bottom: 8px;
}

#team-page .team-section-heading h2 {
  margin: 0;
  font-size: 32px;
}

#team-page .heading-underline {
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--team-blue);
  margin: 12px auto 0;
}

#team-page .team-section-description {
  text-align: center;
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--team-muted);
}

#team-page .team-leadership-section {
  padding: 40px 0 60px;
}

#team-page .the-team-section {
  padding: 20px 0 60px;
}

/* Leadership grid */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 64px;
  margin-top: 48px;
}

.leadership-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.leadership-card-photo {
  flex: 0 0 226px;
  width: 226px;
  height: 226px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--team-photo-bg);
  box-shadow: var(--team-shadow);
}

.leadership-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.leadership-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.leadership-card-name {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0.07px;
  color: var(--team-text);
}

.leadership-card-role {
  display: block;
  margin-top: 4px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.31px;
  color: var(--team-blue);
}

.leadership-card-bio {
  margin: 12px 0 16px;
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.31px;
  color: var(--team-muted);
}

.team-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.team-linkedin img {
  display: block;
  width: 18px;
  height: 18px;
}

.team-linkedin:hover {
  opacity: 1;
}

/* The Team grid */
.the-team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 24px;
  margin-top: 48px;
}

.the-team-card {
  text-align: center;
}

.the-team-card-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--team-photo-bg);
  box-shadow: var(--team-shadow);
}

.the-team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.the-team-badge,
.the-team-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.the-team-badge {
  bottom: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background: var(--team-blue);
  color: #fff;
}

.the-team-play {
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  background: var(--team-blue);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.the-team-play:hover {
  transform: translateX(-50%) scale(1.08);
}

.the-team-card-body {
  padding: 12px 6px 0;
}

.the-team-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--team-text);
}

.the-team-card-role {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--team-blue);
}

.the-team-card.is-hidden {
  display: none;
}

.the-team-load-more {
  text-align: center;
  margin-top: 40px;
}

.the-team-load-more-btn {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--team-text);
  background: #fff;
  border: 1px solid #d8dce8;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.the-team-load-more-btn:hover {
  border-color: var(--team-blue);
  box-shadow: 0 4px 16px rgba(36, 61, 246, 0.08);
}

.the-team-load-more-status {
  margin: 14px 0 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--team-muted);
}

/* -------------------------------------------------------------------------
   About page: Leadership slider shortcode
   ---------------------------------------------------------------------- */
.leadership-slider-section {
  margin: 48px 0;
  width: 100%;
  clear: both;
}

/* Span full section width when placed inside a half-width mad column */
.mad-sides .mad-section-left .leadership-slider-section,
.mad-sides .mad-section-right .leadership-slider-section {
  width: calc(200% + 24px);
}

.mad-sides .mad-section-right .leadership-slider-section {
  margin-left: calc(-100% - 24px);
}

.page-id-26291 .mad-sides .leadership-slider-section {
  width: 100%;
  margin-left: 0;
}

.leadership-slider-block {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: nowrap;
}

.leadership-slider-left {
  flex: 0 0 38%;
  max-width: 38%;
  min-width: 0;
}

.leadership-slider-heading {
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: var(--team-text);
}

.leadership-slider-description {
  margin: 0;
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.31px;
  color: var(--team-muted);
}

.leadership-slider-right {
  flex: 1 1 62%;
  min-width: 0;
}

.leadership-slider-carousel {
  position: relative;
  padding: 0 48px;
}

.leadership-slider__track {
  margin: 0 -8px;
  overflow: hidden;
}

.leadership-slider__track:not(.slick-initialized) .leadership-slider-slide {
  display: none;
}

.leadership-slider__track:not(.slick-initialized) .leadership-slider-slide:nth-child(-n+2) {
  display: block;
  float: left;
  width: 50%;
  padding: 0 8px;
  box-sizing: border-box;
}

.leadership-slider__track:not(.slick-initialized)::after {
  content: '';
  display: table;
  clear: both;
}

.leadership-slider__track .slick-list {
  overflow: hidden;
}

@media (min-width: 901px) {
  .leadership-slider__track .slick-list {
    padding-bottom: 8px;
  }

  .leadership-slider__track .slick-slide {
    padding: 0 8px 4px;
  }
}

.leadership-slider__track .slick-track {
  display: flex !important;
  align-items: stretch;
}

.leadership-slider__track .slick-slide {
  padding: 0 8px;
  height: auto !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
}

.leadership-slider__track .slick-slide .leadership-slider-card {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
}

.leadership-slider-card {
  background: var(--team-card-bg);
  border-radius: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  text-align: center;
}

.leadership-slider-card-photo {
  width: 100%;
  height: 226px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: var(--team-photo-bg);
}

.leadership-slider-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.leadership-slider-card-body {
  flex: 1 1 auto;
  padding: 18px 16px 22px;
}

.leadership-slider-card-name {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0.07px;
  color: var(--team-text);
}

.leadership-slider-card-role {
  display: block;
  margin-top: 4px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.31px;
  text-transform: uppercase;
  color: var(--team-blue);
}

.leadership-slider-arrow {
  position: absolute;
  top: 113px;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #8b93a8;
  box-shadow: 0 8px 24px rgba(20, 28, 70, 0.12);
  cursor: pointer;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.leadership-slider-arrow:hover {
  color: var(--team-blue);
  box-shadow: 0 10px 28px rgba(20, 28, 70, 0.16);
}

.leadership-slider-prev {
  left: 0;
}

.leadership-slider-next {
  right: 0;
}

.leadership-slider-dots {
  margin-top: 20px;
  padding: 0 48px;
}

.leadership-slider-dots .slick-dots {
  position: static;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leadership-slider-dots .slick-dots li {
  margin: 0;
  width: auto;
  height: auto;
}

.leadership-slider-dots .slick-dots li button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background: rgba(36, 61, 246, 0.25);
  font-size: 0;
  line-height: 0;
  border: none;
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
}

.leadership-slider-dots .slick-dots li button::before {
  content: none;
}

.leadership-slider-dots .slick-dots li.slick-active button {
  width: 12px;
  height: 12px;
  background: var(--team-blue);
}

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

@media (max-width: 900px) {
  #home-meet-team {
    padding: 48px 0;
  }

  #home-meet-team .meet-team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
  }

  #home-meet-team .meet-team-intro,
  #home-meet-team .meet-team-cards,
  #home-meet-team .meet-team-cta {
    width: 100%;
  }

  #home-meet-team .meet-team-intro h2 {
    font-size: 28px;
    line-height: 1.25;
  }

  #home-meet-team .meet-team-intro p,
  #home-meet-team .meet-team-description {
    max-width: 520px;
    margin: 0 auto;
  }

  #home-meet-team .meet-team-cta {
    justify-content: center;
  }

  #home-meet-team .meet-team-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    justify-items: stretch;
  }

  #home-meet-team .team-card--simple,
  #home-meet-team .team-card-stack {
    width: 100%;
    max-width: none;
  }

  #home-meet-team .team-card-stack {
    padding: 0;
  }

  #home-meet-team .team-card-stack-layers {
    display: none;
  }

  #home-meet-team .team-card-stack .team-card--stack-front {
    width: 100%;
  }

  .leadership-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .leadership-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .leadership-card-photo {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .leadership-card-body {
    text-align: center;
  }

  .leadership-card-bio {
    text-align: center;
  }

  .team-linkedin {
    margin: 0 auto;
  }

  .the-team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .leadership-slider-block {
    flex-wrap: wrap;
    gap: 32px;
  }

  .leadership-slider-left {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .leadership-slider-right {
    flex: 1 1 100%;
  }

  .leadership-slider-heading {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  #home-meet-team .meet-team-intro h2 {
    font-size: 24px;
  }

  .the-team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #team-page .team-section-heading h2 {
    font-size: 26px;
  }

  .the-team-load-more-btn {
    font-size: 15px;
    padding: 14px 20px;
  }
}
