@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/
.more-posts-button {
  background: #0d1b2a;
  color: #fff;
  padding: 12px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.3s ease;
}
.more-posts-button:hover {
  background: #1e2f45;
}
/* 斜めマスク・装飾を no-mask-block の内側だけで無効化する */
.no-mask-block,
.no-mask-block::before,
.no-mask-block::after,
.no-mask-block .wp-block-cover,
.no-mask-block .wp-block-cover__background,
.no-mask-block .wp-block-image img {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  mask: none !important;
  -webkit-mask: none !important;
  transform: none !important;
  border-radius: 0 !important;
}

/* SWELL のセクション系（fullWide/columns）に付く疑似要素の装飾もOFF */
.no-mask-block.swell-block-fullWide::before,
.no-mask-block.swell-block-fullWide::after,
.no-mask-block.swell-block-columns::before,
.no-mask-block.swell-block-columns::after {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  transform: none !important;
  background: none !important; /* 斜め背景があるとき消す */
  box-shadow: none !important;  /* 影があれば消す */
  content: none !important;     /* 疑似要素そのものを無効化（安全側） */
}
// ① <title> をタグ名に置き換え
add_filter('pre_get_document_title', function($t){
  if (is_tag()) {
    $t = single_tag_title('', false) . '｜現場から未来を紡ぐ NEOTERRAIN Journal';
  }
  return $t;
});

// ② meta description をタグ用に出力
add_filter('ssp_meta_description', function($desc){
  if (is_tag()) {
    $name = single_tag_title('', false);
    $desc = $name.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  }
  return $desc;
});

// ③ OG/Twitter の title・description も統一
add_filter('ssp_og_title', function($title){
  if (is_tag()) $title = single_tag_title('', false).'｜現場から未来を紡ぐ NEOTERRAIN Journal';
  return $title;
});
add_filter('ssp_og_description', function($d){
  if (is_tag()) {
    $name = single_tag_title('', false);
    $d = $name.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  }
  return $d;
});
add_filter('ssp_twitter_title', function($t){
  if (is_tag()) $t = single_tag_title('', false).'｜現場から未来を紡ぐ NEOTERRAIN Journal';
  return $t;
});
add_filter('ssp_twitter_description', function($d){
  if (is_tag()) {
    $name = single_tag_title('', false);
    $d = $name.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  }
  return $d;
});
/* ===== タグアーカイブの<title> / meta / OG / Twitter を強制上書き ===== */

// <title>
add_filter('pre_get_document_title', function($title){
  if (is_tag()) {
    $name  = single_tag_title('', false);
    $title = $name . '｜現場から未来を紡ぐ NEOTERRAIN Journal';
  }
  return $title;
});

// meta description（SSPのフィルターが効く場合）
add_filter('ssp_meta_description', function($desc){
  if (is_tag()) {
    $name = single_tag_title('', false);
    $desc = $name.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  }
  return $desc;
});

// OGP/Twitter（SSPのフィルターが効く場合）
add_filter('ssp_og_title', function($t){
  if (is_tag()) $t = single_tag_title('', false).'｜現場から未来を紡ぐ NEOTERRAIN Journal';
  return $t;
});
add_filter('ssp_og_description', function($d){
  if (is_tag()){
    $n = single_tag_title('', false);
    $d = $n.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  }
  return $d;
});
add_filter('ssp_twitter_title', function($t){
  if (is_tag()) $t = single_tag_title('', false).'｜現場から未来を紡ぐ NEOTERRAIN Journal';
  return $t;
});
add_filter('ssp_twitter_description', function($d){
  if (is_tag()){
    $n = single_tag_title('', false);
    $d = $n.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  }
  return $d;
});

// 万一SSPのフィルターが効かない環境でも最低限のmetaを出す保険
add_action('wp_head', function(){
  if (!is_tag()) return;
  $n   = single_tag_title('', false);
  $ttl = $n.'｜現場から未来を紡ぐ NEOTERRAIN Journal';
  $des = $n.'に関するSoraのフィールドノートや地域の物語を掲載。NEOTERRAIN Journalは、現場から問いを紡ぎ、地域・社会・未来をつなぐジャーナルです。';
  echo "\n<!-- force meta for tag -->\n";
  echo '<meta name="description" content="'.esc_attr($des).'">'."\n";
  echo '<meta property="og:title" content="'.esc_attr($ttl).'">'."\n";
  echo '<meta property="og:description" content="'.esc_attr($des).'">'."\n";
  echo '<meta name="twitter:title" content="'.esc_attr($ttl).'">'."\n";
  echo '<meta name="twitter:description" content="'.esc_attr($des).'">'."\n";
}, 1);
// 動作確認: タグページなら head にコメントを出す
add_action('wp_head', function(){
  if (is_tag()) echo "\n<!-- tag-page: child-theme functions.php is running -->\n";
}, 1);

