/* -------------------------------------------
   Front Page Specific Styles (トップページ専用)
   ※ボタンや共通カードスタイルは style.css へ統合済み
------------------------------------------- */

/* ヒーローセクション */
.fp-hero {
  /* ★修正: ヘッダー被りを防ぐため !important を付与して余白を強制確保 */
  padding-top: 180px !important;
  padding-bottom: 100px;
  position: relative;
}

.fp-hero-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (min-width: 1024px) {
  .fp-hero-content {
    flex-direction: row;
    align-items: center;
    gap: 80px;
  }
}

.fp-hero-text {
  flex: 1;
  min-width: 300px;
}

.fp-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

/* ★修正: PHPに書いてあったサイズ指定をここに移動 */
.fp-hero-label span:first-child {
  width: 40px;             /* 追加 */
  height: 1px;             /* 追加 */
  display: inline-block;   /* 追加 (これがないと幅・高さが効きません) */
  background: var(--accent-color); /* !important を削除 */
}

/* 文字の方は変更なし */
.fp-hero-label span:last-child {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #a3a3a3; /* ここは !important があってもなくてもOKですが、削除しても大丈夫です */
}

.fp-title {
  font-size: 4rem;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin: 0 0 24px 0;
}
@media (min-width: 768px) {
  .fp-title { font-size: 6rem; }
}

.fp-title span {
  /* グラデーションの定義（青→緑） */
  background: linear-gradient(90deg, var(--accent-color), var(--accent-green));
  
  /* テキストの形で切り抜く */
  -webkit-background-clip: text;
  background-clip: text;
  
  /* 文字色を透明にして背景のグラデーションを見せる */
  -webkit-text-fill-color: transparent;
  color: transparent; 
  
  /* もしグラデーションが効かないブラウザ用 */
  display: inline-block;
}

.fp-desc {
  color: #525252;
  font-weight: 500;
  padding-left: 16px;
  border-left: 2px solid #e5e5e5;
  margin-bottom: 32px;
}

/* -----------------------------
   スライダー (Featured)
----------------------------- */
.fp-featured {
  position: relative;
  width: 100%;
  flex: 1.2;
}
/* 強制リセット */
.fp-featured:hover .fp-featured-card,
.fp-featured:hover .fp-featured-card.active { transform: none !important; }
.fp-featured:hover .fp-featured-img { transform: none !important; filter: grayscale(100%) !important; }

/* 画像表示エリア */
.fp-slides-container {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* PCは元々16:9 */
  
  /* ★修正: 0 から 12px に変更 */
  border-radius: 12px;
  
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  cursor: pointer;
}

/* スライドカード */
.fp-featured-card {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #f5f5f5;
  overflow: hidden;
  transition: opacity 1s ease-in-out;
  opacity: 0; pointer-events: none;
  z-index: 0; transform: none !important;
}
.fp-featured-card.active { opacity: 1; pointer-events: auto; z-index: 1; }

.fp-featured-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%); transition: transform 0.7s, filter 0.5s;
}
.fp-slides-container:hover .fp-featured-card.active .fp-featured-img {
  transform: scale(1.05) !important; filter: grayscale(0%) !important;
}

.fp-featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.fp-featured-info {
  position: absolute; bottom: 0; left: 0; padding: 40px;
  color: #fff; z-index: 2; width: 100%;
}

.fp-featured-cat-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fp-featured-cat-tag {
  background: #fff; color: #000; padding: 4px 10px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  transition: all 0.3s ease;
}
.fp-slides-container:hover .fp-featured-card.active .fp-featured-cat-tag {
  background: var(--accent-color); color: #fff;
}

.fp-featured-title {
  font-size: 2rem; font-weight: 900; margin: 0 0 16px 0; line-height: 1.4;
}

.fp-slider-controls {
  display: flex !important; flex-direction: row !important;
  align-items: center !important; justify-content: center !important;
  gap: 32px; margin-top: 32px;
  position: relative; z-index: 10; width: 100%; pointer-events: auto;
}

.fp-slider-arrow {
  position: static !important;
  width: 60px; height: 60px;
  min-width: 60px; min-height: 60px;
  
  /* ★修正: 通常時はシンプルな灰色 */
  background: #f5f5f5 !important;
  border-radius: 50%;
  border: none !important;
  
  /* ★修正: 矢印は黒 */
  color: #171717 !important;
  
  display: flex !important;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin: 0 !important;
  transform: none !important;
  
  /* 通常時は影なし（シンプル） */
  box-shadow: none;
}

.fp-slider-arrow svg { 
  width: 24px; height: 24px; 
  fill: currentColor; 
  display: block; 
}

.fp-slider-arrow:hover {
  /* ★修正: ホバーで青背景に */
  background: var(--accent-color) !important;
  transition: transform 0.5s ease;
  
  /* 矢印を白くして読みやすく */
  color: #fff !important;
  
  /* 少し拡大 */
  transform: scale(1.1) !important;
  
  /* 青いぼかし（発光）を追加 */
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.5);
}

.fp-slider-dots {
  display: flex !important; gap: 12px; align-items: center;
  position: static !important; margin: 0 !important; width: auto !important;
}
.fp-slider-dot {
  width: 10px; height: 10px; background: #e5e5e5;
  border-radius: 50%; cursor: pointer; transition: all 0.3s;
  flex-shrink: 0; display: block !important;
}
.fp-slider-dot.active { background: var(--accent-color); transform: scale(1.3); }

/* -----------------------------
   カテゴリフィルター
----------------------------- */
.fp-filter-sec { margin-bottom: 60px; }
.fp-sec-head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #000; padding-bottom: 16px; margin-bottom: 32px;
}
.fp-sec-title {
  font-size: 2.5rem; font-weight: 900; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 16px; margin: 0;
}
.fp-sec-jp {
  font-size: 1.0rem; font-weight: 700; letter-spacing: 0.05em; color: #737373;
}

.fp-filter-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; }

/* カテゴリボタン（通常時） */
.fp-filter-sec .fp-filter-btn {
  font-size: 0.8rem;
  padding: 12px 28px;
  font-weight: 700; 
  letter-spacing: 0.1em; 
  background-color: #f5f5f5; 
  border: 1px solid #f5f5f5;
  white-space: nowrap; 
  transition: all 0.3s;
  color: #000; 
  cursor: pointer;
  
  /* ★追加: 両端を丸く */
  border-radius: 100vh;
}

/* カテゴリボタン（アクティブ時・ホバー時） */
.fp-filter-btn.active {
  /* ★修正: 黒(#000) から 青(var(--accent-color)) に変更 */
  background: var(--accent-color) !important; 
  color: #fff !important; 
  border-color: var(--accent-color) !important;
}

.fp-filter-btn:hover {
  background: var(--accent-color) !important; 
  color: #fff !important;
  border-color: var(--accent-color) !important;
}


#sub-cat-container {
  min-height: 0; overflow: hidden; transition: all 0.3s ease;
  opacity: 0; margin-top: 0; display: none; padding-left: 0; 
}
#sub-cat-container.visible {
  display: flex; opacity: 1; margin-top: 10px;
  padding-bottom: 10px; gap: 20px; padding-left: 90px; overflow-x: auto;
}

.fp-sub-filter-btn {
  padding: 8px 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  border: none; border-bottom: 2px solid transparent; background: transparent;
  color: #a3a3a3; white-space: nowrap; transition: all 0.2s; cursor: pointer;
}
.fp-sub-filter-btn:hover { background: transparent; color: var(--accent-color); }
.fp-sub-filter-btn.active {
  background: transparent; color: #333333; border-bottom: 2px solid #333333;
}

/* -----------------------------
   記事一覧セクション全体 (余白調整)
   ★修正: フッター上の余白を 160px -> 100px に縮小
----------------------------- */
#articles-sec {
  padding-top: 80px;
  padding-bottom: 100px;
}

/* ==============================================
   Mobile & Responsive Styles (Top Page Specific)
============================================== */
@media (max-width: 960px) {
  /* スライダー調整 */
  .fp-slides-container { height: auto; aspect-ratio: 16 / 9; }
  .fp-slider-controls { gap: 20px; margin-top: 24px; }
  .fp-slider-arrow { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}

@media (max-width: 768px) {
  /* ヒーローセクション */
  /* ★修正: スマホ時も !important を付与 */
  .fp-hero { padding-top: 120px !important; padding-bottom: 60px; }
  
  .fp-hero-content { flex-direction: column; gap: 40px; }
  .fp-hero-text { width: 100%; text-align: left; }
  .fp-title { font-size: 3.8rem; line-height: 1.1; }
  .fp-desc { font-size: 0.9rem; padding-left: 12px; margin-bottom: 24px; line-height: 1.7; }
  
 /* スライダーエリア */
  .fp-featured { width: 100%; flex: none; }
  
  /* ★修正: スマホの時も 4/3 ではなく 16/9 にする */
  .fp-slides-container { aspect-ratio: 16 / 9; }
  
  .fp-featured-info { padding: 20px; }
  .fp-featured-title { font-size: 1.25rem; margin-bottom: 8px; }
  
  /* カテゴリフィルター */
  .fp-sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fp-sec-title { font-size: 1.25rem; flex-wrap: wrap; }
  #sub-cat-container.visible { padding-left: 0; }

  /* 記事一覧セクションの余白調整（スマホ） */
  /* ★修正: フッター上の余白を 100px -> 80px に縮小 */
  #articles-sec {
    padding-top: 60px;
    padding-bottom: 80px;
  }
}