@charset "UTF-8";
/* =========================================================
   最新チラシページ 専用スタイル
   （archive-flyer.php）

   ※ functions.php が assets/css/ 内のCSSを自動で読み込みます
   ※ style.css（共通）のあとに読み込まれます
   ※ ページタイトル帯・パンくずは style.css の
     全ページ共通パーツ（.page-hero / .breadcrumb）を使用しています
   ※ トップページの「.flyer-list / .flyer-item」と干渉しないよう、
     クラス名は「flyer-archive / flyer-block / flyer-btn / flyer-pager」で
     コンポーネント化しています

   ■ レイアウト（design/chirashi_edit.jpg 準拠）
     すべてのチラシ共通：左に文章／右にチラシ画像
     画像の並べ方はチラシの向きで切り替えます（archive-flyer.php が自動判定）
       .flyer-block__media--portrait  … 縦長：表・裏を左右に並べる
       .flyer-block__media--landscape … 横長：表・裏を上下に並べる
========================================================= */

.l-flyer {
  --flyer-dark: #2c2c2c;          /* PDFボタンの黒 */
  --flyer-frame: #999;            /* チラシ画像の枠線 */
  --flyer-line: #dadada;          /* 見出し下の罫線（グレー） */
  --flyer-accent: #2f95cd;        /* 見出し下の罫線（青のアクセント） */

  --flyer-media-w: 595px;         /* 右側（チラシ画像）カラムの幅 */
  --flyer-col-gap: 65px;          /* 文章と画像の間隔 */
  --flyer-btn-w: 352px;           /* PDFボタンの幅 */
}

/* 共通インナー（style.css の --container: 1200px に合わせる） */
.flyer-archive__inner {
  max-width: calc(var(--container) + 40px);
  margin: 0 auto;
  padding: 0 20px;
}


/* =========================================================
   1. 一覧エリア
========================================================= */
.flyer-archive {
  margin-top: 92px;
  padding-bottom: 115px;
}

/* トップページ「詳しく見る」からのアンカー遷移用
   （固定ヘッダーの下に隠れないよう、上に余白を確保します） */
.flyer-block {
  scroll-margin-top: calc(var(--header-h) + 40px);
}

.flyer-block + .flyer-block {
  margin-top: 110px;
}

.flyer-archive__empty {
  padding: 40px 0;
  font-size: 1.6rem;
  text-align: center;
  letter-spacing: .1em;
}


/* =========================================================
   2. レイアウト（全チラシ共通）

      左：見出し → 説明文 → 価格 → PDFボタン
      右：チラシ画像
========================================================= */
.flyer-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--flyer-media-w));
  gap: var(--flyer-col-gap);
  align-items: start;
}

/* 画像なし（文章のみ） */
.flyer-block--no-media {
  display: block;
}


/* =========================================================
   3. チラシ画像

   画像は右カラムの幅に合わせて伸縮し、縦横比は崩しません。
   ・縦長（--portrait） … 表・裏を2列で左右に並べる
                          （裏面なしの1枚だけの場合は右の列に置く）
   ・横長（--landscape）… 表・裏を1列で上下に並べる
========================================================= */
.flyer-block__media {
  display: grid;
  align-items: start;
}

/* 縦長：左右に2枚並び */
.flyer-block__media--portrait {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.flyer-block__media--portrait .flyer-block__figure:only-child {
  grid-column: 2;
}

/* 横長：上下に並べる */
.flyer-block__media--landscape {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.flyer-block__figure {
  min-width: 0;
}

/* チラシ画像自体に白い余白があるため、枠の内側の余白は付けない */
.flyer-block__frame {
  display: block;
  padding: 0;
  border: 1px solid var(--flyer-frame);
  background-color: #fff;
}

.flyer-block__img {
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================================
   4. 見出し（下に「グレーの罫線＋青のアクセント」が入る）
========================================================= */
.flyer-block__title {
  position: relative;
  padding-bottom: 20px;
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: .15em;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

/* グレーの罫線 */
.flyer-block__title::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--flyer-line);
}

/* 青のアクセント */
.flyer-block__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 66px;
  height: 2px;
  background-color: var(--flyer-accent);
}


/* =========================================================
   5. 説明文・価格
========================================================= */
.flyer-block__content {
  margin-top: 30px;
}

.flyer-block__text {
  font-size: 1.7rem;
  line-height: 1.95;
  letter-spacing: .1em;
  overflow-wrap: anywhere;
}

/* WYSIWYG で入力した場合の段落間 */
.flyer-block__text p + p {
  margin-top: 1em;
}

.flyer-block__foot {
  margin-top: 8px;
  text-align: right;
}

.flyer-block__price-label {
  font-size: 1.7rem;
  line-height: 1.8;
  letter-spacing: .1em;
}

.flyer-block__price-data {
  font-size: 2rem;
  line-height: 1.7;
  letter-spacing: .08em;
}

.flyer-block__cta {
  margin-top: 14px;
}


/* =========================================================
   6. PDFボタン（黒背景・白文字・三角アイコン・オーバル柄つき）
========================================================= */
.flyer-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--flyer-btn-w);
  min-height: 54px;
  padding: 10px 16px;
  color: #fff;
  text-align: center;
  background-color: var(--flyer-dark);
  isolation: isolate;
  overflow: hidden;
  transition: opacity .3s;
}

/* ボタンのオーバル柄（assets/images/flyer/yoko_oval.png） */
.flyer-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/flyer/yoko_oval.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: .14;
  pointer-events: none;
  z-index: -1;
}

.flyer-btn:hover {
  color: #fff;
  opacity: .8;
}

.flyer-btn__label {
  position: relative;
  padding-left: 22px;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .1em;
}

/* ラベル左の三角アイコン */
.flyer-btn__label::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent #fff;
  transform: translateY(-50%);
}


/* =========================================================
   7. ページ送り
========================================================= */
.flyer-pager {
  margin-top: 90px;
}

.flyer-pager__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.flyer-pager__item .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;
  height: 33px;
  padding: 0 4px;
  border-radius: 50%;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}

.flyer-pager__item .page-numbers.current {
  color: #fff;
  background-color: var(--flyer-dark);
}

.flyer-pager__item a.page-numbers:hover {
  color: var(--color-blue);
  opacity: 1;
}


/* =========================================================
   8. タブレット（〜1024px）
========================================================= */
@media screen and (max-width: 1024px) {

  .l-flyer {
    --flyer-media-w: 50%;
    --flyer-col-gap: 30px;
  }

  .flyer-block__media--portrait {
    gap: 16px;
  }

  .flyer-block__title {
    font-size: 2rem;
  }

  .flyer-block__text,
  .flyer-block__price-label {
    font-size: 1.6rem;
  }

  .flyer-block__price-data {
    font-size: 1.8rem;
  }
}


/* =========================================================
   9. SP（〜767px）
      1カラムで 見出し → 説明文 → 価格 → ボタン → 画像 の順に縦に並べる
      ・縦長 … 表・裏を2枚横並び
      ・横長 … 表・裏を上下に並べる
========================================================= */
@media screen and (max-width: 767px) {

  .flyer-archive {
    margin-top: 55px;
    padding-bottom: 80px;
  }

  .flyer-block {
    display: block;
    scroll-margin-top: calc(var(--header-h-sp) + 24px);
  }

  .flyer-block + .flyer-block {
    margin-top: 85px;
  }

  /* --- 画像（本文の下） --- */
  .flyer-block__media {
    margin-top: 24px;
  }

  .flyer-block__media--portrait {
    gap: 14px;
  }

  /* 縦長1枚だけのときは、2枚並びの1枚分の幅で中央に置く */
  .flyer-block__media--portrait .flyer-block__figure:only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 14px) / 2);
  }

  .flyer-block__media--landscape {
    gap: 8px;
  }

  /* --- 見出し --- */
  .flyer-block__title {
    padding-bottom: 28px;
    font-size: 1.8rem;
    line-height: 1.7;
    letter-spacing: .12em;
  }

  .flyer-block__title::after {
    width: 58px;
  }

  .flyer-block__content {
    margin-top: 32px;
  }

  /* --- 説明文・価格 --- */
  .flyer-block__text {
    font-size: 1.5rem;
    line-height: 1.85;
    letter-spacing: .08em;
  }

  .flyer-block__foot {
    width: 100%;
    margin-top: 40px;
  }

  .flyer-block__price-label {
    font-size: 1.6rem;
  }

  .flyer-block__price-data {
    font-size: 1.7rem;
    letter-spacing: .04em;
  }

  .flyer-block__cta {
    margin-top: 18px;
  }

  /* --- ボタン（全幅） --- */
  .flyer-btn {
    max-width: none;
    min-height: 52px;
  }

  .flyer-btn__label {
    font-size: 1.6rem;
  }

  /* --- ページ送り --- */
  .flyer-pager {
    margin-top: 56px;
  }

  .flyer-pager__list {
    gap: 12px;
  }

  .flyer-pager__item .page-numbers {
    min-width: 28px;
    height: 28px;
    font-size: 1.6rem;
  }
}
