@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}


/* ========================================
   固定ページ共通カスタマイズ
======================================== */

/* 投稿日・更新日・投稿者情報を非表示 */
.page .date-tags,
.page .author-info {
  display: none;
}

/* 固定ページの背景色 */
.page .container {
  background: #fff;
}

/* 固定ページのメインカラム */
.page #main {
  background: transparent;
}


/* ========================================
   ファイルリンクアイコン自動表示
   PDF / Excel / PowerPoint
======================================== */

/* 共通設定：ダウンロードボタンは除外 */
.entry-content a[href*=".pdf"]:not(.wp-block-file__button)::before,
.entry-content a[href*=".xls"]:not(.wp-block-file__button)::before,
.entry-content a[href*=".xlsx"]:not(.wp-block-file__button)::before,
.entry-content a[href*=".ppt"]:not(.wp-block-file__button)::before,
.entry-content a[href*=".pptx"]:not(.wp-block-file__button)::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 auto;
}

/* PDF */
.entry-content a[href*=".pdf"]:not(.wp-block-file__button)::before {
  background-image: url("https://cstech.osasi.co.jp/wp-content/uploads/2026/06/PDFアイコン-.png");
}

/* Excel */
.entry-content a[href*=".xls"]:not(.wp-block-file__button)::before,
.entry-content a[href*=".xlsx"]:not(.wp-block-file__button)::before {
  background-image: url("https://cstech.osasi.co.jp/wp-content/uploads/2026/06/xlsxファイルアイコン-.png");
}

/* PowerPoint */
.entry-content a[href*=".ppt"]:not(.wp-block-file__button)::before,
.entry-content a[href*=".pptx"]:not(.wp-block-file__button)::before {
  background-image: url("https://cstech.osasi.co.jp/wp-content/uploads/2026/06/pptx（パワーポイント）アイコン-.png");
}

/* ダウンロードボタンにはアイコンを付けない */
.entry-content .wp-block-file__button::before {
  content: none !important;
  background-image: none !important;
}

/* ========================================
   検索関係
======================================== */

/* 検索結果ページの記事カードで、投稿日・更新日・閲覧数を非表示 */
.search .entry-card-meta,
.search .e-card-meta,
.search .post-date,
.search .post-update,
.search .entry-card-pv,
.search .e-card-pv,
.search .pv,
.search .view-count {
  display: none !important;
}

/* 検索結果カード内の簡易パンくず */
.search .search-card-breadcrumb {
  margin: 0.4em 0 0.2em;
  font-size: 12px;
  line-height: 1.4;
  color: #777;
}

.search .search-card-breadcrumb__sep {
  margin: 0 0.35em;
  color: #aaa;
}

.search .search-card-breadcrumb__item {
  color: #777;
}

/* ========================================
   ファイルブロック：ファイル名の下に
   ダウンロードボタンを中央配置
======================================== */
.entry-content .wp-block-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  gap: 10px;
}

/* ファイル名リンク */
.entry-content .wp-block-file > a:not(.wp-block-file__button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  line-height: 1.6;
}

/* ダウンロードボタン */
.entry-content .wp-block-file .wp-block-file__button {
  display: inline-block;
  margin: 0 auto;
}

/* ダウンロードボタン改行機能の無効化 */
/* 無効化したいブロックの追加CSSに「bfdis」を入力 */
.entry-content .wp-block-file.bfdis {
  display: flex;
  flex-direction: initial !important;
  align-items: center;
  width: 100%;
  text-align: center;
  gap: 10px;
  margin-left: 30px;
}

/* ========================================
   ヘッダー：サブメニュー関係
======================================== */

/* ヘッダー：ホバー時に子メニュー表示 */
.fixed-header .navi-in > ul li:hover > ul {
  display: block;
}

/* ヘッダー：検索窓を追加 */
/* 検索アイコンのサブメニューを検索窓サイズにする */
.mega-menu li.header-search-menu > .mega-sub-menu,
.mega-menu li.mega-header-search-menu > .mega-sub-menu {
  width: 320px !important;
  min-width: 320px !important;
  max-width: 90vw !important;
  padding: 12px !important;
  right: 0 !important;
  left: auto !important;
  box-sizing: border-box;
}
/* 検索フォーム */
.mega-menu .mmm-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
/* 入力欄 */
.mega-menu .mmm-search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}
/* 検索ボタン */
.mega-menu .mmm-search-form button {
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 4px;
  background: #333;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.mega-menu .mmm-search-form button:hover {
  background: #555;
}
/* 下向き矢印が残る場合の保険 */
.mega-menu li.header-search-menu > a.mega-menu-link:after,
.mega-menu li.mega-header-search-menu > a.mega-menu-link:after {
  display: none !important;
}
/* 検索入力中はサブメニューを開いたままにする */
.mega-menu li.header-search-menu:focus-within > .mega-sub-menu,
.mega-menu li.mega-header-search-menu:focus-within > .mega-sub-menu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* ========================================
   サイドバー関係
=========================================*/

/* サイドバー追従目次が固定ヘッダーに被らないようにする */
@media screen and (min-width: 1024px) {
  #sidebar-scroll,
  .sidebar-scroll {
    top: 90px !important;
  }
}

/* ========================================
   詳細ブロック関係
=========================================*/

/* 要約部分にマウスオーバー時下線表示 */
.entry-content .wp-block-details summary:hover {
  text-decoration: underline;
}

/* ========================================
	new_list関係
=========================================*/

/* new_listのカード間隔（余白）を調整する */
.new-entry-cards .new-entry-card-link {
    margin-bottom: 20px; /* カードとカードの縦の間隔 */
    padding: 10px;       /* カード内側の余白 */
}

/* ホバーした時に下線を表示する */
.new-entry-cards a:hover {
    text-decoration: underline !important;
}

/* ========================================
	popular_list関係
=========================================*/

/* popular_listのカード間隔（余白）を調整する */
.popular-entry-cards .a-wrap {
	margin-bottom: 20px; /* カードとカードの縦の間隔 */
    padding: 10px;       /* カード内側の余白 */
}

/* ホバーした時に下線を表示する */
.popular-entry-cards a:hover {
    text-decoration: underline !important;
}


/* ========================================
   自作CTAブロック関係
=========================================*/

/* ===見出し部=== */

/* 見出しを親ブロック内で端まで寄せる処理 */
.wp-block-cocoon-blocks-blank-box-1.blank-box {
  overflow: hidden;
}
.wp-block-cocoon-blocks-blank-box-1.blank-box > .wp-block-heading.extend-to-edge {
  margin-top: -0.75em !important;
  margin-left: -1.1em !important;
  margin-right: -1.1em !important;
  margin-bottom: 0.8em !important;
  padding: 0.2em 0.8em !important;
  width: calc(100% + 2.2em);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

/* ===ボタン関係 === */
/* ボタン部に追加CSSで「press-hover-button」を記載で下記CSS適用 */

/* 影を付けて軽く浮かせる */
.wp-block-button.press-hover-button .wp-block-button__link {
  position: relative;
  padding-right: 2.6em !important;
  transition: 
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}
/* マウスオーバーで文字色を変えない */
.wp-block-button.press-hover-button .wp-block-button__link,
.wp-block-button.press-hover-button .wp-block-button__link:hover,
.wp-block-button.press-hover-button .wp-block-button__link:focus,
.wp-block-button.press-hover-button .wp-block-button__link:visited {
  color: #fff !important;
}
/* マウスオーバーで沈む */
.wp-block-button.press-hover-button .wp-block-button__link:hover {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  filter: grayscale(20%) brightness(0.92);
}
.wp-block-button.press-hover-button .wp-block-button__link:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* ボタン右部に"›"を挿入・マウスオーバーでアニメーション */
.wp-block-button.press-hover-button .wp-block-button__link::after {
  content: "›";
  position: absolute;
  right: 1em;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  line-height: 1;
  transition: transform 0.15s ease;
}
.wp-block-button.press-hover-button .wp-block-button__link:hover::after {
  transform: translateY(-50%) translateX(0.25em);
}

/* ===CTAブロック：カード高さ揃え=== */
/* CTA一覧を囲む親ブロックに追加CSSクラス「product-cta-list」を付ける */
.product-cta-list {
  align-items: stretch !important;
}

/* WordPressカラム内のCTAボックス高さを揃える */
.product-cta-list > .wp-block-column {
  display: flex;
}

/* 各CTAボックスに追加CSSクラス「product-cta-card」を付ける */
.product-cta-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* CTAカード内のボタンを下部に揃える */
.product-cta-card .wp-block-buttons {
  margin-top: auto;
}

/* ===CTAブロック：スマートフォン調整=== */
@media screen and (max-width: 600px) {
  .product-cta-list > .wp-block-column {
    display: block;
  }

  .product-cta-card {
    height: auto;
  }
}

/* ========================================
   トップへ戻るボタンカスタマイズ
======================================== */

.go-to-top-button {
  width: 58px;
  height: 58px;
  font-size: 24px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

/* 「TOPへ」の文字を追加 */
.go-to-top-button::after {
  content: "TOPへ";
  display: block;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

/* ホバー */
.go-to-top-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  opacity: 0.9;
}


/* =====================================
   固定ページ用ツリー型サイトマップ
===================================== */

.osasi-page-sitemap {
	margin: 1.5em 0;
}

/* Cocoon側のリスト装飾を解除 */
.osasi-page-sitemap ul {
	list-style: none;
	margin: 0;
	padding-left: 1.8em;
}

.osasi-page-sitemap .osasi-tree-root {
	padding-left: 0;
}

.osasi-page-sitemap li {
	position: relative;
	margin: 0;
	padding: 0.4em 0 0.4em 1.5em;
	line-height: 1.6;
}

/* 横線 */
.osasi-page-sitemap li::before {
	content: "";
	position: absolute;
	top: 1.2em;
	left: 0;
	width: 1em;
	border-top: 1px solid #aeb8c2;
}

/* 縦線 */
.osasi-page-sitemap li::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	border-left: 1px solid #aeb8c2;
}

/* 最後の項目は縦線を途中で止める */
.osasi-page-sitemap li:last-child::after {
	bottom: auto;
	height: 1.2em;
}

/* 最上位項目の縦線開始位置 */
.osasi-page-sitemap .osasi-tree-root > li::after {
	top: 1.2em;
}

.osasi-page-sitemap a {
	text-decoration: none;
}

.osasi-page-sitemap a:hover {
	text-decoration: underline;
}

/* 親ページを少し強調 */
.osasi-page-sitemap li:has(> ul.children) > a {
	font-weight: 600;
}

/* スマートフォン */
@media screen and (max-width: 480px) {
	.osasi-page-sitemap ul {
		padding-left: 1em;
	}

	.osasi-page-sitemap li {
		padding-left: 1.2em;
	}
}