/* Standalone challenges grid — service & industry pages */

.section-challenges--grid {
  --section-challenges-gap-after-heading: var(--spacing-24);
  --section-challenges-gap-inner: var(--spacing-16);
  --section-challenges-gap-list: var(--spacing-16);
  --section-challenges-gap-tight: var(--spacing-8);
  padding: var(--spacing-80) 0;
  background: #fff;
}

.section-challenges--grid .section-challenges__heading {
  margin: 0 0 var(--spacing-24);
  font-size: clamp(32px, 3vw, 40px);
  line-height: 1.2;
  font-weight: var(--font-weight-700);
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.section-challenges--grid .section-challenges__heading-accent {
  color: var(--color-brand-terracotta);
}

.section-challenges--grid .section-challenges__body {
  display: flex;
  flex-direction: column;
  gap: var(--section-challenges-gap-inner);
}

.section-challenges--grid .section-challenges__intro {
  margin: 0 auto var(--section-challenges-gap-list);
  max-width: 860px;
  text-align: center;
  color: var(--secondary-text);
  line-height: 1.6;
  font-size: clamp(14px, 2vw, 16px);
}

/* Multi-paragraph intros: the component never spaced its own paragraphs. */
.section-challenges--grid .section-challenges__intro p:not(:last-child) {
  margin-bottom: var(--spacing-16);
}

.section-challenges--grid .section-challenges__wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-8);
}

.section-challenges--grid .section-challenges__item {
  display: grid;
  padding: var(--spacing-24);
  background: var(--secondary-bg);
  grid-template-columns: 1fr auto;
  gap: var(--spacing-24);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.section-challenges--grid .section-challenges__content {
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 1;
}

.section-challenges--grid .section-challenges__header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  margin-bottom: var(--spacing-16);
}

.section-challenges--grid .section-challenges__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
}

.section-challenges--grid .section-challenges__meta-label {
  color: var(--color-brand-terracotta);
  font-weight: var(--font-weight-600);
  font-size: 16px;
  white-space: nowrap;
}

.section-challenges--grid .section-challenges__meta-line {
  position: relative;
  width: 100px;
  height: 2px;
  background-color: var(--color-brand-terracotta);
}

.section-challenges--grid .section-challenges__meta-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--color-brand-terracotta);
  border-radius: 50%;
}

.section-challenges--grid .section-challenges__item-title {
  margin: 0;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.3;
  font-weight: var(--font-weight-600);
}

.section-challenges--grid .section-challenges__info-text {
  display: flex;
  flex-direction: column;
  gap: var(--section-challenges-gap-tight);
  max-width: 800px;
}
.section-challenges--grid .section-challenges__intro a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}
.section-challenges--grid .section-challenges__intro a:hover,
.section-challenges--grid .section-challenges__intro a:focus-visible {
  color: var(--color-brand-teal-300);
}
.section-challenges--grid .section-challenges__info a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}
.section-challenges--grid .section-challenges__info a:hover {
  color: var(--color-brand-teal-300);
}
.section-challenges--grid .section-challenges__info {
  max-width: 800px;
  color: var(--secondary-text);
  line-height: 1.6;
  font-size: clamp(14px, 2vw, 16px);
}

.section-challenges--grid .section-challenges__info-text ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}

.section-challenges--grid .section-challenges__info-text li {
  position: relative;
  padding-left: 16px;
  line-height: 1.45;
  color: var(--primary-text);
  font-size: clamp(14px, 2vw, 15px);
}
.section-challenges--grid .section-challenges__info-text li a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}
.section-challenges--grid .section-challenges__info-text li a:hover {
  color: var(--color-brand-teal-300);
}


.section-challenges--grid .section-challenges__info-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-brand-terracotta);
}

/* Decorative challenge number — the large faint "#1 / #2 / #3" watermark.
   Contract shared with the case-study variant in p-case.css (which uses the
   same class and property names): pinned to the bottom-right corner, painted
   above the card background (z-index 0) and behind the card content (1).
   Pages only override the --challenge-number-* values when a card needs a
   different size or colour; the position itself is the same everywhere. */
.section-challenges--grid .section-challenges__index {
  --challenge-number-size: clamp(80px, 15vw, 180px);
  --challenge-number-color: rgba(0, 0, 0, 0.08);
  --challenge-number-opacity: 0.4;
  --challenge-number-right: var(--spacing-24);
  --challenge-number-bottom: var(--spacing-8);
  position: absolute;
  right: var(--challenge-number-right);
  bottom: var(--challenge-number-bottom);
  top: auto;
  transform: none;
  font-family: var(--font-display);
  font-size: var(--challenge-number-size);
  font-weight: var(--font-weight-700);
  line-height: 1;
  color: var(--challenge-number-color);
  opacity: var(--challenge-number-opacity);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

@media screen and (max-width: 1024px) {
  .section-challenges--grid .section-challenges__wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-16);
  }

  .section-challenges--grid .section-challenges__heading,
  .section-challenges--grid .section-challenges__intro {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .section-challenges--grid .section-challenges__item {
    grid-template-columns: 1fr;
    padding: var(--spacing-32) var(--spacing-40);
  }

  .section-challenges--grid .section-challenges__index {
    --challenge-number-right: var(--spacing-32);
    --challenge-number-size: clamp(80px, 12vw, 150px);
  }
}

@media screen and (max-width: 768px) {
  .section-challenges--grid .section-challenges__item {
    padding: var(--spacing-24);
    gap: var(--spacing-16);
  }

  .section-challenges--grid .section-challenges__header {
    margin-bottom: 0;
  }

  .section-challenges--grid .section-challenges__content {
    gap: var(--spacing-16);
  }

  .section-challenges--grid .section-challenges__item-title {
    font-size: clamp(18px, 2vw, 20px);
  }

  .section-challenges--grid .section-challenges__index {
    --challenge-number-right: var(--spacing-24);
    --challenge-number-size: clamp(60px, 10vw, 120px);
  }
}

@media screen and (max-width: 480px) {
  .section-challenges--grid .section-challenges__item {
    gap: var(--spacing-24);
  }

  .section-challenges--grid .section-challenges__meta-label {
    font-size: 14px;
  }

  .section-challenges--grid .section-challenges__item-title {
    font-size: 18px;
  }

  .section-challenges--grid .section-challenges__info {
    font-size: 14px;
  }

  .section-challenges--grid .section-challenges__index {
    --challenge-number-right: var(--spacing-16);
    --challenge-number-bottom: 16px;
    --challenge-number-size: clamp(64px, 8vw, 100px);
  }
}
