/* =========================
   トップ
========================= */

/* トップページの yStandard ページヘッダーを完全に消す */
.home .c-page-header,
.home .page-header,
.home .entry-header {
  display: none !important;
}

/* トップページ：ヘッダー直下の余白を完全に消す */
.home #content.site-content {
  margin-top: 0 !important;
  margin-bottom : 0!important;
  padding-top: 0 !important;
}

/* トップページだけヘッダー高さ分の余白を無効化 */
.home {
  --header-height: 0px;
}

/* =========================
   スマホ：ヘッダー調整
========================= */
@media (max-width: 768px) {
  .global-nav__toggle .ys-icon,
  .global-nav__toggle svg {
    width: 30px !important;
    height: 30px !important;
  }

  .global-nav__search {
    display: block;
    z-index: 0;
    position: relative;
    margin: 0 0 1em;
    border: 0 !important;
    background-color: var(--mobile-nav-bg);
  }

  /* ヘッダー背景 */
  .site-header--custom {
    background: #faf4f2;
  }

  /* ヘッダー中身 */
  .site-header__content--custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    box-sizing: border-box;
  }

  /* ロゴ（画像） */
  .site-header__content--custom .site-logo img,
  .site-header__content--custom .custom-logo {
    max-height: 40px;
    width: auto;
  }
}

/* =========================
   スマホメニュー内：サイド内容
========================= */

.sp-menu-widgets-area {
  margin-top: 32px;
  padding: 0 20px;
}

.sp-menu-widget {
  margin-bottom: 28px;
}

.sp-menu-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 0.05em;
}

/* =========================
   スマホメニュー内：ナビ完全修正
========================= */
@media (max-width: 768px) {

  /* ウィジェットエリア */
  .sp-menu-widgets-area {
    margin-top: 32px;
    padding: 0 20px 40px;
  }

  .sp-menu-widget {
    margin-bottom: 32px;
  }

  /* タイトル */
  .sp-menu-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
  }

  /* ★ グローバルナビCSSを完全に無効化 */
  .sp-menu-widget .menu,
  .sp-menu-widget .menu li,
  .sp-menu-widget .menu li a {
    all: unset;
    box-sizing: border-box;
  }

  /* 縦リストとして再定義 */
  .sp-menu-widget .menu {
    display: block;
    width: 100%;
  }

  .sp-menu-widget .menu li {
    display: block;
    width: 100%;
    border : 0px!important;
  }

  .sp-menu-widget .menu li a {
    display: block;
    width: 100%;
    padding: 14px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 0px dotted rgba(255,255,255,0.35);
  }

  .sp-menu-widget .menu li:last-child a {
    border-bottom: none;
  }

  /* 現在ページ */
  .sp-menu-widget .menu li.current-menu-item a {
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
  }

  /* 最近の投稿 */
  .sp-menu-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .sp-menu-widget ul li {
    margin-bottom: 10px;
    text-align: center;
  }

  .sp-menu-widget ul li a {
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
  }
}

/* =========================
   スマホメニュー：ボタン化を完全解除
========================= */
@media (max-width: 768px) {

  /* CTA・ボタン系の影響を除外 */
  .sp-menu-widget .menu li a {
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* nth-child系の誤爆対策 */
  .sp-menu-widget .menu li:nth-child(1) a,
  .sp-menu-widget .menu li:nth-child(2) a {
    background: none !important;
    color: #ffffff !important;
    width: 100% !important;
  }
}

/* =========================
   スマホメニュー：最上部CTAを50%ずつ
========================= */
@media (max-width: 768px) {

  /* 上の2ボタンを包んでいる ul */
  #global-nav__menu {
    display: flex !important;
    gap: 10px;
    margin: 24px 20px 32px;
  }

  #global-nav__menu > li {
    flex: 1;
    margin: 0;
  }

  #global-nav__menu > li > a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
  }
}

/* グローバルナビ hover */
.global-nav__menu > .menu-item > a::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  content: "";
  transition: width .3s;
}

/* =========================
   PC: スマホヘッダー調整を無効化
========================= */
@media (min-width: 769px) {
  .sp-menu-widget {
    display: none;
  }
}

/* FV共通CTA */
.fv-cta {
  margin-top: 20px;
  text-align: center;
}

.fv-cta-btn {
  display: inline-block;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background: #cc0000;
  text-decoration: none;
  border-radius: 999px;
}

/* スマホ */
@media (max-width: 768px) {
  .fv-cta-btn {
    width: 100%;
    max-width: 320px;
  }
}
