/* サービスページ専用スタイル */

/* サービス紹介セクション */
.service-intro {
  background-color: #fff;
  padding: 10rem 0;
}

.service-main-title {
  font-size: 1.8rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.5;
  color: #333;
}

/* サービス表示コンテナ */
.service-container {
  position: relative;
  max-width: 100rem;
  margin: 0 auto;
  min-height: 600px;
  transition: height 0.3s ease-in-out;
}

/* カード表示モード */
.service-cards-view {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  visibility: hidden;
  position: relative;
  width: 100%;
}

.service-cards-view.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* サービスカード */
.service-cards {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 20px;
}

.service-card {
  flex: 0 0 calc(33.333% - 20px);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 540px;
  max-width: 500px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* カードごとの背景色 */
.service-card[data-service="life-up-business"] {
  background: linear-gradient(145deg, #ffd280 0%, #fff 100%);
}

.service-card[data-service="connecting-design"] {
  background: linear-gradient(145deg, #d4e157 0%, #fff 100%);
}

.service-card[data-service="UI-innovation-business"] {
  background: linear-gradient(145deg, #81c784 0%, #fff 100%);
}

.service-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px;
}

.service-card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #333;
}

.service-card-tag {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.service-card-title {
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.service-card-description {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 25px;
}

.service-card-image {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.service-card-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: none;
  mix-blend-mode: multiply;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(closest-side, #000 95%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(closest-side, #000 95%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* 詳細表示モード */
.service-detail-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  max-width: 100%;
  background-color: #fff;
  z-index: 10;
  display: none;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: visible;
}

.service-detail-view.active {
  display: block;
  /* アクティブ時に表示 */
  opacity: 1;
  transform: translateY(0);
}

.service-detail {
  display: none;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
  /* 短縮 */
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  margin-bottom: 40px;
  height: auto;
  width: 100%;
  box-sizing: border-box;
}

.service-detail.active {
  display: block;
  /* アクティブ時に表示 */
  opacity: 1;
  transform: translateY(0) scale(1);
}

.service-detail-header {
  position: relative;
  margin-bottom: 30px;
  text-align: center;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.detail-description,
.detail-image-container {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-detail.active .service-detail-header {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.service-detail.active .detail-description {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.service-detail.active .detail-image-container {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}


.close-button-wrapper {
  display: flex;
  justify-content: flex-end;
}


.back-to-cards-btn {
  position: relative;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f0f0f0;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.back-to-cards-btn:hover {
  background-color: #e0e0e0;
  transform: scale(1.05);
}

.service-detail-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.service-detail-subtitle {
  color: #666;
  font-size: 1rem;
}

.service-detail-content {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 説明文エリア */
.detail-description {
  flex: 1;
  min-width: 0;
}

.detail-description p {
  margin-bottom: 20px;
  line-height: 1.7;
  color: #555;
  white-space: pre-wrap;
}

.detail-description h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 30px 0 15px;
  color: #333;
}

/* 画像エリア */
.detail-image-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 50%;
}

.detail-image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-tech-list {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
}

.service-tech-list li {
  margin-bottom: 8px;
  color: #555;
}

/* サービス詳細の下部ボタン */
.service-detail>.back-to-cards-btn:last-child {
  position: static;
  width: auto;
  height: auto;
  padding: 10px 20px;
  border-radius: 30px;
  margin-top: 30px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* CTA セクション */
.cta-section {
  background-color: #f8f9fa;
  padding: 80px 0;
  text-align: center;
  transition: margin-top 0.3s ease;
  position: relative;
  z-index: 5;
}

.cta-title {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: #333;
}

.cta-description {
  font-size: 1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn {
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn--primary {
  background-color: #333;
  color: white;
}

.btn--outline {
  background-color: transparent;
  color: #333;
  border: 1px solid #333;
}

.btn--primary:hover {
  background-color: #222;
}

.btn--outline:hover {
  background-color: #f0f0f0;
}

/* CTAセクションのボタンスタイルをスコープ限定 */
.cta-section .btn {
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-section .btn--primary {
  background-color: #333;
  color: white;
}

.cta-section .btn--outline {
  background-color: transparent;
  color: #333;
  border: 1px solid #333;
}

.cta-section .btn--primary:hover {
  background-color: #222;
}

.cta-section .btn--outline:hover {
  background-color: #f0f0f0;
}

/* フッターのボタンスタイルを元に戻す（必要に応じて） */
.footer__button.btn--outline {
  background-color: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.footer__button.btn--outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* 必要に応じてフッターのプライマリボタンも修正 */
.footer__button.btn--primary {
  background-color: #fff;
  color: #333;
}

.footer__button.btn--primary:hover {
  background-color: #f0f0f0;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
  .service-cards {
    flex-direction: column;
  }

  .service-card {
    height: auto;
    min-height: 400px;
  }

  .service-card-inner {
    padding: 25px;
  }

  .service-detail-content {
    flex-direction: column;
  }

  .detail-image-container {
    max-width: 100%;
    margin-bottom: 30px;
    order: -1;
  }
}

@media (max-width: 768px) {
  .service-intro {
    background-color: #fff;
    padding: 6rem 0;
  }

  .service-main-title {
    font-size: 1.5rem;
  }

  .service-card-title {
    font-size: 1.6rem;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .service-detail-title {
    font-size: 1.7rem;
  }

  .service-detail {
    padding: 30px 20px;
  }

  .service-detail-content {
    gap: 20px;
  }


  .close-button-wrapper {
    margin-bottom: 8px;
  }
}

@media (max-width: 576px) {
  .service-card-inner {
    padding: 20px;
  }

  .service-card-title {
    font-size: 1.5rem;
  }

  .service-detail {
    padding: 20px 15px;
  }

  .service-detail-title {
    font-size: 1.5rem;
  }

  .detail-image-container {
    margin-bottom: 20px;
  }
}
