/* plan cards */
.plans-section {
  .card {
    > :not(.btn) {
      padding-bottom: 1rem;
    }
  }

  .card#most-popular {
    /* background: var(--font-color-sec); */
    background-color: hsl(from var(--accent-color) h s 40);
    z-index: 1;
    .btn {
      color: var(--font-color-sec);
      font-weight: bolder;
      background: white;
      border-color: black;

      &:active {
        background: black;
        color: white;
      }
    }

    &::after {
      opacity: 0;
      scale: 0;
      pointer-events: auto;
      z-index: 20;
      padding: 0 1rem;
      content: "Most Popular";
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      color: var(--font-color-sec);
      font-weight: 700;
      position: absolute;
      align-self: center;
      top: -5%;
      right: 0;
      backdrop-filter: blur(20px);
      background: yellow;
      height: 10%;
      border-radius: 2rem;
      transition: 300ms ease-in-out;
    }

    &:hover::after {
      opacity: 1;
      scale: 1;
    }
  }
  .card:hover {
    z-index: 15;
    translate: 0 -10%;
  }
  &:has(.card:hover) .card:not(:hover) {
    opacity: 0.4;
    filter: blur(2px);
  }
  .card-holder {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, 260px);

    .card {
      transition: 300ms ease-out;

      &.show {
        opacity: 1;
        scale: 1;
        transform: translateY(0);
      }
    }
  }
}

/* Services */
.plans-section {
  position: relative;

  .bg-blurs {
    &:nth-child(1) {
      top: 10%;
      left: 0;
      background: #ff5f6d;
      scale: 1.3;
      animation-delay: 100ms;
    }

    &:nth-child(2) {
      right: 0;
      scale: 1.5;
      background: #515fce;
      --opacity: 0.4;
      animation-delay: 350ms;
    }
  }

  .services-container {
    position: relative;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #515fce;
    width: clamp(10px, 70vw, 2000px);
    padding-bottom: 5rem;
    flex-wrap: wrap;
    padding-top: 1rem;

    .services {
      position: absolute;
      width: clamp(10px, 70vw, 2000px);
      height: 125%;
      top: 55%;
      display: flex;
      justify-content: center;
      padding-inline: 2rem;
      gap: 1rem;

      .service {
        flex: 1;
        position: relative;
        cursor: pointer;
        background: var(--bg-color);
        box-shadow: 0px 10px 10px 10px rgba(0, 0, 0, 0.1);
        border-radius: 0.5rem;
        display: flex;
        flex-direction: column;
        gap: 0;
        transition: all 400ms ease;
        overflow: hidden;
        padding: 1rem;

        img {
          width: 100%;
          align-self: center;
          border-radius: 0.5rem;
          object-fit: cover;
        }

        span {
          text-transform: capitalize;
          font-weight: 600;
          width: 100%;
          height: 100%;
          display: flex;
          text-align: center;
          justify-content: center;
          align-items: center;
          border-top: 1px solid grey;
        }

        &::after {
          font-weight: 500;
          content: var(--after-content);
          position: absolute;
          background: var(--bg-color);
          inset: 0;
          opacity: 0;
          transition: all 400ms ease;
          transform: translateX(-100%);
          display: flex;
          justify-content: center;
          align-items: center;
          padding: 1rem;
        }

        &:hover {
          flex: 4;

          img {
            translate: 0 -15%;
          }

          &::after {
            opacity: 0.8;
            transform: translateX(0);
          }
        }
      }
      &:has(.service:hover) .service:not(:hover) {
        opacity: 0.8;
      }
    }

    .text-box {
      color: white;
      * {
        font-size: calc(1rem + 0.5vw) !important;
      }
    }

    .text-box .btn {
      scale: 1;
      background: transparent;
      border-color: white;

      &:hover {
        background: white;
        color: black;
      }
    }
  }
}
