/**
 * Leadership Section Styles
 * Matches live https://www.morae.com/solutions/ai-managed-solutions/
 */

/* 1. Base Section Container */
.morae-leadership-section {
  background-color: var(--morae-natural-100, #f5f4f0);
  color: #0f0f0f;
  padding-top: clamp(4.4375rem, 2.0549rem + 10.1657vw, 10.1875rem);
  padding-bottom: clamp(4.4375rem, 2.0549rem + 10.1657vw, 10.1875rem);
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

/* Same-theme consecutive sections: remove duplicate top padding */
section:is(.morae-theme-natural, .natural, .theme-natural, [class*="theme-natural"]) + .morae-leadership-section:is(.morae-theme-natural, .natural, .theme-natural, [class*="theme-natural"]):not(.ignore-same-theme-rule),
section:is(.morae-theme-light, .morae-theme-default, .light, .theme-light, .theme-default, [class*="theme-light"], [class*="theme-default"]) + .morae-leadership-section:is(.morae-theme-light, .morae-theme-default, .light, .theme-light, .theme-default, [class*="theme-light"], [class*="theme-default"]):not(.ignore-same-theme-rule),
section:is(.morae-theme-dark, .dark, .theme-dark, [class*="theme-dark"]) + .morae-leadership-section:is(.morae-theme-dark, .dark, .theme-dark, [class*="theme-dark"]):not(.ignore-same-theme-rule) {
  padding-top: 0 !important;
}

.morae-leadership-section.morae-theme-natural,
.morae-leadership-section.morae-theme-default,
#leadership_section.morae-theme-natural,
#leadership_section.morae-theme-default {
  background-color: var(--morae-natural-100, #f5f4f0);
  color: #0f0f0f;
}

.morae-leadership-section.morae-theme-light,
#leadership_section.morae-theme-light {
  background-color: #ffffff;
  color: #0f0f0f;
}

.morae-leadership-section.morae-theme-dark,
#leadership_section.morae-theme-dark {
  background-color: #101010;
  color: #f5f4f0;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-title,
.morae-leadership-section.morae-theme-dark .morae-leadership-title strong,
.morae-leadership-section.morae-theme-dark .morae-leadership-name {
  color: #ffffff;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-desc,
.morae-leadership-section.morae-theme-dark .morae-leadership-role {
  color: #cac5be;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-card:hover .morae-leadership-name {
  color: #ff501a !important;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-load-btn,
#leadership_section.morae-theme-dark .morae-leadership-load-btn,
.morae-theme-dark .morae-leadership-load-btn {
  border: 1px solid #f5f4f0 !important;
  color: #f5f4f0 !important;
  background-color: transparent !important;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-load-btn span,
#leadership_section.morae-theme-dark .morae-leadership-load-btn span,
.morae-theme-dark .morae-leadership-load-btn span {
  color: #f5f4f0 !important;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-load-btn:hover,
#leadership_section.morae-theme-dark .morae-leadership-load-btn:hover,
.morae-theme-dark .morae-leadership-load-btn:hover {
  background-color: #f5f4f0 !important;
  border-color: #f5f4f0 !important;
  color: #101010 !important;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-load-btn:hover span,
#leadership_section.morae-theme-dark .morae-leadership-load-btn:hover span,
.morae-theme-dark .morae-leadership-load-btn:hover span {
  color: #101010 !important;
}

/* 2. Container (Strict 1920px Max-Width with standard side-padding and 12-Column Grid Architecture) */
.morae-leadership-container {
  max-width: 1920px !important;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(1rem, 5.55556vw, 6.6667rem) !important;
  padding-right: clamp(1rem, 5.55556vw, 6.6667rem) !important;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--morae-gutter, 1.5rem);
}

@media (min-width: 1440px) {
  .morae-leadership-container {
    padding-left: 5.55556vw !important;
    padding-right: 5.55556vw !important;
    column-gap: 1.66667vw !important;
  }
}

@media (min-width: 1920px) {
  .morae-leadership-container {
    column-gap: 32px !important;
  }
}

/* 3. Section Header */
.morae-leadership-header-grid,
.morae-leadership-header-wrap {
  grid-column: span 12 / span 12;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--morae-gutter, 1.5rem);
  width: 100%;
}

.morae-leadership-header {
  grid-column: span 8 / span 8;
  max-width: none;
  width: 100%;
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .morae-leadership-header {
    grid-column: span 12 / span 12;
  }
}

.morae-leadership-topline {
  font-family: var(--morae-font, 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: #e03100 !important;
  font-size: clamp(1.125rem, 1.0732rem + 0.221vw, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  margin: 0 0 0.9375rem 0;
  letter-spacing: normal;
  display: block;
}

.morae-leadership-title {
  font-family: var(--morae-font, 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: #0f0f0f;
  font-size: clamp(1.9375rem, 1.25rem + 2.5vw, 2.960625rem);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0em;
  margin: 0;
  text-wrap: balance;
}

.morae-leadership-title p {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.morae-leadership-title strong {
  background-image: linear-gradient(119.49deg, #FF3600 12.98%, #FF7700 60.83%, #FFBD00 102.78%) !important;
  color: #f5f2ef !important;
  font-weight: 400 !important;
  padding: 0 !important;
  display: inline !important;
  box-decoration-break: slice !important;
  -webkit-box-decoration-break: slice !important;
  border-radius: 0px !important;
}

.morae-leadership-desc {
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  color: #6e6e6e;
  margin-top: 1rem;
}

/* 4. Four-Column Cards Grid */
.morae-leadership-grid {
  grid-column: span 12 / span 12;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--morae-gutter, 1.5rem);
  row-gap: clamp(2.125rem, 1.5rem + 2.5vw, 3.25rem);
  margin-top: clamp(2.125rem, 1.5rem + 2.5vw, 3.25rem);
  width: 100%;
}

.morae-leadership-card {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

/* Card Image Box (Strict 3:2 Aspect Ratio) */
.morae-leadership-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2 !important;
  overflow: hidden;
  background-color: #e5e3dc;
}

.morae-leadership-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.morae-leadership-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.morae-leadership-placeholder {
  width: 100%;
  height: 100%;
  background-color: #dedbd4;
}

/* Card Details */
.morae-leadership-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.morae-leadership-name {
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: clamp(1.125rem, 1.0732rem + 0.221vw, 1.25rem);
  line-height: 1.5;
  font-weight: 400;
  color: #0f0f0f;
  text-decoration: none;
  transition: color 0.2s ease;
  margin: 0;
}

/* Stretched link: full card clickable */
.morae-leadership-name::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.morae-leadership-card:hover .morae-leadership-name {
  color: #e03100 !important;
  text-decoration: underline !important;
}

.morae-leadership-role {
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.04375rem);
  line-height: 1.5;
  font-weight: 400;
  color: #6e6e6e;
  margin: 0;
}

/* Contact Details & Social Links (Email & LinkedIn) */
.morae-leadership-contact-item {
  margin: 0 !important;
}

.morae-leadership-contact-link,
.morae-leadership-meta a.morae-leadership-contact-link,
.morae-leadership-role a {
  position: relative !important;
  z-index: 10 !important;
  display: inline-block !important;
  color: #101010 !important;
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif) !important;
  font-size: clamp(0.78125rem, 0.75066rem + 0.130516vw, 0.868125rem) !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  transition: color 0.2s ease !important;
}

.morae-leadership-contact-link:hover,
.morae-leadership-meta a.morae-leadership-contact-link:hover,
.morae-leadership-role a:hover {
  color: #e03100 !important;
  text-decoration: underline !important;
}

/* Prevent name link hover effect when hovering contact links */
.morae-leadership-card:has(.morae-leadership-contact-link:hover) .morae-leadership-name,
.morae-leadership-card:has(.morae-leadership-role a:hover) .morae-leadership-name {
  color: #0f0f0f !important;
  text-decoration: none !important;
}

/* Dark theme support for contact links */
.morae-leadership-section.morae-theme-dark .morae-leadership-contact-link,
.morae-leadership-section.morae-theme-dark .morae-leadership-meta a.morae-leadership-contact-link,
.morae-leadership-section.morae-theme-dark .morae-leadership-role a,
#leadership_section.morae-theme-dark .morae-leadership-contact-link,
#leadership_section.morae-theme-dark .morae-leadership-meta a.morae-leadership-contact-link,
#leadership_section.morae-theme-dark .morae-leadership-role a {
  color: #f5f4f0 !important;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-contact-link:hover,
.morae-leadership-section.morae-theme-dark .morae-leadership-meta a.morae-leadership-contact-link:hover,
.morae-leadership-section.morae-theme-dark .morae-leadership-role a:hover,
#leadership_section.morae-theme-dark .morae-leadership-contact-link:hover,
#leadership_section.morae-theme-dark .morae-leadership-meta a.morae-leadership-contact-link:hover,
#leadership_section.morae-theme-dark .morae-leadership-role a:hover {
  color: #ff501a !important;
}

.morae-leadership-section.morae-theme-dark .morae-leadership-card:has(.morae-leadership-contact-link:hover) .morae-leadership-name,
.morae-leadership-section.morae-theme-dark .morae-leadership-card:has(.morae-leadership-role a:hover) .morae-leadership-name {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* 5. Load More / Show All Button Wrap */
.morae-leadership-load-wrap {
  grid-column: span 12 / span 12;
  margin-top: clamp(2.5625rem, 1.75rem + 3.2vw, 4.375rem);
  display: flex;
  justify-content: center;
  width: 100%;
}

.morae-leadership-load-wrap.is-hidden,
.morae-leadership-load-wrap[style*="display: none"],
.morae-leadership-load-wrap[style*="display:none"] {
  display: none !important;
}

.morae-leadership-section.morae-theme-natural .morae-btn.morae-btn-secondary,
.morae-leadership-section .morae-btn.morae-btn-secondary,
.morae-leadership-section .morae-leadership-load-btn,
.morae-leadership-load-btn.morae-btn,
.morae-leadership-load-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.3533em;
  min-height: 3.3533em;
  padding: 0 1em !important;
  border: 1px solid #0f0f0f !important;
  border-color: #0f0f0f !important;
  border-radius: 0px !important;
  background: transparent !important;
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.04375rem);
  font-weight: 400;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
  white-space: nowrap;
}

.morae-leadership-section .morae-leadership-load-btn span,
.morae-leadership-load-btn span {
  color: inherit;
}

.morae-leadership-section .morae-leadership-load-btn:hover,
.morae-leadership-load-btn:hover {
  background-color: #0f0f0f !important;
  border-color: #0f0f0f !important;
  color: #ffffff !important;
}

.morae-leadership-section .morae-leadership-load-btn:hover span,
.morae-leadership-load-btn:hover span {
  color: #ffffff !important;
}

/* 6. Responsive Breakpoints */
@media (max-width: 900px) {
  .morae-leadership-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .morae-leadership-grid {
    grid-template-columns: 1fr;
  }
}

/* 7. Viewport Scaling for >= 1440px & 1920px */
@media (min-width: 1440px) {
  .morae-leadership-section {
    padding-bottom: 163px !important;
  }

  .morae-leadership-topline {
    font-size: 1.38889vw !important;
    line-height: 1.5 !important;
  }

  .morae-leadership-title {
    font-size: 3.28958vw !important;
    line-height: 1.3 !important;
  }

  .morae-leadership-desc {
    font-size: 1.15972vw !important;
    line-height: 1.6 !important;
  }

  .morae-leadership-grid {
    column-gap: 1.66667vw !important;
    row-gap: 3.61111vw !important;
    margin-top: 3.61111vw !important;
  }

  .morae-leadership-name {
    font-size: 1.38889vw !important;
    line-height: 1.5 !important;
  }

  .morae-leadership-role {
    font-size: 1.15972vw !important;
    line-height: 1.5 !important;
  }

  .morae-leadership-contact-link,
  .morae-leadership-meta a.morae-leadership-contact-link,
  .morae-leadership-role a {
    font-size: 0.964583vw !important;
    line-height: 1.5 !important;
  }

  .morae-leadership-load-wrap {
    margin-top: 4.86111vw !important;
  }

  .morae-leadership-load-btn {
    font-size: 1.15972vw !important;
    line-height: 1.5 !important;
  }
}

@media (min-width: 1920px) {
  .morae-leadership-section {
    padding-bottom: 163px !important;
  }

  .morae-leadership-topline {
    font-size: 26.6669px !important;
    line-height: 40px !important;
  }

  .morae-leadership-title {
    font-size: 63.16px !important;
    line-height: 1.3 !important;
  }

  .morae-leadership-grid {
    column-gap: 32px !important;
    row-gap: 69.333px !important;
    margin-top: 69.333px !important;
  }

  .morae-leadership-name {
    font-size: 26.6686px !important;
    line-height: 40px !important;
  }

  .morae-leadership-role {
    font-size: 22.2666px !important;
    line-height: 33.4px !important;
  }

  .morae-leadership-contact-link,
  .morae-leadership-meta a.morae-leadership-contact-link,
  .morae-leadership-role a {
    font-size: 18.52px !important;
    line-height: 27.78px !important;
  }

  .morae-leadership-load-wrap {
    margin-top: 93.333px !important;
  }

  .morae-leadership-load-btn {
    font-size: 22.2666px !important;
    line-height: 33.4px !important;
  }
}
