/* ================================================================
   未来シフト｜スタイルシート
   ------------------------------------------------------------
   目次（Ctrl+Fで見出しを検索すると探しやすいです）
   1. 基本設定・リセット
   2. 共通パーツ（コンテナ・見出し・ボタン）
   3. ヘッダー・ナビゲーション
   4. ファーストビュー（hero）
   5. このサイトについて（about / theme-card）
   6. 最新記事（latest-articles）
   7. 運営者プロフィール（profile）
   8. 最後のブログ案内（cta）
   9. よくある質問（faq）
   10. フッター（site-footer）
   11. レスポンシブ対応（メディアクエリ）
   ================================================================ */

/* ----------------------------------------------------------------
   1. 基本設定・リセット
   ---------------------------------------------------------------- */

:root {
  /* サイト全体で使う色。ここを変えるだけで全体の配色を変更できます */
  --color-navy: #17324d;      /* 見出し・フッターなどの濃い色 */
  --color-text: #34495e;      /* 通常の本文色 */
  --color-muted: #647484;     /* 補足テキストの色 */
  --color-bg: #ffffff;        /* ページの背景色 */
  --color-bg-soft: #f5f8fa;   /* セクションの背景色（薄いグレー） */
  --color-bg-blue: #eef4fc;   /* セクションの背景色（薄い青） */
  --color-line: #e1e8ee;      /* 罫線・境界線の色 */

  /* メインのアクセントカラー（明るい青）。ボタンやリンクなど操作できる要素に使う */
  --color-accent: #2f6fed;
  --color-accent-dark: #1f52c0;
  --color-accent-soft: #e8f0fe;

  /* テーマカラー：投資=青／健康=緑／AI=紫（最新記事の見出しの色分けに使用） */
  --color-invest: #2778bd;
  --color-health: #1f8a70;
  --color-ai: #6552d0;

  /* レイアウト共通値 */
  --container-width: 1100px;   /* PC表示時の本文最大幅 */
  --radius: 16px;               /* カードなどの角丸サイズ */
  --shadow: 0 10px 28px rgba(23, 50, 77, 0.08);
}

* {
  box-sizing: border-box; /* paddingを含めてサイズ計算する設定 */
}

html {
  scroll-behavior: smooth; /* ページ内リンクをクリックした時に滑らかにスクロール */
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
}

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

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--color-navy);
  line-height: 1.4;
}

p {
  margin: 0;
}

/* キーボード操作時のフォーカスを見やすくする（アクセシビリティ対応） */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* スキップリンク：画面には隠れているが、Tabキーで最初にフォーカスすると表示される */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: var(--color-navy);
  border-radius: 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ----------------------------------------------------------------
   2. 共通パーツ（コンテナ・見出し・ボタン）
   ---------------------------------------------------------------- */

/* 中央寄せ用のコンテナ。PCで横幅が広がりすぎないようにする */
.container {
  width: min(var(--container-width), 100%);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ボタンの共通スタイル（ピル型＋末尾に矢印を付けるのが基本形） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 22px;
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--color-accent);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--outline:hover {
  background: var(--color-accent-soft);
}

.btn--primary {
  color: #fff;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn--text {
  padding: 8px 4px;
  border: none;
  border-radius: 0;
}

.btn--cta {
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 24px 16px;
  color: var(--color-navy);
  border-color: var(--color-line);
  background: #fff;
  box-shadow: var(--shadow);
}

.btn--cta:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ----------------------------------------------------------------
   3. ヘッダー・ナビゲーション
   ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--container-width), 100%);
  margin-inline: auto;
  padding: 14px 20px;
}

.site-logo a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-navy);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.site-logo__icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  transform: rotate(8deg);
}

.global-nav__list {
  display: flex;
  gap: 28px;
}

.global-nav__list a {
  font-weight: 700;
  text-decoration: none;
}

.global-nav__list a:hover {
  color: var(--color-accent);
}

/* スマホ用メニューボタン。PCでは非表示（11.レスポンシブ対応も参照） */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  content: "";
}

.nav-toggle__bar {
  position: relative;
}

.nav-toggle__bar::before {
  position: absolute;
  top: -7px;
}

.nav-toggle__bar::after {
  position: absolute;
  top: 7px;
}

.nav-toggle__label {
  color: var(--color-navy);
  font-size: 0.65rem;
  font-weight: 700;
}

/* ----------------------------------------------------------------
   4. ファーストビュー（hero）
   ---------------------------------------------------------------- */

.hero {
  background: #fff;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(320px, 560px) 1fr;
  align-items: stretch;
  min-height: 600px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(20px, 5vw, 64px);
}

.hero__eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

.hero__text h1 {
  margin-top: 14px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero__lead {
  max-width: 40em;
  margin-top: 20px;
  color: var(--color-muted);
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* 右側の写真エリア。写真の差し替えはurl()の部分を変更してください */
.hero__photo {
  background-image: url("../images/hero-background.jpg");
  background-size: cover;
  background-position: center 30%;
  border-radius: 0 0 0 56px;
  min-height: 320px;
}

/* ----------------------------------------------------------------
   5. このサイトについて（about / theme-card）
   ---------------------------------------------------------------- */

.about {
  padding: 72px 0;
  text-align: center;
}

.about h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.theme-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}

/* liはカードの高さを揃えるための入れ物。カード自体はaタグ（.theme-card）で、
   写真を含めたカード全体がクリックできるリンクになっている */
.theme-list li {
  display: flex;
}

.theme-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(23, 50, 77, 0.14);
}

.theme-card__photo img {
  width: 100%;
  aspect-ratio: 400 / 260;
  object-fit: cover;
}

.theme-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
}

.theme-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-card__icon {
  flex-shrink: 0;
}

.theme-card__head h3 {
  font-size: 1.15rem;
}

.theme-card__body p {
  flex: 1;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.theme-card__cta {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.92rem;
}

.theme-card:hover .theme-card__cta {
  text-decoration: underline;
}

/* ----------------------------------------------------------------
   6. 最新記事（latest-articles）
   ---------------------------------------------------------------- */

.latest-articles {
  padding: 72px 0;
  background: var(--color-bg-blue);
}

.latest-articles h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.latest-articles__icon {
  width: 26px;
  height: 26px;
  color: var(--color-accent);
}

.latest-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.latest-column {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.latest-column__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--color-line);
}

.latest-column__head img {
  flex-shrink: 0;
}

.latest-column__head h3 {
  flex: 1;
  font-size: 1rem;
}

/* 投資・健康・AIそれぞれのカラムを、既存のテーマカラーで見分けやすくする */
#blog-invest .latest-column__head h3 { color: var(--color-invest); }
#blog-health .latest-column__head h3 { color: var(--color-health); }
#blog-ai .latest-column__head h3 { color: var(--color-ai); }

.latest-column__more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}

.latest-column__more:hover {
  text-decoration: underline;
}

.latest-list__item + .latest-list__item {
  border-top: 1px solid var(--color-line);
}

.latest-list__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
}

.latest-list__link img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--color-bg-soft);
  border-radius: 10px;
  object-fit: cover;
}

.latest-list__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.latest-list__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.4;
  /* 記事タイトルが長くても2行までに収める */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-list__link:hover .latest-list__title {
  color: var(--color-accent);
}

.latest-list__date {
  color: var(--color-muted);
  font-size: 0.75rem;
}

/* ----------------------------------------------------------------
   7. 運営者プロフィール（profile）
   ---------------------------------------------------------------- */

.profile {
  padding: 64px 0;
}

.profile__inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.profile__avatar {
  flex-shrink: 0;
  border-radius: 50%;
}

.profile__body h2 {
  font-size: 1.25rem;
}

.profile__body p {
  margin-top: 12px;
  color: var(--color-muted);
}

/* ----------------------------------------------------------------
   8. 最後のブログ案内（cta）
   ---------------------------------------------------------------- */

.cta {
  padding: 0 0 76px;
}

.cta__panel {
  padding: 48px 32px;
  text-align: center;
  background: var(--color-bg-blue);
  border-radius: 28px;
}

.cta h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.cta__buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.cta__buttons img {
  margin-inline: auto;
}

/* ----------------------------------------------------------------
   9. よくある質問（faq）
   ---------------------------------------------------------------- */

.faq {
  padding: 64px 0;
}

.faq h2 {
  text-align: center;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.faq__list {
  max-width: 46em;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* <details>・<summary>はJavaScriptなしで開閉できるHTML標準の機能を利用 */
.faq__item {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-bg-soft);
  overflow: hidden;
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none; /* ブラウザ標準の三角マークを消す */
}

/* Safari用：標準の三角マークを消す */
.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary h3 {
  font-size: 1rem;
}

/* 開閉状態を示す「＋」アイコン。開いている時は「×」に回転する */
.faq__item summary::after {
  flex-shrink: 0;
  content: "+";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  font-size: 1.2rem;
  font-weight: 700;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.faq__item[open] summary::after {
  transform: rotate(135deg);
}

.faq__item p {
  padding: 0 22px 20px;
  color: var(--color-muted);
}

/* ----------------------------------------------------------------
   10. フッター（site-footer）
   ---------------------------------------------------------------- */

.site-footer {
  padding: 36px 0;
  color: #cfe0eb;
  background: var(--color-navy);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.site-footer__logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.site-footer__links a {
  font-size: 0.88rem;
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__copyright {
  color: #9fb4c4;
  font-size: 0.78rem;
}

/* ----------------------------------------------------------------
   11. レスポンシブ対応（メディアクエリ）
   ---------------------------------------------------------------- */

/* タブレット以下：3カラムのカード類を2カラム／1カラムに */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__photo {
    order: -1;
    min-height: 260px;
    border-radius: 0 0 40px 40px;
  }

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

  .latest-articles__grid {
    grid-template-columns: 1fr;
  }

  .cta__buttons {
    grid-template-columns: 1fr;
  }
}

/* スマホ：ハンバーガーメニューに切り替え、各セクションを1カラムに */
@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  /* 初期状態ではスマホメニューを非表示にし、開いたときだけ表示する */
  .global-nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 8px 20px 16px;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
  }

  /* js/script.js が <nav> に is-open クラスを付け外しして表示を切り替える */
  .global-nav.is-open .global-nav__list {
    display: flex;
  }

  .global-nav__list li {
    border-top: 1px solid var(--color-line);
  }

  .global-nav__list a {
    display: block;
    padding: 14px 4px;
  }

  .hero__text {
    text-align: center;
    padding-block: 40px;
  }

  .hero__buttons {
    justify-content: center;
  }

  .theme-list {
    grid-template-columns: 1fr;
  }

  .profile__inner {
    flex-direction: column;
    text-align: center;
  }

  .cta__panel {
    padding: 36px 20px;
  }

  .about,
  .latest-articles,
  .profile,
  .faq {
    padding-block: 48px;
  }
}
