/* =====================================================
   AI-TERRACE サービスページ専用スタイル
   適用範囲: .ai-terrace-services-page 配下のみ
   Cocoon全体・他ページには影響しません
===================================================== */

/* ===== Cocoonヘッダー・余白リセット（サービスページのみ） ===== */
body.page-template-page-services #header-container {
  display: none;
}

body.page-template-page-services #content {
  margin-top: 0;
}

body.page-template-page-services #main {
  padding-top: 0;
}

body.page-template-page-services main.ai-terrace-services-page {
  padding-bottom: 0 !important;
}

/* ===== ベース ===== */
.ai-terrace-services-page {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  color: #333;
  line-height: 1.7;
}

.ai-terrace-services-page *,
.ai-terrace-services-page *::before,
.ai-terrace-services-page *::after {
  box-sizing: border-box;
}

/* ===== Cocoon干渉リセット ===== */
.ai-terrace-services-page h1,
.ai-terrace-services-page h2,
.ai-terrace-services-page h3 {
  border: none !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

/* ===== インナー幅 ===== */
.ats-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== セクション共通 ===== */
.ai-terrace-services-page .ats-section {
  padding: 64px 0;
  background: #fff;
}

.ai-terrace-services-page .ats-section--gray {
  background: #f0f5ff;
}

.ai-terrace-services-page .ats-cta-section {
  padding: 40px 0;
}

/* ===== セクションヘッド ===== */
.ats-section-head {
  text-align: center;
  margin-bottom: 48px;
}

.ats-section-head h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a3a6b;
  margin: 8px 0 14px;
  line-height: 1.4;
}

.ats-section-head > p {
  font-size: 1rem;
  color: #555;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== キッカー（小見出しラベル） ===== */
.ats-kicker {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #1d4ed8;
  margin: 0 0 20px;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ===== ヒーロー ===== */
.ai-terrace-services-page .ats-hero {
  background: #f8faff;
  padding: 42px 0 54px;
}

.ats-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.ats-hero__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ats-title {
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  font-weight: 900;
  color: #07142f;
  line-height: 1.22;
  margin: 0;
  letter-spacing: 0;
}

.ats-title__line {
  display: inline-block;
  white-space: nowrap;
}

.ats-title__line--accent {
  color: #0b4fe8;
}

.ats-lead {
  max-width: 560px;
  font-size: 1rem;
  color: #17233c;
  line-height: 2;
  font-weight: 600;
  margin: 26px 0 0;
}

.ats-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.ats-hero__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

/* ===== ボタン ===== */
.ats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 60px;
  padding: 0 32px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  border: 2px solid transparent;
  line-height: 1.4;
}

.ats-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  text-decoration: none;
}

.ats-btn--primary {
  background: #2563eb;
  color: #fff !important;
  border-color: #2563eb;
}

.ats-btn--secondary {
  background: #fff;
  color: #2563eb !important;
  border-color: #2563eb;
}

.ats-btn--secondary:hover {
  background: #2563eb;
  color: #fff !important;
}

/* ===== サービスカード（4列） ===== */
.ats-card-grid--4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ats-service-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.ats-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.ats-service-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.ats-service-card > div {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ats-service-card > div > span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #2563eb;
}

.ats-service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a3a6b;
  margin: 0;
}

.ats-service-card p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

.ats-service-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  margin-top: auto;
}

.ats-service-card a:hover {
  text-decoration: underline;
}

/* ===== 講座内容 ===== */
.ats-curriculum-section {
  background: #ffffff;
}

.ats-curriculum-section,
.ats-curriculum-card {
  scroll-margin-top: 88px;
}

.ats-curriculum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ats-curriculum-card {
  position: relative;
  min-height: 260px;
  padding: 28px 26px 26px;
  border: 1px solid #dbe6f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 30px rgba(15, 53, 115, 0.06);
}

.ats-curriculum-card::before {
  content: "";
  position: absolute;
  top: 28px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(47, 191, 101, 0.12);
}

.ats-curriculum-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.ats-curriculum-card h3 {
  margin: 0 0 14px;
  color: #07142f;
  font-size: 1.24rem;
  font-weight: 900;
  line-height: 1.55;
}

.ats-curriculum-card p {
  margin: 0;
  color: #42536a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.8;
}

.ats-curriculum-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ats-curriculum-card li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
}

.ats-curriculum-card li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2fbf65;
}

.ats-curriculum-card--wide {
  grid-column: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 18px 28px;
  align-items: start;
}

.ats-curriculum-card--wide > span,
.ats-curriculum-card--wide h3,
.ats-curriculum-card--wide p {
  grid-column: 1;
}

.ats-curriculum-card--wide ul {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  margin-top: 0;
}

/* ===== サービス詳細（2カラム） ===== */
.ats-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid #e0e8f5;
}

.ats-detail:last-child {
  border-bottom: none;
}

/* 偶数番目は画像右に */
.ats-detail--reverse {
  direction: rtl;
}

.ats-detail--reverse > * {
  direction: ltr;
}

.ats-detail__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
}

.ats-detail__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ats-detail__body h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a3a6b;
  margin: 0;
  line-height: 1.4;
}

.ats-detail__body > p {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.85;
  margin: 0;
}

.ats-detail__body ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ats-detail__body ul li {
  padding: 10px 0 10px 28px;
  position: relative;
  font-size: 0.95rem;
  color: #333;
  border-bottom: 1px solid #e0e8f5;
}

.ats-detail__body ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: 700;
}

/* ===== フロー ===== */
.ats-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.ats-flow::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 2px;
  background: #dde6f5;
  z-index: 0;
}

.ats-flow__step {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ats-flow__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  font-style: normal;
  flex-shrink: 0;
}

.ats-flow__step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3a6b;
  margin: 0;
}

.ats-flow__step p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.65;
  margin: 0;
}

/* ===== 料金テーブル ===== */
.ats-pricing-table {
  overflow-x: auto;
}

.ats-pricing-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.ats-pricing-table th {
  background: #1a3a6b;
  color: #fff;
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.ats-pricing-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #dde6f5;
  color: #333;
}

.ats-pricing-table tr:last-child td {
  border-bottom: none;
}

.ats-pricing-table tr:nth-child(even) td {
  background: #f8faff;
}

/* ===== FAQ ===== */
.ats-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #dde6f5;
}

.ats-faq__item {
  border-bottom: 1px solid #dde6f5;
}

.ats-faq__item summary {
  padding: 18px 48px 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a3a6b;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background 0.2s;
}

.ats-faq__item summary::-webkit-details-marker {
  display: none;
}

.ats-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #2563eb;
  font-weight: 300;
  line-height: 1;
}

.ats-faq__item[open] summary::after {
  content: '−';
}

.ats-faq__item summary:hover {
  background: #f0f5ff;
}

.ats-faq__item > p {
  padding: 0 20px 20px 20px;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* ===== 最終CTA ===== */
.ats-final-cta__wrap {
  position: relative;
  display: block;
  line-height: 0;
}

.ats-final-cta__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

/* ボタン部分のみリンク（トップページと同じ位置） */
.ats-final-cta__btn-overlay {
  position: absolute;
  left: 32%;
  width: 36%;
  top: 70.7%;
  height: 14%;
  display: block;
  cursor: pointer;
  text-decoration: none;
  border-radius: 50px;
}

.ats-final-cta__btn-overlay:hover {
  opacity: 0.85;
}

/* ===== レスポンシブ ===== */
@media (max-width: 1024px) {
  .ats-card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .ats-curriculum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ats-curriculum-card--wide {
    grid-template-columns: 1fr;
  }

  .ats-curriculum-card--wide > span,
  .ats-curriculum-card--wide h3,
  .ats-curriculum-card--wide p,
  .ats-curriculum-card--wide ul {
    grid-column: auto;
    grid-row: auto;
  }

  .ats-curriculum-card--wide ul {
    margin-top: 18px;
  }

  .ats-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .ats-flow::before {
    display: none;
  }

}

@media (max-width: 768px) {
  .ai-terrace-services-page .ats-section {
    padding: 48px 0;
  }

  .ats-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ats-hero__image {
    order: -1;
  }

  .ats-title {
    font-size: clamp(2rem, 9.2vw, 2.85rem);
  }

  .ats-section-head h2 {
    font-size: 1.5rem;
  }

  .ats-card-grid--4 {
    grid-template-columns: 1fr;
  }

  .ats-curriculum-grid {
    grid-template-columns: 1fr;
  }

  .ats-curriculum-card {
    min-height: 0;
    padding: 24px 20px;
  }

  .ats-detail {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0;
  }

  .ats-detail--reverse {
    direction: ltr;
  }

  .ats-flow {
    grid-template-columns: 1fr;
  }

  .ats-wrap {
    padding: 0 16px;
  }

  .ats-actions .ats-btn {
    width: 100%;
    min-width: 0;
  }

}
