@charset "UTF-8";
/* =========================================================
   注文住宅（Style Collection）一覧ページ 専用スタイル
   （archive-style-works.php）

   参照デザイン
     一覧（PC） … design/archive_stylecollection.jpg
                  （キャンバス幅 1600px・CSS等倍）
     一覧（SP） … 支給なし（PCデザインを元に1カラムへ組み替えています）

   ※ functions.php が assets/css/ 内のCSSを
     filemtime() のバージョン付きで自動読み込みします（キャッシュ対策）
   ※ style.css（共通）のあとに読み込まれます
   ※ ページタイトル帯・パンくずは
     style.css の全ページ共通パーツ（.page-hero / .breadcrumb）
   ※ 説明ページ（style-collection.css／swa- 接頭辞）・
     詳細ページ（style-works.css／sw- 接頭辞）と衝突しないよう、
     クラス名はすべて「swl-」接頭辞でコンポーネント化しています
========================================================= */

.l-style-works-list {
  --swl-dark: #2c2c2c; /* バッジ・ボタンの黒（説明ページと共通） */

  /* カードのバッジ（STYLE 01）の大きさ。画面幅ごとにここだけ変えます */
  --swl-badge-w: 90px;
  --swl-badge-h: 118px;

  overflow-x: hidden; /* 画面外へはみ出す背景の英字で横スクロールが出ないように */
}


/* =========================================================
   スタイルコレクション一覧
   ・デザイン実測：カード 751 × 295px／列のすき間 35px／行のすき間 27px
     左右の余白 32px（1600px キャンバスのほぼ全幅に並びます）
   ・背景のうすいグレーの楕円は gray_oval.png をくり返し表示
========================================================= */

.swl-collection {
  padding: 66px 0 138px;
  background: url(../images/style-works/gray_oval.png) repeat center top / 835px auto;
}

/* ---- 見出しロゴ（STYLE COLLECTION 自分らしさを見つけよう。） ---- */
.swl-collection__title {
  width: min(638px, calc(100% - 40px));
  margin: 0 auto;
}

.swl-collection__title img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- カードの並び（PCは2列） ---- */
.swl-collection__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 27px 35px;
  max-width: 1600px;
  margin: 18px auto 0;
  padding: 0 32px;
  list-style: none;
}

.swl-collection__empty {
  margin: 40px 20px 0;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  text-align: center;
}


/* =========================================================
   カード（写真 ＋ STYLE番号 ＋ タイトル）
========================================================= */

.swl-card {
  position: relative;
  display: block;
  color: #fff;
  text-decoration: none;
}

/* 写真（デザイン実測 751 × 295px）。拡大アニメーションははみ出さないよう、ここで切り抜く */
.swl-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 751 / 295;
  overflow: hidden;
  background-color: #e5e5e5; /* 写真が未登録のときの下地 */
}

/* 詳細ページのメインビジュアルを、カードの形に合わせて中央で切り抜きます */
.swl-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.swl-card:hover .swl-card__thumb img,
.swl-card:focus-visible .swl-card__thumb img {
  transform: scale(1.04);
}

/* STYLE 01 のバッジ（デザイン実測 90 × 118px／写真の左上・カード左端から 27px） */
.swl-card__badge {
  position: absolute;
  left: 27px;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--swl-badge-w);
  height: var(--swl-badge-h);
  background-color: var(--swl-dark);
  font-family: var(--font-display);
  line-height: 1;
}

.swl-card__badge-en {
  font-size: calc(var(--swl-badge-w) * 0.156); /* 14px ÷ 90px */
  letter-spacing: 0.12em;
}

.swl-card__badge-num {
  margin-top: 0.15em;
  font-size: calc(var(--swl-badge-w) * 0.611); /* 55px ÷ 90px */
  letter-spacing: 0.02em;
}

/*
   写真の下のタイトル帯（デザイン実測：高さ約 58px・黒背景・白文字・中央揃え）
   ・投稿タイトルをそのまま1行で表示し、幅が足りないときだけ折り返します
     （折り返す場合は、文節の切れ目で2行の長さをそろえます）
*/
.swl-card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 20px;
  background-color: var(--swl-dark);
  font-family: var(--font-serif);
  font-size: 1.95rem;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-align: center;
  word-break: auto-phrase;
  text-wrap: balance;
}


/* =========================================================
   スタイルコレクション TOP に戻るボタン
   ・ボタン本体は共通パーツです（style.css の .sc-back）
   ・ここではこのページでの上の余白だけを指定しています
========================================================= */

.swl-collection > .sc-back {
  margin-top: 168px; /* 英字の上端までが 110px になるように（はみ出す 58px ＋ 110px） */
}


/* =========================================================
   タブレット（1299px以下）
   ・カードが小さくなるぶん、写真を少し縦長にして文字の入る高さを確保します
========================================================= */
@media screen and (max-width: 1299px) {

  .l-style-works-list {
    --swl-badge-w: 76px;
    --swl-badge-h: 100px;
  }

  .swl-collection__list {
    gap: 24px;
    padding: 0 24px;
  }

  .swl-card__thumb {
    aspect-ratio: 751 / 340;
  }

  .swl-card__name {
    min-height: 52px;
    font-size: 1.7rem;
  }

  .swl-card__badge {
    left: 16px;
  }
}


/* =========================================================
   SP（767px以下）… 1列に並べます
========================================================= */
@media screen and (max-width: 767px) {

  .l-style-works-list {
    --swl-badge-w: 62px;
    --swl-badge-h: 82px;
  }

  .swl-collection {
    padding: 40px 0 80px;
    background-size: 520px auto;
  }

  .swl-collection__title {
    width: min(320px, calc(100% - 64px));
  }

  .swl-collection__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 14px;
    padding: 0 16px;
  }

  .swl-card__thumb {
    aspect-ratio: 343 / 200;
  }

  .swl-card__badge {
    left: 12px;
  }

  .swl-card__name {
    min-height: 46px;
    padding: 8px 12px;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
  }

  .swl-collection > .sc-back {
    margin-top: 96px;
  }
}


/* =========================================================
   動きを減らす設定の端末では、拡大アニメーションを止めます
========================================================= */
@media (prefers-reduced-motion: reduce) {

  .swl-card__thumb img {
    transition: none;
  }

  .swl-card:hover .swl-card__thumb img,
  .swl-card:focus-visible .swl-card__thumb img {
    transform: none;
  }
}
