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

/************************************
** 基本設定
************************************/
* {
  box-sizing: border-box;
}

img {
  max-width: 100% !important;
  height: auto;
}

/************************************
** ヘッダー画像設定
************************************/
body.blog .header,
body.single .header,
body.archive .header {
  background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/04/02ブログ.png");
}

body.page-id-42 .header {
  background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/04/02スタッフ.png");
}

body.page-id-45 .header {
  background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/04/02スタジオ.png");
}

body.page-id-80 .header {
  background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/04/02お問い合わせ.png");
}

/* 共通 */
.header {
  background-size: cover;
  background-position: center;
  overflow: visible;
}

.header-container {
  overflow: visible;
}

/************************************
** PC表示
************************************/
body:not(.home):not(.front-page) .header {
  height: 280px;
}

/************************************
** ロゴ制御
************************************/
.header-container .logo-header {
  display: none !important;
}

.home .header-container .logo-header,
.front-page .header-container .logo-header {
  display: block !important;
}

/************************************
** レイアウト
************************************/
.wrap,
.container,
.content,
.main,
.sidebar {
  max-width: 100%;
}
/* PCだけ「中身」だけ縮める */
@media screen and (min-width: 769px) {
  .container {
    max-width: 90%;
    margin: 0 auto;
  }
}

/* スマホはそのまま */
@media screen and (max-width: 768px) {
  .container {
    max-width: 100%;
  }
}

.sidebar {
  width: 300px;
}

.main {
  width: calc(100% - 320px);
}

/************************************
** スマホ対応
************************************/
@media screen and (max-width: 480px){

  body:not(.home):not(.front-page) .header {
    height: 140px !important;
    background-position: center top;
  }

  .header-in,
  .header-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
  }
}

/************************************
** ブロックレイアウト調整
************************************/
@media screen and (max-width: 768px) {

  .wp-block-cover > .wp-block-group > .wp-block-columns {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  .wp-block-cover > .wp-block-group > .wp-block-columns > .wp-block-column {
    flex: 0 0 calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
  }

  .wp-block-columns .wp-block-columns {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .wp-block-columns .wp-block-columns > .wp-block-column {
    flex: 0 0 calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
  }

  .wp-block-column img {
    width: 100% !important;
    height: auto !important;
    display: block;
  }
}

/************************************
** タイトル・日付非表示
************************************/
.home .entry-title,
.page .entry-title {
  display: none;
}

.entry-date,
.entry-update,
.post-date,
.post-update {
  display: none;
}

/************************************
** サイドバー
************************************/
.sidebar .widget-title {
  font-size: 16px;
  background: #ffe4ec;
  padding: 8px 12px;
  border-radius: 8px;
}

.widget_recent_entries li a {
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget_recent_entries li {
  margin-bottom: 6px;
}

/************************************
** ヘッダーメニュー
************************************/
.menu-item a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
}

.menu-item i {
  display: inline-block;
  font-size: 16px;
}

@media screen and (max-width: 480px){

  .header {
    background-size: cover;  /* ← はみ出し防止 */
    background-repeat: no-repeat;
    background-position: center;
  }

  body:not(.home):not(.front-page) .header {
    height: auto !important;
    aspect-ratio: 16 / 9; /* ← 画像の比率に合わせて調整OK */
  }
}

/************************************
** スマホ用ヘッダー画像差し替え
************************************/
@media screen and (max-width: 480px){

  /* ブログ・投稿・アーカイブ */
  body.blog .header,
  body.single .header,
  body.archive .header {
    background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/05/スマホ用ブログ.png");
  }

  /* スタッフ */
  body.page-id-42 .header {
    background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/05/スマホ用スタッフ.png");
  }

  /* スタジオ */
  body.page-id-45 .header {
    background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/05/スマホ用スタジオ.png");
  }

  /* お問い合わせ */
  body.page-id-80 .header {
    background-image: url("http://enryouiku-araiyakushi.jp/wp-content/uploads/2026/05/スマホ用お問い合わせ.png");
  }
}

  /* 5領域の画像(PCとスマホで画像を使い分け)-------------------------------------------------------------------*/
.pc-only {
  display: block;
}
.sp-only {
  display: none;
}

@media screen and (max-width: 1024px) {
  .pc-only {
    display: none !important;
  }
  .sp-only {
    display: block !important;
  }
}

/* スマホだけ余白を消す(児発の画像) */
@media screen and (max-width: 768px) {
  .img-bottom-jihatu {
    margin-top: 0 !important;
  }
}