/* ==========================================================================
   Therapies Section — Bento Grid with Glassmorphism + Reveal Animations
   ========================================================================== */

/* ---- Bento Grid Layout ---- */
.therapies__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 20px;
}

/* Card 1: Featured — spans 5 cols */
.therapies__grid .therapy-card:nth-child(1) {
  grid-column: span 5;
}

/* Card 2: 3 cols */
.therapies__grid .therapy-card:nth-child(2) {
  grid-column: span 3;
}

/* Card 3: 4 cols */
.therapies__grid .therapy-card:nth-child(3) {
  grid-column: span 4;
}

/* Card 4: 4 cols */
.therapies__grid .therapy-card:nth-child(4) {
  grid-column: span 4;
}

/* Card 5: 4 cols */
.therapies__grid .therapy-card:nth-child(5) {
  grid-column: span 4;
}

/* Card 6: 4 cols */
.therapies__grid .therapy-card:nth-child(6) {
  grid-column: span 4;
}

/* ---- Card Shell — Glassmorphism ---- */
.therapy-card {
  position: relative;
  border-radius: var(--card-radius-lg);
  overflow: hidden;
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
  border: 1px solid rgba(var(--color-sage-rgb), 0.1);
  background: linear-gradient(
    135deg,
    rgba(var(--color-bg-card-rgb), 0.8) 0%,
    rgba(var(--color-bg-card-hover-rgb), 0.6) 50%,
    rgba(var(--color-bg-card-rgb), 0.8) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Inner wrapper for z-index stacking above glow */
.therapy-card__inner {
  position: relative;
  z-index: 2;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}

/* Corner glow effect */
.therapy-card__glow {
  position: absolute;
  top: -40%;
  right: -40%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--color-sage-rgb), 0.12) 0%,
    transparent 70%
  );
  z-index: 1;
  filter: blur(30px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
  pointer-events: none;
}

.therapy-card:hover .therapy-card__glow {
  opacity: 1;
  transform: scale(1.3);
  background: radial-gradient(
    circle,
    rgba(var(--color-gold-rgb), 0.12) 0%,
    rgba(var(--color-sage-rgb), 0.06) 50%,
    transparent 70%
  );
}

/* Bottom accent line */
.therapy-card__line {
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-sage-muted),
    transparent
  );
  transition: all 0.5s var(--ease-out);
}

.therapy-card:hover .therapy-card__line {
  left: 5%;
  right: 5%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gold),
    transparent
  );
  box-shadow: 0 0 12px rgba(var(--color-gold-rgb), 0.3);
}

/* ---- Hover state ---- */
.therapy-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--color-sage-rgb), 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(var(--color-sage-rgb), 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ---- Featured card extras ---- */
.therapy-card--featured {
  background: linear-gradient(
    145deg,
    rgba(var(--color-bg-card-hover-rgb), 0.9) 0%,
    rgba(38, 58, 42, 0.7) 40%,
    rgba(var(--color-bg-card-rgb), 0.85) 100%
  );
  border-color: rgba(var(--color-sage-rgb), 0.15);
}

.therapy-card--featured .therapy-card__inner {
  padding: 44px 38px;
}

.therapy-card--featured .therapy-card__icon {
  width: 56px;
  height: 56px;
}

.therapy-card--featured .therapy-card__icon svg {
  width: 28px;
  height: 28px;
}

.therapy-card--featured .therapy-card__title {
  font-size: 1.45rem;
}

.therapy-card--featured .therapy-card__description {
  font-size: 0.92rem;
}


/* ---- Icon ---- */
.therapy-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--card-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(var(--color-sage-rgb), 0.12),
    rgba(var(--color-sage-rgb), 0.04)
  );
  border: 1px solid rgba(var(--color-sage-rgb), 0.1);
  flex-shrink: 0;
  transition: all 0.4s var(--ease-out);
}

.therapy-card__icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-sage-light);
  transition: all 0.4s var(--ease-out);
}

.therapy-card:hover .therapy-card__icon {
  background: linear-gradient(
    135deg,
    rgba(var(--color-gold-rgb), 0.15),
    rgba(var(--color-gold-rgb), 0.05)
  );
  border-color: rgba(var(--color-gold-rgb), 0.2);
  box-shadow: 0 0 20px rgba(var(--color-gold-rgb), 0.1);
}

.therapy-card:hover .therapy-card__icon svg {
  color: var(--color-gold);
  filter: drop-shadow(0 0 8px rgba(var(--color-gold-rgb), 0.3));
  transform: scale(1.1) rotate(3deg);
}

/* ---- Number ---- */
.therapy-card__num {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-top: 20px;
  margin-bottom: 8px;
  display: block;
  transition: color 0.4s var(--ease-out);
}

.therapy-card:hover .therapy-card__num {
  color: var(--color-gold);
}

/* ---- Title ---- */
.therapy-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--color-white);
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: all 0.4s var(--ease-out);
}

.therapy-card:hover .therapy-card__title {
  background: linear-gradient(
    135deg,
    var(--color-gold-light) 0%,
    var(--color-gold) 50%,
    var(--color-gold-deep) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Description ---- */
.therapy-card__description {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  font-weight: 300;
  margin-top: auto;
  padding-top: 4px;
}

/* ---- "Mehr erfahren" Link ---- */
.therapy-card__link {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-sage-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  transition: color var(--duration-fast) var(--ease-out),
              gap var(--duration-fast) var(--ease-out);
}

.therapy-card:hover .therapy-card__link {
  color: var(--color-gold);
  gap: 8px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1150px) {
  .therapies__grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }

  /* Row 1: Card 1 (4 cols) + Card 2 (2 cols) */
  .therapies__grid .therapy-card:nth-child(1) {
    grid-column: span 4;
  }

  .therapies__grid .therapy-card:nth-child(2) {
    grid-column: span 2;
  }

  /* Row 2: Card 3 (3 cols) + Card 4 (3 cols) */
  .therapies__grid .therapy-card:nth-child(3) {
    grid-column: span 3;
  }

  .therapies__grid .therapy-card:nth-child(4) {
    grid-column: span 3;
  }

  /* Row 3: Card 5 (3 cols) + Card 6 (3 cols) */
  .therapies__grid .therapy-card:nth-child(5) {
    grid-column: span 3;
  }

  .therapies__grid .therapy-card:nth-child(6) {
    grid-column: span 3;
  }

  .therapy-card__inner {
    padding: 30px 26px;
  }

  .therapy-card--featured .therapy-card__inner {
    padding: 36px 30px;
  }

  .therapy-card--featured .therapy-card__title {
    font-size: 1.3rem;
  }

}

@media (max-width: 768px) {
  .therapies__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
    gap: 14px;
  }

  /* Reset all to full width */
  .therapies__grid .therapy-card:nth-child(n) {
    grid-column: span 1;
  }

  .therapy-card__inner {
    padding: 28px 24px;
  }

  .therapy-card--featured .therapy-card__inner {
    padding: 32px 28px;
  }

  .therapy-card--featured .therapy-card__title {
    font-size: 1.2rem;
  }

  .therapy-card--featured .therapy-card__icon {
    width: 48px;
    height: 48px;
  }

  .therapy-card__icon {
    width: 44px;
    height: 44px;
  }

  .therapy-card__icon svg {
    width: 20px;
    height: 20px;
  }

  /* Reset wide card inner */
  .therapy-card--wide .therapy-card__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .therapy-card--wide .therapy-card__icon {
    margin-top: 0;
  }

}

@media (max-width: 480px) {
  .therapy-card__inner {
    padding: 24px 20px;
  }

  .therapy-card--featured .therapy-card__inner {
    padding: 28px 24px;
  }

  .therapy-card__title {
    font-size: 1.1rem;
  }

  .therapy-card__description {
    font-size: 0.85rem;
    line-height: 1.65;
  }

  .therapy-card__line {
    display: none;
  }

  .therapy-card__glow {
    display: none;
  }
}
