@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){
  /*必要ならばここにコードを書く*/
}


/*--------------------------------------------------
 共通：リンク・ボタンのホバー色（完全統一）
--------------------------------------------------*/

.wp-block-button {
  background: none !important;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
}

.wp-block-button .wp-block-button__link,
.wp-block-button__link {
  background-color: #1f1f1f !important;
  color: #ffffff !important;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  padding: 0.7em 1.5em;
  border-radius: 0px;
  display: inline-block;
  font-weight: 600;
  box-sizing: border-box;
  text-align: center;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button__link:hover {
  background-color: #888888 !important;
  color: #ffffff !important;
}

/*--------------------------------------------------
 ヘッダー・ロゴ・日付など
--------------------------------------------------*/
.logo-menu-button img,
.header-container-in.hlt-top-menu .logo-header img {
  max-height: 30px;
}

/* Cocoonのセンターロゴを大きく表示させる */
.header-container-in.hlt-center-logo .logo-header img {
  max-height: 80px !important;
  height: auto !important;
  width: auto !important;
}


.date-tags {
  text-align: left;
}
.page .date-tags {
  display: none;
}

div#list-wrap .list-new-entries {
  display: none;
}

button.wp-block-search__button.wp-element-button {
  background: #2e3963;
}

h3.widget-sidebar-title.widget-title {
  background: #f4f4f4;
  color: #333333;
}

/*--------------------------------------------------
 テーブル
--------------------------------------------------*/
table {
  width: 100%;
  border-collapse: collapse;
}
table, th, td {
  border: 1px solid #ccc;
}
th, td {
  padding: 10px;
  text-align: left;
}

/*--------------------------------------------------
 フッター・戻るボタン
--------------------------------------------------*/
.footer-bottom {
  margin: 0;
  padding: 0;
}

go-to-top-button {
  border-radius: 0;
}


/*--------------------------------------------------
 更新情報ブロック（Nintendo風仕上げ）※flex方式・横並び1列表示・PC最大幅対応
--------------------------------------------------*/
.top-information-list {
  list-style: none;
  padding: 0 16px;
  margin: 0 auto;
  max-width: 1200px; /* ←PC時の横幅を広げました */
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  align-items: center;
}

.top-information-list .wp-block-post {
  display: flex;
  align-items: center; /* ←中央寄せ */
  justify-content: flex-start;
  border-bottom: 1px solid #e0e0e0;
  padding: 14px 0;
  gap: 10px;
  flex-wrap: nowrap; /* ←1列横並び */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 日付 */
.top-information-list .wp-block-post-date {
  flex-shrink: 0;
  min-width: 110px;
  color: #555;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 500;
  margin-top: 0;
}

/* カテゴリ */
.top-information-list .wp-block-post-terms,
.top-information-list .wp-block-post-terms a {
  background-color: #f0f0f0;
  color: #444 !important;
  min-width: 90px;
  text-align: center;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 0;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  margin-top: 0;
}

.top-information-list .wp-block-post-terms a:hover {
  background-color: #ccc;
}

/* タイトル */
.top-information-list .wp-block-post-title {
  flex-grow: 1;
  margin-top: 0;
  min-width: 0;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: break-word;
}

ul.top-information-list li h1.wp-block-post-title a,
body.page-id-2004 h2.wp-block-post-title a,
.top-information-list .wp-block-post-title a {
  font-size: 13px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  color: #000 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  display: inline;
}

ul.top-information-list li.wp-block-post .wp-block-post-title a:hover {
  color: #2e3963 !important;
  text-decoration: underline !important;
}

/*--------------------------------------------------
 モバイル対応（768px以下は縦並び）
--------------------------------------------------*/
@media screen and (max-width: 768px) {
  .top-information-list {
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .top-information-list .wp-block-post {
    flex-direction: column;
    align-items: flex-start;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 0;
    gap: 4px;
    box-sizing: border-box;
  }

  .top-information-list .wp-block-post-date,
  .top-information-list .wp-block-post-terms,
  .top-information-list .wp-block-post-title {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .top-information-list .wp-block-post-terms {
    width: auto;
  }

  .wp-block-group,
  .wp-block-query,
  .wp-block-query-loop,
  .is-layout-flow,
  .is-layout-flex {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  ul.wp-block-post-template {
    padding-left: 0 !important;
  }
}



/*--------------------------------------------------
* Contact Form 7：フォーム全体 
--------------------------------------------------*/

/************************************
** お問い合わせフォームの入力
************************************/
#cf-tbl{
width: 100%;
}

#cf-tbl table{
width: 100%;
border-collapse: collapse;
border: solid #CCC;
border-width: 1px;
color: #444;
}
#cf-tbl table tr th,
#cf-tbl table tr td{
padding: 0.5em;
text-align: left;
vertical-align: top;
border: solid #CCC;
border-width: 1px;
vertical-align: middle;
}
#cf-tbl table tr th{
width: 35%;
background: #eee;
}
@media screen and (max-width:768px){
#cf-tbl{
width: 100%;
}

#cf-tbl table,
#cf-tbl table tbody,
#cf-tbl table tr,
#cf-tbl table tr th,
#cf-tbl table tr td{
display: block;
}

#cf-tbl table{
width: 100%;
border-width: 0 0 1px 0;
}

#cf-tbl table tr th,
#cf-tbl table tr td{
width: 100%;
padding: 3% 5%;
}

#cf-tbl table tr td{
border-width: 0px 1px 0px 1px;
}
}
/*「必須」文字デザイン*/
.required{
font-size:.8em;
padding: 5px;
background: #CC0000;
color: #fff;
border-radius: 0px;
margin-right: 5px;
}

/*「任意」文字デザイン*/
.optional{
font-size:.8em;
padding: 5px;
background: #000080;
color: #fff;
border-radius: 3px;
margin-right: 5px;
}

/* 入力項目を見やすく */
input.wpcf7-form-control.wpcf7-text,
textarea.wpcf7-form-control.wpcf7-textarea {
	width: 100%;
	padding: 8px 15px;
	margin-right: 10px;
	margin-top: 10px;
	border: 1px solid #d0d5d8;
	border-radius: 3px;
	background-color: #eff1f5;
}
textarea.wpcf7-form-control.wpcf7-textarea {
	height: 200px;
}

/* 「送信する」ボタン */
input.wpcf7-submit {
    display: block;
    padding: 15px;
    width: 400px;
    background: #1dbf66;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 2px;
    margin: 15px auto 0
}
@media screen and (max-width:768px){
input.wpcf7-submit {
width: 250px;
}
}

input.wpcf7-submit:hover {
	box-shadow: 0 15px 30px -5px rgba(0,0,0,.15), 0 0 5px rgba(0,0,0,.1);
	transform: translateY(0px);
	opacity:0.7;
}
/* エラーメッセージを見やすく */
span.wpcf7-not-valid-tip,
.wpcf7-response-output.wpcf7-validation-errors {
	color: red;
	font-weight: 600;
}

}


/* レスポンシブ対応 */
@media (max-width: 768px) {
  .wpcf7 {
    padding: 16px;
    max-width: 95%; /* スマホでは画面幅に合わせて調整 */
  }
}


/************************************
** スマホのみ表示　PCのみ表示　
************************************/
<style>
.example>div{
    border: 1px solid #999;
    background: #f2f2f2;
    padding: 10px;
    margin: 10px;
}
@media(min-width:751px){
    .sp{
        display: none !important;
    }
}
@media(max-width:750px){
    .pc{
        display: none !important;
    }
}
</style>
<div class="example">
    <div class="sp">PCのとき非表示</div>
    <div class="pc">スマホのとき非表示</div>
    <div>どちらでも表示</div>
</div>

/************************************
** フロントページのスライド画像を横幅最大化
************************************/ 
.ContentOver-box{
  padding: 0 rem 0;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  background: #ddd;
}

.content {
  margin-top: 0;
}
.article h1 {
  margin-top: 0;
  padding-top: 0;
}
/************************************
** メタスライダースマホの時縦長にする
************************************/

@media screen and (max-width: 768px) {
  .metaslider,
  .metaslider .flexslider,
  .metaslider .flexslider .slides,
  .metaslider .flexslider .slides li,
  .metaslider .flexslider .slides li img {
    height: 500px !important;  /* ← 高さをしっかり確保 */
    object-fit: cover;         /* ← 横長画像を切り取って縦長に見せる */
    width: 100% !important;    /* ← 横幅を画面にフィット */
  }
}
/* スライダーをフルワイドに広げる */
.metaslider {
  width: 100vw !important;        /* ビューポート幅に合わせる */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;             /* 中央寄せ＋横幅全体表示のための調整 */
  max-width: 100vw !important;    /* テーマによる制限を解除 */
  overflow: hidden;
  z-index: 1;
}

/* スライド画像も幅いっぱいに */
.metaslider img {
  width: 100vw !important;
  height: auto;
  object-fit: cover; /* 必要に応じてトリミング調整 */
}

/************************************
** ▼ Worksカード：白帯完全除去＋3カラム＋ホバー維持 ▼
************************************/

/* グリッド3カラム */
.works-grid > .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
  padding: 0 !important;
  list-style: none;
  box-sizing: border-box;
}

/* 各記事カード */
.works-grid > .wp-block-post-template li {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0px;　/* ← 数字を入れて角を丸くする！ */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* アイキャッチ画像も直角に（念のため） */
.works-grid li div a img {
  border-radius: 0 !important;
}
/* アイキャッチ画像のみホバー */
.works-grid li div a {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 0 !important;
}
.works-grid li div a img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
  display: block;
}
.works-grid li div a:hover img {
  transform: scale(1.1);
}

/* タイトルエリア全体の余白を完全除去 */
.works-grid .wp-block-post-title {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  height: auto !important;
  line-height: 1.0 !important;
  min-height: unset !important;
  border: none !important;
  box-shadow: none !important;
  display: block;
}

/* タイトルリンク（黒グレー色帯） */
.works-grid .wp-block-post-title a {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 14px 0 !important;
  background-color: #1f1f1f !important;
  color: #ffffff !important;
  text-align: center;
  text-decoration: none;
  font-size: 1.1em;
  line-height: 1.4;
  border-radius: 0 !important;
  box-sizing: border-box;
}

/* ホバーしても色そのまま */
.works-grid .wp-block-post-title a:hover {
  background-color: #888888 !important;
  color: #ffffff !important;
}

/* Groupブロックや内部余白除去（Cocoonで自動生成される場合あり） */
.works-grid .wp-block-group {
  margin: 0 !important;
  padding: 0 !important;
}
.works-grid .wp-block-group__inner-container {
  margin: 0 !important;
  padding: 0 !important;
}

/* スマホ：1カラム */
@media screen and (max-width: 768px) {
  .works-grid > .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }
}
.works-grid li div a {
  position: relative;
  overflow: hidden;
}

.works-grid li div a::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(46, 57, 99, 0.15); /* ← 透明度を0.12に調整 */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1;
}

.works-grid li div a:hover::after {
  opacity: 1;
}

/* モバイルヘッダーのレイアウト調整 */
@media screen and (max-width: 768px) {
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-search {
    order: 1; /* 左に表示 */
  }

  .logo {
    order: 2; /* 中央 */
    margin: 0 auto;
  }

  .menu-button {
    order: 3; /* 右に表示 */
  }
}

/************************************
** ▼ 見出しをスマホビジュアル時は1行に収める▼
************************************/
@media screen and (max-width: 768px) {
  .custom-title {
    font-size: 14px; /* 適切に小さく調整 */
    white-space: nowrap; /* 強制的に1行にする */
    overflow: hidden;
    text-overflow: ellipsis; /* はみ出した場合に「…」で表示 */
  }
}


/************************************
/Cocoonグローバルメニューを中央揃え＆おしゃれに 
************************************/
#navi ul {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px 0;
  background: #ffffff;
  border-bottom: 2px solid #eee;
}

/* メニューリンクデザイン */
#navi ul li a {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: bold;
  text-decoration: none;
  color: #333;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

/* ホバー時の装飾（下線アニメーション） */
#navi ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 0%;
  height: 2px;
  background-color: #0073aa;
  transition: 0.3s ease;
}

#navi ul li a:hover::after {
  width: 100%;
}

/* ホバー時背景色変更 */
#navi ul li a:hover {
  color: #0073aa;
}

/* モバイル（768px以下）のときに #navi を非表示 */
@media screen and (max-width: 768px) {
  #navi {
    display: none;
  }
}


/* フッター全体の背景とテキスト */
#footer {
  background-color: #1a1a1a;
  color: #f5f5f5;
  padding: 40px 20px;
  font-size: 14px;
  line-height: 1.8;
}

/* フッター内のリンク */
#footer a {
  color: #f5f5f5;
  text-decoration: none;
  transition: color 0.3s ease;
}

#footer a:hover {
  color: #00cc99; /* ゴールド系のホバー色 */
}

/* フッター内の区切り線 */
#footer hr {
  border-color: #444;
}

/* コピーライト部分の調整 */
#copyright {
  margin-top: 20px;
  font-size: 12px;
  color: #999;
  text-align: center;
}

/* フッターのメニューを横並びから縦並びにレスポンシブ対応 */
@media (max-width: 768px) {
  #footer .footer-menu {
    text-align: center;
  }

  #footer .footer-menu li {
    display: block;
    margin: 10px 0;
  }
}
