/* ウイルネット共通ヘッダ・フッタ
   本体（TCDテーマ style.css / style_pc.css / style_sp.css / japanese.css）の値に合わせています。
   すべて .wn-header / .wn-footer の中に閉じているため、サブページ側テーマのCSSとは干渉しにくい構成です。 */
:root {
  --wn-primary: #477093;     /* グローバルメニュー・コピーライト帯（#global_menu / #copyright） */
  --wn-link: #333;           /* a, a:visited */
  --wn-link-hover: #00a2d9;  /* a:hover */
  --wn-text: #333;
  --wn-line: #ccc;
  --wn-sub-hover: #e2e2e2;   /* ドロップダウン hover */
  --wn-footer-bg: #f4f4f4;   /* #footer */
  --wn-max: 1140px;          /* #headerinn / #footer_inner */
  --wn-font: 'Noto Sans Japanese', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'ＭＳ Ｐゴシック', sans-serif; /* japanese.css */
}

/* ---- 共通リセット（ヘッダ・フッタ内のみ） ---- */
.wn-header, .wn-footer { font-family: var(--wn-font); color: var(--wn-text); line-height: 1.6; font-size: 14px; }
.wn-header *, .wn-header *::before, .wn-header *::after,
.wn-footer *, .wn-footer *::before, .wn-footer *::after { box-sizing: border-box; }
.wn-header ul, .wn-footer ul { list-style: none; margin: 0; padding: 0; }
.wn-header li, .wn-footer li { margin: 0; padding: 0; }
.wn-header p, .wn-footer p { margin: 0; }
.wn-header img { max-width: 100%; height: auto; display: block; border: 0; }
.wn-header button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; border-radius: 0; }
.wn-header a, .wn-footer a { text-decoration: none; outline: none; }
.wn-header a:focus-visible, .wn-header button:focus-visible,
.wn-footer a:focus-visible { outline: 2px solid var(--wn-link-hover); outline-offset: -2px; }
.wn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wn-inner, .wn-header ul.wn-inner { max-width: var(--wn-max); margin: 0 auto; }

/* ---- ヘッダ上段（ロゴ・お知らせ・会員ログイン） ---- */
.wn-header { background: #fff; position: relative; z-index: 999; }
.wn-bar__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 5px 0; }
.wn-logo { flex: 0 0 auto; }
.wn-util { margin-left: auto; display: flex; align-items: center; font-size: 12px; }
.wn-header .wn-util a { color: var(--wn-link); padding: 0 10px; line-height: 1; }
.wn-header .wn-util a + a { border-left: 1px solid #aaa; }
.wn-header .wn-util a:hover { color: var(--wn-link-hover); }
.wn-burger { display: none; }

/* ---- グローバルメニュー（PC） ---- */
.wn-nav { background: var(--wn-primary); }
.wn-menu { display: flex; flex-wrap: wrap; }
.wn-item { position: relative; }
.wn-header .wn-link {
  display: block; height: 64px; line-height: 60px; padding: 0 15px;
  font-size: 16px; font-weight: 800; color: #fff; text-align: center; white-space: nowrap;
  border-bottom: 4px solid var(--wn-primary); transition: border-color .4s ease, color .4s ease;
}
.wn-header .wn-item:hover > .wn-link,
.wn-header .wn-item:focus-within > .wn-link,
.wn-header .wn-item.is-open > .wn-link { border-bottom-color: #fff; color: #000; }
.wn-subtoggle { display: none; }

.wn-sub { display: none; background: #fff; }
.wn-header .wn-sub a { display: block; color: var(--wn-link); }

@media (min-width: 961px) {
  .wn-sub { position: absolute; top: 64px; left: 0; z-index: 999; border-top: 1px solid var(--wn-line); }
  .wn-sub .wn-sub { top: 0; left: 100%; margin-left: -1px; border-top: 0; }
  .wn-item--right > .wn-sub { left: auto; right: 0; }
  .wn-item--right .wn-sub .wn-sub { left: auto; right: 100%; margin: 0 -1px 0 0; }
  .wn-sub li { position: relative; }
  .wn-header .wn-sub a {
    width: 190px; padding: 10px 20px 8px; margin: 0 0 -1px; font-size: 12px; line-height: 180%;
    background: #fff; border: 1px solid var(--wn-line);
  }
  .wn-header .wn-sub a:hover { background: var(--wn-sub-hover); color: var(--wn-link); }
  .wn-sub .wn-sub a { width: 260px; }
  .has-sub:hover > .wn-sub, .has-sub:focus-within > .wn-sub, .has-sub.is-open > .wn-sub { display: block; }
  .wn-sub .has-sub > a::after { content: "›"; position: absolute; right: 10px; color: #999; }
  .wn-item--right .wn-sub .has-sub > a::after { content: "‹"; }
}

/* ---- スマホ（style_sp.css 準拠） ---- */
@media (max-width: 960px) {
  .wn-bar__inner { min-height: 60px; padding: 0 0 0 15px; gap: 8px; }
  .wn-logo img { max-height: 30px; width: auto; }
  .wn-util { font-size: 11px; }
  .wn-util a:not(.wn-util__login) { display: none; }
  .wn-header .wn-util a + a { border: 0; }
  .wn-burger { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; color: #888; }
  .wn-burger:hover, .wn-burger[aria-expanded="true"] { background: #333; color: #fff; }
  .wn-burger__icon, .wn-burger__icon::before, .wn-burger__icon::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
  .wn-burger__icon::before, .wn-burger__icon::after { content: ""; position: absolute; left: 0; }
  .wn-burger__icon::before { top: -6px; }
  .wn-burger__icon::after { top: 6px; }
  .wn-burger[aria-expanded="true"] .wn-burger__icon { background: transparent; }
  .wn-burger[aria-expanded="true"] .wn-burger__icon::before { transform: translateY(6px) rotate(45deg); }
  .wn-burger[aria-expanded="true"] .wn-burger__icon::after { transform: translateY(-6px) rotate(-45deg); }

  .wn-nav { display: none; background: #fff; box-shadow: 1px 2px 1.5px rgba(0,0,0,.1); }
  .wn-nav.is-open { display: block; }
  .wn-menu { display: block; }
  .has-sub { position: relative; }
  .wn-header .wn-link, .wn-header .wn-sub a {
    display: block; width: 100%; height: auto; position: relative; text-align: left;
    margin: 0 0 -1px; padding: 10px 50px 10px 30px; border: 1px solid var(--wn-line);
    font-size: 14px; font-weight: normal; line-height: 160%; color: var(--wn-link); background: #fff;
  }
  .wn-header .wn-link::before, .wn-header .wn-sub a::before {
    content: ""; position: absolute; left: 14px; top: 50%; width: 5px; height: 5px; margin-top: -3px;
    border-top: 1px solid #999; border-right: 1px solid #999; transform: rotate(45deg);
  }
  .wn-header .wn-sub a { padding-left: 45px; }
  .wn-header .wn-sub a::before { left: 29px; }
  .wn-header .wn-sub .wn-sub a { padding-left: 60px; }
  .wn-header .wn-sub .wn-sub a::before { left: 44px; }
  .wn-header .wn-link:hover, .wn-header .wn-sub a:hover,
  .wn-header .wn-item:hover > .wn-link, .wn-header .wn-item:focus-within > .wn-link,
  .wn-header .wn-item.is-open > .wn-link { background: #aaa; color: #fff; border-color: var(--wn-line); }
  .wn-header .wn-link:hover::before, .wn-header .wn-sub a:hover::before { border-color: #fff; }
  .wn-subtoggle { display: block; position: absolute; top: 0; right: 0; width: 46px; height: 44px; color: #666; z-index: 1; }
  .wn-subtoggle::before, .wn-subtoggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; transition: transform .2s; }
  .wn-subtoggle::after { transform: rotate(90deg); }
  .has-sub.is-open > .wn-subtoggle::after { transform: rotate(0); }
  .has-sub.is-open > .wn-subtoggle { color: #fff; }
  .has-sub.is-open > .wn-sub { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .wn-header * { transition: none !important; }
}

/* ---- ページ上部へ戻る（#return_top 準拠：右端固定タブ） ---- */
.wn-footer .wn-totop {
  position: fixed; right: 0; bottom: 25px; z-index: 999; display: block; width: 36px; height: 100px;
  background: #ccc; text-indent: -9999px; overflow: hidden;
}
.wn-footer .wn-totop::before {
  content: ""; position: absolute; left: 12px; top: 46px; width: 11px; height: 11px;
  border-top: 2px solid #fff; border-left: 2px solid #fff; transform: rotate(45deg);
}
.wn-footer .wn-totop:hover { background: #aaa; }

/* ---- フッタ（#footer / #footer_inner 準拠） ---- */
.wn-footer { font-size: 11px; clear: both; }
.wn-footer__main { background: var(--wn-footer-bg); padding: 50px 0 30px; }
.wn-fgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 24px; }
.wn-fhead { font-size: 12px; font-weight: bold; margin: 0 0 6px; line-height: 170%; }
.wn-fhead::before { content: "■ "; }
.wn-fcol ul { margin: 0 0 14px; }
.wn-fcol li { line-height: 170%; margin: 0 0 4px; }
.wn-fcol ul li::before { content: "・"; }
.wn-flist-strong li { font-size: 12px; font-weight: bold; margin-bottom: 8px; }
.wn-fcol .wn-flist-strong li::before { content: "■ "; }
.wn-footer .wn-fcol a, .wn-footer .wn-fcol a:visited { color: var(--wn-link); }
.wn-footer .wn-fcol a:hover { color: var(--wn-link-hover); }

/* コピーライト帯（#copyright / #footer_menu 準拠） */
.wn-footer__bottom { background: var(--wn-primary); color: #fff; }
.wn-footer__bottom .wn-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 50px; padding: 12px 0; }
.wn-legal { display: flex; flex-wrap: wrap; }
.wn-legal li { line-height: 100%; margin: 4px 0; }
.wn-footer .wn-legal a { color: #fff; padding: 0 10px; border-right: 1px solid #aaa; }
.wn-legal li:first-child a { padding-left: 0; }
.wn-legal li:last-child a { border: 0; }
.wn-footer .wn-legal a:hover, .wn-footer .wn-copy a:hover { text-decoration: underline; }
.wn-copy { font-size: 12px; white-space: nowrap; }
.wn-footer .wn-copy a { color: #fff; }

@media (max-width: 1180px) {
  .wn-inner { padding-left: 20px; padding-right: 20px; }
  .wn-fgrid { grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
}
@media (max-width: 960px) {
  .wn-header .wn-inner { padding: 0; }
  .wn-footer__main { padding-top: 30px; }
  .wn-fgrid { grid-template-columns: 1fr 1fr; }
  /* style_sp.css：フッタメニューは灰色地に中央寄せ、コピーライトは黒帯 */
  .wn-footer__bottom { background: #f2f2f2; color: #000; }
  .wn-footer__bottom .wn-inner { display: block; padding: 0; }
  .wn-legal { justify-content: center; padding: 30px 15px; font-size: 12px; }
  .wn-legal li { margin: 4px 0; }
  .wn-footer .wn-legal a { color: #000; padding: 0 5px; border-right-color: #000; }
  .wn-legal li:first-child a { padding-left: 5px; }
  .wn-footer .wn-legal a:hover { color: #999; text-decoration: none; }
  .wn-copy { display: block; height: 50px; line-height: 50px; text-align: center; background: #000; color: #fff; font-size: 10px; }
}
@media (max-width: 480px) {
  .wn-fgrid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .wn-header .wn-link--btn::after { content: "+"; position: absolute; right: 17px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: normal; line-height: 1; color: #666; }
  .wn-header .wn-item.is-open > .wn-link--btn::after { content: "−"; color: #fff; }
}
