:root {
  --height__h-rose-top-menu-height: 66px;
  --height__h-rose-main-menu-height: 66px;
  --height__h-rose-top-menu-height-mobile: 56px;
  --height__h-rose-main-menu-height-mobile: 56px;
  --height__h-marguerite-middle-menu-height-mobile: 140px;
  --color__h-rose-top-menu-background: #FFFFFF;
  --color__h-rose-top-menu-border: #F0F2F5;
  --color__h-rose-main-menu-background: #FFFFFF;
  --color__h-rose-main-menu-border: #F0F2F5;
  --color__h-marguerite-middle-menu-background: #FFFFFF;
  --color__h-marguerite-middle-menu-border: transparent;
}

/* ----- メインメニュー＋サブメニューのフォント ----- */
.custom-top-nav li a,
.custom-top-nav li ul li a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

/* ----- トップメニュー ----- */
.beeteam368-top-menu {
  background-color: var(--color__h-rose-top-menu-background);
  border-bottom: 1px solid var(--color__h-rose-top-menu-border);
  position: relative;
  z-index: 7;
  width: 100%;
}
.beeteam368-top-menu-row {
  min-height: var(--height__h-rose-top-menu-height);
}

/* ----- メインメニュー ----- */
.beeteam368-main-menu {
  box-shadow: 0px 1px 8px 1px var(--color__global-box-shadow);
  -webkit-box-shadow: 0px 1px 8px 1px var(--color__global-box-shadow);
  background-color: var(--color__h-rose-main-menu-background);
  width: 100%;
  position: relative;
  z-index: 5;
}
.beeteam368-main-menu-row {
  min-height: var(--height__h-rose-main-menu-height);
  display: flex;
  align-items: center;
}

/* ----- ミドルメニュー ----- */
.beeteam368-middle-menu {
  background-color: var(--color__h-marguerite-middle-menu-background);
  position: relative;
  z-index: 6;
  width: 100%;
}
.beeteam368-middle-menu-row {
  min-height: var(--height__h-marguerite-middle-menu-height);
  padding-top: 12px;
}

/* ----- ロゴ ----- */
.beeteam368-logo-wrap { text-align: left; }

/* ----- 検索ボックス（PC） ----- */
.beeteam368-searchbox { flex: 1; }
.beeteam368-searchbox .beeteam368-searchbox-wrap {
  transition: all 0.3s ease-in-out;
}

/* ----- モバイル検索アイコン＆ポップアップ ----- */
.beeteam368-searchbox-mobile {
  display: none; /* デフォルト非表示 */
  align-items: center;
}
.beeteam368-searchbox-popup {
  display: none;              /* 初期非表示 */
  position: fixed;            /* 画面固定 */
  top: 0;                     /* 画面上端 */
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  z-index: 999999;
  justify-content: flex-start; /* 上端に配置 */
  align-items: flex-start;
  overflow-y: auto;
  padding-top: 20px;
  box-sizing: border-box;
}
.beeteam368-searchbox-popup .beeteam368-searchbox-wrap {
  width: 90%;
  max-width: 400px;
  margin: 0 auto; /* 横中央寄せ */
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.7);
  box-sizing: border-box;
}
.beeteam368-search-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #fff;
}

/* ----- カスタムトップメニュー ----- */
.custom-top-nav {
  width: 100%;
  background-color: transparent;
  border-top: 1px solid #000;
}
.custom-top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.custom-top-nav li { margin: 0 15px; display: flex; align-items: center; justify-content: center; position: relative; }
.custom-top-nav li a {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff; font-weight: 500;
  font-size: 15px; padding: 10px 15px;
  transition: color 0.3s, border-bottom 0.3s;
  border-bottom: 2px solid transparent;
}
.custom-top-nav li a:hover { color: #1e63a2; border-bottom: 2px solid #1e63a2; }
.custom-top-nav li.current-menu-item > a,
.custom-top-nav li.current_page_item > a,
.custom-top-nav li.current-menu-ancestor > a {
  color: #1e63a2;
  border-bottom: 2px solid #1e63a2;
}
.custom-top-nav li ul {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #222; width: 200px;
  border-radius: 8px; padding: 8px 0;
  flex-direction: column; z-index: 1000;
  text-align: center; opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}
.custom-top-nav li:hover > ul { display: flex; opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.custom-top-nav li ul li a { display: block; padding: 10px 15px; color: #fff; text-decoration: none; font-size: 14px; transition: background 0.3s, color 0.3s; }
.custom-top-nav li ul li a:hover { background-color: #1e63a2; color: #fff; }

/* ----- モバイル用 ----- */
@media (max-width: 991px) {
  .custom-top-nav ul { flex-direction: row; flex-wrap: wrap; }
  .custom-top-nav li { margin: 0 0; }
  .custom-top-nav li a { padding: 10px 12px; font-size: 14px; }
  .custom-top-nav li ul { position: absolute; top: 100%; left: 0; }

  .beeteam368-searchbox { display: none !important; }       /* PC用フォーム非表示 */
  .beeteam368-searchbox-mobile { display: flex !important; } /* アイコン表示 */

  .beeteam368-logo { display: none !important; }
  .beeteam368-logo-mobile { display: flex !important; flex: 1; text-align: center; max-width: 60%; }
  .beeteam368-logo-mobile .beeteam368-logo-img { max-width: 100%; height: auto; }

  .beeteam368-main-menu-row { justify-content: center !important; position: relative; }
  .beeteam368-sidemenu-btn { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }

  .beeteam368-searchbox-mobile {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    max-width: 35%; width: auto;
  }
  .beeteam368-searchbox-mobile .beeteam368-searchform { display: flex; width: 100%; }
  .beeteam368-searchbox-mobile input.beeteam368-searchtext { width: 100%; min-width: 80px; box-sizing: border-box; }

  .mobile-active .beeteam368-main-menu { position: fixed; top: var(--height__top-bar); left: 0; right: 0; z-index: 99999; }
}

/* ----- PC用 ----- */
@media (min-width: 992px) {

  .beeteam368-searchbox-popup {
    display: none;       /* 初期は非表示 */
    position: fixed;     /* 画面固定 */
    top: 0;              /* 画面上端 */
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 999999;     /* かなり前面 */
    justify-content: flex-start;
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 20px;
  }
  .beeteam368-searchbox-popup .beeteam368-searchbox-wrap {
    margin: 0 auto;      /* 横中央寄せ */
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }
  .beeteam368-logo-mobile,
  .beeteam368-searchbox-mobile { display: none !important; } /* PCでは非表示 */
  .beeteam368-logo,
  .beeteam368-searchbox { display: block !important; }      /* PC用フォーム表示 */
}
