@charset "UTF-8";

/* ==========================================================================
   0. 全体レイアウトの骨組み
   ========================================================================== */
body {
  font-family: var(--font-base);
  color: var(--text-color-main);
  background-color: #ffffff;
}

.site-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* フッターを常に画面最下部に押し下げる設定 */
}

.site-main {
  flex: 1;
}

.site-main__inner,
.site-header__inner,
.site-footer__inner {
  width: 100%;
  max-width: 1100px; /* サイト全体の最大横幅 */
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   1. ヘッダー & ナビゲーション（レスポンシブ）
   ========================================================================== */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100; /* スクロール時も最前面に固定 */
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px; /* ヘッダーの高さ */
}

/* サイトロゴ */
.site-logo__title {
  font-size: var(--font-size-site-title);
  font-weight: 700;
  font-family: var(--font-heading);
}
.site-logo__title a {
  transition: color 0.3s;
}
.site-logo__title a:hover {
  color: var(--primary-color);
}

/* --------------------------------
   PC用レイアウト（画面幅 768px 以上）
   -------------------------------- */
@media (min-width: 768px) {
  /* スマホ専用要素を非表示にする */
  .sp-only {
    display: none !important;
  }

  /* PCナビゲーション */
  .site-nav__list {
    display: flex;
    gap: 20px; /* メニュー項目同士の間隔 */
  }

  .site-nav__list li {
    padding: 0 20px 0 0; /* 線と文字の間の余白 */
    border-right: 1px solid #d1d5db; /* 薄いグレーの罫線 */
    line-height: 1.2; /* 線の高さを文字に合わせる */
  }

  .site-nav__list li:last-child {
    border-right: none;
    padding-right: 0;
  }

  .site-nav__list a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 10px 0;
    transition: color 0.3s;
  }

  .site-nav__list a:hover {
    color: var(--primary-color);
  }
}

/* --------------------------------
   スマホ・ハンバーガー（画面幅 767px 以下）
   -------------------------------- */
@media (max-width: 767px) {
  /* PC専用要素を非表示にする */
  .pc-only {
    display: none !important;
  }

  /* ハンバーガーボタン三本線 */
  .menu-trigger {
    display: block;
    position: relative;
    width: 30px;
    height: 24px;
    z-index: 200; /* 引き出しメニューより前面 */
    cursor: pointer;
  }

  .menu-trigger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color-main);
    transition: all 0.4s;
  }

  /* 三本線の位置固定 */
  .menu-trigger span:nth-child(1) { top: 0; }
  .menu-trigger span:nth-child(2) { top: 11px; }
  .menu-trigger span:nth-child(3) { bottom: 0; }

  /* メニューが開いたとき（JavaScriptで active クラスを付与して変形） */
  .menu-trigger.active span:nth-child(1) { transform: translateY(11px) rotate(-45deg); }
  .menu-trigger.active span:nth-child(2) { opacity: 0; }
  .menu-trigger.active span:nth-child(3) { transform: translateY(-11px) rotate(45deg); }

  /* スマホ用引き出しメニュー裏側 */
  .sp-menu {
    position: fixed;
    top: 0;
    right: -100%; /* 初期状態は右側に隠す */
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 150;
    transition: all 0.4s ease;
    padding: 100px 40px 40px;
  }

  /* JavaScriptで開いたとき */
  .sp-menu.open {
    right: 0;
  }

  .sp-menu__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    margin-bottom: 40px;
  }

  .sp-menu__list a {
    font-size: 1.2rem;
    font-weight: 500;
    display: block;
    padding: 10px;
  }

  /* メニュー内SNSエリア */
  .sp-menu__sns {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
}

/* ==========================================================================
   2. 下層ページ共通ヘッダー（画像切り替え用）
   ========================================================================== */
.page-header {
  background-color: var(--primary-color); /* 背景画像がない場合のフォールバック */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 60px 0;
  text-align: center;
  color: #ffffff;
}

.page-header__title {
  font-size: var(--font-size-page-title);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ==========================================================================
   3. 記事一覧・カードレイアウト（archive.php用）
   ========================================================================== */
/* 一覧を並べる外枠（グリッドコンテナ） */
.site-main .archive-list {
  display: flex;
  flex-wrap: wrap; /* 幅がいっぱいになったら次の行へ折り返す */
  gap: 30px;       /* カード同士のすき間 */
  margin: 40px 0;
}

/* 個々の記事カード */
.archive-item {
  width: calc((100% - 60px) / 3);
  background-color: #ffffff;
  border: 2px solid #e5d4c4;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* カード全体をリンクにするための設定 */
.archive-item__link {
  display: flex;
  flex-direction: column;
  height: 100%; /* カードの高さをごちゃ混ぜにせず統一する */
}

/* マウスホバー時にカードをフワッと浮かせる演出 */
.archive-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* カードの画像エリア */
.archive-item__thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9; /* 画像の比率を16:9に完全固定（横長で綺麗に揃います） */
  overflow: hidden;
  background-color: var(--bg-color-light);
}

.archive-item__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像が歪まないように切り抜く魔法のコード */
  transition: transform 0.3s;
}

/* ホバー時に画像だけをじわっと拡大させるプロの演出 */
.archive-item:hover .archive-item__thumbnail img {
  transform: scale(1.05);
}

/* カードのテキストエリア（余白の設定） */
.archive-item__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 投稿日 */
.archive-item__date {
  font-size: 0.85rem;
  color: #718096; /* 落ち着いたグレー */
  margin-bottom: 8px;
}

/* 記事タイトル */
.archive-item__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-color-main);
  margin-bottom: 12px;
  /* タイトルが長すぎても3行で綺麗に収めて末尾を「…」にする設定 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 記事の抜粋文 */
.archive-item__excerpt {
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.6;
  /* 抜粋は2行で収めて末尾を「…」にする */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 記事が1件もない場合のテキスト */
.no-posts {
  grid-column: 1 / -1; /* グリッド全体に横いっぱいに広げる */
  text-align: center;
  padding: 60px 0;
  color: #718096;
}

/* タブレット（960px以下：2列） */
@media (max-width: 960px) {
  .site-main .archive-item {
    /* (100% - すき間30px×1個) ÷ 2列 */
    width: calc((100% - 30px) / 2);
  }
}

/* スマホ（767px以下：1列） */
@media (max-width: 767px) {
  .site-main .archive-item {
    width: 100%;
  }
}

/* ==========================================================================
   4. ページネーション（一覧ページ下部のページ送り）
   ========================================================================== */
.archive-pagination {
  margin: 50px 0;
}

.archive-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* 数字や「次へ」の共通デザイン */
.archive-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
}

/* マウスホバー時、および今見ているページの数字の装飾 */
.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

/* 「...」の省略記号の時はホバーや色付けをしない */
.archive-pagination .page-numbers.dots {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-color-main);
}


/* ==========================================================================
   5. アニメーション（スクロールでふわっと表示）
   ========================================================================== */
.anime-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}
.anime-fade-up.is-active { /* スクロールして画面に入ったらJSでこのクラスを付与 */
    opacity: 1;
    transform: translateY(0);
}

.anime-zoom-in {
    transform: scale(0.9);
    transition: transform 1s;
}
.anime-zoom-in.is-active {
    transform: scale(1);
}

/* ==========================================================================
   6. ブロックの影付き
   ========================================================================== */
.is-style-modern-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
}
