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

/* ★以下追加 */
/*フロント固定ページのタイトル、SNS、更新日、投稿者名を非表示*/
.home.page .entry-title,
.home.page .sns-share.ss-top,
/* .home.page .sns-follow, */
.home.page .date-tags,
.home.page .author-info{
  display: none;
}

/* 基本データテーブル */
.tbl_data {
	width: 90%;
	border-collapse: collapse;
	border-spacing: 0;
}
.tbl_data th {
	text-align: center;
	padding: 10px;
}
.tbl_data td {
	padding: 10px;
}

/* 施設情報テーブル */
.tbl_info {
	width: 95%;
	margin-left: auto;
	margin-right: auto;
	border-collapse: collapse;
	border-spacing: 0;
	border: 0;
}
.tbl_info th {
	text-align: center;
	padding: 10px;
	border: 0;
	border-bottom: dotted 1px #778ca3;
	border-top: dotted 1px #778ca3;
	color: #778ca3;
	background-color:#fafafa;
}
.tbl_info td {
	padding: 10px;
	border: 0;
	border-bottom: dotted 1px #778ca3;
	border-top: dotted 1px #778ca3;
}

/* タイトル */
h2.data {}
h2.info {}
h2.map {}

/* 地図 */
div.map{
	width:100%;
	height:500px;
}

/* ===== 横に長い表を、狭い画面では横スクロールで見せる（2026-11-08 追加）=====
   HTML側で <div class="table-scroll"> … </div> で表を囲んだときだけ効く。
   囲っていない表には何も起きないので、既存ページへの影響はない。
   いまは「仏教の宗派」の6列表（table.shuha）だけに使っている。 */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* スクロールできることが分かるよう、狭い画面でだけ一言出す */
.table-scroll-hint { display: none; }

@media (max-width: 834px) {

  .table-scroll-hint {
    display: block;
    font-size: 14px;
    color: #666666;
    margin: -4px 0 8px;
  }

  /* 列幅の%指定をやめ、中身に合わせた幅にする */
  .table-scroll > table {
    width: auto !important;
    min-width: 100%;
    table-layout: auto;
  }

  /* 短い列は折り返さない（「1253年」が1文字ずつ縦に並ぶのを防ぐ） */
  .table-scroll > table th,
  .table-scroll > table td {
    white-space: nowrap;
    padding: 10px 12px !important;
  }

  /* いちばん右の列（本山など）は長いので、ここだけ折り返す */
  .table-scroll > table th:last-child,
  .table-scroll > table td:last-child {
    white-space: normal;
    min-width: 14em;
  }
}

/* ===== 固定ページの挿入イラスト（2026-11-08 追加、同日に対象を全固定ページへ拡大）=====
   効くのは固定ページだけ。神社・寺院の記事（投稿）には影響しない。
   画像は WordPress の「左寄せ」で入れるだけでよい（右寄せでも同じように整う）。 */

/* 見出しの前で必ず回り込みを解除する。
   文章が短い項目でも、画像が次の見出しに食い込まない */
body.page .entry-content h3 {
  clear: both;
}

/* イラストの大きさをそろえる（パソコン・大きめタブレット） */
body.page .entry-content img.alignleft {
  width: 260px;
  height: auto;
  margin: 4px 24px 14px 0;
  border-radius: 6px;
}

body.page .entry-content img.alignright {
  width: 260px;
  height: auto;
  margin: 4px 0 14px 24px;
  border-radius: 6px;
}

/* 画像だけの段落にできる、余分な空き行とすき間を詰める */
body.page .entry-content p:has(img.alignleft) > br:first-child,
body.page .entry-content p:has(img.alignright) > br:first-child {
  display: none;
}

body.page .entry-content p:has(img.alignleft),
body.page .entry-content p:has(img.alignright) {
  margin-bottom: 0;
}

/* スマホ・小さめタブレットでは、回り込みをやめて横いっぱいに置く */
@media (max-width: 834px) {

  body.page .entry-content img.alignleft,
  body.page .entry-content img.alignright {
    float: none;
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 4px auto 16px;
  }
}
