/*
 Theme Name: Lightning Child
 Template: lightning
 Description: Child theme for Lightning
 Author: You
 Version: 1.0
 Text Domain: lightning-child
*/

/* HOME */

/* 余白調整 */
.entry-content > * + * {
  margin-top: 2em; 
}

p {
  margin-top: 1.2em;
  margin-bottom: 1.8em;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 2em;
  margin-bottom: 1.2em;
}

/* フォント指定 */
/* ベース：Noto Sans JP に自動フォールバック */
html, body {
  font-family: "Noto Sans JP",
               system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}

/* 特定のクラスだけ Monoton を使う */
.monoton {
  font-family: "Monoton", cursive;
  font-style: normal;
  font-weight: 400;
}

header .line{
   font-family: "Exo", sans-serif;
}


/* ミント色指定 */
:root { --mint: #A8F5E1; } 

/* h2タイトル（追加cssクラスに mint と記入）は Exo ExtraBold Italic、中央揃え、下線を引く */
.wp-block-heading.has-text-align-center.mint-title{
  /* フォント指定 */
  font-family: "Exo", sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(40px, 3.4vw, 50px);

  /* 中央 & 文字幅 */
  display: block;
  width: fit-content;              /* or max-content */
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  line-height: 1.1;

  /* ミントのマーカー */
  background: linear-gradient(var(--mint), var(--mint)) no-repeat left bottom / 100% .22em;
  padding-bottom: .06em;

  /* 親がflex/columnやgridでも中央に来る保険 */
  align-self: center;              /* flex親（column）の横方向 */
  justify-self: center;            /* grid親 */
}

/* アニメ用の準備＆表示状態 */
.mint-title { 
  transition: opacity 1.8s cubic-bezier(.22,.61,.36,1),
              transform 1.8s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.mint-title.will-reveal { opacity: 0; transform: translateY(14px); }
.mint-title.is-revealed { opacity: 1; transform: translateY(0); }

/* OSの「動きを減らす」設定に配慮 */
@media (prefers-reduced-motion: reduce) {
  .mint-title,
  .mint-title.will-reveal,
  .mint-title.is-revealed {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
/* 共通：1.0sでふわっと */
.reveal {
  transition: opacity 1.2s cubic-bezier(.22,.61,.36,1),
              transform 1.2s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.will-reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-revealed { opacity: 1; transform: translateY(0); }

.wangantoyz {
	background-image: url("https://juvenile-jp.com/wp-content/uploads/2025/10/2c37b07e-3448-4046-9396-765a6386542b-scaled.jpg");
}

/* 動きを減らす設定に配慮（既存のmint-title用と同じ方針） */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.will-reveal,
  .reveal.is-revealed {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* このセクションだけ：親は常に不透明、子をフェード */
.service-section.reveal.will-reveal,
.service-section.reveal.is-revealed{
  opacity: 1 !important;
  transform: none !important;   /* 親を動かさない＝背景/::beforeも安全 */
}
/* 中身だけアニメさせる */
.service-section.reveal > *{
  transition: opacity 1s cubic-bezier(.22,.61,.36,1),
              transform 1s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.service-section.reveal.will-reveal > *{ opacity: 0; transform: translateY(14px); }
.service-section.reveal.is-revealed  > *{ opacity: 1; transform: translateY(0); }

/* 動きを減らす設定（このセクション限定） */
@media (prefers-reduced-motion: reduce){
  .service-section.reveal > *,
  .service-section.reveal.will-reveal > *,
  .service-section.reveal.is-revealed  > *{
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;}
	}

	
	
	
	
	



/* HOME-SERVICE */
/* 親：背景だけ（余白は持たせない） */
.service-section{
  position: relative;
  isolation: isolate;
}
.service-section::before{
  content:"";
  position:absolute; inset:0;
  /* background: url("https://juvenile-jp.com/wp-content/uploads/2025/08/HPヘッダー用イラスト_ラフ_2_背景_250824-scaled.jpg") center/cover no-repeat; */
  opacity:.50; z-index:0; filter: saturate(1.05);
}
/* 中身を背景の上に */
.service-section > *{ position: relative; z-index: 1; }

/* 強制フルブリード */
.service-section.alignfull{
  width: 100vw;
  margin-left:  calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 内側ラッパー：上下＋左右の余白をここで一括管理 */
.service-inner{
  max-width: min(1100px, 92vw);
  margin-inline: auto;
  padding: 95px 200px;     
  box-sizing: border-box;
}
/* 端末別調整 */
@media (max-width: 1199px){
  .service-inner{ padding: 88px 170px; }
}
@media (max-width: 959px){
  .service-inner{ padding: 72px 80px; }
}
@media (max-width: 781px){
  .service-inner{ padding: 56px 30px; }
}

/* カード間強制隙間調整 */
/* 1) カラム間ギャップをWP標準の変数で指定 */
.service-inner .wp-block-columns{
  --wp--style--block-gap: clamp(14px, 3.8vw, 36px);
}

/* 2) テーマが付けている余計な margin を無効化（= 二重間隔を防ぐ） */
.service-inner .wp-block-columns > .wp-block-column{
  margin: 0 !important;
}

/* 3) モバイルで縦積み時の“縦の間”を確実に確保 */
/*@media (max-width: 782px){
  .service-inner .wp-block-columns{
    --wp--style--block-gap: clamp(20px, 6vw, 48px);
  }
  .service-inner .wp-block-columns > .wp-block-column:not(:first-child){
    margin-top: var(--wp--style--block-gap) !important;
  }
}*/

/* Columns（3枚を包む要素）に class="service-grid" を付ける */
.service-grid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 32px !important;   /* ←大きめで効きを確認してから調整 */
  margin: 0 !important;
  padding: 0 !important;
}
/* 端末別余白調整 */
@media (max-width: 1199px){ .service-grid{ gap: 28px !important; } }
@media (max-width: 959px){
  .service-grid{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 24px !important; }
}
@media (max-width: 781px){
  .service-grid{ grid-template-columns: 1fr !important; gap: 20px !important; }
}

/* 子カラムの余白・幅・flex指定をリセット */
.service-grid > .wp-block-column{
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  flex: initial !important;
}

/* ブレークポイント（必要なら調整） */
@media (max-width: 960px){
  .service-grid{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 782px){
  .service-grid{
    grid-template-columns: 1fr !important;
    gap: clamp(22px, 6vw, 56px) !important;
  }
}


/* 各SERVICEに飛ぶカード（＝各カラム） */
.service-card{ position: relative; overflow:hidden; aspect-ratio: 1/1; }
/* 画像をフィット（z=1） */
.service-card .wp-block-image{ position: relative; margin: 0 !important; z-index:1; }
.service-card .wp-block-image img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition: transform .28s ease;
}
.service-card:hover .wp-block-image img{ transform: scale(1.03); }
/* ミント色の半透明シート（z=2） */
.service-card::after{
  content:""; position:absolute; inset:0;
  background: color-mix(in srgb, var(--mint, #14c8aa) 56%, transparent);
  opacity:0; transition: opacity .22s ease; z-index:2; pointer-events:none;
}
.service-card:hover::after{ opacity:1; }
/* 文字を最前面に配置（z=3） */
.overlay-text{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  text-align:center; padding:12px; font-family:"Exo", system-ui, sans-serif;
  font-weight:800; line-height:1.1; color:#fff; opacity:0; transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease; z-index:3;
  pointer-events:none; /* 下のリンクに関与しない */
  font-size: clamp(18px, 2.2vw, 28px);
}
.service-card:hover .overlay-text{ opacity:1; transform: translateY(0); }

/* 直下同士の“縦の間” */
.service-inner > * + *{
  margin-block-start: clamp(20px, 4vw, 40px);
}








/* SERVICE */
/* アイキャッチを正方形に */
.pc-card__thumb { 
  aspect-ratio: 1/1; /* 正方形に固定 */
  overflow: hidden; 
}
.pc-card__thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* 中央をトリミング */
  display: block; 
}


/* カスタムプロパティで太さ・大きさ・色を調整 */
:root{
  --pc-arrow-size: 16px;      /* アイコンの外形サイズ */
  --pc-arrow-stroke: 2px;     /* 線の太さ（1.5〜2pxあたりが細め） */
  --pc-arrow-color: #fff;     /* 線の色 */
}

/* ナビゲーションボタン本体 */
.pc-button{
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity .25s ease, transform .2s ease;
}
.pc-wrap:hover .pc-button{ opacity: 1; }
.pc-button:hover{ transform: scale(1.06); }

/* ── 矢印描画 ── */
.pc-button::after{
  content: "";
  box-sizing: border-box;
  width: var(--pc-arrow-size);
  height: var(--pc-arrow-size);
  border-radius: 2px; /* 角をほんのり丸くして“く”感を出す */
  display: block;
  /* 右上の辺だけ線を出す（ベースは “＞” の片側） */
  border-top: var(--pc-arrow-stroke) solid var(--pc-arrow-color);
  border-right: var(--pc-arrow-stroke) solid var(--pc-arrow-color);
  transform: rotate(45deg); /* これで“＞”になる */
  /* 背景の写真上でも見えるようにほんのり影 */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}

/* 左矢印は“＜”：向きを反転 */
.pc-button--prev::after{
  transform: rotate(225deg); /* = 45deg + 180deg（“＜”） */
}

/* 右矢印は“＞” */
.pc-button--next::after{
  transform: rotate(45deg);
}

/* フォーカス見やすく（キーボード操作対応） */
.pc-button:focus-visible{
  outline: 2px solid rgba(255,255,255,.75);
  outline-offset: 2px;
}

/* 動き調整 */
.pc-swiper .swiper-wrapper{
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
  will-change: transform;
  backface-visibility: hidden;
}




/* ===== News – Simple ===== */
.c-news-simple .cns__header{
  text-align:center;
  max-width:min(960px, 92vw);
  margin: clamp(24px, 4vw, 48px) auto clamp(16px, 3vw, 32px);
}
.cns__cat{ margin-bottom:.65rem; }
.cns__cat a{
  display:inline-block; padding:.25rem .75rem;
  border:1px solid currentColor; border-radius:9999px;
  text-decoration:none; font-size:.86rem; opacity:.86;
}
.cns__title{
  margin:0 0 .4rem;
  font-weight:700;
  line-height:1.25;
  font-size: clamp(1.8rem, 1.25rem + 2.2vw, 2.6rem);
}
.cns__date{ font-size:.95rem; opacity:.75; }

.c-news-simple .cns__content{
  max-width:min(960px, 92vw);
  margin:0 auto clamp(32px, 5vw, 56px);
  line-height:1.9;
}
.c-news-simple .cns__content img{ width:100%; height:auto; }

/* Related */
.cns__related{
  max-width:min(1024px, 92vw);
  margin: clamp(24px, 4vw, 48px) auto clamp(40px, 6vw, 72px);
}
.cns__related-title{
  text-align:center; font-weight:600; margin:0 0 1rem; opacity:.9;
}
.cns__related-list{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.cns__related-link{
  display:block; height:100%;
  border:1px solid #e5e7eb; border-radius:.75rem;
  padding:.8rem .95rem; text-decoration:none;
}
.cns__related-link:hover{ background:#f9fafb; }
.cns__related-date{ display:block; font-size:.85rem; opacity:.6; margin-bottom:.35rem; }
.cns__related-title-txt{ display:block; font-weight:600; line-height:1.5; }


/* ヘッダー/フッター強制復活（確認用） */
.site-header, .l-header, header.site-header,
.site-footer, .l-footer, footer.site-footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 1000;
}
