/* ============================================================
   front-page.css  —  SWELL子テーマ TOPページ
   ============================================================ */

/* ---------- カスタムプロパティ ---------- */
:root {
  --fn-accent:   #c0392b;   /* メインカラー（赤） */
  --fn-text:     #111111;
  --fn-meta:     #555555;
  --fn-border:   #e0e0e0;
  --fn-noimg:    #333333;
  --fn-font:     "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --fn-right-w:  300px;
  --fn-gap:      20px;
}

/* ---------- ラッパー ---------- */
.fnews-wrap {
  max-width: 1240px;
  margin: 12px auto 32px;
  padding: 0 16px;
  font-family: var(--fn-font);
  box-sizing: border-box;
}

/* ============================================================
   3カラムグリッド
   ============================================================ */
.fnews-3col {
  display: grid;
  grid-template-columns: 1fr 1fr var(--fn-right-w);
  gap: var(--fn-gap);
  align-items: start;
}

/* ============================================================
   共通：メタ情報（時刻・カテゴリ）
   ============================================================ */
.fnews-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.fnews-meta__time {
  font-size: 0.78rem;
  color: var(--fn-meta);
  white-space: nowrap;
}

/* 赤丸（PHPで出力したspanにスタイル適用） */
.fnews-meta__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--fn-accent);
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
}

/* カテゴリ：SWELLのデフォルトスタイルを使用 */
.fnews-meta__cat {
  text-decoration: none;
}

.fnews-meta__cat:hover {
  text-decoration: underline;
}

/* ============================================================
   共通：アイキャッチなし プレースホルダー
   ============================================================ */
.fnews-noimg {
  width: 100%;
  height: 100%;
  background: var(--fn-noimg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.fnews-noimg--sm {
  font-size: 0.68rem;
}

/* ============================================================
   左カラム ① ヒーロー記事（大アイキャッチ）
   ============================================================ */
.fnews-hero {
  border-bottom: 1px solid var(--fn-border);
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.fnews-hero__img-link {
  display: block;
  overflow: hidden;
}

.fnews-hero__img-wrap {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: var(--fn-noimg);
  height: auto !important;
  max-height: none !important;
}

.fnews-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.fnews-hero__img-link:hover .fnews-hero__img {
  transform: scale(1.04);
}

.fnews-hero__body {
  padding: 8px 0 0;
}

.fnews-hero__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 4px;
}

.fnews-hero__title a {
  color: var(--fn-text) !important;
  text-decoration: none !important;
}

.fnews-hero__title a:hover {
  text-decoration: underline !important;
  color: var(--fn-accent) !important;
}

/* ============================================================
   左カラム ② サムネ付き記事リスト（2件目以降）
   ============================================================ */
.fnews-text-item {
  border-bottom: 1px solid var(--fn-border);
  padding: 2px 0;
}

.fnews-text-item:last-child {
  border-bottom: none;
}

.fnews-text-item__link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.fnews-text-item__title a {
  color: var(--fn-text) !important;
  text-decoration: none !important;
}

.fnews-text-item__title a:hover {
  text-decoration: underline !important;
  color: var(--fn-accent) !important;
}

.fnews-text-item__body {
  flex: 1;
  min-width: 0;
}

.fnews-text-item__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 4px;
  color: var(--fn-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.fnews-text-item__thumb-wrap {
  display: block;
  width: 88px;
  min-width: 88px;
  height: 66px;
  overflow: hidden;
  background: var(--fn-noimg);
  flex-shrink: 0;
  line-height: 0;
}

.fnews-text-item__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.fnews-text-item__link:hover .fnews-text-item__thumb {
  transform: scale(1.06);
}

/* ============================================================
   中央カラム：タイトル左・サムネ右 リスト
   ============================================================ */
.fnews-col--center {
  border-left: 1px solid var(--fn-border);
  padding-left: var(--fn-gap);
}

.fnews-thumb-item {
  border-bottom: 1px solid var(--fn-border);
}

.fnews-thumb-item:last-child {
  border-bottom: none;
}

.fnews-thumb-item__link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}

.fnews-thumb-item__title a {
  color: var(--fn-text) !important;
  text-decoration: none !important;
}

.fnews-thumb-item__title a:hover {
  text-decoration: underline !important;
  color: var(--fn-accent) !important;
}

.fnews-thumb-item__body {
  flex: 1;
  min-width: 0;
}

.fnews-thumb-item__title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 4px;
  color: var(--fn-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}



.fnews-thumb-item__img-wrap {
  display: block;
  width: 88px;
  min-width: 88px;
  height: 66px;
  overflow: hidden;
  background: var(--fn-noimg);
  flex-shrink: 0;
  line-height: 0;
}

.fnews-thumb-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.fnews-thumb-item__link:hover .fnews-thumb-item__img {
  transform: scale(1.06);
}

/* ============================================================
   右カラム（広告）
   ============================================================ */
.fnews-col--right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 72px;
}

.fnews-ad,
.fnews-col--right .widget {
  width: var(--fn-right-w);
  line-height: 0;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  box-sizing: border-box;
}

/* ウィジェット内の画像・insタグを横幅いっぱいに */
.fnews-col--right .widget img,
.fnews-col--right .widget ins,
.fnews-ad--banner img,
.fnews-ad--banner ins {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.fnews-ad--adsense ins {
  display: block !important;
  width: 300px;
  height: 250px;
}

.fnews-banner-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s;
}

.fnews-ad a:hover .fnews-banner-img {
  opacity: 0.85;
}

/* ============================================================
   固定ページ（ID=28）内の h2 装飾
   左：メインカラー ＋ 右：薄グレー の下線
   ============================================================ */
.fnews-static-page .wp-block-heading h2,
.fnews-static-page h2 {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.fnews-static-page .wp-block-heading h2::after,
.fnews-static-page h2::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #e0e0e0;
  border-radius: 2px;
}

.fnews-static-page .wp-block-heading h2::before,
.fnews-static-page h2::before {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--fn-accent);
  border-radius: 2px;
  z-index: 1;
}

/* ============================================================
   ナビゲーションメニュー：カテゴリ説明文を非表示
   ============================================================ */
.menu-item .menu-item-description,
.global-nav .menu-item-description,
nav .menu-item-description,
.swell-block-nav .menu-item-description {
  display: none !important;
}

/* ============================================================
   固定ページ（ID=28）内の投稿リスト デザイン変更
   ============================================================ */
.fnews-static-page .p-postListWrap .p-postList.-type-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__item {
  border-bottom: 1px solid var(--fn-border);
  margin: 0;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__item:last-child {
  border-bottom: none;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__link {
  display: flex !important;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__thumb {
  width: 88px !important;
  min-width: 88px !important;
  height: 66px !important;
  overflow: hidden;
  flex-shrink: 0;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .c-postThumb__figure {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .c-postThumb__figure img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__body {
  flex: 1;
  min-width: 0;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__title {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
  margin: 0 0 4px !important;
  color: var(--fn-text) !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
}

.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__link:hover .p-postList__title {
  text-decoration: underline;
  color: var(--fn-accent) !important;
}

/* 固定ページ内メタ情報 */
.fnews-static-page .p-postListWrap .p-postList.-type-list .p-postList__meta {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--fn-meta);
  margin-top: 4px;
}

/* 時計アイコン非表示 */
.fnews-static-page .p-postList__meta time::before {
  display: none !important;
}

/* 時間の後ろに赤丸 */
.fnews-static-page .p-postList__meta time {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  color: var(--fn-meta);
}

.fnews-static-page .p-postList__meta time::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--fn-accent);
  border-radius: 50%;
  margin-left: 6px;
  flex-shrink: 0;
}

/* カテゴリ */
.fnews-static-page .p-postList__meta .p-postList__cat,
.fnews-static-page .p-postList__meta .c-postCat {
  font-size: 0.78rem;
  color: var(--fn-accent);
  font-weight: 600;
  text-decoration: none;
}

.fnews-static-page .p-postList__meta .p-postList__cat:hover {
  text-decoration: underline;
}

/* 「もっと見る」リンク */
.fnews-static-page .swell-block-post-list__readMore {
  display: block;
  text-align: right;
  font-size: 0.82rem;
  color: var(--fn-meta);
  margin-top: 8px;
  text-decoration: none;
}

.fnews-static-page .swell-block-post-list__readMore:hover {
  color: var(--fn-accent);
  text-decoration: underline;
}

/* ============================================================
   レスポンシブ
   ============================================================ */

@media (max-width: 1100px) {
  .fnews-3col {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left   center"
      "right  right";
  }
  .fnews-col--left   { grid-area: left; }
  .fnews-col--center { grid-area: center; }
  .fnews-col--right  {
    grid-area: right;
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }
}

@media (max-width: 768px) {
  .fnews-3col {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "center"
      "right";
  }
  .fnews-col--center {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--fn-border);
    padding-top: 12px;
  }
  .fnews-col--right {
    flex-direction: column;
    align-items: stretch;
    position: static;
  }
  .fnews-hero__img-wrap {
    aspect-ratio: 16 / 9;
  }
  .fnews-ad,
  .fnews-col--right .widget {
    width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    box-sizing: border-box;
  }

  .fnews-col--right .widget img,
  .fnews-col--right .widget ins {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
  .fnews-ad--adsense ins {
    width: 100% !important;
    height: auto !important;
    min-height: 100px;
  }
  .fnews-banner-img {
    width: 100%;
    height: auto;
  }
}

/* ============================================================
   PVランキング TOP5
   ============================================================ */
.fnews-ranking {
  max-width: 1240px;
  margin: 24px auto 8px;
  padding: 0 16px;
}

.fnews-ranking__heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 10px;
  position: relative;
}

/* 見出し下線（左：アクセントカラー、右：グレー） */
.fnews-ranking__heading::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #e0e0e0;
  border-radius: 2px;
}

.fnews-ranking__heading::before {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--fn-accent);
  border-radius: 2px;
  z-index: 1;
}

/* リスト */
.fnews-ranking__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 各アイテム：番号＋タイトル左・サムネ右 */
.fnews-ranking__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--fn-border);
}

.fnews-ranking__item:last-child {
  border-bottom: none;
}

/* 順位番号（縦長長方形） */
.fnews-ranking__num {
  font-size: 1rem;
  font-weight: 700;
  width: 24px;
  min-width: 24px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  color: #fff;
  background: #999;
  flex-shrink: 0;
  margin-top: 0;
}

/* 1〜3位は特別カラー */
.fnews-ranking__num--1 { background: #c0a000; }
.fnews-ranking__num--2 { background: #888888; }
.fnews-ranking__num--3 { background: #a05030; }

/* テキスト部分 */
.fnews-ranking__body {
  flex: 1;
  min-width: 0;
}

.fnews-ranking__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.fnews-ranking__title a:hover {
  text-decoration: underline !important;
  color: var(--fn-accent) !important;
}

/* サムネイル（右） */
.fnews-ranking__thumb-wrap {
  display: block;
  width: 88px;
  min-width: 88px;
  height: 66px;
  overflow: hidden;
  background: var(--fn-noimg);
  flex-shrink: 0;
  line-height: 0;
}

.fnews-ranking__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.fnews-ranking__thumb-wrap:hover .fnews-ranking__thumb {
  transform: scale(1.06);
}

/* レスポンシブ */
@media (max-width: 768px) {
  .fnews-ranking {
    padding: 0 16px;
  }
}