/***********************************************************
  My Web Service - Modern & Minimal Style
  Version: 1.9 (SNS統合・資格勉強カテゴリ追加・グリッド最適化)
***********************************************************/

.my-web-service-container {
  /* カラー・定数定義 */
  --primary: #46757E;
  --text-main: #2C3E50;
  --text-sub: #5F6C7B;
  --bg-page: #fdfcfb;
  
  /* カテゴリーアクセント */
  --cat-business: #f3a683;   /* 業務系: オレンジ */
  --cat-sns: #1d9bf0;        /* SNS系: X(Twitter)ブルー */
  --cat-diagnostic: #78e08f; /* 診断系: グリーン */
  --cat-study: #f1c40f;      /* 資格勉強: ゴールド（新設） */

  /* シャドウ・装飾 */
  --soft-shadow: 0 10px 30px rgba(70, 117, 126, 0.08);
  --hover-shadow: 0 15px 45px rgba(70, 117, 126, 0.15);
  --radius-custom: 20px;

  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  box-sizing: border-box;
  text-align: center;
}

/***********************************************************
  ヘッダーエリア
***********************************************************/
.my-web-service-header {
  margin-bottom: 60px;
}

.my-web-service-title {
  display: inline-block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 12px;
}

.my-web-service-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  opacity: 0.3;
}

.my-web-service-subtitle {
  font-size: 1.1rem;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  margin: 0;
}

/***********************************************************
  セクションラベル
***********************************************************/
.my-web-service-section {
  margin-bottom: 60px;
}

.my-web-service-section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 30px;
}

.my-web-service-section-label::before,
.my-web-service-section-label::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: #e0e0e0;
  max-width: 60px;
  margin: 0 20px;
}

.section-business { color: var(--cat-business); }
.section-sns { color: var(--cat-sns); }
.section-diagnostic { color: var(--cat-diagnostic); }
.section-study { color: var(--cat-study); } /* 資格勉強用に追加 */

/***********************************************************
  グリッドレイアウト
***********************************************************/
.my-web-service-grid {
  display: grid;
  /* auto-fillを使用し、アイテムが少なくても横幅を固定する */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/***********************************************************
  カード本体 (aタグ全体)
***********************************************************/
.my-web-service-item {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: var(--radius-custom);
  padding: 32px;
  box-shadow: var(--soft-shadow);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0,0,0,0.03);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.my-web-service-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary);
}

.my-web-service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  opacity: 0.9;
}

.category-business::before { background: var(--cat-business); }
.category-sns::before { background: var(--cat-sns); }
.category-diagnostic::before { background: var(--cat-diagnostic); }
.category-study::before { background: var(--cat-study); } /* 資格勉強用に追加 */

/***********************************************************
  カード内テキスト
***********************************************************/
.my-web-service-item h3 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  transition: color 0.3s;
}

.my-web-service-item:hover h3 {
  color: var(--primary);
}

.my-web-service-item p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin: 0;
  text-align: left;
}

/***********************************************************
  画像ありカード (.has-image) の最適化
***********************************************************/
.my-web-service-item.has-image {
  padding: 0 !important;
}

.my-web-service-item.has-image .item-content {
  padding: 32px 32px 20px;
}

.my-web-service-item .item-visual {
  margin-top: auto;
  padding: 0 24px 24px;
}

.my-web-service-item .item-visual img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.my-web-service-item:hover .item-visual img {
  transform: scale(1.03);
}

/***********************************************************
  レスポンシブ（スマホ対応）
***********************************************************/
@media (max-width: 768px) {
  .my-web-service-container {
    padding: 50px 20px;
  }

  .my-web-service-title {
    font-size: 1.6rem;
  }

  .my-web-service-grid {
    gap: 24px;
    grid-template-columns: 1fr; /* スマホでは1列固定 */
  }

  .my-web-service-item {
    padding: 24px;
  }

  .my-web-service-item.has-image .item-content {
    padding: 24px 24px 15px;
  }

  .my-web-service-item .item-visual {
    padding: 0 20px 20px;
  }
}