@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
*/

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


/* メインコンテンツ背景を透明に */
#content,
#main,
.main,
.content,
.content-in {
  background: transparent !important;
}

/* ================================
  ナビ：通常時はヘッダー画像の下端 / 追従時は画面上に固定
================================ */

/* ヘッダーを基準に */
#header-container-in { position: relative; }
/* キャッチコピー上のラインを消す */
.tagline::before, .tagline::after {
  display: none !important;
}
/* borderで出ている場合の保険 */
.tagline {
  border: none !important;
}

/* キャッチコピー（命を守る、地域をつなぐウェブメディア） */
.tagline {
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
/* サイト名「もふもふ新聞」を太く・大きく */
.logo-header .site-name-text{
  font-size: 36px; /* ← 大きさ（好みで調整） */
  font-weight: 700; /* 太字（600〜900で調整可） */
  letter-spacing: 0.05em; /* 少し余白を出して上品に */
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

@media (max-width: 600px) {
  .logo-header .site-name-text {
    font-size: 26px;
  }
}

/* 通常時：ヘッダー画像の“下端”に重ねる */
#navi{
  position: absolute;
  left: 0;
  right: 0;
  top: 60%;            /* ★ 30% はやめて下端に固定 */
  z-index: 50;
}

/* 背景透明 */
#navi,
#navi-in{
  background: transparent !important;
}

/* 文字色 */
#navi a{ color:#fff; }
#navi a:hover{ opacity:.8; }

/* 追従時：fixed に切り替え
   （Cocoon側のbodyクラスが環境で違うことがあるので複数指定） */
body.fixed-header #navi,
body.header-fixed #navi,
body.is-fixed-header #navi,
body.fixed #navi{
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  z-index: 9999;
}

/* fixed時も透明 */
body.fixed-header #navi,
body.header-fixed #navi,
body.is-fixed-header #navi,
body.fixed #navi,
body.fixed-header #navi-in,
body.header-fixed #navi-in,
body.is-fixed-header #navi-in,
body.fixed #navi-in{
  background: transparent !important;
}

/* 追従時のロゴは黒文字 */
#header-container.fixed-header .logo .site-name-text {
  color: #000;
  text-shadow: none;
}


/* ==============================
  追従時：ヘッダーの配置をリセットして崩れを防ぐ
============================== */

/* Cocoonは追従時に #header-container に fixed-header が付く */
#header-container.fixed-header #header-in{
  position: static !important;   /* ← absoluteを解除 */
  top: auto !important;
  left: auto !important;
  right: auto !important;
  padding-top: 0 !important;
  display: block !important;     /* ← flex解除 */
  min-height: auto !important;
  text-align: center;            /* 必要なら */
}

/* 追従時：ナビはヘッダー内の上に揃える（ズレ防止） */
#header-container.fixed-header #navi{
  position: relative !important; /* ← absolute/fixedを解除して自然に配置 */
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 9999;
}

/* 追従時も透明 */
#header-container.fixed-header #navi,
#header-container.fixed-header #navi-in{
  background: transparent !important;
}



/* ==============================
   タブレット以下：PCメニューを完全抹殺
============================== */
@media (max-width: 1024px) {

  /* 通常時 */
  #navi .menu-pc {
    display: none !important;
  }

  /* 追従ヘッダー時（fixed-header） */
  body.fixed-header #navi .menu-pc {
    display: none !important;
  }

  /* モバイルメニューを表示 */
  #navi .menu-mobile {
    display: block !important;
  }
}

/* ================================
  カルーセルのマージン
================================ */
.carousel {
  margin-bottom: 64px;
}



/* ================================
   ホームの新着記事：カードを3列＆縦型カードにする（完成版）
================================ */

/* 1) 一覧をグリッド化して3カラム */
.home-card-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 2) カードを縦型（画像→本文）に固定 */
.home-card-grid .entry-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 3) サムネ（上） */
.home-card-grid .entry-card-thumb{
  width: 100%;
  max-width: 100%;
  position: relative; /* カテゴリーラベル重ね用 */
  margin: 0;
}

/* 4) 画像をカード幅にフィット */
.home-card-grid .entry-card-thumb img{
  width: 100%;
  height: auto;
  display: block;
}

/* 5) カテゴリーラベルを画像左上に重ねる */
.home-card-grid .cat-label{
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

/* 6) 本文（下） */
.home-card-grid .entry-card-content{
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important; /* 例の margin-left:330px を無効化 */
  display: block;
  padding: 12px 14px;
  text-align: left;
}

/* 7) 縦書きっぽくなるのを防ぐ（保険） */
.home-card-grid .entry-card-title,
.home-card-grid .entry-card-snippet,
.home-card-grid .entry-card-meta{
  writing-mode: horizontal-tb;
  text-align: left;
}

/* 8) admin-pv の崩れ防止 */
.home-card-grid .admin-pv{
  display: block;
  margin-top: 8px;
}

/* 新着記事・カテゴリごとのブロック間を広げる */
.home-block {
  margin-bottom: 64px; /* お好みで 48px / 72px などに調整OK */
}



/* ================================
   archiveページ　カテゴリと並べ替え
================================ */

.posts-archive-title{
  margin-top: 64px;
}

/* 投稿一覧：並べ替えフォームを1行＆幅を適正化 */
.archive-sort{
  display: flex;
  justify-content: flex-end;   /* 中央寄せ（右寄せが良ければ flex-end に） */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;          /* 画面が狭い時だけ折り返す */
  margin: 0 0 16px;
}

.archive-sort-label{
  white-space: nowrap;       /* 「並べ替え：」を1行固定 */
}

.archive-sort select{
  width: auto;               /* 横幅を必要最小限に */
  max-width: 220px;          /* 好みで調整（200〜300くらい） */
}

/* 画面が狭いときだけ自然に縦並び */
@media (max-width:1024px){
  .archive-sort{
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .archive-sort select{
    width: 100%;
    max-width: 100%;
  }
}

/* categoryフィルター */
.archive-category-filter{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}

.archive-category-label{
  white-space: nowrap;
}

.archive-category-filter select{
  min-width: 160px;
  max-width: 260px;
}


/* ================================
   レスポンシブ：タブレット2列 / スマホ1列
================================ */
@media (max-width: 1024px){
  .home-card-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .home-card-grid{ grid-template-columns: 1fr; }
}


/* ================================
   「もっと見る」ボタン（中央・オレンジ）
================================ */

.home-more{
  margin-top: 16px;
  text-align: center;   /* 中央寄せ */
}

.home-more-btn{
  display: inline-block;
  padding: 12px 28px;
  background-color: #f39800; /*オレンジ*/
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 9999px;     /* 丸みのあるボタン */
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}

/* ホバー時 */
.home-more-btn:hover{
  opacity: 0.85;
  transform: translateY(-2px);
  color: #fff;
}

/* フォーカス（キーボード操作対策） */
.home-more-btn:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(243,152,0,.3);
}



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

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

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



/* ================================
   Contact Page
================================ */

/* ページ全体 */

.contact-page-header {
  margin-bottom: 32px;
  text-align: center;
}

.contact-page-header .entry-title {
  margin-bottom: 16px;
  font-size: 32px;
  line-height: 1.4;
}

.contact-page-lead {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.9;
  color: #555;
}

/* 本文エリア（固定ページ本文がある場合） */
.contact-page-content {
  max-width: 860px;
  margin: 0 auto 40px;
}

/* 各ブロック共通 */
.contact-info-block,
.contact-form-block,
.contact-back-block {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* セクション見出し */
.contact-section-title {
  text-align: center;
  margin-bottom: 24px;
}

/* 案内カード */
.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-info-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.contact-card-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.contact-info-card p {
  margin: 0;
  line-height: 1.9;
  color: #555;
  font-size: 14px;
}

/* フォーム枠 */
.contact-form-wrap {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* CF7 ラベル */
.contact-form-wrap .wpcf7 form p {
  margin-bottom: 20px;
}

.contact-form-wrap .wpcf7 label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

/* 入力系 */
.contact-form-wrap .wpcf7 input[type="text"],
.contact-form-wrap .wpcf7 input[type="email"],
.contact-form-wrap .wpcf7 input[type="tel"],
.contact-form-wrap .wpcf7 input[type="url"],
.contact-form-wrap .wpcf7 select,
.contact-form-wrap .wpcf7 textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
  box-sizing: border-box;
}

.contact-form-wrap .wpcf7 textarea {
  min-height: 90px;
  height: 250px;
  resize: vertical;
}

/* Contact Form 7 項目調整 */
.required {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  vertical-align: middle;
}

.contact-form-table .form-row {
  margin-bottom: 20px;
}

.contact-form-table .wpcf7-list-item {
  margin: 0 16px 0 0;
}

.contact-form-table .wpcf7-list-item-label {
  margin-left: 6px;
}

.privacy-box {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 16px;
  background: #fafafa;
}

.privacy-text {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

.form-row-privacy {
  margin-bottom: 0;
}

.form-submit {
  margin-top: 28px;
  text-align: center;
}

/* フォーカス */
.contact-form-wrap .wpcf7 input:focus,
.contact-form-wrap .wpcf7 select:focus,
.contact-form-wrap .wpcf7 textarea:focus {
  outline: none;
  border-color: #f39800;
  box-shadow: 0 0 0 3px rgba(243,152,0,.15);
}

/* 送信ボタン */
.contact-form-wrap .wpcf7 input[type="submit"] {
  display: inline-block;
  min-width: 220px;
  padding: 14px 32px;
  background-color: #f39800;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.contact-form-wrap .wpcf7 input[type="submit"]:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.contact-form-wrap .wpcf7 .wpcf7-spinner {
  vertical-align: middle;
}

/* 確認文 */
.contact-privacy-note {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  color: #777;
}

/* エラーメッセージ */
.contact-form-wrap .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 13px;
}

.contact-form-wrap .wpcf7 form .wpcf7-response-output {
  margin: 24px 0 0;
  border-radius: 12px;
  padding: 12px 16px;
}

/* レスポンシブ */
@media (max-width: 1024px) {
  .contact-card-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrap {
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .contact-page {
    margin-top: 32px;
  }

  .contact-page-header .entry-title {
    font-size: 26px;
  }

  .contact-page-lead {
    font-size: 15px;
  }

  .contact-form-wrap {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .contact-form-wrap .wpcf7 input[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}


/* ================================
   Contact Confirm Page
================================ */

.contact-confirm-page {
  margin-top: 48px;
}

.contact-confirm-block,
.contact-confirm-notes-block,
.contact-confirm-back-block {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* 確認一覧の全体枠 */
.contact-confirm-table {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* 1行 */
.confirm-row {
  display: grid;
  border-bottom: 1px solid #eee;
  height: 200px;
  grid-template-rows: 1fr 2fr;
}

.confirm-row:last-child {
  border-bottom: none;
}

/* 左の見出し */
.confirm-label {
  background: #faf7f2;
  padding: 20px 24px 0;
  font-weight: 700;
  color: #333;
  line-height: 1;
  border-right: 1px solid #eee;
}
.confirm-label > p {
  margin-bottom: 0;
}
/* 右の値 */
.confirm-value {
  padding: 20px 24px;
  color: #555;
  line-height: 1.2;

}

/* 値が空のときにレイアウトが崩れにくいように */
.confirm-value:empty::before {
  content: "未入力";
  color: #999;
}

/* ボタンエリア */
.confirm-actions p {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}


.confirm-actions input {
  display: inline-block;
  min-width: 220px;
  width: 220px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
}
/* 前へ戻るボタン */
.confirm-actions .wpcf7-previous,
.confirm-actions input.wpcf7-previous,
.confirm-actions input[type="button"] {
  background: #fff;
  color: #f39800;
  border: 2px solid #f39800;
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.confirm-actions .wpcf7-previous:hover,
.confirm-actions input.wpcf7-previous:hover,
.confirm-actions input[type="button"]:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  background: #fff8ee;
}

/* 送信ボタン */
.confirm-actions input[type="submit"] {
  background-color: #f39800;
  color: #fff;
  border: none;
  transition: opacity .2s ease, transform .2s ease;
}

.confirm-actions input[type="submit"]:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.confirm-actions .wpcf7-spinner {
  width: 24px;
  margin: 0;
}

/* 確認メモ欄 */
.contact-confirm-notes-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.contact-confirm-notes-list {
  margin: 0;
  padding-left: 1.2em;
}

.contact-confirm-notes-list li {
  margin-bottom: 10px;
  line-height: 1.9;
  color: #555;
}

.contact-confirm-notes-list li:last-child {
  margin-bottom: 0;
}

/* ラジオや長文が来ても崩れにくく */
.confirm-value span,
.confirm-value p,
.confirm-value div {
  line-height: inherit;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .confirm-row {
    grid-template-columns: 1fr;
  }

  .confirm-label {
    border-right: none;
    border-bottom: 1px solid #eee;
    padding: 14px 16px;
  }

  .confirm-value {
    padding: 14px 16px;
  }

  .confirm-actions {
    gap: 12px;
  }

  .confirm-actions .wpcf7-previous,
  .confirm-actions input.wpcf7-previous,
  .confirm-actions input[type="button"],
  .confirm-actions input[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .contact-confirm-page {
    margin-top: 32px;
  }

  .contact-confirm-table {
    border-radius: 16px;
  }

  .contact-confirm-notes-box {
    padding: 20px 16px;
  }
}

/* ================================
   Contact Thanks Page
================================ */

.contact-thanks-page {
  margin-top: 48px;
}

.contact-card-grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.thanks-message-block,
.thanks-guide-block,
.thanks-back-block {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.thanks-message-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-align: center;
}

.thanks-message-box p {
  margin: 0 0 16px;
  line-height: 1.9;
  color: #555;
}

.thanks-message-box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .contact-thanks-page {
    margin-top: 32px;
  }

  .thanks-message-box {
    padding: 24px 16px;
    border-radius: 16px;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .contact-card-grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
}

