/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/

/* ==============================================================================
   目次（このファイルにすべて集約。追加CSSは空にする）
   1. 全体設定
   2. ヘッダー・ロゴ・スティッキーヘッダー
   3. メインメニュー（Mega Menu）
   4. 体験申込みボタン（メニュー内 PC／スマホ）
   5. ハンバーガーメニュー（スマホ）
   6. トップビジュアル（画像・キャッチコピー・キャラクター・スマホ用ボタン）
   7. お知らせ・レイアウト部品
   8. コンタクトフォーム
   9. 保護者登録フォーム
   10. 一般向けお知らせ（ショートコード）
============================================================================== */


/* =========================
   1. 全体設定
========================= */

body {
  font-family: "Noto Sans JP", sans-serif;
  color: #333;
  background-color: #FFFFFA !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2, h3 {
  color: #003366;
}

a {
  color: #003366;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ページタイトル非表示 */
.entry-title {
  display: none;
}

/* ヘッダー下の高さ調整 */
.site {
  padding-top: 30px;
}

@media (max-width: 921px) and (min-width: 768px) {
  .site {
    padding-top: 180px;
  }
}

@media (max-width: 767px) {
  .site {
    padding-top: 90px;
  }
}


/* =========================
   2. ヘッダー・ロゴ・スティッキーヘッダー
========================= */

/* ヘッダー背景色 */
.site-header,
.main-header-bar,
#masthead,
.ast-primary-header-bar {
  background-color: #fffffA !important;
}

/* PC：ロゴとタグラインの幅を揃える */
@media (min-width: 1025px) {
  .site-branding.ast-site-identity {
    width: 330px;
  }

  .site-branding.ast-site-identity .site-description {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
  }
}

/* スティッキーヘッダー（動きはPHP側のJSで制御） */
#masthead {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background-color 0.35s ease;
}

/* 下スクロールで隠す */
#masthead.header-hidden {
  transform: translateY(-120%);
}

/* 上スクロールで表示 */
#masthead.header-scrolled {
  transform: translateY(0);
  background: #fffffa;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}


/* =========================
   3. メインメニュー（Astra + Mega Menu）
========================= */

/* メニュー全体 */
#mega-menu-wrap-primary {
  background: transparent !important;
  border-bottom: 0px solid #e0e0e0;
}

/* メニュー項目 */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
  background: transparent !important;
  color: #333 !important;
  font-size: 15px;
  font-weight: 700;
  min-width: 90px;
  height: 42px;
  line-height: 42px;
  border-radius: 0;
  text-align: center;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px;
  position: relative !important;
}

/* メニューを横並びにし、体験申込みボタンを右端へ */
#mega-menu-wrap-primary #mega-menu-primary {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

/* 縦線（ボタン間） */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item {
  position: relative !important;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item:not(:last-child)::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  right: 0 !important;
  transform: translateY(-50%) !important;
  width: 1px !important;
  height: 20px !important;
  background: #ccc !important;
  z-index: 999 !important;
  display: block !important;
}

/* ホバー時テキスト色 */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover {
  background: transparent !important;
  color: #4693f5 !important;
}

/* 下線アニメ（通常時は非表示） */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link::before {
  content: "" !important;
  position: absolute !important;
  bottom: 4px !important;
  left: 0 !important;
  width: 0 !important;
  height: 2px !important;
  background: #4693f5 !important;
  transition: width .25s ease !important;
  display: block !important;
}

/* ホバー時に下線を伸ばす */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover::before {
  width: 100% !important;
}

/* アクティブページ */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item.current-menu-item > a.mega-menu-link,
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item.current > a.mega-menu-link {
  color: #4693f5 !important;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item.current-menu-item > a.mega-menu-link::before,
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item.current > a.mega-menu-link::before {
  width: 100% !important;
}

/* サブメニュー背景 */
#mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu {
  background: #545aa8 !important;
}

/* サブメニュー 通常時 */
#mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
  background: #545aa8 !important;
  color: #ffffff !important;
}

/* サブメニュー ホバー時 */
#mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:hover {
  background: #fbbf24 !important;
  color: #1e3a8a !important;
}

/* サブメニュー仕切り線 */
#mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
  border-bottom: 1px solid rgba(255,255,255,0.35) !important;
}

/* 最後の項目は線なし */
#mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu li.mega-menu-item:last-child > a.mega-menu-link {
  border-bottom: none !important;
}

/* 教室一覧 サブメニュー上下幅（PC） */
@media (min-width: 769px) {
  #mega-menu-wrap-primary .mega-sub-menu li a {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 1.4 !important;
  }
}

/* 教室一覧 サブメニュー上下幅（スマホ） */
@media (max-width: 768px) {
  #ast-hf-mobile-menu .sub-menu li a {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 1.4 !important;
  }
}


/* =========================
   4. 体験申込みボタン（メニュー項目ID：395）
========================= */

/* 右端に寄せる */
#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 {
  margin-left: auto !important;
  padding-left: 24px !important;
  display: flex !important;
  align-items: center !important;
}

/* ボタン本体（PC） */
#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #1e3a8a !important;
  border-radius: 9999px !important;
  padding: 12px 32px !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-width: 160px !important;
  line-height: 1.4 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.3s !important;
}

/* キラッ光の演出 */
#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link::after {
  content: '' !important;
  position: absolute !important;
  top: -50% !important;
  left: -100% !important;
  width: 200% !important;
  height: 200% !important;
  background: rgba(255, 255, 255, 0.3) !important;
  transform: rotate(45deg) !important;
  transition: 0.6s !important;
  display: block !important;
}

/* ホバーでキラッ＋浮き上がり */
#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6) !important;
  color: #1e3a8a !important;
}

#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link:hover::after {
  left: 100% !important;
}

/* アンダーバー完全消去 */
#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link::before {
  display: none !important;
  width: 0 !important;
  background: none !important;
}

/* 自動アピール（JSから auto-shine クラスが付く） */
#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link.auto-shine {
  transform: scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6) !important;
}

#mega-menu-wrap-primary #mega-menu-primary li#mega-menu-item-395 a.mega-menu-link.auto-shine::after {
  left: 100% !important;
}

/* スマホ表示の体験申込みボタン */
#ast-hf-mobile-menu li#menu-item-395 a.menu-link {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #1e3a8a !important;
  border-radius: 9999px !important;
  padding: 12px 32px !important;
  font-weight: 900 !important;
  display: block !important;
  text-align: center !important;
  margin: 8px 0 !important;
  width: calc(100% - 24px) !important;
  margin-left: 12px !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4) !important;
  text-decoration: none !important;
}

#ast-hf-mobile-menu li#menu-item-395 a.menu-link:hover {
  transform: scale(1.05) !important;
  color: #1e3a8a !important;
}


/* =========================
   5. ハンバーガーメニュー（スマホ）
========================= */

.ast-button-wrap .menu-toggle {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 4px !important;
  min-width: 44px !important;
  width: 44px !important;
  height: 44px !important;
}

.ast-button-wrap .menu-toggle::after {
  content: "MENU";
  display: block;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  margin-top: 5px;
}


/* =========================
   6. トップビジュアル
========================= */

/* TOP画像（フル幅＋高さ） */
.top-visual {
  position: relative;
  height: 80vh;
  overflow: visible;        /* バナーの下にキャラがはみ出せるようにする */
  z-index: 20;              /* 下の内容よりバナー（とキャラ）を手前に出す */
  margin-bottom: 70px;      /* キャラのはみ出し量より少し大きくする（PC） */

  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 背景レイヤー（枠） */
.top-visual-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;

  opacity: 0;
  transition: opacity 1s ease;
}

.top-visual-bg.active {
  opacity: 1;
}

/* 中身（ここだけズーム） */
.bg-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;

  transform-origin: center;
  animation: zoom 12s ease-in-out infinite alternate;
}

/* 2枚目のズームずらし */
.bg2 .bg-inner {
  animation-delay: 6s;
}

/* テキストとキャラを入れる枠（背景の上に重ねる） */
.top-visual-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

/* キャッチコピー */
.top-visual-text {
  position: absolute;
  left: 5%;                 /* ← 左からの距離 */
  top: 75%;                 /* ← 上下位置 */
  transform: translateY(-50%);
  color: #fff;
  font-size: 36px;          /* ← 文字サイズ */
  font-weight: bold;
  line-height: 1.5;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);

  opacity: 0;
  animation: fadeIn 2s ease 0.5s forwards;
}

/* キャラクター（サイズ・位置はここだけで調整） */
.top-visual-character {
  /* ▼ PC用：ここの数字を変えて調整 ▼ */
  --char-width:  250px;  /* 大きさ（横幅） */
  --char-right:  40%;     /* 右からの距離（大きいほど左へ） */
  --char-bottom: -50px;  /* 下からの距離（マイナス＝バナーの下へはみ出す／大きいほど上へ） */

  position: absolute;
  right: var(--char-right);
  bottom: var(--char-bottom);
  width: var(--char-width);
  z-index: 3;
}

.top-visual-character img {
  width: 100%;
  height: auto;
  display: block;
}

/* フェード */
@keyframes fadeIn {
  to { opacity: 1; }
}

/* PCズーム */
@keyframes zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

/* スマホ */
@media (max-width: 768px) {

  .bg-inner {
    animation: pan 12s ease-in-out infinite alternate;
    transform: none !important;

    background-size: cover;
    background-position: center;
  }

  @keyframes pan {
    from { background-position: 50% 40%; }
    to   { background-position: 50% 60%; }
  }

  .top-visual {
    height: 60vh;
    margin-bottom: 50px;    /* キャラのはみ出し量より少し大きくする（スマホ） */
  }

  .top-visual-text {
    font-size: 20px;
    left: 5%;
    top: 40%;
    padding: 0;
    max-width: 60%;
  }

  .top-visual-character {
    /* ▼ スマホ用：ここの数字を変えて調整 ▼ */
    --char-width:  110px;
    --char-right:  2%;
    --char-bottom: -30px;
  }
}

/* --- メインビジュアル専用 体験申込みボタン --- */

/* PCでは表示しない */
@media (min-width: 1025px) {
  .top-visual-sp-button {
    display: none;
  }
}

/* スマホ・タブレット */
@media (max-width: 1024px) {
  .top-visual-sp-button {
    position: absolute;
    left: 50%;
    top: 66%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 240px;
    text-align: center;
  }

  .top-visual-sp-button a {
    display: block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e3a8a;
    font-size: 18px;
    font-weight: 900;
    padding: 15px 22px;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(251,191,36,.45);
    position: relative;
    overflow: hidden;
    animation: spButtonJump 2.8s infinite;
  }

  .top-visual-sp-button a:hover {
    color: #1e3a8a;
  }
}

/* ボタン演出（ぴょこっと拡大） */
@keyframes spButtonJump {
  0%   { transform: scale(1); }
  8%   { transform: scale(1.08); }
  16%  { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ボタン演出（光が走る） */
.top-visual-sp-button a::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -120%;
  width: 70%;
  height: 200%;
  background: rgba(255,255,255,.45);
  transform: rotate(25deg);
  animation: shineMove 3s infinite;
}

@keyframes shineMove {
  0%   { left: -120%; }
  20%  { left: 140%; }
  100% { left: 140%; }
}


/* キャラクターの動き */
.top-visual-character img {
  width: 100%;
  height: auto;
  display: block;
  animation: charFloat 3s ease-in-out infinite;
}

@keyframes charFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* =========================
   7. お知らせ・レイアウト部品
========================= */

.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  margin-bottom: 8px;
}

.news-list span {
  color: #999;
  margin-right: 10px;
}

.columns {
  display: flex;
  gap: 20px;
}

.column {
  flex: 1;
  border: 1px solid #eee;
  padding: 15px;
}

.button {
  display: inline-block;
  padding: 8px 12px;
  background: #003366;
  color: #fff;
  font-size: 13px;
}


/* =========================
   8. コンタクトフォーム
========================= */

/* フォーム全体 */
.contact1 {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  border-collapse: collapse;
  border: 2px solid #d8e5f2;
  background: #fff;
  font-size: 15px;
}

/* 必須・任意ラベル */
.hissu {
  display: inline-block;
  font-size: 10px;
  padding: 3px 10px;
  background: #ff7f50;
  color: #fff;
  border-radius: 3px;
  margin-right: 8px;
}

.ninni {
  display: inline-block;
  font-size: 10px;
  padding: 3px 10px;
  background: #4682b4;
  color: #fff;
  border-radius: 3px;
  margin-right: 8px;
}

/* 左側（項目名） */
.contact1 th {
  width: 240px;
  padding: 15px;
  background: #eef6ff;
  border-bottom: 2px solid #d8e5f2;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
  font-weight: 600;
}

/* 補足説明 */
.contact1 th .sub-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
  font-weight: normal;
  line-height: 1.5;
}

/* 右側（入力欄） */
.contact1 td {
  padding: 15px;
  background: #f5faff;
  border-bottom: 2px solid #d8e5f2;
  vertical-align: top;
  line-height: 1.8;
}

/* 入力欄 */
.contact1 input,
.contact1 select,
.contact1 textarea {
  max-width: 100%;
  box-sizing: border-box;
}

/* PC・タブレット（768px以上）のみ：入力枠幅 */
@media (min-width: 768px) {
  .contact1 input.w20  { width: 20% !important; }
  .contact1 input.w30  { width: 30% !important; }
  .contact1 input.w50  { width: 50% !important; }
  .contact1 input.w70  { width: 70% !important; }
  .contact1 input.w100 { width: 100% !important; }
  .contact1 input.w200 { width: 200px !important; }

  .contact1 select.w20  { width: 20% !important; }
  .contact1 select.w30  { width: 30% !important; }
  .contact1 select.w50  { width: 50% !important; }
  .contact1 select.w70  { width: 70% !important; }
  .contact1 select.w100 { width: 100% !important; }
  .contact1 select.w200 { width: 200px !important; }
}

/* プレースホルダー色 */
.contact1 ::placeholder {
  color: #b8b8b8;
  opacity: 1;
}

.kiboubi-wrap {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.kiboubi-wrap input[type="date"] {
  width: 180px;
}

.kiboubi-wrap select {
  width: 100px;
}

.birth-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.birth-wrap select:nth-child(1) {
  width: 140px;
}

.birth-wrap select:nth-child(2),
.birth-wrap select:nth-child(3) {
  width: 90px;
}

/* テキストエリア */
.contact1 textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
}

/* フォーカス */
.contact1 input:focus,
.contact1 select:focus,
.contact1 textarea:focus {
  outline: none;
  border-color: #ff7f50;
  box-shadow: 0 0 5px rgba(255,127,80,.25);
}

/* スマホのみカレンダーアイコン表示 */
@media (max-width: 768px) {
  .date-icon-wrap {
    position: relative;
    display: inline-block;
  }

  .date-icon-wrap::after {
    content: "📅";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    pointer-events: none;
  }

  .date-icon-wrap input[type="date"] {
    padding-right: 45px;
  }
}

/* ラジオボタン */
.contact1 .wpcf7-list-item {
  display: inline-block;
  margin: 0 20px 8px 0;
}

.contact1 .wpcf7-list-item-label {
  margin-left: 6px;
}

/* 送信ボタン */
.wpcf7-submit {
  display: block;
  width: 260px;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 14px;
  border: none;
  border-radius: 6px;
  background: #F9C233;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: .2s;
}

.wpcf7-submit:hover {
  background: #ffdb7d !important;
}

/* スケジュールリンク */
.schedule-links a {
  display: inline-block;
  margin: 4px 16px 4px 0;
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.schedule-links a:hover {
  color: #ff7f50;
  text-decoration: underline;
}

/* スマホ（500px以下） */
@media (max-width: 500px) {

  .contact1,
  .contact1 tbody,
  .contact1 tr,
  .contact1 th,
  .contact1 td {
    display: block;
    width: 100%;
  }

  .contact1 {
    border: none;
    margin: 0 auto;
  }

  .contact1 th {
    padding: 12px 10px 6px;
    border: none;
  }

  .contact1 td {
    padding: 0 10px 15px;
    border-bottom: 1px solid #d8e5f2;
  }

  .contact1 input,
  .contact1 select,
  .contact1 textarea {
    width: 100%;
  }

  .contact1 select {
    min-width: 0;
  }

  .contact1 .wpcf7-list-item {
    display: block;
    margin-bottom: 10px;
  }

  .contact1 th .sub-text {
    font-size: 11px;
  }
}


/* =========================
   9. 保護者登録フォーム
========================= */

.sanraku-register-form {
  max-width: 500px;
  margin: 30px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0,0,0,.1);
}

.sanraku-register-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.sanraku-register-form input,
.sanraku-register-form select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.sanraku-register-form input[type="submit"] {
  background: #fbbf24;
  color: #1e3a8a;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
}


/* =========================
   10. 一般向けお知らせ（ショートコード）
========================= */

.sanraku-simple-news,
.sanraku-no-news {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px 20px;
  background: #fff;
}

.sanraku-simple-news::before,
.sanraku-no-news::before {
  content: "お知らせ";
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.sanraku-simple-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sanraku-simple-news-item {
  border-bottom: 1px solid #ddd;
}

.sanraku-simple-news-link {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
}

.sanraku-simple-news-date {
  color: #777;
  min-width: 90px;
  font-size: 14px;
}

.sanraku-simple-news-title {
  flex: 1;
}

.sanraku-simple-news-more {
  text-align: right;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .sanraku-simple-news-link {
    flex-direction: column;
    gap: 2px;
  }

  .sanraku-simple-news-date {
    min-width: 0;
  }
}