/*
 * JPC AI Toolchest — homepage-only styling (v1.6).
 * Visual reference: JPC's existing white Toolset Suite section.
 * The ID selector is intentional: no other Elementor section is affected.
 */
#jpc-ai-toolchest {
  --jpc-ai-bg: #FFFFFF;
  --jpc-ai-card: #F3F7FD;
  --jpc-ai-card-ring: #E5EEFC;
  --jpc-ai-edge: #E0E8F3;
  --jpc-ai-ink: #081529;
  --jpc-ai-sub: #0C1B2D;
  --jpc-ai-accent: #1768E1;
  --jpc-ai-navy: #081529;
  background: var(--jpc-ai-bg) !important;
  color: var(--jpc-ai-ink) !important;
  /* Match the original Toolset Suite's centred ~1100px content column.
   * Width and margins are scoped to the ONE AI section, not site-wide. */
  width: calc(100% - 48px) !important;
  max-width: 1104px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: clamp(55px, 6vw, 100px) 0 !important;
  box-sizing: border-box;
  scroll-margin-top: 88px; /* Keep the section heading clear of sticky menus. */
  gap: 18px;
}

/* Section label and headline: match the original Toolset Suite heading. */
#jpc-ai-toolchest .jpc-ai-kicker,
#jpc-ai-toolchest .elementor-widget-text-editor .jpc-ai-kicker {
  color: var(--jpc-ai-ink) !important;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
  text-transform: uppercase;
}
#jpc-ai-toolchest h2,
#jpc-ai-toolchest h2.elementor-heading-title,
#jpc-ai-toolchest h2 .elementor-heading-title {
  color: var(--jpc-ai-ink) !important;
  font-family: inherit;
  font-weight: 900;
  font-size: clamp(34px, 4.7vw, 60px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-transform: uppercase;
  max-width: 1040px;
  margin: 0;
}
#jpc-ai-toolchest .jpc-ai-headline-accent {
  color: var(--jpc-ai-accent) !important;
}

/* All descriptive copy uses the existing JPC Toolset-card navy-on-white look. */
#jpc-ai-toolchest .elementor-widget-text-editor,
#jpc-ai-toolchest .elementor-widget-text-editor p,
#jpc-ai-toolchest p,
#jpc-ai-toolchest .jpc-ai-workflow li,
#jpc-ai-toolchest .jpc-ai-workflow li span {
  color: var(--jpc-ai-sub) !important;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}
#jpc-ai-toolchest .elementor-widget-text-editor p,
#jpc-ai-toolchest p { margin: 0; }
#jpc-ai-toolchest .jpc-ai-lead,
#jpc-ai-toolchest .elementor-widget-text-editor .jpc-ai-lead {
  font-size: clamp(17px, 1.7vw, 20px);
  max-width: 900px;
  line-height: 1.7;
  margin: 0;
}
#jpc-ai-toolchest h3,
#jpc-ai-toolchest h3.elementor-heading-title,
#jpc-ai-toolchest h3 .elementor-heading-title {
  color: var(--jpc-ai-ink) !important;
  font-family: inherit;
  font-size: clamp(22px, 2.2vw, 27px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.17;
  margin: 0;
}

/* Preserve the existing two CTAs and their correct destinations. */
#jpc-ai-toolchest .jpc-ai-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 32px;
}
#jpc-ai-toolchest .jpc-ai-actions .elementor-button,
#jpc-ai-toolchest .jpc-ai-actions a.jpc-ai-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--jpc-ai-navy) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--jpc-ai-navy) !important;
  border-radius: 2px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .025em;
  line-height: 1.4;
  padding: 16px 24px;
}
#jpc-ai-toolchest .jpc-ai-actions .elementor-widget-button:nth-child(2) .elementor-button,
#jpc-ai-toolchest .jpc-ai-actions a.jpc-ai-action:nth-child(2) {
  background: transparent !important;
  color: var(--jpc-ai-navy) !important;
  border-color: var(--jpc-ai-navy) !important;
}

/* Five RFQ-to-proposal steps: pale-blue panels and dark, readable text. */
#jpc-ai-toolchest .jpc-ai-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 12px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
#jpc-ai-toolchest .jpc-ai-workflow li {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 24px 21px;
  background: var(--jpc-ai-card) !important;
  border: 1px solid var(--jpc-ai-edge);
  min-width: 0;
  font-size: 16px;
  line-height: 1.45;
}
#jpc-ai-toolchest .jpc-ai-workflow li strong {
  color: var(--jpc-ai-ink) !important;
  font-size: 17px;
  font-weight: 500;
}
#jpc-ai-toolchest .jpc-ai-workflow li span { font-size: 16px; line-height: 1.5; }

/* Four feature cards: same pale-blue panel and top-right ring as reference. */
#jpc-ai-toolchest .jpc-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}
#jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 40px 46px;
  min-width: 0;
  min-height: 245px;
  background: var(--jpc-ai-card) !important;
  border: 1px solid var(--jpc-ai-edge);
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
}
#jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature::before {
  content: '';
  position: absolute;
  z-index: 0;
  width: 105px;
  height: 105px;
  top: -58px;
  right: -43px;
  border: 30px solid var(--jpc-ai-card-ring);
  border-radius: 50%;
  pointer-events: none;
  box-sizing: content-box;
}
#jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature > * {
  position: relative;
  z-index: 1;
}
#jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature h3 { margin: 0; }
#jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature p { margin: 0; }

@media (max-width: 1050px) {
  #jpc-ai-toolchest .jpc-ai-workflow { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 780px) {
  #jpc-ai-toolchest .jpc-ai-workflow { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #jpc-ai-toolchest .jpc-ai-grid { grid-template-columns: 1fr; }
  #jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature { min-height: 0; }
}
@media (max-width: 520px) {
  #jpc-ai-toolchest { width: calc(100% - 32px) !important; }
  #jpc-ai-toolchest .jpc-ai-workflow { grid-template-columns: 1fr; }
  #jpc-ai-toolchest .jpc-ai-grid .jpc-ai-feature { padding: 30px 25px; }
  #jpc-ai-toolchest .jpc-ai-actions { display: flex; flex-direction: column; }
  #jpc-ai-toolchest .jpc-ai-actions .elementor-widget-button { margin: 0; }
  #jpc-ai-toolchest h2,
  #jpc-ai-toolchest h2.elementor-heading-title,
  #jpc-ai-toolchest h2 .elementor-heading-title { font-size: clamp(32px, 8vw, 42px); }
}
