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

/* 
* ヘッダーロゴ(テキスト)の反対側に問い合わせボタン表示
*/
div#header-in {
  /* ヘッダーロゴ(テキスト)と問い合わせボタンを横並び */
  flex-direction: row;
}
.header-in .logo-header {
  /* ヘッダーロゴ(テキスト)と問い合わせボタンの位置を両端にする */
  margin-right: auto;
}
.header-contact {
  /* 問い合わせボタンにパディングを追加（見た目を整える） */
  padding: 10px 0;
}

/* Cocoon ギャラリーを常に3列固定 */
.wp-block-gallery,
.blocks-gallery-grid {
  display: flex !important;
  flex-wrap: wrap;
}

.wp-block-gallery .blocks-gallery-item,
.blocks-gallery-grid .blocks-gallery-item {
  width: 33.333% !important;
  max-width: 33.333% !important;
}

/* ===== Cocoon ギャラリー 3列崩れ防止 ===== */

/* 余白を含めて幅計算 */
.wp-block-gallery *,
.blocks-gallery-grid * {
  box-sizing: border-box;
}

/* ギャラリー全体の隙間を無効化 */
.wp-block-gallery,
.blocks-gallery-grid {
  gap: 0 !important;
}

/* 各画像アイテム */
.wp-block-gallery figure,
.wp-block-gallery li,
.blocks-gallery-item {
  margin: 0 !important;
  padding: 0.5em; /* ←余白が欲しければここだけ調整 */
  width: 33.3333% !important;
  max-width: 33.3333% !important;
  flex: 0 0 33.3333% !important;
}
