@charset "utf-8";

/*PC・タブレット・スマホ共通設定
------------------------------------------------------------------------------------------------------------------------------------------------------*/

ul,
ol,
li {
  margin: 0px;
  padding: 0px;
}

ul {
  list-style-type: none;
}

header {
  margin: 0px;
  padding: 0px;
  color: #333;
  /*全体の文字色*/
  font-family: verdana, "ヒラギノ丸ゴ ProN W4", "Hiragino Maru Gothic ProN", "メイリオ", "Meiryo", "ＭＳ Ｐゴシック", "MS PGothic", Sans-Serif;
  font-size: 16px;
  /*文字サイズ*/
  line-height: 2;
  /*行間*/
  background: #fff;
  /*背景色*/
  -webkit-text-size-adjust: none;
}

/*リンク（全般）設定
---------------------------------------------------------------------------*/
a {
  color: #333;
  /*リンクテキストの色*/
  -webkit-transition: 0.5s;
  /*マウスオン時の移り変わるまでの時間設定。0.5秒。*/
  transition: 0.5s;
  /*同上*/
}

a:hover {
  color: #002c74;
  /*マウスオン時の文字色*/
  text-decoration: none;
  /*マウスオン時にリンクの下線を消す設定*/
}

/*ヘッダー（ロゴが入った最上段のブロック）
---------------------------------------------------------------------------*/
/*ヘッダーブロック*/
.site-header {
  display: flex;
  width: 100%;
  margin: 0 auto;
  justify-content: space-between;
  align-items: center;
}

header .inner {
  display: flex;
  width: 1000px;
  margin: 0 auto;
  justify-content: space-between;
}

header .inner a {
  text-decoration: none;
}

/* 左側グループ（ロゴ＋団体名） */
.left-group {
  display: flex;
  align-items: center;
}

.logo img {
  height: 55px;
  margin-top: 8px;
  margin-left: 5px;
  margin-right: 20px;
}

.org-name {
  font-size: 1.4em;
  font-weight: bold;
}

/* 右側グループ（更新日＋アクセス情報） */
.right-group {
  text-align: right;
}

.ISO,
.address {
  font-size: 14px;
}

.access-info {
  display: inline-block;
  text-decoration: none;
  font-size: 16px;
  border: none;
  transition: background-color 0.3s ease;
}

.access-info:hover {
  border-radius: 6px;
}

/*メインメニュー
---------------------------------------------------------------------------*/
/*メニューブロックの設定*/
#menu-box {
  width: 100%;
  background: #fff;
  /*背景色*/
}

/*サイト幅にしたmenu-box内のブロック*/
#menubar {
  width: 1000px;
  /*幅*/
  height: 52px;
  margin: 0 auto;
  border-left: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  border-top: 1px solid #ccc;
}

/*メニュー１個あたりの設定*/
#menubar li,
#menubar-s li {
  float: left;
  /*左に回り込み*/
  /*width: 166.67px; /*メニュー幅（メニューが6個の時用）*/
  width: 200px;
  /*メニュー幅（メニューが5個の時用）*/
  text-align: center;
  /*内容をセンタリング*/
}

#menubar li:first-child {
  margin-left: 0px;
  /*１つ目のメニューのmarginを0に。*/
}

#menubar a,
#menubar-s a {
  display: block;
  height: 42px;
  text-decoration: none;
  background: #002C74;
  font-size: 16px;
  /*文字サイズ*/
  letter-spacing: 0.1em;
  /*文字間隔を少しだけ広くとる設定。不要ならこの行削除。*/
  padding: 10px 0px 0px;
  /*上、左右、下へのボックス内の余白*/
  color: #fff;
  /*文字色*/
  border-right: 1px solid #ccc;
  /*右の線の幅、線種、色*/
}

/*飾り文字（小さな補足用テキスト）*/
#menubar span,
#menubar-s span {
  display: block;
  font-size: 10px;
  /*文字サイズ*/
  color: #fff;
  /*文字色*/
  margin: -5px 0px 0px;
  /*ボックスの外側にあけるスペース。上、左右、下。*/
  padding-bottom: 10px;
  /*下へのボックス内の余白*/
}

/*マウスオン時と、現在表示中*/
#menubar li a:hover,
#menubar li.current > a {
  background: #fff;
  /*背景色*/
  color: #002C74;
  /*文字色*/
}

#menubar .current span,
#menubar-s .current span {
  color: #002C74;
}

#menubar a:hover span {
  color: #ccc;
}

/*スマホ用メニューを表示させない*/
#menubar-s {
  display: none;
}

/*３本バーアイコンを表示させない*/
#menubar_hdr {
  display: none;
}

.menu-item {
  position: relative; /* ドロップダウンの基準 */
}

#menubar .menu-item:hover > a {
  background: #fff;
  color: #002C74;
}

/* ドロップダウンメニュー */
#menubar .dropdown {
  display: none;               /* 初期は非表示 */
  position: absolute;
  top: 100%;                   /* 親メニューの真下 */
  left: 0;
  width: 250px;                /* 親liと同じ幅 */
  background: #fff;
  border: 1px solid #ccc;
  z-index: 9999;
}

/* hover時に表示 */
#menubar .menu-item:hover .dropdown {
  display: block;
}

/* ドロップダウン内のli */
#menubar .dropdown li {
  float: none;                 /* 横並び解除 */
  width: 100%;
}

/* ドロップダウン内のリンク */
#menubar .dropdown a {
  height: auto;
  padding: 3px 10px;
  background: #002C74;
  color: #fff;
  border-right: none;
  text-align: left;
  letter-spacing: normal;
}

/* ドロップダウン hover */
#menubar .dropdown a:hover {
  background: #fff;
  color: #002C74;
}

/*画面幅800px以下の設定
------------------------------------------------------------------------------------------------------------------------------------------------------*/
@media screen and (max-width: 480px) {

  /*ヘッダー（サイトロゴが入った最上段のブロック）
---------------------------------------------------------------------------*/
  /*サイト幅にしたheader内のブロック*/
  header .inner {
    width: 100%;
    background: none;
  }

  /*サイト幅にしたheader内のブロック（トップページ用の追加指定）*/
  #top header .inner {
    -webkit-background-size: contain;
    /*この１行は古い端末向けの最低限の設定*/
  }

  /*ロゴ画像*/
  header #logo img {
    position: absolute;
    left: 4%;
    top: 40px;
  }

  /*ロゴ画像（トップページ専用の追加設定）*/
  #top #logo img {
    position: absolute;
    left: 4%;
    top: 70px;
  }

  /*メインメニュー
---------------------------------------------------------------------------*/
  /*メニューブロックの設定*/
  #menubar {
    width: auto;
    border: none;
  }

  /*メニュー１個あたりの設定*/
  #menubar li {
    width: 50%;
    margin: 0px;
  }

  #menubar a,
  #menubar-s a {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }
}

/* =========================================================
   スマホ（～480px）：logo の下に org-name を配置（縦並び）
   ========================================================= */
@media screen and (max-width: 480px) {

  /* 左ブロックを“縦積み”に（PCで横並びでもスマホでは縦へ） */
  .left-group {
    display: flex !important;          /* ← display:contents の上書き */
    flex-direction: column !important; /* ← 縦並び */
    align-items: flex-start !important;/* 左寄せ（中央にしたければ center） */
    gap: 2px;                           /* すき間はお好みで */
    margin: 10px 0 0 10px;
  }

  /* logo は比率を維持して縮小（109:55） */
  .logo img {
    display: block;
    height: 38px !important;           /* 目安：36〜42pxで現物合わせ可 */
    aspect-ratio: 109 / 55;
    width: auto !important;
    object-fit: contain;
    margin: 0 !important;
    vertical-align: top !important;    /* 画像の“ベースライン隙間”対策 */
  }

  /* org-name は logo の直下に来る（縦積みの2番目） */
  .org-name {
    order: 2;                          /* 明示しておくと安心（logo が 1） */
    font-weight: 700;
    font-size: clamp(13px, 3.4vw, 18px);
    line-height: 1.2;
    white-space: nowrap;               /* 1行に収めたい場合。折返しOKなら normal */
    margin-top: 2px;                   /* 見た目の余白微調整 */
  }
  
/* --------- 中央列：ISO → アクセス → TEL --------- */

  /* ISO */
  .ISO {
    font-size: clamp(11px, 2.9vw, 16px);
    line-height: 1.3;
    margin-top: 10px;
  }

  /* 住所文章（addr-text）はスマホでは完全非表示 */
  .address .addr-text {
    display: none !important;
  }

  /* アクセスリンク（アクセスだけ表示） */
  .address a {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    font-size: clamp(12px, 3.2vw, 16px);
    line-height: 1.25;
    text-decoration: none;
  }

  .address i.fa-solid.fa-location-dot {
    font-size: 1em;
    line-height: 1;
  }

  /* TEL */
  .address .tel {
    display: block;
    margin-top: 2px;
    font-size: clamp(12px, 3.2vw, 16px);
    line-height: 1.25;
  }

  /* --------- 右列：三本バー --------- */
  #menubar_hdr {
    display: block;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid #000;
    background: #fff;
    padding: 0;
    margin: 17px 10px 0 5px;
    z-index: 1001;
  }
  #menubar_hdr span {
    display: block;
    width: 22px; height: 2px;
    background: #000;
    margin: 3px 0 3px 5px;
  }
  
/* ナビ：PC用は非表示、SP用は“開いたときのみ表示”に変更 */
  #menubar { display: none; }     /* 既存通り */
  #menubar-s { display: none; }   /* 既存の display:block を上書きして非表示に */
  body.is-nav-open #menubar-s {
    display: block;
    position: absolute; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 1000;
  }
  /* 縦並び（float解除） */
  #menubar-s ul { margin: 0; padding: 0; }
  #menubar-s li { float: none; width: 100%; }
  #menubar-s a {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid #ccc; border-bottom: 1px solid #ccc;
    background: #002C74; color: #fff; text-decoration: none;
  }
  #menubar-s li a:hover,
  #menubar-s li.current a {
    background: #fff; color: #002C74;
  }

  /* （保険）左リンク全体を display:contents で“バラす”指定がある場合の無効化 */
  header .inner > a { display: block !important; } /* クリック領域を確保したいなら block 推奨 */
}