/* =========================================================
   common.css : 全ページ共通レイアウト
   - ベース / レイアウトヘルパー
   - ヘッダー（PC=アイコンナビ＋中央ロゴ / SP=ロゴ＋ハンバーガー）
   - SPドロワー
   - フローティングCTA（PCのみ）
   - フッター
   施設子サイト（りじょう認定こども園）
   ========================================================= */

/* ===== base ===== */
body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: #fdfcf8;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* 背景の装飾ブロブによる横スクロール抑止 */
}

/* PC共通背景（トップ以外の全ページ：bg_enマスターを1枚画像で適用）。
   各ページは上から必要分だけ表示。SPは下の @media で bg-sp.svg が引き続き適用される。 */
@media (min-width: 751px) {
  body.bg-en {
    background-color: #fff;
    background-image: url(../img/pc-bg.webp);
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
  }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; vertical-align: bottom; }

/* ===== layout helper ===== */
.inner {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.inner--wide { max-width: calc(var(--content-width-wide) + var(--gutter) * 2); }

.section { padding-top: 90px; padding-bottom: 90px; }

.pc-only { display: block; }
.sp-only { display: none; }
.br-sp { display: none; } /* SPのみ改行 */

/* ===== header（PC） ===== */
.header {
  position: relative;
  z-index: 100;
  background: var(--color-white);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 40px);
  max-width: 1525px;
  margin-inline: auto;
  padding: 18px clamp(20px, 3vw, 40px);
}
.gnav { flex: 1; max-width: 463px; }
.header__logo {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-text);
  white-space: nowrap;
  text-align: center;
}
.gnav__list {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(12px, 2.2vw, 44px);
}
.gnav--left { justify-content: flex-start; }
.gnav--right { justify-content: flex-end; }
.gnav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.gnav__link:hover { opacity: 0.65; }
.gnav__icon {
  display: flex;
  align-items: flex-end;
  height: 46px;
  background-color: var(--color-accent-mid); /* アイコン色＝中間色。園で自動追従 */
  -webkit-mask: var(--ic) no-repeat center bottom / contain;
          mask: var(--ic) no-repeat center bottom / contain;
}
.gnav__icon img { width: auto; height: 100%; opacity: 0; } /* 幅確保用。色はmask+bgで付与 */
.gnav__label {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-accent);
  text-align: center;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== hamburger（SP） ===== */
.hamburger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
/* デザインは2本線 */
.hamburger__bar,
.hamburger__bar::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--color-accent);
}
.hamburger__bar { left: 11px; top: 18px; }
.hamburger__bar::after { left: 0; top: 8px; }

/* ===== drawer（SP） ===== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-accent);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity 0.25s, visibility 0.25s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding-inline: 20px;
}
.drawer__logo {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-white);
}
.drawer__close {
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.drawer__close::before,
.drawer__close::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 21px;
  width: 24px;
  height: 2px;
  background: var(--color-white);
}
.drawer__close::before { transform: rotate(45deg); }
.drawer__close::after  { transform: rotate(-45deg); }
.drawer__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 40px 20px 60px;
}
.drawer__link {
  font-family: var(--font-base);
  font-size: 17px;
  color: var(--color-white);
  letter-spacing: 0.06em;
}
.drawer__link--btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 44px;
  border-radius: 22px;
  background: var(--color-white);
  color: var(--color-accent);
  font-weight: 500;
}
.drawer__spacer { height: 16px; }

/* ===== floating CTA（PCのみ・右端固定） ===== */
.float-cta {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 90;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.float-cta__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  border-radius: 30px 0 0 30px;
  color: var(--color-white);
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: opacity 0.2s;
}
.float-cta__item:hover { opacity: 0.88; }
.float-cta__item--insta {
  height: 100px;
  background: #f2b38b;
}
.float-cta__item--insta img { width: 40px; height: 40px; }
.float-cta__item--text {
  height: 227px;
  background: var(--color-accent);
  writing-mode: vertical-rl;
  letter-spacing: 0.25em;
}

/* ===== footer ===== */
.footer { position: relative; }
.footer__bg { /* 波形＋塗りのSVGを全面背景に */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.footer__inner {
  position: relative;
  z-index: 1;
  max-width: 1840px;
  margin-inline: auto;
  padding: 80px clamp(24px, 4vw, 116px) 36px;
}
.footer__logo {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-text);
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 80px;
  margin-top: 36px;
}
.footer__col-title {
  font-family: var(--font-base);
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 14px;
}
.footer__list { display: flex; flex-direction: column; gap: 12px; }
.footer__link {
  position: relative;
  font-size: 14px;
  color: var(--color-text);
  transition: opacity 0.2s;
}
.footer__link:hover { opacity: 0.6; }
.footer__list--sub .footer__link { padding-left: 14px; }
.footer__list--sub .footer__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--color-accent);
  border-right: 1.5px solid var(--color-accent);
  transform: translateY(-50%) rotate(45deg);
}
.footer__copy {
  margin-top: 36px;
  text-align: right;
  font-size: 12px;
  color: var(--color-text);
}

/* ===== SP footer（簡易） ===== */
.footer__sp { display: none; }

/* =========================================================
   レスポンシブ（SP : max-width 750px）
   ========================================================= */
@media (max-width: 750px) {
  .pc-only { display: none; }
  .sp-only { display: block; }
  .br-sp { display: inline; }

  /* SP全体の装飾は1枚背景に集約（個別装飾の崩れ回避） */
  body {
    background: var(--color-bg) url(../img/bg-sp.svg) top center / 100% auto repeat-y;
  }

  .section { padding-top: 54px; padding-bottom: 54px; }

  /* header */
  .header__inner {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    min-height: 50px;
  }
  .header__logo { font-size: 16px; text-align: left; }
  .gnav { display: none; }
  .hamburger { display: block; }

  /* floating CTA は SP では非表示（ドロワーに集約） */
  .float-cta { display: none; }

  /* footer */
  .footer__pc { display: none; }
  .footer__sp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    padding: 24px 20px 28px;
    text-align: left;
  }
  .footer__sp .footer__logo { font-size: 18px; }
  .footer__sp .footer__insta {
    margin-left: auto;
    width: 26px;
    height: 26px;
  }
  .footer__sp .footer__insta img { width: 100%; height: 100%; }
  .footer__sp .footer__copy { flex-basis: 100%; margin-top: 14px; text-align: left; }
}
