/* BODIKサイト共通のヘッダ・フッタ。R_D (../R_D/shared.css) の実装に合わせています。 */

:root {
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --accent: #0066cc;
  --accent-strong: #0052a3;
  --accent-soft: #eef5ff;
  --navy: #033285;
  --navy-mid: #0a469d;
  --navy-deep: #022763;
  --text: #333333;
  --text-muted: #666666;
  --border: #d9dfe8;
  --bg-light: #f7f9fc;
  --bg-section: #ffffff;
  --radius: 8px;
  --shadow: 0 10px 24px rgba(3, 50, 133, .08);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(100%, 1240px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ヘッダ */
.site-header {
  /* この地震情報サイトでは、BODIK共通ヘッダは固定せずスクロールで流します。
     代わりにサイト内メニュー (.portal-tabs) を固定して、どこからでも各項目へ飛べるようにします。 */
  position: relative;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.site-header .site-header-container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .site-header-logo {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.site-header .site-header-logo a { display: inline-flex; align-items: center; }

.site-header .site-header-logo img {
  display: block;
  max-height: 60px;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.site-header .global-nav {
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-weight: 400;
}

.site-header .global-nav-list {
  list-style: none;
  width: auto;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  position: relative;
}

.site-header .global-nav-list > li {
  position: relative;
  text-align: center;
  line-height: 1.4;
  font-size: 12px;
  flex: 0 0 auto;
}

.site-header .global-nav-list > li > a {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.4;
  padding: 14px 1.05em;
  transition: color .18s ease, border-color .18s ease;
}

.site-header .global-nav-list > li > a:hover,
.site-header .global-nav-list > li > a:focus-visible,
.site-header .global-nav-list > li.current-menu-item > a {
  color: var(--accent-strong);
}

.site-header .global-nav-list > li::before {
  position: absolute;
  left: 0;
  bottom: 0;
  content: "";
  width: 0;
  border-bottom: 1px solid var(--accent);
  transition: all .5s ease-out;
}

.site-header .global-nav-list > li:hover::before,
.site-header .global-nav-list > li.current-menu-item::before { width: 100%; }

.site-header .global-nav-list:hover > li.current-menu-item:not(:hover)::before { width: 0; }

.site-header .global-nav-name {
  font-size: 14px;
  display: block;
  width: 100%;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.4;
}

/* フッタ */
.site-footer {
  background: var(--navy);
  padding: 52px 0 22px;
  color: #fff;
}

.site-footer .site-footer-content { max-width: 1240px; }

/* 上段はロゴとリンク2列。説明文はその下に全幅で置きます。 */
.site-footer .row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 1fr 1fr;
  gap: 0 48px;
  align-items: start;
}

.site-footer .row > div { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* 説明文はフッタの幅いっぱいを使い、1文が長くなりすぎないよう2段に分けます。 */
.site-footer .row > .footer-about-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 48px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.site-footer .menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.site-footer .menu > li { border-bottom: 1px solid rgba(255, 255, 255, .15); }
.site-footer .menu > li:first-child { border-top: 1px solid rgba(255, 255, 255, .15); }

.site-footer .menu a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  padding: 10px;
  margin: 0 -10px;
  transition: background .15s ease, color .15s ease;
}

.site-footer .menu a:hover,
.site-footer .menu a:focus-visible { color: #fff; background: rgba(255, 255, 255, .1); }

.site-footer .footer-logo img { width: min(180px, 60%); height: auto; }
.site-footer .footer-isit img { width: min(220px, 100%); height: auto; }

.site-footer .footer-note,
.site-footer .footer-about {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .84);
  /* 読みやすいよう、折り返しを文節の区切りに寄せます。 */
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: anywhere;
}

.site-footer .footer-about strong { color: #fff; font-weight: 700; }

.site-footer .footer-external-note {
  margin: 0 0 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
}

.site-footer .site-footer-copyright {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  text-align: center;
}

.site-footer .site-footer-copyright p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
}

@media (max-width: 1080px) {
  .site-header .site-header-container {
    min-height: 72px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-header .global-nav { width: 100%; }

  .site-header .global-nav-list {
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .site-header .global-nav-list > li > a { padding: 14px 1.2em; }

  .site-footer .row { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .row > .footer-about-row { grid-template-columns: 1fr; margin-top: 0; }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .site-header .site-header-logo img { max-height: 35px; }
  .site-header .global-nav-list { gap: 4px; }
  .site-header .global-nav-list > li > a { padding: 10px .8em; }
  .site-header .global-nav-name { font-size: 13px; }
  .site-footer { padding-top: 56px; }
}

/* サイト名。BODIKロゴの右に並べます。 */
.site-header-logo { display: flex; align-items: center; gap: 14px; white-space: normal; }

.site-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--navy);
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .01em;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.site-title a { color: inherit; text-decoration: none; }
.site-title a:hover { color: var(--accent-strong); }

@media (max-width: 1080px) {
  .site-header-logo { flex: 1 1 100%; justify-content: flex-start; }
}

@media (max-width: 760px) {
  .site-title { font-size: 14px; padding-left: 10px; }
  .site-header-logo { gap: 10px; }
}

/* BODIK本体サイトへ移動するリンクです。別タブで開くことをアイコンで示します。 */
.site-header .global-nav-name::after,
.site-footer .menu a::after,
.site-footer .footer-logo a::after,
.site-footer .footer-isit a::after {
  content: "";
  display: inline-block;
  width: .82em;
  height: .82em;
  margin-left: 6px;
  vertical-align: -.04em;
  background-color: currentColor;
  -webkit-mask: var(--icon-external) no-repeat center / contain;
  mask: var(--icon-external) no-repeat center / contain;
  opacity: .6;
}

/* ロゴのリンクは画像だけなので、アイコンの位置を文字の高さに合わせます。 */
.site-footer .footer-logo a,
.site-footer .footer-isit a {
  display: inline-flex;
  align-items: flex-end;
  color: #fff;
  font-size: 15px;
}
