/* seikazui mobile fix v5 */

/* ===== ハンバーガーメニュー（全幅共通）===== */
/* toggled-onクラス追加時に表示（メディアクエリ外 = 全幅で有効） */
.ast-mobile-header-content.toggled-on {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  max-height: none !important;
  background-color: #1a2744 !important;
  width: 100% !important;
  position: relative !important;
  z-index: 9998 !important;
}
.ast-mobile-header-content.toggled-on a,
.ast-mobile-header-content.toggled-on .menu-link {
  color: #ffffff !important;
  display: block !important;
  padding: 12px 20px !important;
}
.ast-mobile-header-content.toggled-on .sub-menu {
  background-color: #243560 !important;
  display: none;
}
.ast-mobile-header-content.toggled-on .sub-menu.toggled-on {
  display: block !important;
}

/* Astra body classで開いた状態 */
.ast-main-header-nav-open .ast-mobile-header-content,
body.ast-nav-toggled .ast-mobile-header-content {
  display: block !important;
  visibility: visible !important;
}

/* ===== PC: ヘッダーグリッドレイアウト ===== */
.ast-builder-grid-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 70px !important;
}
.site-header-primary-section-left,
.site-header-primary-section-right,
.ast-builder-layout-element {
  display: flex !important;
  align-items: center !important;
}
.main-header-menu {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 30px !important;
  align-items: center !important;
}
.main-header-menu > .menu-item > a {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 16px !important;
}

/* ===== スマホ専用 ===== */
@media (max-width: 921px) {
  header#masthead > .ast-primary-header-bar,
  header#masthead > .ast-above-header-bar {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  #ast-mobile-header {
    display: block !important;
    visibility: visible !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }
  #ast-mobile-header .ast-primary-header-bar,
  #ast-mobile-header .main-header-bar {
    display: block !important;
    min-height: 60px !important;
    background-color: #1a2744 !important;
  }
  #ast-mobile-header .ast-builder-grid-row,
  #ast-mobile-header .ast-main-header-wrap,
  #ast-mobile-header .main-header-bar-wrap {
    display: flex !important;
    min-height: 60px !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
    background-color: #1a2744 !important;
  }
  #ast-mobile-header .site-header-primary-section-left,
  #ast-mobile-header .site-header-primary-section-right,
  #ast-mobile-header .ast-builder-layout-element,
  #ast-mobile-header .ast-button-wrap,
  #ast-mobile-header .menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #ast-mobile-header .menu-toggle {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .elementor-invisible { visibility: visible !important; opacity: 1 !important; }
}

/* ===== モバイルメニュー overflow修正 ===== */
/* posistion:sticky のクリッピングを防ぐ */
#ast-mobile-header {
  overflow: visible !important;
}

/* メニューコンテンツのz-indexと位置 */
.ast-mobile-header-content,
.ast-mobile-header-wrap .ast-mobile-header-content {
  z-index: 9998 !important;
  overflow: visible !important;
}

/* body に ast-main-header-nav-open が付いた時のメニュー表示強化 */
.ast-main-header-nav-open .ast-mobile-header-wrap .ast-mobile-header-content {
  display: block !important;
  visibility: visible !important;
  position: absolute !important;
  width: 100% !important;
  left: 0 !important;
  z-index: 9998 !important;
}

.ast-main-header-nav-open.ast-header-break-point .ast-mobile-header-wrap .ast-mobile-header-content {
  display: block !important;
  visibility: visible !important;
}

/* メニュー文字色（白） */
.ast-mobile-header-content .menu-link,
.ast-mobile-header-content a {
  color: #ffffff !important;
}
.ast-mobile-header-content {
  background-color: #1a2744 !important;
}
