/* =========================================================
   Cralier - Recipe Page Stylesheet
   (style.css + shop.css の共通スタイルに上乗せ)
   ========================================================= */

/* =========================================================
   Hero(レシピ一覧の表紙)
   ========================================================= */
.recipe-hero {
  position: relative;
  background-image: url('../images-webp/recipe-images/recipe-hero-img.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 401 / 400;
  display: flex;
  flex-direction: column;
  justify-content: center;       /* 縦は中央寄せ */
  align-items: flex-start;       /* 横は左寄せ */
  padding: 0 28px 0 32px;
  text-align: left;
}
.recipe-hero__inner {
  position: relative;
  z-index: 1;
  text-align: left;
}
.recipe-hero__en {
  font-family: "Fredericka the Great", "Times New Roman", serif;
  font-size: 56px;
  color: var(--c-text);
  margin: 0;
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.recipe-hero__jp {
  font-size: 11px;
  color: var(--c-text);
  margin: 6px 0 16px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}
.recipe-hero__desc {
  font-size: 12px;
  color: var(--c-text);
  margin: 0;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

/* =========================================================
   Genre Hero(ジャンル絞り込みページ用 — レジン等)
   左にテキスト / 右に画像。画像は右端まで bleed させて切れ目をなくす
   ========================================================= */
.genre-hero {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  margin: 16px 24px;
  overflow: hidden;                 /* 画像を角丸で切り抜く */
  min-height: 150px;                /* 全面背景用に少し高め */
}
.genre-hero__text {
  position: relative;
  z-index: 1;                       /* 背景画像の上にテキスト */
  flex: 1;
  min-width: 0;
  max-width: 60%;                   /* テキストは左側に寄せる */
  padding: 18px 12px 18px 34px;     /* 少し右へ */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.genre-hero__title {
  font-family: "Kaisei Decol", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 27px;                  /* 22px → 少し大きく */
  color: var(--c-text);
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  white-space: nowrap;              /* 途中改行させない(1行固定) */
}
.genre-hero__desc {
  font-family: "Kaisei Decol", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 11px;
  color: var(--c-text);
  margin: 0;
  line-height: 1.7;
  letter-spacing: 0.02em;
}
.genre-hero__visual {
  position: absolute;               /* 全面背景として敷く */
  inset: 0;
  z-index: 0;
}
.genre-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;                /* 容器を埋め切る */
  display: block;
}

/* =========================================================
   Recipe Section(新着 / ランキング 共通)
   ========================================================= */
.recipe-section {
  padding: 28px 24px 12px;
}
.recipe-section + .recipe-section {
  margin-top: 8px;
}
.recipe-section__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin: 0 0 14px;
  letter-spacing: 0.08em;
}

/* もっと見る(再利用) */
.recipe-section .more-link {
  margin: 18px 0 0;
  text-align: center;
}
.recipe-section .more-link a {
  display: inline-block;
  padding: 8px 24px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--c-line);
  text-decoration: none;
}

/* =========================================================
   Recipe Card(2カラムグリッド & 横長カード)
   ========================================================= */
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-item {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(124, 91, 56, 0.12);
  transition: transform .25s ease, box-shadow .25s ease;
}
.recipe-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(124, 91, 56, 0.18);
}
/* カード全体を <a> でラップした場合用 */
.recipe-item__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.recipe-item--wide .recipe-item__link {
  display: flex;
  align-items: stretch;
}

/* 2カラムカード */
.recipe-grid .recipe-item__img {
  aspect-ratio: 1 / 1;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.recipe-grid .recipe-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-grid .recipe-item__body {
  padding: 12px 14px 14px;
}

/* 横長カード(ランキング) */
.recipe-item--wide {
  display: flex;
  align-items: stretch;
}
/* hidden 属性が display:flex に上書きされないよう明示的に隠す */
.recipe-item[hidden] { display: none; }
.recipe-item--wide .recipe-item__img {
  flex: 0 0 38%;
  aspect-ratio: 1 / 1;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.recipe-item--wide .recipe-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-item--wide .recipe-item__body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* ランキング番号バッジ(画像左上に表示)
   data-rank 属性の値をそのまま CSS の content で表示するので
   CMS 化してもデータ駆動で動く
   1位=金 / 2位=銀 / 3位=銅 / 4位以降=Cralier 茶色 */
.recipe-item--wide[data-rank]::before {
  content: attr(data-rank);
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-accent);              /* 4位以降のデフォルト */
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-en);
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(124, 91, 56, 0.25);
  letter-spacing: 0;
}
/* 🥇 1位:金(少し大きめで存在感) */
.recipe-item--wide[data-rank="1"]::before {
  background: linear-gradient(135deg, #E8C77B 0%, #C49A3F 100%);
  width: 38px;
  height: 38px;
  font-size: 17px;
  box-shadow: 0 3px 10px rgba(196, 154, 63, 0.4);
}
/* 🥈 2位:銀 */
.recipe-item--wide[data-rank="2"]::before {
  background: linear-gradient(135deg, #D4D0CA 0%, #A39E96 100%);
  box-shadow: 0 2px 8px rgba(120, 110, 100, 0.3);
}
/* 🥉 3位:銅 */
.recipe-item--wide[data-rank="3"]::before {
  background: linear-gradient(135deg, #D29B7A 0%, #9F6940 100%);
  box-shadow: 0 2px 8px rgba(159, 105, 64, 0.3);
}

.recipe-item__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin: 4px 0 4px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.recipe-item__desc {
  font-size: 11px;
  color: var(--c-text);
  margin: 0;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* レベル別タグ(レシピ用)*/
.recipe-tag {
  display: inline-block;
  align-self: flex-start;          /* flex 親内で横に伸びないように固定 */
  font-size: 11px;
  padding: 3px 14px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  margin: 0 0 4px;
}
.recipe-tag--new       { color: var(--c-pink-text);  background: var(--c-pink-bg); }
.recipe-tag--beginner  { color: var(--c-green-text); background: var(--c-green-bg); }
.recipe-tag--mid       { color: var(--c-pink-text);  background: var(--c-pink-bg); }
.recipe-tag--advanced  { color: var(--c-blue-text);  background: var(--c-blue-bg); }

/* =========================================================
   Recruitment(レシピ募集バナー)— 画像全面背景 + テキスト右側
   ========================================================= */
.recipe-recruitment {
  margin: 36px 24px 24px;
}
/* バナー全体を <a> でラップして、ホバーで少し浮かせる */
.recipe-recruitment__link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.25, .8, .25, 1), box-shadow .3s ease;
}
.recipe-recruitment__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(120, 90, 60, 0.18);
}
.recipe-recruitment__inner {
  background-image: url('../images-webp/recipe-images/recipe-recruitment.webp');
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  border-radius: 12px;
  min-height: 240px;
  padding: 22px 18px 22px 42%;     /* 左側の本/コーヒー部分を避けてテキスト配置 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.recipe-recruitment__title {
  font-family: "Kaisei Decol", "Hiragino Mincho ProN", serif;
  font-size: 17px;
  color: var(--c-text);
  margin: 0 0 8px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.recipe-recruitment__sub {
  font-size: 10px;
  color: var(--c-text);
  margin: 0 0 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.recipe-recruitment__points {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.recipe-recruitment__points li {
  background: var(--c-white);
  color: var(--c-text);
  border-radius: 10px;
  padding: 10px 10px 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  min-width: 78px;
}
.recipe-recruitment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--c-accent);
}
.recipe-recruitment__icon svg {
  width: 100%;
  height: 100%;
}
.recipe-recruitment__btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--c-pink-text);
  color: var(--c-white);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity .2s, transform .2s;
}
.recipe-recruitment__btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
