.parent {
  width: 300px;
  height: 320px;
  perspective: 1200px;
}

.card {
  height: 100%;
  border-radius: 40px;
  background: linear-gradient(135deg,
      #6B21A8 0%,
      #8B5CF6 100%);
  transition: all 0.6s ease-in-out;
  transform-style: preserve-3d;
  box-shadow:
    rgba(30, 30, 60, 0) 40px 50px 25px -40px,
    rgba(30, 30, 60, 0.2) 0px 25px 25px -5px;
}

.glass {
  transform-style: preserve-3d;
  position: absolute;
  inset: 10px;
  border-radius: 45px;
  border-top-left-radius: 100%;
  background: linear-gradient(0deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.7) 100%);
  transform: translate3d(0px, 0px, 30px);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.6s ease-in-out;
}

.content {
  padding: 90px 50px 0px 25px;
  transform: translate3d(0, 0, 31px);
}

.content .title {
  display: block;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
}

.content .text {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-top: 15px;
  line-height: 1.5;
}

.bottom {
  padding: 12px 15px;
  transform-style: preserve-3d;
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translate3d(0, 0, 31px);
}

.bottom .view-more {
  display: flex;
  align-items: center;
  width: 40%;
  justify-content: flex-end;
  transition: all 0.3s ease-in-out;
}

.bottom .view-more:hover {
  transform: translate3d(0, 0, 15px);
}

.bottom .view-more .view-more-button {
  background: none;
  border: none;
  color: #6a5acd;
  font-weight: bold;
  font-size: 13px;
}

.bottom .view-more .svg {
  fill: none;
  stroke: #6a5acd;
  stroke-width: 2.5px;
  max-height: 14px;
}

.bottom .social-buttons-container {
  display: flex;
  gap: 12px;
  transform-style: preserve-3d;
}

.bottom .social-buttons-container .social-button {
  width: 32px;
  aspect-ratio: 1;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: none;
  display: grid;
  place-content: center;
  box-shadow: rgba(30, 30, 60, 0.4) 0px 8px 6px -5px;
}

.bottom .social-buttons-container .social-button:first-child {
  transition:
    transform 0.3s ease-in-out 0.3s,
    box-shadow 0.3s ease-in-out 0.3s;
}

.bottom .social-buttons-container .social-button:nth-child(2) {
  transition:
    transform 0.3s ease-in-out 0.5s,
    box-shadow 0.3s ease-in-out 0.5s;
}

.bottom .social-buttons-container .social-button:nth-child(3) {
  transition:
    transform 0.3s ease-in-out 0.7s,
    box-shadow 0.3s ease-in-out 0.7s;
}

.bottom .social-buttons-container .social-button .svg {
  width: 16px;
  fill: #3c2f80;
}

.bottom .social-buttons-container .social-button:hover {
  background: #3c2f80;
}

.bottom .social-buttons-container .social-button:hover .svg {
  fill: #ffffff;
}

.bottom .social-buttons-container .social-button:active {
  background: #ffd700;
}

.bottom .social-buttons-container .social-button:active .svg {
  fill: #3c2f80;
}

.logo {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}

.logo .circle {
  display: block;
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  top: 0;
  left: 0;
  box-shadow: rgba(100, 100, 111, 0.2) 10px 10px 20px 0px;
  background: rgba(147, 112, 219, 0.3);
  transition: all 0.6s ease-in-out;
}

.logo .circle1 {
  width: 160px;
  transform: translate3d(0, 0, 25px);
  top: 10px;
  left: 10px;
}

.logo .circle2 {
  width: 130px;
  transform: translate3d(0, 0, 45px);
  top: 12px;
  left: 12px;
  transition-delay: 0.3s;
}

.logo .circle3 {
  width: 100px;
  transform: translate3d(0, 0, 65px);
  top: 15px;
  left: 15px;
  transition-delay: 0.6s;
}

.logo .circle4 {
  width: 70px;
  transform: translate3d(0, 0, 85px);
  top: 20px;
  left: 20px;
  transition-delay: 0.9s;
}

.logo .circle5 {
  width: 40px;
  transform: translate3d(0, 0, 105px);
  top: 25px;
  left: 25px;
  display: grid;
  place-content: center;
  transition-delay: 1.2s;
}

.logo .circle5 .svg {
  width: 18px;
  fill: #ffffff;
}

.parent:hover .card {
  transform: rotate3d(1, -1, 0, 25deg);
  box-shadow:
    rgba(30, 30, 60, 0.3) 30px 50px 25px -40px,
    rgba(30, 30, 60, 0.15) 0px 25px 30px 0px;
}

.parent:hover .card .bottom .social-buttons-container .social-button {
  transform: translate3d(0, 0, 60px);
  box-shadow: rgba(30, 30, 60, 0.25) 5px 20px 10px 0px;
}

.parent:hover .card .logo .circle2 {
  transform: translate3d(0, 0, 65px);
}

.parent:hover .card .logo .circle3 {
  transform: translate3d(0, 0, 85px);
}

.parent:hover .card .logo .circle4 {
  transform: translate3d(0, 0, 105px);
}

.parent:hover .card .logo .circle5 {
  transform: translate3d(0, 0, 125px);
}


/* Grid Layout Helper (Restoring from Services) */
.services-section {
  position: relative;
  padding: 100px 8%;
  background-color: transparent;
  z-index: 10;
}

.services-header {
  text-align: center;
  margin-bottom: 80px;
}

.services-title {
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #ffffff;
  margin-bottom: 20px;
}

.services-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* Enforce 3 columns for the curve */
  gap: 40px;
  width: 100%;
  justify-items: center;
  align-items: center;
  padding-top: 60px;
  /* Space for the middle card to rise */
  padding-bottom: 60px;
}

/* Curve Effect: Arc Layout */
@media (min-width: 992px) {
  .services-grid .parent:nth-child(1) {
    transform: translateY(40px) rotate(-3deg);
  }

  .services-grid .parent:nth-child(2) {
    transform: translateY(-40px);
    /* Rise up */
    z-index: 2;
    /* On top */
  }

  .services-grid .parent:nth-child(3) {
    transform: translateY(40px) rotate(3deg);
  }
}

/* Icon Helper */
.logo .circle5 img {
  width: 60px;
  /* Increased from 24px - significantly larger */
  height: 60px;
  object-fit: cover;
  transform: scale(1.5);
  /* Slight pop */
}

/* Light Mode Overrides for text outside cards */
[data-theme="light"] .services-title {
  color: #111;
}

[data-theme="light"] .services-subtitle {
  color: #444;
}

/* Light Mode Overrides for 3D Cards */
[data-theme="light"] .card {
  background: linear-gradient(135deg, #F3F4F6 0%, #E9D5FF 100%);
  /* Light Grey to Light Purple Gradient */
  box-shadow: rgba(0, 0, 0, 0.1) 40px 50px 25px -40px, rgba(0, 0, 0, 0.05) 0px 25px 25px -5px;
}

[data-theme="light"] .content .title {
  color: #3c2f80;
  /* Restore dark purple text */
}

[data-theme="light"] .content .text {
  color: rgba(60, 47, 128, 0.8);
}

[data-theme="light"] .bottom .view-more .view-more-button {
  color: #3c2f80;
}

[data-theme="light"] .bottom .view-more .svg {
  stroke: #3c2f80;
}

[data-theme="light"] .social-buttons-container .social-button {
  background: rgba(60, 47, 128, 0.1);
  box-shadow: none;
}

[data-theme="light"] .glass {
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.9) 100%);
  border-color: rgba(60, 47, 128, 0.1);
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid items */
.services-grid .parent:nth-child(1) {
  transition-delay: 0.1s;
}

.services-grid .parent:nth-child(2) {
  transition-delay: 0.3s;
}

.services-grid .parent:nth-child(3) {
  transition-delay: 0.5s;
}

/* Maintain the curve transform when visible on Desktop */
@media (min-width: 992px) {
  .services-grid .parent:nth-child(1).visible {
    transform: translateY(40px) rotate(-3deg);
  }

  .services-grid .parent:nth-child(2).visible {
    transform: translateY(-40px);
  }

  .services-grid .parent:nth-child(3).visible {
    transform: translateY(40px) rotate(3deg);
  }
}