@charset "UTF-8";

/* =========================================================
   Post card（記事 1 件）
   WordPress では template-parts/card-post.php（$args['variant'] で切り替え）

   共通の要素
     .post-card__thumb : サムネイル
     .post-card__date  : 投稿日
     .post-card__cat   : カテゴリ
     .post-card__title : タイトル
     .post-card__text  : 抜粋

   バリエーション
     .post-card--top     : TOP の NEWS（SP では横並び）
     .post-card--archive : NEWS 一覧
   ========================================================= */
.post-card {
  display: block;
}

.post-card__thumb {
  position: relative;
  overflow: hidden;
  background: var(--c-gray);
}

.post-card__text {
  font-family: var(--f-maru);
  letter-spacing: 0.1em;
  word-break: break-all;
}

/* =========================================================
   --top : TOP の NEWS
   ========================================================= */
.post-card--top {
  width: min(268px, 100%);
  margin-inline: auto;
  color: var(--c-blue);
}

.post-card--top .post-card__thumb {
  width: 241px;
  max-width: 100%;
  aspect-ratio: 1;
}

.post-card--top .post-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card--top .post-card__meta {
  display: flex;
  align-items: center;
  gap: 51px;
  margin-top: 75px;
  padding-left: 13px;
}

.post-card--top .post-card__title {
  font-family: var(--f-maru);
  font-weight: 500;
  font-size: 21px;
  line-height: 32px;
  letter-spacing: 0.1em;
}

.post-card--top .post-card__date {
  font-family: var(--f-num);
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.post-card--top .post-card__text {
  margin-top: 28px;
  padding-left: 13px;
  font-size: 14px;
  line-height: 1.8;
}

.post-card--top .post-card__foot {
  display: flex;
  align-items: center;
  gap: 21px;
  margin-top: 23px;
  padding-left: 11px;
}

.post-card--top .post-card__cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 103px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--c-blue-line);
  font-family: var(--f-en-sans), var(--f-maru);
  font-size: 13px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* カテゴリー名の長さに合わせて線が縮む */
.post-card--top .post-card__line {
  flex: 1 1 auto;
  min-width: 20px;
  max-width: 115px;
  height: 1px;
  background: var(--c-blue-line);
  transition: max-width 0.4s;
}

.post-card--top:hover .post-card__line {
  max-width: 135px;
}

/* =========================================================
   --archive : NEWS 一覧
   ========================================================= */
.post-card--archive {
  color: var(--c-brown-dark);
}

.post-card--archive .post-card__date {
  display: block;
  font-family: var(--f-maru);
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 0.1em;
  text-align: right;
}

.post-card--archive .post-card__thumb {
  margin-top: 5px;
  aspect-ratio: 182 / 173;
}

.post-card--archive .post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card--archive .post-card__cat {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  margin-top: 13px;
  border: 1.2px solid var(--c-blue-btn);
  border-radius: 13px;
  font-family: var(--f-maru);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.07em;
  color: var(--c-brown-light);
  white-space: nowrap;
}

/* カテゴリ「おすすめメニュー」は枠をベージュに */
.post-card--archive .post-card__cat--menu {
  border-color: var(--c-beige-gray);
}

.post-card--archive .post-card__title {
  width: calc(100% + 40px); /* Figma 同様、2行目は列間の余白まで使う */
  margin-top: 15px;
  font-family: var(--f-maru);
  font-weight: 400;
  font-size: 16px;
  line-height: 25px;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.post-card--archive .post-card__text {
  margin-top: 15px;
  font-size: 12px;
  line-height: 21.2px;
}

.post-card--archive:hover .post-card__title {
  color: var(--c-blue);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .post-card--top .post-card__meta {
    gap: 24px;
    margin-top: 40px;
    padding-left: 0;
  }

  .post-card--top .post-card__text,
  .post-card--top .post-card__foot {
    padding-left: 0;
  }

  .post-card--archive .post-card__title {
    width: auto;
  }
}

@media (max-width: 768px) {
  /* --top：画像 ＋ テキストの横並び */
  .post-card--top {
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: 16px;
    width: 100%;
  }

  .post-card--top .post-card__thumb {
    grid-row: 1 / 4;
    width: 100%;
  }

  .post-card--top .post-card__meta {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 4px;
    margin-top: 0;
  }

  .post-card--top .post-card__title {
    font-size: 17px;
    line-height: 1.5;
  }

  .post-card--top .post-card__date {
    font-size: 12px;
  }

  .post-card--top .post-card__text {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .post-card--top .post-card__foot {
    gap: 12px;
    margin-top: 10px;
  }

  .post-card--top .post-card__cat {
    min-width: 80px;
    height: 26px;
    font-size: 12px;
  }

  .post-card--top:hover .post-card__line {
    max-width: 115px;
  }

  /* --archive */
  .post-card--archive .post-card__date {
    font-size: 12px;
  }

  .post-card--archive .post-card__cat {
    height: 24px;
    font-size: 12px;
  }

  .post-card--archive .post-card__title {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.06em;
  }

  .post-card--archive .post-card__title br {
    display: none;
  }

  .post-card--archive .post-card__text {
    margin-top: 8px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
