/* ============================================================
   How We Help — Premium animated programme cards · wave166
   ============================================================ */

.pw-pro-programs {
  position: relative;
  padding: clamp(72px, 10vw, 108px) 0;
  overflow: hidden;
  background: linear-gradient(180deg, #F0F2F5 0%, #fff 45%, #F7F8FA 100%);
}

.pw-pro-programs__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 10% 20%, rgba(201, 168, 110, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(184, 149, 88, 0.08), transparent 50%);
}

.pw-pro-programs__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(184, 149, 88, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
}

.pw-pro-programs .container {
  position: relative;
  z-index: 1;
}

.pw-pro-programs__head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.pw-pro-programs__lead {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.75;
  color: #64748b;
}

.pw-pro-programs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.pw-pro-program {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px 24px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s ease,
    border-color 0.35s ease;
}

.pw-pro-program::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #B89558, #C9A86E);
  border-radius: 0 0 4px 0;
  transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.pw-pro-program::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 149, 88, 0.04), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pw-pro-program:hover {
  transform: translateY(-10px);
  border-color: rgba(184, 149, 88, 0.25);
  box-shadow:
    0 24px 48px rgba(184, 149, 88, 0.12),
    0 0 0 1px rgba(184, 149, 88, 0.06);
}

.pw-pro-program:hover::before {
  height: 100%;
}

.pw-pro-program:hover::after {
  opacity: 1;
}

.pw-pro-program.is-inview {
  animation: pwProgIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--prog-delay, 0ms);
}

@keyframes pwProgIn {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pw-pro-program__num {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(184, 149, 88, 0.08);
  transition: color 0.4s ease, transform 0.4s ease;
}

.pw-pro-program:hover .pw-pro-program__num {
  color: rgba(184, 149, 88, 0.14);
  transform: scale(1.05);
}

.pw-pro-program__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(201, 168, 110, 0.12), rgba(232, 220, 196, 0.15));
  color: #B89558;
  transition: transform 0.4s ease, background 0.4s ease;
}

.pw-pro-program__icon svg {
  width: 24px;
  height: 24px;
}

.pw-pro-program:hover .pw-pro-program__icon {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(135deg, #B89558, #C9A86E);
  color: #fff;
}

.pw-pro-program h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}

.pw-pro-program p {
  position: relative;
  z-index: 1;
  flex: 1;
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #64748b;
}

.pw-pro-program__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.pw-pro-program__tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B89558;
  background: rgba(201, 168, 110, 0.12);
  transition: background 0.3s ease, color 0.3s ease;
}

.pw-pro-program:hover .pw-pro-program__tag {
  background: #B89558;
  color: #fff;
}

.pw-pro-program__arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 1rem;
  transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.pw-pro-program:hover .pw-pro-program__arrow {
  transform: translateX(4px);
  background: #B89558;
  border-color: #B89558;
  color: #fff;
}

.pw-pro-programs__cta {
  margin: 40px 0 0;
  text-align: center;
}

/* Animated connector line (desktop) */
@media (min-width: 1081px) {
  .pw-pro-programs__grid {
    position: relative;
  }

  .pw-pro-programs__grid::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(184, 149, 88, 0.2), transparent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
  }

  .pw-pro-programs__grid.is-inview::before {
    transform: scaleX(1);
  }
}

@media (max-width: 1080px) {
  .pw-pro-programs__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .pw-pro-programs__grid {
    grid-template-columns: 1fr;
  }

  .pw-pro-program {
    padding: 24px 20px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-pro-program.is-inview {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .pw-pro-program:hover {
    transform: none;
  }
}
