/* ============================================================
   2026-10-30 グロナビの案1（野田さん：案1で実装して提案。今のヘッダーにある要素は残す〈イベント・セミナーも〉）
   header.php の header.is-nav-new のときだけ効く（pdb_renewal_is_live( 'nav' )。公開前はステージングと手元）。
   ・ヘッダーの上に細い帯：電話番号2つ・ログイン（PC。下の .pdbh-buttons の同じものは PC では出さない）
   ・右のボタン：［イベント・セミナー］［資料ダウンロード］（塗り）［お問い合わせ］。イベント・セミナーは入る幅（1360px 以上）で出す（今は 1441px 以上だけ）
   ・スマホ：帯は出さず、ヘッダーのバーに［資料ダウンロード］。メニューの下のボタンは、資料ダウンロード・ログイン・イベント・セミナー・メール・電話
   ・今のヘッダーより 36px 高くなる（帯の分）ので、PC ではページの中身（header の後ろの main）を 36px 下げる
============================================================ */

/* ---------- 上の細い帯 ---------- */
header.is-nav-new .pdbh-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  height: 36px;
  padding: 0 40px;
  background-color: #0E1E4F;
  color: white;
  font-size: 0.75rem;
  line-height: 1;
}
header.is-nav-new .pdbh-topbar a {
  color: inherit;
}
header.is-nav-new .pdbh-topbar-right {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 20px;
}
header.is-nav-new .pdbh-topbar-tel {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}
header.is-nav-new .pdbh-topbar-tel small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.6875rem;
}
header.is-nav-new .pdbh-topbar-tel a {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
header.is-nav-new .pdbh-topbar-login {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 14px;
  border-radius: 12px;
  background-color: white;
  color: #0E1E4F !important;
  font-size: 0.75rem;
  font-weight: 700;
}
@media (max-width: 1380px) {
  header.is-nav-new .pdbh-topbar {
    padding: 0 1.5rem;
  }
}
@media (max-width: 1200px) {
  header.is-nav-new .pdbh-topbar {
    padding: 0 20px;
  }
  header.is-nav-new .pdbh-topbar-right {
    gap: 14px;
  }
}

/* ---------- 右のボタン ---------- */
header.is-nav-new .pdbh-buttons #header-document {
  display: flex;
  align-items: center;
  gap: 6px;
}
header.is-nav-new .pdbh-buttons #header-document::before {
  content: "";
  width: 15px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pdbh-sp-document {
  display: none;
}
@media (min-width: 1081px) {
  /* 電話番号とログインは上の帯へ移したので、下では出さない */
  header.is-nav-new .pdbh-buttons .contact-tels,
  header.is-nav-new .pdbh-buttons #header-login {
    display: none;
  }
}
@media (min-width: 1360px) {
  /* イベント・セミナー：今のテーマは 1440px 以下で隠すが、帯へ移した分の場所があるので 1360px 以上で出す（1281px ではメニューとくっついた） */
  header.is-nav-new .pdbh-buttons #header-seminar {
    display: flex;
  }
}
/* 狭い PC：ボタンとメニューの余白を詰める */
@media (max-width: 1280px) and (min-width: 1081px) {
  header.is-nav-new .pdbh-buttons .button {
    padding: 0 1rem;
  }
}
@media (max-width: 1140px) and (min-width: 1081px) {
  header.is-nav-new .pdbh-menu .menu-name {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
  }
}

/* ---------- スマホ（1080px 以下） ---------- */
@media (max-width: 1080px) {
  header.is-nav-new .pdbh-topbar {
    display: none;
  }
  header.is-nav-new .pdbh-inner {
    position: relative;
  }
  header.is-nav-new .pdbh-logo img {
    width: 150px;   /* バーの資料ダウンロードのボタンと重ならないように */
  }
  header.is-nav-new .pdbh-sp-document {
    display: inline-flex;
    position: absolute;
    top: 50%;
    right: 60px;
    z-index: 3;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    background-color: #4458B2;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    transform: translateY(-50%);
  }
  /* メニューの下のボタン：資料ダウンロードを先頭に足すので、場所を広げて上に詰める。塗りは資料ダウンロードだけ、ログインは枠線 */
  header.is-nav-new .pdbh-menu {
    height: calc(100% - 270px);
  }
  header.is-nav-new .pdbh-buttons {
    height: 270px;
    align-content: flex-start;
  }
  header.is-nav-new .pdbh-buttons #header-document {
    order: 0;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  header.is-nav-new .pdbh-buttons #header-login {
    border: 1px solid #4458B2;
    background: white;
    color: #4458B2;
  }
}

/* ---------- ページの中身を帯の分だけ下げる（PC。ヘッダーは固定なので、下げないと各ページの上が帯の分だけ隠れる） ---------- */
@media (min-width: 1081px) {
  header.is-nav-new ~ main {
    padding-top: 36px;
  }
}

/* ---------- 2026-11-05 幅 1801px 以上で、右のメニューのドロップダウンが画面の右で切れる ----------
   style.css は 1800px 以下でしか中央に寄せておらず、1801px 以上はメニューの左端から幅 1280px で開く（今の本番も同じ）。
   切れる幅の間だけ、右に寄せて画面に収める。上限の幅は、寄せてもメニューの真下に開く範囲（これより広いと切れない）。 */
@media (min-width: 1801px) and (max-width: 1890px) {
  header.is-nav-new .pdbh-menu > li:nth-last-child(3) .menu-content {
    left: auto;
    right: 16px;
  }
}
@media (min-width: 1801px) and (max-width: 2014px) {
  header.is-nav-new .pdbh-menu > li:nth-last-child(2) .menu-content {
    left: auto;
    right: 16px;
  }
}
@media (min-width: 1801px) and (max-width: 2112px) {
  header.is-nav-new .pdbh-menu > li:nth-last-child(1) .menu-content {
    left: auto;
    right: 16px;
  }
}
