/*
Theme Name: kidsplus-theme
Description: KIDS PLUS オリジナルテーマ
Version: 1.0
*/

/* ========== 共通 ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, "Yu Gothic", "メイリオ", sans-serif;
  background: #f6f7fb;
  color: #222;
  line-height: 1.7;
}

a {
  color: #0080ff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== グローバルヘッダー ========== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffffdd;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e5e5;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo a {
  display: inline-flex;
  align-items: center;
}

.site-logo img {
  display: block;
  height: 48px; /* ロゴを 48px に拡大 */
}

/* PC ナビ */
.global-nav {
  display: flex;
}
.global-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.global-nav a {
  color: #333;
}
.global-nav a:hover {
  opacity: 0.7;
}

/* ハンバーガー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  border-radius: 999px;
  margin: 4px 0;
}

/* ========== HERO ========== */

.hero {
  position: relative;
  min-height: 75vh;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1rem 2rem; /* 固定ヘッダー分を考慮して上を多めに */
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* ★ 画像が必ず出るように絶対パス指定に変更 */
  background: url("/wp-content/themes/kidsplus-theme/assets/hero.jpg") center/cover no-repeat;
  filter: brightness(0.6);
}

.hero .inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1rem;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.btn {
  display: inline-block; /* ボタンとして振る舞う */
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  backdrop-filter: blur(4px);
  text-align: center; /* ボタン内のテキストを中央揃え */
}
.btn.primary {
  background: #ff4b8b;
  border-color: #ff4b8b;
}

/* ========== 3サービスカード（カラフルな3枚） ========== */

.services {
  max-width: 1100px;
  margin: -3rem auto 3rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch; /* ★ 高さを揃える */
}

.service-card {
  padding: 1.6rem;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  display: flex; /* ★ 高さを揃える */
  flex-direction: column; /* ★ 高さを揃える */
}

.service-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.service-card p {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  flex-grow: 1; /* ★ 高さを揃える */
}

.service-card a {
  color: #fff;            /* 「詳しく見る」を白に */
  font-weight: 600;
}
.service-card a:hover {
  text-decoration: underline;
}

.svc-kidsplus {
  background: #9b4de3;
}
.svc-en {
  background: #00a0ff;
}
.svc-english {
  background: #26b269;
}

/* ========== 共通レイアウト ========== */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

section {
  margin-bottom: 3.5rem;
}

/* ========== ビジョンセクション（人とTechnologyで…） ========== */

#vision {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.vision-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.vision-layout > * {
  max-width: 100%;
}

.vision-image img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* ========== サービス詳細（3つの説明セクション） ========== */

.service-detail {
  background: #fff;
  padding: 2.6rem 2.4rem;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: stretch;
  min-height: 400px; /* お客様の修正値(400px)を反映 */
}

.service-detail > div:first-child:not(:has(img)),
.service-detail > div:last-child:not(:has(img)) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* セクション同士の間隔を広めに */
#kidsplus,
#en,
#english {
  margin-bottom: 5rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tag {
  display: inline-block;
  color: #fff;
  font-size: 0.75rem; /* ★ タグを小さく */
  padding: 0.2rem 0.4rem; /* ★ タグを短く */
  border-radius: 999px;
  margin-bottom: 0.6rem;
  align-self: flex-start; /* ★ タグが伸びないように */
}

.tag-kidsplus {
  background: #9b4de3;
}
.tag-en {
  background: #00a0ff;
}
.tag-english {
  background: #26b269;
}

#english .tag.tag-english {
  /* .tag の指定がそのまま適用されます */
}

.service-detail img {
  width: 100%;
  border-radius: 10px;
  height: 300px; /* ★ お客様の修正値(300px)を反映 */
  object-fit: contain;
  object-position: center;
}

/* ========== フッター ========== */

.site-footer {
  background: #111319;
  color: #ddd;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  margin-top: 4rem;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: #3aa7ff;
}

/* ========== 固定ページ用（会社概要・プライバシーなど） ========== */

.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 1rem 4rem; /* ヘッダー分を考慮して上を広めに */
}

.page-box {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* ========== 固定ページのアイキャッチ画像 ========== */
.page-eyecatch {
  margin: -2rem -1.5rem 2rem -1.5rem; 
  max-width: calc(100% + 3rem);
  overflow: hidden;
}
.page-eyecatch img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}
.page-eyecatch + h1 {
  margin-top: 0;
}

/* ===== 固定ページ内のコンテンツスタイル（統合済み）===== */
.page-box h1 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
}
.page-box h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.page-box h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.page-box p,
.page-box ul,
.page-box ol {
  line-height: 1.8;
  margin-bottom: 1rem;
}
.page-box ul,
.page-box ol {
  padding-left: 1.5rem; 
}
.page-box p a {
  color: #0080ff;
  text-decoration: underline;
}
.page-box p a:hover {
  opacity: 0.7;
}

/* テーブルスタイル */
.page-box table {
  width: 100%;
  border-collapse: collapse;
  line-height: 1.8;
  margin-top: 1rem;
}
.page-box table td {
  padding: 8px 4px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.page-box table td:first-child {
  font-weight: 600;
  width: 30%;
  padding-right: 1rem;
}

/* ========== お問い合わせページ（iframe）調整 ========== */
.page-box iframe {
  display: block;
  width: 100%;
  margin: 0;
  min-height: 850px;
  border: none;
}

/* サービス詳細のボタンラップ */
.service-btn-wrap {
  margin-top: 1.5rem;
  align-self: flex-start;
}

/* テキストリンクのスタイル */
.service-text-link {
  color: #ff4b8b; /* サイトのキーカラー */
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.service-text-link:hover {
  text-decoration: underline;
}

/* 外部リンクアイコンをCSSで追加 */
.service-text-link::after {
  content: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="0.8em" height="0.8em" viewBox="0 0 16 16" fill="%23ff4b8b"><path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/><path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/></svg>');
  display: inline-block;
  margin-left: 0.3em;
  vertical-align: middle;
}

/* 追記：ISMS認証ロゴのスタイル */
.page-box .isms-logo {
  display: block;
  width: 200px; /* スマホ版のデフォルトサイズ */
  max-width: 100%;
  height: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* 404ページ用のスタイル */
.page-404 {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.page-404-title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 700;
  color: #ccc;
  margin-bottom: 1rem;
  line-height: 1;
}
.page-404-message {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.page-404-button {
  margin-top: 2rem;
}
.page-404 .btn.primary {
  background: #ff4b8b;
  border-color: #ff4b8b;
  color: #fff;
  padding: 0.8rem 1.5rem; /* 2行表示用にパディング調整 */
}
.page-404 .btn.primary:hover {
  background: #e6397a;
  border-color: #e6397a;
}
/* 404ページ - 段落の英語テキスト */
.page-404 p .en {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-top: 0.2em;
}
/* 404ページ - ボタン内のテキストスタイル */
.page-404 .btn .ja {
  display: block; /* 1行目 */
  font-weight: 600;
  line-height: 1.2;
  font-size: 0.95rem;
}
.page-404 .btn .en {
  display: block; /* 2行目 */
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.85;
  margin-top: 0.1em;
  color: #fff;
}
/* 404ページ - アイコン */
.icon-404 {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ff4b8b"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>') center/contain no-repeat;
  filter: saturate(1.5) brightness(0.9);
}

/* フッターSNS */
.footer-social {
  text-align: left;
}
.footer-social a {
  color: #3aa7ff;
  text-decoration: none;
}
.footer-social a:hover {
  text-decoration: underline;
}
.footer-sns-icons {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}
.footer-sns-icons a {
  display: inline-block;
  opacity: 0.7;
  transition: opacity 0.2s;
  color: #ddd;
}
.footer-sns-icons a:hover {
  opacity: 1;
  text-decoration: none;
}
.footer-sns-icons svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}


/* ========== レスポンシブ ========== */

/* PC表示時 (901px以上) のみ適用 */
@media (min-width: 901px) {
  .page-box .isms-logo {
    width: 300px; /* PC版では300pxに拡大 */
  }
}

/* テーブルのスマホ表示 (600px以下) */
@media (max-width: 600px) {
  .page-box table,
  .page-box table tbody,
  .page-box table tr,
  .page-box table td {
    display: block;
    width: 100%;
  }
  .page-box table tr {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  .page-box table td {
    padding: 2px 0;
    border-bottom: none;
  }
  .page-box table td:first-child {
    font-weight: 600;
    width: 100%;
    padding-top: 0.5rem;
  }
  .page-404 p br.sp-only {
    display: none;
  }
}

/* サイト全体のスマホ表示 (900px以下) */
@media (max-width: 900px) {
  .services {
    grid-template-columns: 1fr;
  }
  
  .service-card {
    min-height: auto;
  }

  #vision,
  #kidsplus,
  #en,
  #english {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .vision-layout {
    grid-template-columns: 1fr;
  }

  .service-detail {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2rem 1.5rem;
    align-items: center;
  }

  .service-detail img {
    height: 300px;
    object-fit: contain;
    object-position: center;
  }
  
  .site-logo img {
    height: 42px;
  }

  .site-header-inner {
    padding: 0.5rem 0.75rem;
  }

  /* ナビはハンバーガーに */
  .menu-toggle {
    display: block;
  }
  .global-nav {
    display: none;
    position: absolute;
    top: 56px;
    right: 0;
    left: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
  }
  .global-nav ul {
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    gap: 0.75rem;
  }
  .global-nav.is-open {
    display: block;
  }

  /* 固定ページの余白調整 */
  .page-box {
    padding: 1.5rem 1.1rem;
  }
  
  /* 固定ページアイキャッチ(SP) */
  .page-eyecatch {
    margin: -1.5rem -1.1rem 1.5rem -1.1rem;
    max-width: calc(100% + 2.2rem);
    height: 180px;
  }
  .page-eyecatch img {
    height: 100%;
  }

  /* お問い合わせiframeの調整(SP) */
  .page-box iframe {
    min-height: 1000px;
    width: 100%;
  }

  /* SP時にフッターを縦積みに */
  .site-footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* フッターSNS(SP) */
  .footer-social {
    text-align: left;
  }
  .footer-sns-icons {
    justify-content: flex-start;
  }
}