/* Purpose: Problem · Hidden Loops. Cream field with a centre-sharp / edge-blurred
   background figure, a pill + headline, and frosted loop cards split left/right.
   Ported from the WV reference. Background image is injected per-instance via a
   scoped <style> block in the template (.problem-loops__bg::before/::after). */

.problem-loops {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--cream);
}

/* Sharp background figure. */
.problem-loops__bg::before {
  content: '';
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 68%;
  background-repeat: no-repeat;
  z-index: 0;
}
/* Blurred copy with a radial mask — keeps the central oval sharp, blurs surroundings. */
.problem-loops__bg::after {
  content: '';
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 68%;
  background-repeat: no-repeat;
  filter: blur(16px) saturate(110%);
  -webkit-mask-image: radial-gradient(ellipse 22% 48% at center 56%, transparent 55%, rgba(0,0,0,0.55) 75%, #000 95%);
          mask-image: radial-gradient(ellipse 22% 48% at center 56%, transparent 55%, rgba(0,0,0,0.55) 75%, #000 95%);
  z-index: 1;
  pointer-events: none;
}
/* Cream radial wash — keeps headline + cards readable over the photo. */
.problem-loops__wash {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 50% 28%, rgba(245, 239, 224, 0.85) 0%, rgba(245, 239, 224, 0.55) 30%, rgba(245, 239, 224, 0.20) 55%, transparent 78%),
    radial-gradient(ellipse 40% 50% at 50% 78%, rgba(245, 239, 224, 0.55) 0%, transparent 70%);
}
.problem-loops .section-i { position: relative; z-index: 3; }

/* ── Head ── */
.problem-loops__head {
  text-align: center;
  max-width: 980px;
  margin: 0 auto 64px;
  display: flex; flex-direction: column; align-items: center;
}
.problem-loops__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px 9px 14px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--em-08, rgba(55, 96, 84, 0.10));
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  box-shadow: 0 4px 14px -8px rgba(55, 96, 84, 0.20);
}
.problem-loops__pill svg {
  width: 14px; height: 14px;
  color: var(--emerald);
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.problem-loops__title {
  font-family: var(--font-display); font-weight: var(--weight-regular);
  font-size: var(--sec-h2);
  line-height: 1.05; letter-spacing: -0.022em;
  color: var(--ink);
}
.problem-loops__title em { color: var(--emerald); font-style: italic; }
.problem-loops__hint {
  margin-top: 20px;
  font-family: var(--font-body); font-size: 16px; font-weight: 500;
  line-height: 1.55; color: var(--ink);            /* full ink — readable over the bg figure */
  max-width: 52ch;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.75); /* soft halo lifts it off the image */
}

/* ── Grid: 3 left · centre · 3 right ── */
.loops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 1320px;
  margin: 0 auto;
}
.loops-grid__center { display: none; }
@media (min-width: 1024px) {
  .loops-grid {
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 28px;
    align-items: center;
  }
  .loops-grid__center { display: block; min-height: 480px; }
}
.loops-grid__col { display: flex; flex-direction: column; gap: 26px; }

/* ── Loop card ── */
.loop-card {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.60);
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: 0 18px 34px -16px rgba(55, 96, 84, 0.35);
  transition: transform var(--dur-default), box-shadow var(--dur-default);
  text-decoration: none; color: inherit;
}
.loop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -22px rgba(55, 96, 84, 0.30);
}
.loop-card__icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  border: 1px solid rgba(55, 96, 84, 0.06);
  transition: transform var(--dur-default);
}
.loop-card:hover .loop-card__icon { transform: scale(1.08) rotate(-4deg); }
.loop-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.loop-card__title {
  font-family: var(--font-body); font-weight: 600;
  font-size: 16px; line-height: 1.3;
  color: var(--ink); letter-spacing: -0.005em;
}
.loop-card__desc {
  font-family: var(--font-body); font-size: 14px;
  line-height: 1.45; color: var(--ink-72);
}
.loop-card__arrow {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(55, 96, 84, 0.07);
  color: var(--emerald);
  opacity: 0.6;
  transition: opacity var(--dur-default), transform var(--dur-default), background var(--dur-default), color var(--dur-default);
}
.loop-card__arrow svg {
  width: 14px; height: 14px; fill: none;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.loop-card:hover .loop-card__arrow {
  opacity: 1; transform: translateX(3px);
  background: var(--emerald); color: #FFFFFF;
}
