/* 전문 서비스 section */
.special-service-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  background: url('/rw_images/main/floral.webp') no-repeat center/cover;

  &::before {
    content: '';
    opacity: 0.6;
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    inset: 0;
    background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.7) 0%, #000000 100%);
    z-index: 10;
  }

  .container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
  
  }

  .text-area {
    text-align: center;

    .section-title {
      font-size: var(--font-size-xxl);
      font-weight: var(--font-weight-bold);
      color: var(--color-white);
    }

    .section-sub-title {
      margin-top: 1rem;
      font-size: var(--font-size-base);
      font-weight: var(--font-weight-regular);
      color: var(--color-white);
    }
  }

  .service-img-wrap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center;
    column-gap: 3.6rem;
    max-width: 134.4rem;
    width: 100%;
    margin-top: 3rem;
    margin-bottom: 3rem;
  }

  .service-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 2px solid var(--alpha-white-60);

    &::after {
      content: '';
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      background: var(--alpha-black-60);
      transition: background 0.3s;
    }

    @media (hover: hover) and (pointer: fine) {
      &:hover {
        &::after {
          background: transparent;
        }

        .service-img {
          filter: none;
        }

        .icon-arrow_right {
          opacity: 1;
          right: 3rem;
        }
      }
    }

    &:active {
      &::after {
        background: transparent;
      }

      .service-img {
        filter: none;
      }

      .icon-arrow_right {
        opacity: 1;
        right: 3rem;
      }
    }

    .icon-arrow_right {
      opacity: 0;
      position: absolute;
      top: 3rem;
      right: 6rem;
      font-size: var(--font-size-md);
      font-weight: 700;
      color: var(--color-white);
      transition:
        right 0.3s,
        opacity 0.3s;
    }
  }

  .service-img {
    width: 100%;
    height: 100%;
    filter: grayscale(1);
    object-fit: cover;
  }

  .service-text {
    z-index: 1;
    position: absolute;
    display: flex;
    flex-direction: column;
    row-gap: 1.8rem;
    width: 100%;
    bottom: 0;
    padding: 3rem 2rem;
    color: var(--color-white);

    .service-title {
      font-size: var(--font-size-md);
      font-weight: var(--font-weight-bold);
    }

    .service-sub-title {
      font-size: var(--font-size-xs);
      font-weight: var(--font-weight-medium);
    }
  }

  .service-box-wrap {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2rem;
    max-width: 134.4rem;
    width: 100%;
    margin-bottom: 6rem;

    .service-box {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 2rem;
      background: var(--alpha-white-30);
      border-radius: 1rem;
      font-size: var(--font-size-sm);
      font-weight: var(--font-weight-bold);
      color: var(--color-white);
      word-break: keep-all;
      transition: background 0.3s;

      @media (hover: hover) and (pointer: fine) {
        &:hover {
          background: var(--color-purple-light);
        }
      }

      &:hover {
        background: var(--color-purple-light);
      }
    }
  }
}

@media screen and (max-width: 1440px) {
  /* 전문 서비스 section */
  .special-service-section {
    .service-img-wrap {
      column-gap: 3rem;
      max-width: 112rem;
      margin-top: 5.2rem;
    }

    .service-text {
      row-gap: 1rem;
    }

    .service-box-wrap {
      gap: 1.6rem;
      max-width: 112rem;

      .service-box {
        min-width: 12.5rem;
        padding: 2rem 1rem;
        font-size: var(--font-size-xs);
      }
    }
  }
}

@media screen and (max-width:1280px) {
  /* 전문 서비스 section */
  .special-service-section {
    .service-img-wrap {
      margin-top: 8rem;
    }
  }
}

@media screen and (max-width:1024px) {
  /* 전문 서비스 section */
  .special-service-section {
    .service-img-wrap {
      grid-template-columns: repeat(2, 1fr);
      max-width: 75rem;
      margin-top: 2rem;
      margin-bottom: 2rem;
      gap: 2rem;
    }

    .service-item {
      width: 100%;
      height: 10rem;

      &:first-of-type {
        grid-column: span 2;
      }

      .icon-arrow_right {
        top: unset;
        bottom: 3rem;
      }
    }

    .service-img {
      object-fit: cover;
    }

    .service-box-container {
      max-width: 75rem;
      width: 100%;
    }

    .service-box-wrap {
      max-width: 100%;
      grid-template-columns: repeat(4, 1fr);
      margin-bottom: 2rem;

      .service-box {
        padding: 1.5rem 1rem;
      }
    }
  }
}

@media screen and (max-width:780px) {
   /* 전문 서비스 section */
   .special-service-section {
    .service-img-wrap {
      max-width: 60rem;
    }

    .service-box-container {
      max-width: 60rem;
    }
  }
}

@media screen and (max-width:600px) {
  /* 전문 서비스 section */
  .special-service-section {
    .service-img-wrap {
      margin-top: 6rem;
      margin-bottom: 2rem;
      max-width: 50rem;
    }

    .service-box-container {
      max-width: 50rem;
    }

    .service-box-wrap {
      .service-box {
        min-width: unset;
      }
    }

    .service-text {
      row-gap: 0.4rem;
    }
  }
}

@media screen and (max-width:480px) {
   /* 전문 서비스 section */
   .special-service-section {
    .text-area {
      .section-sub-title {
        margin-top: 0.8rem;
      }
    }
    .service-img-wrap {
      margin-top: 1.5rem;
      margin-bottom: 1.5rem;
      max-width: 40rem;
      gap: 1.2rem;
    }

    .service-box-container {
      max-width: 40rem;
    }

    .service-item {
      height: 8rem;
    }

    .service-text {
      padding: 2rem 1.5rem;
    }

    .service-box-wrap {
      gap: 1.2rem;
      .service-box {
        padding: 1.3rem 1rem;
      }
    }
  }
}

@media screen and (max-width:320px) {
   /* 전문 서비스 section */
   .special-service-section {
    .text-area {
      .section-sub-title {
        margin-top: 0.4rem;
      }
    }

    .service-img-wrap {
      margin-top: 2rem;
      margin-bottom: 1rem;
      max-width: 28rem;
      gap: 1rem;
    }

    .service-box-container {
      max-width: 28rem;
    }

    .service-item {
      height: 4.2rem;
    }

    .service-text {
      padding: 0.7rem 0.1rem 0.7rem 1rem;
      row-gap: 0.2rem;
    }

    .service-box-wrap {
      gap: 1rem;
      margin-bottom: 2.2rem;

      .service-box {
        padding: 0.6rem 0.35rem;
        border-radius: 0.5rem;
      }
    }
  }
}