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

#hp-hero,
.e-flexbox-base.full-section {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* お知らせカード:幅をそろえる */
.news-cards .new-entry-card-link {
  flex: 0 0 calc((100% - 40px) / 3); /* PC:3列(gap 20px×2) */
  max-width: calc((100% - 40px) / 3);
  margin: 0 !important;
}
/* ===== トップページのみ:横スライド ===== */
@media screen and (max-width: 1023px) {
  body.home .news-cards {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 12px;
    scroll-padding-left: 16px;
    scrollbar-width: none;
  }
  body.home .news-cards::-webkit-scrollbar { display: none; }
  body.home .news-cards .new-entry-card-link {
    flex: 0 0 45%;
    max-width: 45%;
    scroll-snap-align: start;
  }
}
@media screen and (max-width: 600px) {
  body.home .news-cards .new-entry-card-link {
    flex-basis: 80%;
    max-width: 80%;
  }
}

/* ===== トップ以外(/diary/ など):グリッド ===== */
@media screen and (max-width: 1023px) {
  body:not(.home) .news-cards .new-entry-card-link {
    flex: 0 0 calc((100% - 20px) / 2); /* タブレット:2列 */
    max-width: calc((100% - 20px) / 2);
  }
}
@media screen and (max-width: 600px) {
  body:not(.home) .news-cards .new-entry-card-link {
    flex-basis: 100%; /* スマホ:1列 */
    max-width: 100%;
  }
  body:not(.home) .news-cards {
    padding: 0 16px; /* 端に貼り付かないように */
  }
}

.news-cards .new-entry-card,
.news-cards .new-entry-card-thumb,
.news-cards .new-entry-card-thumb img {
  width: 100% !important;
  max-width: 100% !important;
}
.news-cards .new-entry-card-thumb img {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* =========================================================
   関保育園 演出
   ========================================================= */

/* ---------- 0. 動きを減らす設定の人には動かさない ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- 1. ページ遷移をふわっと（View Transitions） ---------- */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .35s;
}
/* ヘッダーは固定したまま本文だけ切り替わる */
#header { view-transition-name: site-header; }

/* ---------- 2. スクロールで出てくる（クラス: fx-reveal） ---------- */
html, body { overflow-x: clip !important; }

@keyframes fx-rise {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
  .fx-reveal,
  .feature-card,
  .info-card,
  .extra-info-card,
  .staff-voice-card,
  .widget-entry-card,
  .elementor-image-carousel-wrapper,
  .teaser-card {
    animation: fx-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
}
/* 未対応ブラウザでは普通に表示 */

/* 画面の真ん中に来たら1語ずつポン(transition版) */
html.fx-js .fx-words-center > * {
  opacity: 0;
  transform: scale(.4) rotate(-8deg);
  transition:
    opacity .4s ease-out,
    transform .7s cubic-bezier(.34, 1.56, .64, 1) !important;
}
html.fx-js .fx-words-center.is-in > * {
  opacity: 1;
  transform: none;
}
html.fx-js .fx-words-center > *:nth-child(2) { transition-delay: .25s !important; }
html.fx-js .fx-words-center > *:nth-child(3) { transition-delay: .5s  !important; }
html.fx-js .fx-words-center > *:nth-child(4) { transition-delay: .75s !important; }

@media (prefers-reduced-motion: reduce) {
  html.fx-js .fx-words-center > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 汎用:グループが画面の真ん中に来たら、中の fx-pop-item を順番にポン */
html.fx-js .fx-pop-item {
  opacity: 0;
  transform: scale(.4) rotate(-8deg);
  transition: opacity .4s ease-out,
              transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
html.fx-js .fx-pop-group.is-in .fx-pop-item {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.fx-js .fx-pop-item { opacity: 1 !important; transform: none !important; }
}

/* ---------- 3b. 旗ガーランドがゆらゆら（クラス: fx-flag） ---------- */
@keyframes fx-sway {
  from { transform: rotate(-1.5deg); }
  to   { transform: rotate(1.5deg); }
}
.fx-flag {
  transform-origin: top center;
  animation: fx-sway 3s ease-in-out infinite alternate;
}

@keyframes garland-wind {
  0%   { transform: skewX(0deg)  scaleY(1); }
  50%  { transform: skewX(-8deg) scaleY(1.06); }
  100% { transform: skewX(6deg)  scaleY(.98); }
}
.garland-strip {
  transform-origin: top center;   /* 紐の部分は固定 */
  animation: garland-wind 4s ease-in-out infinite alternate;
  will-change: transform;
}

/* ---------- 4. 一日の流れタイムライン（HTMLは snippets 参照） ---------- */
.fx-timeline {
  position: relative;
  list-style: none;
  margin: 0 auto;
  padding: 0 0 0 36px;
  max-width: 640px;
}
.fx-timeline::before,
.fx-timeline::after {               /* 下地の線 / 伸びる線 */
  content: "";
  position: absolute;
  left: 12px; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background: #eadfc8;
}
.fx-timeline::after {
  background: #f4a6b7;
  transform-origin: top;
}
@keyframes fx-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@supports (animation-timeline: view()) {
  .fx-timeline::after {
    animation: fx-grow linear both;
    animation-timeline: view();
    animation-range: entry 60% exit 60%;
  }
  .fx-timeline > li {
    animation: fx-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}
.fx-timeline > li {
  position: relative;
  padding: 0 0 32px 16px;
}
.fx-timeline > li::before {          /* 丸いポイント */
  content: "";
  position: absolute;
  left: -32px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #f4a6b7;
  z-index: 1;
}
.fx-timeline time {
  display: inline-block;
  font-weight: 700;
  color: #e5799a;
  margin-bottom: 4px;
}
.fx-timeline h3 { margin: 0 0 6px; font-size: 1.1em; }
.fx-timeline p  { margin: 0; }
.fx-timeline img {
  width: 100%;
  border-radius: 12px;
  margin-top: 10px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}


/* ---------- 5a. クレヨン風アンダーライン（見出しに fx-underline） ---------- */
.fx-underline {
  display: inline-block;
  padding-bottom: 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8 Q 28 2 52 7 T 100 7 T 150 6 T 197 7' fill='none' stroke='%23F4A6B7' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat left bottom / 100% 12px;
}
@keyframes fx-draw {
  from { background-size: 0% 12px; }
  to   { background-size: 100% 12px; }
}
@supports (animation-timeline: view()) {
  .fx-underline {
    animation: fx-draw linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 40%;
  }
}

/* ---------- 5b. セクション下端を波線に（コンテナに fx-wave） ---------- */
/* --fx-wave-color は「次のセクションの背景色」に合わせる */
.fx-wave { position: relative; }
.fx-wave::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 36px;
  background: var(--fx-wave-color, #fdf6e3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C150 0 300 40 450 20 S750 0 900 20 S1150 40 1200 20 V40 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C150 0 300 40 450 20 S750 0 900 20 S1150 40 1200 20 V40 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 1;
}


/* ---------- 6. スマホ下部の固定ボタン（HTMLは snippets 参照） ---------- */
.fx-cta-bar { display: none; }

@media screen and (max-width: 767px) {
  .fx-cta-bar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    backdrop-filter: blur(6px);
  }
  .fx-cta-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
  }
  .fx-cta-bar .fx-cta-tel   { background: #8cc7a8; }
  .fx-cta-bar .fx-cta-visit { background: #f4a6b7; }

  /* 固定バーで本文の最後が隠れないように */
  body { padding-bottom: 72px; }

  /* 右側の縦タブはスマホでは非表示（クラス名は実際のものに置き換え） */
  /* .side-tabs { display: none !important; } */
}


/* スマホでも表の形を保ち、コンパクトにする */
@media screen and (max-width: 600px) {
  .entry-content table   { display: table !important; width: 100% !important; table-layout: auto; }
  .entry-content thead   { display: table-header-group !important; }
  .entry-content tbody   { display: table-row-group !important; }
  .entry-content tr      { display: table-row !important; }
  .entry-content th,
  .entry-content td {
    display: table-cell !important;
    width: auto !important;
    padding: 10px 8px !important;
    font-size: 14px;
    line-height: 1.5;
    vertical-align: top;
    border-bottom: 2px solid #f6d9b8;
  }
  /* 日付列は折り返さず幅を最小に */
  .entry-content th:first-child,
  .entry-content td:first-child {
    white-space: nowrap;
    width: 1% !important;
    font-weight: 700;
  }
  /* 見出し行は少し小さく */
  .entry-content thead th { font-size: 13px; padding: 8px !important; }
	
  /* 固定レイアウトを解除して、中身に合わせて列幅を決める */
  .entry-content table,
  .entry-content table.has-fixed-layout {
    table-layout: auto !important;
  }
  /* 日付列は最低限の幅を確保 */
  .entry-content th:first-child,
  .entry-content td:first-child {
    width: auto !important;
    min-width: 5.5em;
  }
}