@charset "UTF-8";

/* =========================================================
   「AI戦国武将のお悩み相談室」トップページ用スタイル
   Design System:
   - メインカラー: #316745（千歳緑）
   - サブカラー: #BAD8A6（うすもえぎ）
   - アクセントカラー: #f8b500（山吹色）
   - 背景色: #F8F4E6（象牙色）
   - タイポグラフィ（見出し）: 'Yuji Shuku', serif
   - タイポグラフィ（本文）: 'Noto Serif JP', serif
========================================================= */

:root {
  --color-main: #316745;
  --color-sub: #BAD8A6;
  --color-accent: #f8b500;
  --color-bg: #F8F4E6;
  --color-text: #333333;
  --font-heading: 'Yuji Shuku', serif;
  --font-body: 'Noto Serif JP', serif;
}

#ai-sengoku-front {
  background-color: var(--color-bg);
  /* 和紙のようなザラザラした質感をSVGのノイズフィルターで再現 */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.8;
  overflow-x: hidden;
}

#ai-sengoku-front .sng-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

#ai-sengoku-front section {
  padding: 80px 0;
}

/* 共通の見出しスタイル */
#ai-sengoku-front .section-heading {
  font-family: var(--font-heading);
  color: var(--color-main);
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  position: relative;
  font-weight: bold;
}

#ai-sengoku-front .section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  margin: 15px auto 0;
}


/* =========================================================
   1. ヒーローセクション
========================================================= */
.front-hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 1;
}

.hero-bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 動画の上に被せるオーバーレイ。文字を読みやすくしつつ、動画も見える絶妙な濃さ */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(49, 103, 69, 0.5) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 20px;
  width: 100%;
}

.hero-catchcopy {
  font-family: var(--font-heading);
  color: #fff;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.8;
  text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8), 0px 0px 20px rgba(49, 103, 69, 0.5);
  margin: 0;
  font-weight: normal;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .hero-catchcopy {
    line-height: 1.6;
    letter-spacing: 0;
  }
}


/* =========================================================
   2. ブログの理念（コンセプト）セクション
========================================================= */
.front-concept {
  background-color: var(--color-bg);
  text-align: center;
}

.concept-title {
  font-family: var(--font-heading);
  color: var(--color-main);
  font-size: clamp(22px, 3.5vw, 28px);
  margin-bottom: 50px;
  font-weight: bold;
}

.concept-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

@media (min-width: 768px) {
  .concept-content {
    text-align: center;
  }
}

.concept-content p {
  font-size: 18px;
  letter-spacing: 0.08em;
  margin-bottom: 2.5em;
  line-height: 2.2;
}


/* =========================================================
   3. 武将ごとのナビゲーション（タグ一覧）セクション
========================================================= */
.front-warlords {
  background-color: #fff;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--color-sub);
  color: var(--color-main);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  /* デフォルトは薄く表示 */
}

.slider-btn:hover {
  opacity: 1;
  /* カーソルを合わせた時に濃く表示 */
  /* background-color: var(--color-sub); */
  /* 色の反転は外し、透明度の変化のみに */
}

.slider-prev {
  left: 10px;
}

.slider-next {
  right: 10px;
}

/* スマホ表示時はスワイプ前提のため矢印を非表示 */
@media (max-width: 768px) {
  .slider-btn {
    display: none;
  }
}

.slider-wrapper.infinite-slider {
  max-width: 100vw;
  overflow: hidden;
  /* Hide anything outside full width wrapper */
}

.warlords-slider-viewport {
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 480px;
  /* Changed from height to min-height/height to prevent collapse */
  height: 480px;
  margin: 0 auto;
  overflow: hidden;
  cursor: grab;
}

.warlords-slider-viewport:active {
  cursor: grabbing;
}

.warlords-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  /* Prevent children from stretching vertically to fill the 100% track height */
  height: 100%;
  width: max-content;
  /* Ensure width grows with items */
}

.warlord-card {
  display: block;
  width: 220px;
  min-width: 220px;
  flex: 0 0 220px;
  /* Prevent flex shrinking */
  background-color: var(--color-bg);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  /* Ensure margin-right is explicitly set for spacing calculations */
  margin-right: 20px;
}

.warlord-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.warlord-img {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-sub);
  background-color: #fff;
}

.warlord-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.warlord-name {
  font-family: var(--font-heading);
  color: var(--color-main);
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: bold;
}

.warlord-desc {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}


/* ===============================
   お悩みから策を探すセクション
=============================== */
.front-troubles {
  background-color: var(--color-bg);
  padding: 80px 0;
}

.troubles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1080px;
  margin: 0 auto;
}

.trouble-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.trouble-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.trouble-img-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background-color: var(--color-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.trouble-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.trouble-name {
  font-size: 1.25rem;
  color: var(--text-base);
  margin: 0;
  font-weight: 700;
}

/* スマホ用レスポンシブ：横長のカードにする */
@media (max-width: 768px) {
  .troubles-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .trouble-card {
    flex-direction: row;
    /* 横並びにする */
    justify-content: flex-start;
    padding: 15px 20px;
    text-align: left;
  }

  .trouble-img-wrapper {
    width: 60px;
    /* アイコンを少し小さく */
    height: 60px;
    margin: 0 20px 0 0;
    /* 右側にマージンを持たせる */
  }

  .trouble-icon {
    width: 35px;
    height: 35px;
  }

  .trouble-name {
    font-size: 1.1rem;
    margin: 0;
  }
}




/* =========================================================
   5 & 6. 記事一覧セクション（新着・人気）
========================================================= */
.front-latest {
  background-color: #fff;
}

.front-popular {
  background-color: var(--color-bg);
}

.sng-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sng-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.sng-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.sng-card-link {
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sng-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.sng-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.sng-card:hover .sng-card-img img {
  transform: scale(1.05);
}

.sng-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sng-card-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 15px;
  line-height: 1.6;
  flex-grow: 1;
}

.sng-card-meta {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sng-card-meta time {
  display: inline-flex;
  align-items: center;
}

.sng-card-meta .updated {
  /* color: var(--color-main); */
  /* font-weight: bold; */
}

/* スマホ用レスポンシブ：横長のリスト型にする */
@media (max-width: 768px) {
  .sng-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sng-card-link {
    flex-direction: row;
    align-items: center;
    padding: 12px;
  }

  .sng-card-img {
    width: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    /* 角丸を追加してカード内になじませる */
  }

  .sng-card-body {
    padding: 0 0 0 15px;
  }

  .sng-card-title {
    font-size: 14px;
    margin: 0 0 8px;
    /* 2行で切り捨てるスタイル（オプション） */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sng-card-meta {
    font-size: 11px;
    gap: 5px;
  }
}


/* =========================================================
   ボタン共通スタイル
========================================================= */
.section-btn-wrap {
  text-align: center;
  margin-top: 50px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  padding: 16px 48px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(248, 181, 0, 0.4);
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
  font-weight: bold;
}

.btn-primary:visited {
  color: #fff;
}

.btn-primary:hover {
  background-color: #e5a700;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(248, 181, 0, 0.5);
}