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

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

/*
Theme Name:   Cocoon Child – Nursery
Template:     cocoon-master
*/


/*──────────────────────────────────────
  カラー変数（ここを変えれば全体色が切り替わります）
──────────────────────────────────────*/
:root {
  --color-bg: #fafafa;
  --color-text: #333;
  --color-primary: #007acc;
  --color-btn-hover: #005fa3;
}

/* リセット & ベース */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Noto Sans JP", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}
a {
  text-decoration: none;
  color: inherit;
}
.header-container-in.hlt-top-menu .site-name-text {
    font-weight: 600;
}
/*──────────────────────────────────────
 トップページのみ隠れh1が出るようにする
──────────────────────────────────────*/
/*
/* 画面には見せないが、スクリーンリーダーには伝える非表示 */
.sr-only{
  position:absolute !important;
  width:1px; height:1px;
  margin:-1px; padding:0; border:0;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap;
}

/*──────────────────────────────────────
  モバイルヘッダー
──────────────────────────────────────*/
.mobile-menu-buttons .menu-caption {
    display: none;
}

.mobile-menu-buttons .menu-icon {
    font-size: 25px;
}

/*──────────────────────────────────────
  ヒーロースライダー
──────────────────────────────────────*/
/* スライダーを16:9に固定（Swiper 8以降/以前どちらでも効くように） */
.hero-slider,
.hero-slider.swiper,
.hero-slider.swiper-container {
  width: 100%;
  aspect-ratio: 16 / 9;   /* ここで比率を決める */
  height: auto;           /* 高さは比率から自動算出 */
  position: relative;
  overflow: hidden;
}

/* Swiper内部は高さを100%に揃える */
.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide {
  height: 100%;
}

/* 画像はスライドいっぱいに広げて中央基準でトリミング */
.hero-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* はみ出し分をトリミング（中央基準） */
  object-position: center;
  display: block;
}

/* ナビゲーションがずれないように（必要なら） */
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
  top: 50%;
  transform: translateY(-50%);
}



.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero-slider .slides {
  display: flex;
}
.hero-slider .slides .slide {
  min-width: 100%;
}
.hero-slider .slides .slide img {
  width: 100%;
  height: auto;
  display: block;
}

}

/* 共通スタイル */
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after {
  /* 矢印文字 */
  font-size: 1.5rem;
  color: #333;
  font-weight: bold;
}
.hero-slider .swiper-button-prev {
  left: 1rem;
}
.hero-slider .swiper-button-next {
  right: 1rem;
}

/* スタイリッシュなホバー効果 */
.hero-slider .swiper-button-prev:hover,
.hero-slider .swiper-button-next:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.1);
}

/* ────────────────────────────────────
   モバイル時：さらに小さく
──────────────────────────────────── */
@media (max-width: 768px) {
  .hero-slider .swiper-button-prev,
  .hero-slider .swiper-button-next {
    display: none !important;
  }
}

  
  
/* Swiperボタンの見た目調整 */
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
  color: #fff;          /* 白い矢印 */
  font-size: 2rem;      /* 矢印の大きさ */
  width: 3rem;
  height: 3rem;
  background: rgba(0,0,0,0.3);
  border-radius: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  z-index: 10;
}
.hero-slider .swiper-button-prev { left: 1rem; }
.hero-slider .swiper-button-next { right: 1rem; }


/* ページネーション（ドット）の位置調整 */
.hero-slider .swiper-pagination {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ドットのカラー変更 */
.hero-slider .swiper-pagination-bullet {
  background: rgba(255,255,255,0.7);
  opacity: 1;
}
.hero-slider .swiper-pagination-bullet-active {
  background: #fff;
}





/* 必要なら背景をほんのり暗くする（濃さはお好みで調整/不要なら消す） */
.hero-wrap::after{
  content:""; position:absolute; inset:0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.01), rgba(0,0,0,.35));
  pointer-events: none;           /* クリックはスライダーに通す */
  z-index: 1;
}



/* 中央オーバーレイ本体 */
.hero-center{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  z-index: 2;                      /* スライド画像より上、矢印の下でもOK */
  pointer-events: none;            /* 矢印やドットの操作を邪魔しない */
  padding: 0 1rem;
  text-align: center;
}
.hero-center__title{
  margin: 0 0 .35em;
  color: #fff;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  font-size: clamp(1.4rem, 4.5vw, 3rem);
  letter-spacing: .02em;
}
.hero-center__subtitle{
  margin: 0;
  color: #fff;
  opacity: .95;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  font-size: clamp(1.3rem, 1.6vw, 1.2rem);
}

/* モバイルは行間を少し詰めて読みやすく */
@media (max-width: 768px){
  .hero-center__title{ line-height: 1.2; }
  .hero-center__subtitle{
	  font-size: clamp(.9rem, 1.6vw, 1.2rem);
  }
}


header.hero-slider .hero-center__title,
header.hero-slider .hero-center__subtitle{
  text-shadow:
    0 2px 12px rgba(0,0,0,.95),
    0 0 2px rgba(0,0,0,.15);
}



/*──────────────────────────────────────
  トップページ セクション
──────────────────────────────────────*/
.sections .section {
  display: flex;
  align-items: center;
  padding: 0rem 0rem;
}
.sections .section--even {
  flex-direction: row-reverse;
}
.section__img,
.section__body {
  text-align: center !important;
  flex: 1;
}
.section__img img {
  width: 100%;
  height: auto;
  display: block;
}
.section__body {
  padding: 1rem;
}
.section__body h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}
.section__body p {
  font-size: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  padding: 0 1.5rem;
}

/* PCだけ画像を横幅の55%に（モバイルは一切変更しない） */
@media (min-width: 769px){
  .home .sections .section{ display:flex; }
  .home .sections .section__img{
    flex: 0 0 55%;
    max-width: 55%;
  }
  .home .sections .section__body{
    flex: 0 0 45%;
    max-width: 45%;
    min-width: 0; /* 文章のはみ出し防止（任意） */
  }
}


@media (max-width: 768px) {
  .section__body{
    margin: 3rem 0rem;
  }
  .section__body p{
    padding: 0 0.5rem;
  }
  .section__body h2 {
  	font-size: 1.8rem;
    margin-top: 0rem;
  	margin-bottom: 1.5rem;
　}
}


/*──────────────────────────────────────
  ボタン
──────────────────────────────────────*/
.btn ,.wp-block-button .wp-block-button__link{
  display: inline-block;
  padding: .75em 5em;
  border-radius: 1em;
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
  transition: transform .2s ease, background .2s ease;
  
  /* 最低幅を設定して揃えたい場合は以下を有効化 */
  /* min-width: 180px !important; */

  /* 必要に応じてフォントサイズも少し大きく */
  /* font-size: 1.05rem !important; */
  
}
.btn:hover ,
.wp-block-button .wp-block-button__link:hover{
  background: var(--color-btn-hover);
  transform: translateY(-2px);
}

.wp-block-button .wp-block-button__link{
  font-size: 13pt;
  padding: .5em 2em;
}


/*──────────────────────────────────────
  レスポンシブ
──────────────────────────────────────*/
@media (max-width: 768px) {
  .sections .section,
  .sections .section--even {
    flex-direction: column;
    text-align: center;
  }
}




/*──────────────────────────────────────
  トップページのデザイン変更
──────────────────────────────────────*/
/* そのテンプレートを使うページだけ */
body.page-template-page-home .main { padding: 0 !important; }
body.page-template-page-home .content { margin-top: 0 !important; }
body.page-template-page-home .hero-slider .swiper-wrapper { margin: 0 !important; }

/*──────────────────────────────────────
  トップページのNews欄
──────────────────────────────────────*/
/* ===== Scope ===== */
.home-news{ --max:1100px; --gutter:clamp(16px,4vw,40px); --accent:#0ea5e9; }
.home-news__container{ max-width:var(--max); margin:0 auto; padding:2rem var(--gutter); }

/* 2カラム（SPは1列） */
.home-news__grid{ display:grid; grid-template-columns:1fr 1fr; gap:4rem; }
@media (max-width:768px){ .home-news__grid{ grid-template-columns:1fr; } }

/* カラム見出し：中央揃え */
.home-news__colTitle{
  text-align:center;
  font-size:1.3rem; font-weight:700;
  margin:0 0 .75rem;
}

/* リスト */
.home-news__list{ display:flex; flex-direction:column; gap:.75rem; }


/* アイテム（コンパクト・枠線・角丸） */
.home-news__item{
    /* 横＝[サムネ][本文] の2カラムに */
  display: grid !important;
  grid-template-columns: var(--thumb-w) 1fr;
  gap: .75rem;
  align-items: start; /* 行の上端基準 */
  padding: .6rem .8rem; /* 既存値を踏襲 */
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  text-decoration:none; color:inherit;
  transition:box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.home-news__item:hover{
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  transform:translateY(-1px);
  border-color:#bfdbfe; /* うっすら青 */
}
.home-news a:hover{ color:var(--accent) !important; } /* テーマの赤ホバーを上書き */

/* サムネイル（小さめ・画像と枠の間を狭く） */
.home-news__thumb{ flex:0 0 76px; height:52px; overflow:hidden; border-radius:8px; background:#f3f4f6; }
.home-news__thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.home-news__thumb--placeholder{ width:100%; height:100%; background:#ececec; }

/* 投稿日時（タイトルの“上”に小さく） */
.home-news__date{
  font-size:.82rem; line-height:1; color:#6b7280; /* gray-500 */
  align-self: start;
  line-height: 1;
  margin: 0;
}

/* タイトル（2行で省略。ホバーで青に） */
/* 右カラムを2行グリッド：上=日付(高さauto) / 下=タイトル(高さ残り1fr) */
.home-news__meta{
  min-width: 0;
  display: grid !important;
  grid-template-rows: auto 1fr;
  min-height: var(--thumb-h);     /* サムネと同じ高さにして揃える */
  row-gap: .15rem;
}
/* タイトルは“残りの高さ”の中で中央寄せ（複数行でもOK） */
.home-news__title{
  align-self: center;             /* 縦中央 */
  font-size: .98rem;              /* ちょい小さめ */
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;          /* 2行で省略 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-news__item:hover .home-news__title{ color:var(--accent); }

/* もっと見る：枠線なし＆小さめ、右下配置 */
.home-news__more{ display:flex; justify-content:flex-end; margin-top:.5rem; }
.home-news__moreLink{
  font-size:.9rem;
  text-decoration:none;
  color:inherit;
  padding:.25rem .4rem;
}
.home-news__moreLink:hover{ color:var(--accent); }

/* SPでは各リスト3件だけ表示 */
@media (max-width:768px){
  .home-news__list .home-news__item:nth-child(n+4){ display:none; }
  .home-news__thumb{ flex-basis:72px; height:48px; }
  /* スマホはサムネを少し小さく */
  .home-news{ --thumb-w: 72px; --thumb-h: 48px; }
}
.home-news{
  /* サムネの基準サイズを変えたい場合はここを調整 */
  --thumb-w: 96px;
  --thumb-h: 64px;
}
.home-news__thumb{
  width: var(--thumb-w) !important;
  height: var(--thumb-h) !important;
  flex: none !important;         /* 既存のflex指定を無効化 */
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4f6;
}
.home-news__thumb img{
  width: 100%; height: 100%; object-fit: cover; display: block;
}







/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
  /*
main.main, div.sidebar {
  padding: 0px;
}  必要ない？一旦消しておく
*/
  .header-container{
    display: none;
}  
  
}

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

  
}

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

}



/* このテンプレのページだけに適用（ファイル名に連動） */
body.page-template-page-hero-featured{
  --hero-h: 46vh;                 /* ヒーロー高さ（px/％/vhで自由に） */
  --hero-min: 260px;              /* モバイル等の最低高さ */
  --hero-overlay: rgba(0,0,0,.28);/* タイトル読ませる薄い暗幕 */
  --title-size: clamp(1.6rem,4.2vw,2.6rem);
  --gutter: clamp(16px, 4vw, 40px); /* 本文の左右余白（画面幅に応じ可変） */
  --content-max: 1100px;          /* 本文の最大幅 */
}

/* ❶ Cocoonのラッパでクリップされないように（ヒーローがはみ出すため） */
body.page-template-page-hero-featured .content,
body.page-template-page-hero-featured .inner{ overflow: visible !important; }

/* ❷ デフォルトのページタイトルは非表示（ヒーローに出すため） */
body.page-template-page-hero-featured .entry-title,
body.page-template-page-hero-featured .page-title{ display:none !important; }

/* ❸ ヒーロー：画面端までフルブリード＋高さ調整可 */
body.page-template-page-hero-featured .hero-featured{
  position: relative;
  width: 100vw;
  height: var(--hero-h);
  min-height: var(--hero-min);
  margin: 0;
  /* サイト余白を打ち消して“完全全幅”に */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  line-height: 0;
}
body.page-template-page-hero-featured .hero-featured__bg{
  position: absolute; inset: 0;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
body.page-template-page-hero-featured .hero-featured__bg::after{
  content:""; position:absolute; inset:0; background: var(--hero-overlay);
}
/* タイトルを中央に重ねる */
body.page-template-page-hero-featured .hero-featured__inner{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center; padding: 0 var(--gutter);
}
body.page-template-page-hero-featured .hero-featured__title{
  margin:0; color:#fff; font-size: var(--title-size); line-height:1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* ❹ 本文：中央寄せ＋最大幅＋可変余白（テーマの見た目は維持） */
body.page-template-page-hero-featured .entry-content--scoped{
  box-sizing: border-box;
  max-width: var(--content-max);
  margin: 1.5rem auto 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  text-align: left;
}

/* 任意：モバイルでヒーローを少し低めに */
@media (max-width: 768px){
  body.page-template-page-hero-featured{ --hero-h: 28vh; --hero-min: 200px; }
}