/* ==========================================================================
   Pedagogical pillars
   ========================================================================== */

.home-pillars {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 9vw, 9rem) 0;
  background: #f4f8f7;
}

.home-pillars::before,
.home-pillars::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.home-pillars::before {
  top: -10rem;
  right: -9rem;
  width: 29rem;
  height: 29rem;
  border-radius: 48% 52% 60% 40% / 42% 38% 62% 58%;
  background: var(--mh-yellow, #e6e766);
  opacity: 0.18;
  transform: rotate(20deg);
}

.home-pillars::after {
  bottom: -12rem;
  left: -9rem;
  width: 27rem;
  height: 27rem;
  border-radius: 55% 45% 42% 58% / 38% 52% 48% 62%;
  background: var(--mh-medium-teal, #007980);
  opacity: 0.08;
  transform: rotate(-15deg);
}

.home-pillars__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, 1140px);
  margin-inline: auto;
}

.home-pillars__header {
  max-width: 850px;
  margin: 0 auto clamp(4.5rem, 7vw, 7rem);
  text-align: center;
}

.home-pillars__eyebrow {
  display: inline-flex;
  margin: 0 0 1.25rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--mh-yellow, #e6e766);
  color: var(--mh-dark-teal, #00595d);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.home-pillars__title {
  margin: 0;
  color: var(--mh-dark-teal, #00595d);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.98;
}

.home-pillars__intro {
  max-width: 680px;
  margin: 1.75rem auto 0;
  color: #536464;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.home-pillars__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
}

.pillar-card {
  position: relative;
  min-width: 0;
  padding: 5.25rem 1.6rem 2rem;
  border-radius: 2.5rem 2.5rem 0.75rem 2.5rem;
  box-shadow: 0 20px 50px rgb(0 89 93 / 10%);
}

.pillar-card:nth-child(even) {
  margin-top: 3.5rem;
  border-radius: 2.5rem 0.75rem 2.5rem 2.5rem;
}

.pillar-card--language {
  background: #e2f1ee;
}

.pillar-card--nature {
  background: #f3f3ce;
}

.pillar-card--movement {
  background: #dceff0;
}

.pillar-card--creativity {
  background: #f5eadf;
}

.pillar-card__icon {
  position: absolute;
  top: -3.75rem;
  left: 50%;
  width: 8rem;
  height: 8rem;
  transform: translateX(-50%);
  transition: transform 220ms ease;
}

.pillar-card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgb(0 89 93 / 12%));
}

.pillar-card:hover .pillar-card__icon {
  transform: translateX(-50%) rotate(-4deg) scale(1.04);
}

.pillar-card__content {
  text-align: center;
}

.pillar-card__title {
  min-height: 2.5em;
  margin: 0 0 1.25rem;
  color: var(--mh-dark-teal, #00595d);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.2;
}

.pillar-card__text {
  margin: 0;
  color: #4f5e5e;
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Tablet */

@media (max-width: 960px) {
  .home-pillars__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5.5rem 1.5rem;
  }

  .pillar-card:nth-child(even) {
    margin-top: 2rem;
  }
}

/* Mobile */

@media (max-width: 620px) {
  .home-pillars {
    padding-block: 4.5rem;
  }

  .home-pillars__inner {
    width: min(100% - 2rem, 1140px);
  }

  .home-pillars__header {
    margin-bottom: 5.5rem;
    text-align: left;
  }

  .home-pillars__intro {
    margin-left: 0;
  }

  .home-pillars__title br {
    display: none;
  }

  .home-pillars__grid {
    grid-template-columns: 1fr;
    gap: 5.5rem;
  }

  .pillar-card,
  .pillar-card:nth-child(even) {
    margin-top: 0;
    padding: 5rem 1.5rem 2rem;
  }

  .pillar-card__title {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pillar-card__icon {
    transition: none;
  }
}
