/* Dark magical service-circle flips — client-supplied subcategory wording only. */
.hero-service-icon {
  position: relative;
}

.hero-service-icon__flipper {
  position: relative;
  display: block;
  width: clamp(164px, 14.5vw, 212px);
  aspect-ratio: 1;
  perspective: 980px;
}

.hero-service-icon__face {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(167, 232, 220, 0.82);
  border-radius: 50%;
  backface-visibility: hidden;
  box-shadow: 0 0 0 7px rgba(8, 29, 34, 0.48), 0 18px 42px rgba(0, 0, 0, 0.46);
  transition: transform 540ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-service-icon__face--front {
  transform: rotateY(0deg);
  background: rgba(3, 15, 20, 0.56);
}

.hero-service-icon__face--front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-service-icon__face--back {
  box-sizing: border-box;
  flex-direction: column;
  padding: clamp(16px, 1.6vw, 23px);
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 20%, rgba(108, 207, 193, 0.24), transparent 48%),
    linear-gradient(145deg, rgba(4, 29, 36, 0.98), rgba(4, 12, 18, 0.98));
  color: #e8fff8;
  text-align: center;
}

.hero-service-icon__back-title {
  display: block;
  margin-bottom: 7px;
  color: #b4f1e4;
  font-family: "Comfortaa", system-ui, sans-serif;
  font-size: clamp(0.58rem, 0.72vw, 0.72rem);
  font-weight: 700;
  line-height: 1.22;
}

.hero-service-icon__face--back ul {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Comfortaa", system-ui, sans-serif;
  font-size: clamp(0.62rem, 0.77vw, 0.8rem);
  font-weight: 700;
  line-height: 1.28;
}

.hero-service-icon--spiritual .hero-service-icon__face--back {
  padding: clamp(13px, 1.25vw, 19px);
}

.hero-service-icon--spiritual .hero-service-icon__face--back ul {
  gap: 3px;
  font-size: clamp(0.57rem, 0.68vw, 0.71rem);
}

@media (min-width: 801px) {
  .hero-service-icon__flipper {
    width: clamp(144px, 11.7vw, 176px);
  }

  .hero-service-icon__face--back {
    padding: clamp(15px, 1.35vw, 20px);
  }

  .hero-service-icon__back-title {
    margin-bottom: 6px;
    font-size: clamp(0.61rem, 0.73vw, 0.76rem);
  }

  .hero-service-icon--spiritual .hero-service-icon__face--back {
    padding: clamp(12px, 1.1vw, 16px);
  }
}

.hero-service-icon:hover .hero-service-icon__face--front,
.hero-service-icon:focus-visible .hero-service-icon__face--front {
  transform: rotateY(-180deg);
}

.hero-service-icon:hover .hero-service-icon__face--back,
.hero-service-icon:focus-visible .hero-service-icon__face--back {
  transform: rotateY(0deg);
}

.hero-service-icon__touch-copy {
  display: none;
}

@media (max-width: 800px) {
  .hero-service-icon__flipper {
    width: clamp(82px, 22vw, 118px);
  }

  .hero-service-icon__face {
    border-width: 1px;
    box-shadow: 0 0 0 4px rgba(8, 29, 34, 0.45), 0 12px 25px rgba(0, 0, 0, 0.42);
  }

  .hero-service-icon__face--back {
    padding: 9px;
  }

  .hero-service-icon__back-title {
    margin-bottom: 4px;
    font-size: 0.42rem;
  }

  .hero-service-icon__face--back ul,
  .hero-service-icon--spiritual .hero-service-icon__face--back ul {
    gap: 2px;
    font-size: 0.37rem;
    line-height: 1.18;
  }

  .hero-service-icon--spiritual .hero-service-icon__face--back {
    padding: 7px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .hero-service-icon__touch-copy {
    display: block;
    max-width: 18ch;
    margin-top: 5px;
    color: rgba(229, 251, 244, 0.92);
    font-family: "Comfortaa", system-ui, sans-serif;
    font-size: clamp(0.47rem, 1.85vw, 0.58rem);
    font-weight: 700;
    line-height: 1.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-service-icon__face {
    transition: none;
  }
}
