/**
 * agri-koukoku-theme — Additional Styles
 * テーマ固有のコンポーネントCSSです。
 * theme.json で表現しきれない複合スタイルをここに定義します。
 */

/* ============================================================
   1. ヘッダー
   ============================================================ */
.ak-header {
  z-index: 100;
  border-bottom: 1px solid #E8E8E8;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.ak-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
}
.ak-header__logo a,
.ak-header__logo .wp-block-site-title a {
  font-size: 20px;
  font-weight: 700;
  color: #2D6A4F;
  text-decoration: none;
}
.ak-header__nav .wp-block-navigation__container {
  gap: 4px;
}
.ak-header__nav .wp-block-navigation-item__content {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 4px;
  transition: background 0.15s;
  color: #1A1A1A;
}
.ak-header__nav .wp-block-navigation-item__content:hover {
  background: #F4F5F5;
  color: #2D6A4F;
}
.ak-nav__cta .wp-block-navigation-item__content {
  background: #2D6A4F;
  color: #fff !important;
  border-radius: 4px;
  font-weight: 600;
}
.ak-nav__cta .wp-block-navigation-item__content:hover {
  background: #52B788;
}

/* ============================================================
   2. フッター
   ============================================================ */
.ak-footer {
  background: #1A1A1A;
  color: #fff;
}
.ak-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 48px 24px 32px;
}
.ak-footer .wp-block-navigation-item__content {
  color: #AAAAAA;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s;
}
.ak-footer .wp-block-navigation-item__content:hover {
  color: #fff;
}
.ak-footer__copy {
  border-top: 1px solid #333333;
  padding: 16px 24px;
}

/* ============================================================
   3. セクション共通
   ============================================================ */
.ak-section {
  width: 100%;
}
.ak-section--pale {
  background-color: #F4F5F5;
}
.ak-section--dark {
  background-color: #2D6A4F;
  color: #fff;
}

/* ============================================================
   4. ラベル（英字小見出し）
   ============================================================ */
.ak-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #2D6A4F;
}

/* ============================================================
   5. パンくず
   ============================================================ */
.ak-breadcrumb {
  font-size: 12px;
  color: #888888;
  line-height: 1.6;
}
.ak-breadcrumb a {
  color: #888888;
  text-decoration: none;
}
.ak-breadcrumb a:hover {
  color: #2D6A4F;
}

/* ============================================================
   6. フィルターバー
   ============================================================ */
.ak-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ak-filter__btn {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  border: 1.5px solid #CCCCCC;
  border-radius: 100px;
  color: #555555;
  text-decoration: none;
  background: #fff;
  transition: all 0.15s;
  white-space: nowrap;
}
.ak-filter__btn:hover {
  border-color: #2D6A4F;
  color: #2D6A4F;
}
.ak-filter__btn--active {
  background: #2D6A4F;
  border-color: #2D6A4F;
  color: #fff;
}

/* ============================================================
   7. 投稿カード
   ============================================================ */
.ak-post-card {
  border-radius: 8px;
  border: 1px solid #E8E8E8;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ak-post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.ak-post-card .wp-block-post-title a {
  color: #1A1A1A;
  text-decoration: none;
}
.ak-post-card .wp-block-post-title a:hover {
  color: #2D6A4F;
}

/* ============================================================
   8. メディアカード
   ============================================================ */
.ak-media-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #E8E8E8;
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ak-media-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.ak-pattern-card {
  background: #fff;
  border-radius: 8px;
  border: 2px solid #E8E8E8;
  padding: 32px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ak-pattern-card:hover {
  border-color: #52B788;
  box-shadow: 0 4px 16px rgba(45,106,79,0.1);
}

/* ============================================================
   9. 事例カード & 3ステップ
   ============================================================ */
.ak-case-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #E8E8E8;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.ak-case-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.ak-case-card__head {
  background: #F4F5F5;
  border-bottom: 1px solid #E8E8E8;
  padding: 20px 24px;
}

/* 3ステップグリッド */
.ak-case-steps {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  gap: 0;
  align-items: stretch;
}
.ak-case-step {
  border: 1px solid #E8E8E8;
  border-radius: 4px;
  padding: 16px;
  background: #fff;
}
.ak-case-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #AAAAAA;
}
.ak-result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.ak-result-metric {
  border: 1.5px solid #1A1A1A;
  padding: 8px 14px;
  border-radius: 2px;
  text-align: center;
}

/* ============================================================
   10. 5フェーズバー
   ============================================================ */
.ak-phase-bar {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}
.ak-phase-bar__item {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  min-width: 120px;
  border-right: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s;
}
.ak-phase-bar__item:last-child {
  border-right: none;
}
.ak-phase-bar__item--active {
  background: rgba(255,255,255,0.22) !important;
  border-top: 2px solid rgba(255,255,255,0.5);
  border-bottom: 2px solid rgba(255,255,255,0.5);
}

/* ============================================================
   11. サイドバーレイアウト
   ============================================================ */
.ak-sidebar-layout.is-layout-flex {
  align-items: flex-start;
  gap: 48px;
}
.ak-sidebar {
  flex-shrink: 0;
}
.ak-sidebar__cta {
  background: #2D6A4F;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

/* ============================================================
   12. CTAバンド
   ============================================================ */
.ak-cta-band {
  background: #2D6A4F;
  text-align: center;
}

/* ============================================================
   13. テーブル（ノウハウ記事内）
   ============================================================ */
.ak-table,
.wp-block-table.is-style-stripes table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 24px;
}
.ak-table th,
.wp-block-table th,
.entry-content th {
  background: #2D6A4F;
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
  border: 1px solid #2D6A4F;
}
.ak-table td,
.wp-block-table td,
.entry-content td {
  padding: 10px 14px;
  border: 1px solid #E8E8E8;
  vertical-align: top;
  color: #444;
  line-height: 1.7;
}
.ak-table tr:nth-child(even) td,
.wp-block-table.is-style-stripes tr:nth-child(even) td {
  background: #F4F5F5;
}

/* ============================================================
   14. 記事本文スタイル
   ============================================================ */
.entry-content h2,
.wp-block-post-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2D6A4F;
}
.entry-content h3,
.wp-block-post-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #E8E8E8;
}
.entry-content p,
.wp-block-post-content p {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 18px;
}

/* 注意ボックス */
.ak-caution-box {
  background: #F5F5F5;
  border-left: 4px solid #2D6A4F;
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
  font-size: 13px;
  color: #555;
  line-height: 2;
  margin: 24px 0;
}

/* ============================================================
   15. ボタン共通
   ============================================================ */
.wp-block-button__link {
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #2D6A4F !important;
  color: #fff !important;
  border-color: #2D6A4F !important;
}

/* ============================================================
   16. レスポンシブ
   ============================================================ */
@media (max-width: 768px) {
  .ak-header__inner { padding: 0 16px; }
  .ak-phase-bar { flex-direction: column; }
  .ak-phase-bar__item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .ak-case-steps { grid-template-columns: 1fr; }
  .ak-case-arrow { display: none; }
  .ak-sidebar-layout.is-layout-flex { flex-direction: column; }
  .ak-sidebar { width: 100% !important; }
  .ak-filter-bar { gap: 6px; }
  .ak-filter__btn { font-size: 12px; padding: 5px 12px; }
}
@media (max-width: 900px) {
  .ak-sidebar-layout.is-layout-flex { flex-direction: column; }
  .ak-sidebar { width: 100% !important; }
}
