/**
 * Featured Insights Section Styles
 * Matches live Morae homepage "Our Latest Insights" with 3 theme variants (Light, Natural, Dark)
 * Uses common theme tokens and spacing variables.
 */

/* ==========================================================================
   1. Base Section Container & Common Spacing
   ========================================================================== */
#featured_insights_id,
.morae-featured-insights-section,
.morae-latest-insights-section,
.morae-proof-points-section:has(.leadership-insights-section) {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  padding-top: var(--morae-section-py-lg, clamp(4.4375rem, 2.054903314917127rem + 10.165745856353592vw, 10.1875rem));
  padding-bottom: var(--morae-section-py-lg, clamp(4.4375rem, 2.054903314917127rem + 10.165745856353592vw, 10.1875rem));
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Same-Theme Collapse: When preceded by another section of the same theme, collapse top padding */
section:is(.morae-theme-light, .morae-theme-default, .theme-light, .theme-default, .light) + .morae-featured-insights-section:is(.morae-theme-light, .morae-theme-default, .theme-light, .theme-default, .light):not(.ignore-same-theme-rule),
section:is(.morae-theme-light, .morae-theme-default, .theme-light, .theme-default, .light) + #featured_insights_id:is(.morae-theme-light, .morae-theme-default, .theme-light, .theme-default, .light):not(.ignore-same-theme-rule),
section:is(.morae-theme-natural, .theme-natural, .natural) + .morae-featured-insights-section:is(.morae-theme-natural, .theme-natural, .natural):not(.ignore-same-theme-rule),
section:is(.morae-theme-natural, .theme-natural, .natural) + #featured_insights_id:is(.morae-theme-natural, .theme-natural, .natural):not(.ignore-same-theme-rule),
section:is(.morae-theme-dark, .theme-dark, .dark) + .morae-featured-insights-section:is(.morae-theme-dark, .theme-dark, .dark):not(.ignore-same-theme-rule),
section:is(.morae-theme-dark, .theme-dark, .dark) + #featured_insights_id:is(.morae-theme-dark, .theme-dark, .dark):not(.ignore-same-theme-rule) {
  padding-top: 0 !important;
}

/* ==========================================================================
   2. Theme Variants (Light, Natural, Dark)
   ========================================================================== */

/* Light Theme (Default) */
#featured_insights_id.morae-theme-light,
#featured_insights_id.morae-theme-default,
#featured_insights_id.theme-light,
#featured_insights_id.theme-default,
.morae-featured-insights-section.morae-theme-light,
.morae-featured-insights-section.morae-theme-default,
.morae-featured-insights-section.theme-light,
.morae-featured-insights-section.theme-default,
.morae-latest-insights-section.morae-theme-light,
.morae-latest-insights-section.morae-theme-default,
#featured_insights_id:not(.morae-theme-dark):not(.theme-dark):not(.morae-theme-natural):not(.theme-natural),
.morae-featured-insights-section:not(.morae-theme-dark):not(.theme-dark):not(.morae-theme-natural):not(.theme-natural) {
  --insights-bg: var(--morae-bg-light, #ffffff);
  --insights-text: var(--morae-text-light, #262626);
  --insights-title: var(--morae-title-color-light, #262626);
  --insights-desc: var(--morae-text-muted-light, #595959);
  --insights-meta: #767676;
  --insights-border: var(--morae-border, #ece8e2);
  --insights-media-bg: #f2efe9;
  --insights-tag: var(--primary-accessible, #e13000);
  --insights-hover: var(--primary-accessible, #e13000);
  background-color: var(--insights-bg);
  color: var(--insights-text);
}

/* Natural Theme */
#featured_insights_id.morae-theme-natural,
#featured_insights_id.theme-natural,
.morae-featured-insights-section.morae-theme-natural,
.morae-featured-insights-section.theme-natural,
.morae-latest-insights-section.morae-theme-natural {
  --insights-bg: var(--morae-bg-natural, #f5f4f0);
  --insights-text: var(--morae-text-natural, #262626);
  --insights-title: var(--morae-title-color-light, #262626);
  --insights-desc: var(--morae-text-muted-light, #595959);
  --insights-meta: #767676;
  --insights-border: #e0dcd5;
  --insights-media-bg: #e8e4dc;
  --insights-tag: var(--primary-accessible, #e13000);
  --insights-hover: var(--primary-accessible, #e13000);
  background-color: var(--insights-bg);
  color: var(--insights-text);
}

/* Dark Theme */
#featured_insights_id.morae-theme-dark,
#featured_insights_id.theme-dark,
.morae-featured-insights-section.morae-theme-dark,
.morae-featured-insights-section.theme-dark,
.morae-latest-insights-section.morae-theme-dark {
  --insights-bg: var(--morae-bg-dark, #101010);
  --insights-text: var(--morae-text-dark, #f5f4f0);
  --insights-title: var(--morae-title-color-dark, #ffffff);
  --insights-desc: var(--morae-text-muted-dark, #cac5be);
  --insights-meta: #9e9e9e;
  --insights-border: rgba(255, 255, 255, 0.15);
  --insights-media-bg: #1a1a1a;
  --insights-tag: var(--primary, #ff3600);
  --insights-hover: var(--primary, #ff3600);
  background-color: var(--insights-bg);
  color: var(--insights-text);
}

/* ==========================================================================
   3. Container & Layout (Flex Column Layout to avoid Grid Column Bleed)
   ========================================================================== */
#featured_insights_id .morae-container,
#featured_insights_id .morae-proof-container,
.morae-featured-insights-section .morae-container,
.morae-featured-insights-section .morae-proof-container {
  display: flex !important;
  flex-direction: column !important;
  max-width: var(--morae-container-max-width, 1920px) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--morae-side-padding, clamp(1rem, -0.408rem + 6.009vw, 5rem)) !important;
  padding-right: var(--morae-side-padding, clamp(1rem, -0.408rem + 6.009vw, 5rem)) !important;
  box-sizing: border-box !important;
}

#featured_insights_id .morae-proof-header,
.morae-featured-insights-section .morae-proof-header,
.morae-latest-insights-header {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  grid-column: auto !important;
  margin-top: 0 !important;
  /* margin-bottom: var(--spacing-2xl, clamp(2.125rem, 1.6588vw, 3.25rem)) !important; */
}

#featured_insights_id .leadership-news-section,
#featured_insights_id .leadership-insights-section,
.morae-featured-insights-section .leadership-news-section,
.morae-featured-insights-section .leadership-insights-section {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-column: auto !important;
}

#featured_insights_id .leadership-news-list,
.morae-featured-insights-section .leadership-news-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: var(--morae-gutter, 1.5rem) !important;
  row-gap: clamp(1.5rem, 2vw, 1.8125rem) !important;
  width: 100% !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

#featured_insights_id .leadership-news-item:nth-child(1),
.morae-featured-insights-section .leadership-news-item:nth-child(1) {
  grid-column: 1 / span 2 !important;
  grid-row: 1 / span 2 !important;
  width: 100% !important;
}

#featured_insights_id .leadership-news-item:nth-child(2),
.morae-featured-insights-section .leadership-news-item:nth-child(2) {
  grid-column: 3 !important;
  grid-row: 1 !important;
  width: 100% !important;
}

#featured_insights_id .leadership-news-item:nth-child(3),
.morae-featured-insights-section .leadership-news-item:nth-child(3),
.leadership-insights-section .leadership-news-item:nth-child(3) {
  grid-column: 3 !important;
  grid-row: 2 !important;
  width: 100% !important;
  border-top: 1px solid var(--insights-border, #ece8e2) !important;
  padding-top: var(--spacing-lg, clamp(1.5rem, 1.370511rem + 0.552486vw, 1.8125rem)) !important;
  margin-top: 0 !important;
}

@media (max-width: 991.98px) {
  #featured_insights_id .leadership-news-list,
  .morae-featured-insights-section .leadership-news-list {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  #featured_insights_id .leadership-news-item,
  #featured_insights_id .leadership-news-item:nth-child(1),
  #featured_insights_id .leadership-news-item:nth-child(2),
  #featured_insights_id .leadership-news-item:nth-child(3),
  .morae-featured-insights-section .leadership-news-item,
  .morae-featured-insights-section .leadership-news-item:nth-child(1),
  .morae-featured-insights-section .leadership-news-item:nth-child(2),
  .morae-featured-insights-section .leadership-news-item:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   6. Card Structure & Media (16:9 Thumbnail)
   ========================================================================== */
.leadership-insights-section .leadership-news-item,
.morae-latest-insights-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  box-sizing: border-box;
  height: 100%;
}

.leadership-insights-section .leadership-news-link,
.morae-latest-insights-link {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
}

/* Media / Thumbnail (16:9 Ratio) */
.leadership-insights-section .leadership-news-media,
.morae-latest-insights-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--insights-media-bg);
}

.leadership-insights-section .leadership-news-media img,
.morae-latest-insights-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.leadership-insights-section .leadership-news-link:hover .leadership-news-media img,
.morae-latest-insights-card:hover .morae-latest-insights-img {
  transform: scale(1.025);
}

/* Content Area */
.leadership-insights-section .leadership-news-content,
.morae-latest-insights-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Spacing between media and content */
.leadership-insights-section .leadership-news-item:nth-child(1) .leadership-news-content,
.morae-latest-insights-card--featured .morae-latest-insights-content {
  padding-top: 1.5rem;
}

.leadership-insights-section .leadership-news-item:not(:nth-child(1)) .leadership-news-content,
.morae-latest-insights-card--compact .morae-latest-insights-content {
  padding-top: 1.125rem;
}

.leadership-insights-section .leadership-news-media + .leadership-news-content {
  padding-top: 1.125rem !important;
}

.leadership-insights-section .leadership-news-item:nth-child(1) .leadership-news-media + .leadership-news-content {
  padding-top: 1.5rem !important;
}

/* Card 3 media is strictly hidden (matches live reference design) */
#featured_insights_id .leadership-news-item:nth-child(3) .leadership-news-media,
.morae-featured-insights-section .leadership-news-item:nth-child(3) .leadership-news-media,
.leadership-insights-section .leadership-news-item:nth-child(3) .leadership-news-media {
  display: none !important;
}

#featured_insights_id .leadership-news-item:nth-child(3) .leadership-news-content,
.morae-featured-insights-section .leadership-news-item:nth-child(3) .leadership-news-content,
.leadership-insights-section .leadership-news-item:nth-child(3) .leadership-news-content,
.leadership-insights-section .leadership-news-item:nth-child(3):not(:has(.leadership-news-media)) .leadership-news-content {
  padding-top: 0 !important;
}

/* Category / Solution Tag (Only Card 3 shows coral tag in reference design) */
.leadership-insights-section .leadership-news-tag,
.morae-latest-insights-tag {
  display: none;
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: var(--morae-font-size-body-sm, clamp(0.9375rem, 0.90009rem + 0.15962vw, 1.04375rem));
  line-height: 1.4;
  font-weight: 500;
  color: var(--insights-tag, #e13000);
  margin: 0 0 0.4em 0;
  letter-spacing: 0.01em;
}

#featured_insights_id .leadership-news-item:nth-child(3) .leadership-news-tag,
.morae-featured-insights-section .leadership-news-item:nth-child(3) .leadership-news-tag,
.leadership-insights-section .leadership-news-item:nth-child(3) .leadership-news-tag {
  display: block !important;
  color: var(--insights-tag, #e13000) !important;
  margin: 0 0 0.4em 0 !important;
}

/* Card Titles */
.leadership-insights-section .leadership-news-title,
.morae-latest-insights-card-title {
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.35;
  font-weight: 500;
  color: var(--insights-title);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.leadership-insights-section .leadership-news-item:nth-child(1) .leadership-news-title,
.morae-latest-insights-card-title--large {
  font-size: var(--morae-font-size-display-lg, clamp(1.625rem, 1.25rem + 1.4vw, 2.375rem));
  line-height: 1.4 !important;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.875rem 0;
}

.leadership-insights-section .leadership-news-link:hover .leadership-news-title,
.morae-latest-insights-card:hover .morae-latest-insights-link {
  color: var(--insights-hover) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Abstract / Excerpt */
.leadership-insights-section .leadership-news-abstract,
.morae-latest-insights-card-summary {
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: var(--morae-font-size-body-sm, clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem));
  line-height: 1.55;
  color: #6e6e6e;
  margin: 0.4em 0 1.2em 0;
}

.leadership-insights-section .leadership-news-item:nth-child(1) .leadership-news-abstract,
.morae-latest-insights-card-summary--large {
  font-size: var(--morae-font-size-body, clamp(1rem, 0.95rem + 0.2vw, 1.125rem));
  line-height: 1.5;
  margin: 0.4em 0 1.2em 0;
}

/* Meta Footer (Type • Date) */
.leadership-insights-section .leadership-news-meta,
.morae-latest-insights-meta {
  margin-top: 0;
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif);
  font-size: clamp(0.78125rem, 0.75rem + 0.12vw, 0.84375rem);
  line-height: 1.4;
  color: var(--insights-meta);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.leadership-insights-section .leadership-news-meta .meta-dot,
.morae-latest-insights-meta .meta-dot {
  margin: 0 0.35rem;
  opacity: 0.8;
}

.leadership-insights-section .leadership-news-meta time,
.morae-latest-insights-meta time {
  color: inherit;
}

@media (min-width: 90rem), (min-width: 1440px) {
  #featured_insights_id .morae-proof-topline,
  .morae-featured-insights-section .morae-proof-topline,
  .morae-latest-insights-topline {
    font-size: 1.3889vw !important;
    line-height: 1.5 !important;
  }

  #featured_insights_id .morae-proof-title,
  .morae-featured-insights-section .morae-proof-title,
  .morae-latest-insights-title {
    font-size: 3.2895833vw !important;
    line-height: 1.3 !important;
  }

  #featured_insights_id .morae-proof-header p:last-child:not(.morae-proof-title):not(.morae-proof-topline),
  .morae-featured-insights-section .morae-proof-header p:last-child:not(.morae-proof-title):not(.morae-proof-topline),
  .morae-latest-insights-desc {
    font-size: 1.38899vw !important;
    line-height: 1.5 !important;
  }

  .leadership-insights-section .leadership-news-tag,
  .morae-latest-insights-tag {
    font-size: 1.15972vw !important;
    line-height: 1.4 !important;
  }

  .leadership-insights-section .leadership-news-title,
  .morae-latest-insights-card-title {
    font-size: 1.38899vw !important;
    line-height: 1.35 !important;
  }

  .leadership-insights-section .leadership-news-item:nth-child(1) .leadership-news-title,
  .morae-latest-insights-card-title--large {
    font-size: 2.4680556vw !important;
    line-height: 1.22 !important;
  }

  .leadership-insights-section .leadership-news-abstract,
  .morae-latest-insights-card-summary {
    font-size: 1.15972vw !important;
    line-height: 1.55 !important;
  }

  .leadership-insights-section .leadership-news-item:nth-child(1) .leadership-news-abstract,
  .morae-latest-insights-card-summary--large {
    font-size: 1.38899vw !important;
    line-height: 1.5 !important;
  }

  .leadership-insights-section .leadership-news-meta,
  .morae-latest-insights-meta {
    font-size: 0.964583vw !important;
    line-height: 1.4 !important;
  }
}

