/* =========================================================
   service.css
   - リハビリのご案内 Topページ専用スタイル
   - Initiativesページのデザイン（白カード）を採用
========================================================= */

/* --- Utilities --- */
.bg-gray {
  background-color: var(--color-gray-light);
  padding: 6rem 0;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 2rem;
}

/* ---------------------------------------------------------
   4. Service Hub (Grid Layout)
--------------------------------------------------------- */

/* メイン（入院・外来）は2列 */
.service-main-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* PC: 2列 */
  gap: 30px;
  margin-top: 50px;
}

/* 特設エリア */
.service-special-area {
  margin-top: 80px;
}

/* 特設ラベル（見出し） */
.special-label {
  margin-bottom: 30px;
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}
.special-label .label-ja {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.special-label .label-en {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

/* 特設グリッド（今後増えることを想定して3列設定にしておく） */
.service-special-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PC: 3列 */
  gap: 30px;
}

/* ---------------------------------------------------------
   Card Style (Initiatives Design)
--------------------------------------------------------- */
.service-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--color-gray-border);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary-light);
}

/* サムネイル画像 */
.card-thumb {
  width: 100%;
  height: 240px; /* 少し高さを確保 */
  overflow: hidden;
  position: relative;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .card-thumb img {
  transform: scale(1.05);
}

/* カード本文 */
.card-body {
  padding: 30px;
}

.card-en {
  display: block;
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-family: 'Helvetica Neue', sans-serif;
}

.card-ja {
  font-size: 1.4rem;
  color: var(--color-primary-dark); /* タイトル色を濃い青に */
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 25px;
  min-height: 3.4em; /* 高さ揃え */
}

/* リンク矢印 */
.card-link {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 700;
  position: relative;
  display: inline-flex;
  align-items: center;
}
.card-link::after {
  content: '→';
  margin-left: 8px;
  transition: transform 0.2s;
}
.service-card:hover .card-link::after {
  transform: translateX(5px);
}

/* ---------------------------------------------------------
   5. Standards & Target (施設基準・診療科)
--------------------------------------------------------- */
.standards-wrapper {
  background: #fff;
  border: 1px solid var(--color-gray-border);
  border-radius: 8px;
  padding: 45px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.standard-box h3,
.target-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eee;
  display: flex;
  align-items: center;
}
.standard-box h3 i,
.target-box h3 i {
  margin-right: 10px;
  color: var(--color-primary);
  font-style: normal;
}

.standard-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.standard-list li {
  position: relative;
  padding-left: 1.6em;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.5;
}
.standard-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.target-box p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 15px;
}

.dept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dept-tags span {
  background-color: #f4faff;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid #ddecff;
  font-weight: 500;
  white-space: nowrap;
}

.small-note {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   6. Flow (受診の流れ)
--------------------------------------------------------- */
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.flow-step {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-gray-border);
  align-items: stretch;
}

.step-num {
  background-color: var(--color-primary);
  color: #fff;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content {
  padding: 25px 30px;
  flex: 1;
}
.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.step-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
}

.flow-note {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.8;
}
.flow-note a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 700;
}

/* ---------------------------------------------------------
   Responsive Design
--------------------------------------------------------- */
@media (max-width: 900px) {
  /* Tablet */
  .service-special-grid {
    grid-template-columns: repeat(2, 1fr); /* 特設も2列に */
  }
}

@media (max-width: 600px) {
  /* Mobile */
  .service-main-grid,
  .service-special-grid {
    grid-template-columns: 1fr; /* 全て1列 */
    gap: 40px;
  }

  .card-thumb {
    height: 200px;
  }

  .card-body {
    padding: 25px 20px;
  }

  .standard-list {
    grid-template-columns: 1fr;
  }
  .standards-wrapper {
    padding: 30px 20px;
  }

  .flow-step {
    flex-direction: column;
  }
  .step-num {
    width: 100%;
    height: 40px;
    font-size: 1.2rem;
    justify-content: flex-start;
    padding-left: 20px;
  }
  .step-num::before {
    content: 'STEP';
    font-size: 0.9rem;
    margin-right: 8px;
    opacity: 0.8;
  }
  .step-content {
    padding: 20px;
  }
}
