/* =============================================================
* common.css
*
* [目次]
* 1. 変数・リセット
* 2. レイアウト（ページ全体・サイドバー）
* 3. コンポーネント
* 4. メディアクエリ（930px以上）
* 5. メディアクエリ（1100px以上）
* 6. メディアクエリ（929px以下）
* ============================================================= */

/* 1. 変数・リセット ---------------------------------------- */
:root {
/* 車両カード用カラー定義 */
  .train-color[data-train-color="仙台市営地下鉄"] { --train-color: #7fae5e; }
  .train-color[data-train-color="東京メトロ"] { --train-color: #f5873c; }
  .train-color[data-train-color="都営地下鉄"] { --train-color: #d18f83; }
  .train-color[data-train-color="横浜市営地下鉄"] { --train-color: #80bfe2; }
  .train-color[data-train-color="名古屋市営地下鉄"] { --train-color: #e2c792; }
  .train-color[data-train-color="京都市営地下鉄"] { --train-color: #9cbaae; }
  .train-color[data-train-color="Osaka Metro"] { --train-color: #ddbcb3; }
  .train-color[data-train-color="神戸市営地下鉄"] { --train-color: #6f927c; }
  .train-color[data-train-color="福岡市営地下鉄"] { --train-color: #7ca7d2; }
  .train-color[data-train-color="埼玉高速鉄道"] { --train-color: #91d7d9; }
  .train-color[data-train-color="東葉高速鉄道"] { --train-color: #f4a69a; }
  .train-color[data-train-color="横浜高速鉄道"] { --train-color: #fad05a; }
  .train-color[data-train-color="広島高速交通"] { --train-color: #636a7c; }
  .train-color[data-train-color="北総鉄道"] { --train-color: #a40000; }
  .train-color[data-train-color="札幌市営地下鉄"] { --train-color: #569d7d; }
  .train-color[data-train-color="首都圏新都市鉄道"] { --train-color: #d15d6c; }
  --color-bg-card-badge-linear: #ffa500;
  --color-bg-card-badge-rubber: #87ceeb;
}

/* 日本語 */
:lang(ja) {
  /*font-family: "Yu Gothic", "YuGothic", "Hiragino Sans", Meiryo, sans-serif;*/
}

/* 英語 */
:lang(en) {
  font-family: Arial, Helvetica, sans-serif;
}

/* 中国語（簡体字） */
:lang(zh) {
  font-family: "Microsoft YaHei", "PingFang SC", SimSun, sans-serif;
}

/* 中国語（繁体字） */
:lang(zh-tw) {
  font-family: "Microsoft JhengHei", "PingFang TC", PMingLiU, sans-serif;
}

/* 韓国語 */
:lang(ko) {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", Dotum, sans-serif;
}

/* 2. レイアウト -------------------------------------------- */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0px;
}

main {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.content {
  max-width: none;
  width: 100%;
  flex: 1;
  background-color: #f0f0f0;
  padding-top: 0;
}
p {
  margin: 0;
}

/* ==================================
  サイドブロック
  =================================== */
.side-blocks {
  max-width: 220px;
  width: 20%;
  padding: 10px;
  flex-shrink: 1;
}
/* ==================================
  メインブロック
  =================================== */
.main-blocks {
  width: 100%;
  padding: 10px;
  background: var(--color-bg-main);
  margin: 0 0 0.5em 0;
  box-sizing: border-box;
}
/* ==================================
  side_blocks が存在する場合
  =================================== */
.page-body:has(.side-blocks) .main-blocks {
  width: 80%;
}

/* 3. コンポーネント -------------------------------------------- */
/* ==================================
  MTブロックスタイル
  ================================== */
.mt-be-columns {
  display: flex;
  gap: 10px;
}

/* ==================================
  ヘッダー・共通設定
  ================================== */
.header {
  padding: 0;
  max-width: none;
  width: 100%;
  background-color: #f8f8f8;
  border-bottom: 2px solid #004da1;
}
.header .header-body {
  max-width: 1200px;
  margin: 0 auto;
}
.header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0px 0px 0px;
}
.header .header-content-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-grow: 1;
  max-width: calc(100% - 200px);
}
/* メニュー文字色統一 (#333) */
.header .header-nav a,
.header .header-nav .menu-item,
.header .header-nav .menu-item>a,
.header .header-nav .menu-item span {
  color: #333 !important;
  text-decoration: none;
  line-height: 1.4;
  flex-shrink: 0;
  font-weight: bold;
}
.header .header-nav .menu-item {
  display: flex;
  flex-direction: column;
}
.header .header-nav .menu-item .menu-item-link-wrap {
  display: flex;
}

/* 共通のボタン基本スタイル */
.header .member-page a,
.header .world-page a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  height: 32px;
  /* 高さを統一 */
  box-sizing: border-box;
}
/* 「会員の方はこちら」：黒枠ボタン */
.header .member-page a {
  border: 1px solid #000;
  background-color: #fff;
  color: #000 !important;
}
/* 「WORLD PLAZA」：青枠ボタン */
.header .world-page a {
  border: 2px solid #004da1;
  /* 少し太めの青枠 */
  background-color: #fff;
  color: #004da1 !important;
}
/* アイコン（地球マーク）の擬似要素を追加 */
.header .world-plaza-icon {
  margin-right: 6px;
}
/* ホバー時の演出（共通） */
.header .member-page a:hover,
.header .world-page a:hover {
  opacity: 0.7;
}
.header .menu-text {
  padding: 5px 10px;
  font-weight: bolder;
}

/* ==================================
  フッダー・共通設定
  ================================== */
.footer {
  max-width: none;
  width: 100%;
  background-color: #707070;
  /* 濃いグレー */
  color: #ffffff;
  margin: 0 auto 0 auto;
}
.footer .footer-body {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.8;
}
.footer .footer-info-section,
.footer .footer-nav-section {
  padding: 10px 10px 0 10px;
}
.footer .footer-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 5px;
}
.footer .footer-container a {
  color: #ffffff;
  text-decoration: underline;
  font-size: 14px;
  border-left: 1px solid #ccc;
  padding: 0 5px;
}
.footer .footer-container a:last-child {
  border-right: 1px solid #ccc;
}
.footer .info-bottom {
  display: flex;
  justify-content: space-between;
}
.footer .info-bottom-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ==================================
  トップに戻るボタン
  ================================== */
.scroll-top-btn {
  position: fixed;
  right: 25px;
  /* 右下の位置調整 */
  bottom: 25px;
  /* 下下の位置調整 */
  z-index: 1000;
  /* 他の要素より前面に出す */
  width: 50px;
  height: 50px;
  background-color: #004da1;
  border: none;
  border-radius: 50%;
  /* 正円にする */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 初期状態は透明にして、少し下に配置しておく */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s, visibility 0.4s, transform 0.4s, background-color 0.3s;
}
/* ある程度スクロールして「is-show」クラスがついた時のスタイル */
.scroll-top-btn.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  /* 定位置に戻る */
}
/* ホバー */
.scroll-top-btn:hover {
  background-color: #0062cc;
}
.scroll-top-btn:hover .scroll-top-arrow {
  transform: translateY(-2px) rotate(-45deg);
}
/* ボタンの中の矢印 */
.scroll-top-btn .scroll-top-arrow {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 3px solid #ffffff;
  border-right: 3px solid #ffffff;
  transform: rotate(-45deg);
  /* 斜めにして上向きの矢印にする */
  margin-top: 4px;
  transition: transform 0.3s;
}

/* ==================================
  パンくずリストマージン設定
  ================================== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.breadcrumb li {
  display: inline-block;
}
.breadcrumb li:after {
  content: '\203A';
  margin: 0 0.5em;
}
.breadcrumb li:last-child:after {
  display: none;
}

/* ==================================
  検索結果
  ================================== */
.search-hit-excerpt mark {
  background: #fff3a3;
  font-weight: 700;
  padding: 0 0.15em;
}

/* ==================================
  【共通】画像スライドショーモジュール
  FADE_IMAGE
  ================================== */
.swiper-body {
  max-width: none;
  background-color: #f0f0f0;
}
.mySwiper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  display: block;
}
.mySwiper .swiper-wrapper {
  display: flex;
  align-items: flex-start;
  height: auto;
}
.mySwiper .swiper-slide img {
  display: block;
  width: 100%;
}

/* ==================================
  【共通】マルチカラム(分割割合指定)
  CUSTOM_MULTI_COLUMN
  ================================== */
.multi-layout {
  display: flex;
  gap: 16px;
  width: 100%;
}
.layout-1 { flex: 1; box-sizing: border-box; }
.layout-2 { flex: 2; box-sizing: border-box; }
.layout-3 { flex: 3; box-sizing: border-box; }
.layout-4 { flex: 4; box-sizing: border-box; }
.layout-5 { flex: 5; box-sizing: border-box; }
.layout-6 { flex: 6; box-sizing: border-box; }
.layout-7 { flex: 7; box-sizing: border-box; }
.layout-8 { flex: 8; box-sizing: border-box; }
.layout-9 { flex: 9; box-sizing: border-box; }
.layout-flex { flex: 1; box-sizing: border-box;}

/* ==================================
  【共通】右揃えコンテナ
  RIGHT_CONTAINER
  ================================== */
.right-container {
  width: 100%;
  text-align: right;
}

/* ==================================
  【共通】回り込みレイアウト
  WRAP_FLOW_LAYOUT
   ================================== */
.text-image {
  float: right;
  width: 300px;
  max-width: 40%;
  height: auto;
  margin: 0 0 20px 30px;
}
.text-image-wrap::after {
  content: "";
  display: block;
  clear: both;
}

/* ==================================
  【共通】リンクコンテナ
  LINK_CONTAINER
   ================================== */
.link-container {
  display: grid;
  gap: 0.5rem 2rem;
}
.link-container.column-2 {
  grid-template-columns: repeat(2, 1fr);
}
.link-container.column-3 {
  grid-template-columns: repeat(3, 1fr);
}
.link-container.column-4 {
  grid-template-columns: repeat(4, 1fr);
}
.link-container p {
  margin: 0;
  padding-bottom: 5px;
  font-size: 12px;
}

/* 4. メディアクエリ（930px以上） -------------------------------------------- */
@media (min-width: 930px) {
  /* ==================================
    ヘッダー・共通設定
    ================================== */
  .header .menu-trigger {
    display: none !important;
  }
  .header .site-title {
    flex-shrink: 0;
  }
  .header .pc-image {
    display: block;
  }
  .header .sp-image {
    display: none;
  }
  .header .header-nav {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    flex-shrink: 1;
    width: auto;
    gap: 12px 18px;
    position: static !important;
    visibility: visible !important;
  }
  .header .sub-navigation {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    margin-right: 10px;
    gap: 20px;
  }
  .header .main-navigation {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-right: 10px;
    gap: 0px
  }
  .header .main-navigation>.menu-item {
    position: relative;
    /* padding: 5px 10px; */
    /* 左右の余白を調整 */
    transition: background-color 0.3s, color 0.3s;
    /* 色変化を滑らかに */
    border-left: 1px solid #ccc;
    /* 左側に線を引く */
  }
  .header .main-navigation>.menu-item>a,
  .header .main-navigation>.menu-item>.menu-item-link-wrap>a {
    padding: 5px 10px;
  }
  /* 検索フォームの直前にある要素の右側に線を引く */
  .header .main-navigation>*:has(+ .search-form) {
    border-right: 1px solid #ccc;
  }
  .header .main-navigation>.menu-item:hover {
    background-color: #004da1;
    border-radius: 4px;
  }
  .header .menu-text:hover,
  .header .menu-item:hover .menu-text {
    color: #ffffff !important;
    /* 文字を白にする */
  }
  .header .search-form {
    display: flex;
    justify-content: flex-end;
    margin-left: 5px;
    flex-shrink: 1;
    flex-grow: 1;
    min-width: 120px;
    font-size: 12px;
  }
  .header .search-form .search-input {
    width: 100%;
    box-sizing: border-box;
  }
  .header .search-btn {
    flex: 0 0 25%;
  }
  .header .menu-item {
    position: relative;
    display: inline-block;
  }
  .header .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.75);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    z-index: 1000;
    list-style: none;
    padding: 5px 0;
    margin: 0;
  }
  .header .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    margin: 10px;
  }
  .header .sub-menu li a {
    display: block;
    color: #ffffff !important;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 0.3s;
  }
  .header .sub-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  .header .sub-menu-toggle {
    display: none !important;
  }
  .header .menu-item:hover .sub-menu {
    display: block !important;
  }
}

/* 5. メディアクエリ（1100px以上） -------------------------------------------- */
@media (min-width: 1100px) {
  /* ==================================
    ヘッダー・共通設定
    ================================== */
  .header .header-nav a,
  .header .header-nav .menu-item,
  .header .header-nav .menu-item>a,
  .header .header-nav .menu-item span {
    font-size: 18px;
    font-weight: bolder;
  }
  /*.header .main-navigation > .menu-item {
    padding: 5px 15px;
  }*/
  .header .main-navigation>.menu-item>a,
  .header .main-navigation>.menu-item>.menu-item-link-wrap>a {
    padding: 5px 15px;
  }
}

/* 6. メディアクエリ（929px以下） -------------------------------------------- */
@media (max-width: 929px) {
  body {
    padding-top: 60px;
    box-sizing: border-box;
  }

  .content {
    margin: 0;
  }

  /* ==================================
    サイドブロック
    =================================== */
  .side-blocks {
    width: 10%;
    padding: 0;
  }

  /* ==================================
  side_blocks が存在する場合
  =================================== */
  .page-body:has(.side-blocks) .main-blocks {
    width: 90%;
  }

  /* ==================================
    ヘッダー・共通設定
    ================================== */
  .header {
    position: fixed;
    /* 画面に固定 */
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    z-index: 2000;
    /* 他の要素より上に表示（メニュー背景2002より下） */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* 浮いている感じを出すための影（任意） */
  }

  .header .header-content-right {
    max-width: none;
  }

  .header .header-inner {
    padding-right: 20px;
    box-sizing: border-box;
    width: 100%;
  }
  .header .site-title {
    flex-shrink: 1;
    min-width: 250px;
  }

  .header .pc-image {
    display: none;
  }

  .header .sp-image {
    display: block;
  }

  .header .sp-image img {
    max-width: 100% !important;
  }

  .header .menu-trigger {
    display: block !important;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 2003;
    background: none;
    border: none;
  }

  .header .menu-trigger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #333;
    transition: 0.3s;
  }

  .header .menu-trigger span:nth-child(1) {
    top: 0;
  }

  .header .menu-trigger span:nth-child(2) {
    top: 11px;
  }

  .header .menu-trigger span:nth-child(3) {
    bottom: 0;
  }

  .header .menu-trigger.is-active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }

  .header .menu-trigger.is-active span:nth-child(2) {
    opacity: 0;
  }

  .header .menu-trigger.is-active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  .header .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    /* ほんのり黒い半透明 */
    z-index: 2001;
    /* メニュー(.header-nav)より一歩後ろに配置 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s, visibility 0s;
  }

  /* メニューがアクティブになったら、カバーを表示する */
  .header .nav-overlay.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .header .header-nav {
    display: flex !important;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: calc(100vh - 100px);
    ;
    max-height: calc(100vh - 100px);
    ;
    background: #fff;
    z-index: 2002;
    padding: 80px 20px;
    flex-direction: column;
    transition: right 0.3s ease;
    visibility: hidden;
    overflow-y: auto;
  }

  .header .header-nav.is-active {
    right: 0;
    visibility: visible;
  }

  .header .sub-navigation {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 15px;
    order: +1;
  }

  .header .header-nav .member-page a,
  .header .header-nav .world-page a {
    display: flex;
    width: 180px;
    align-items: center;
    justify-content: center;
    /* 文字を中央に揃える */
    box-sizing: border-box;
  }

  .header .main-navigation {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header .menu-item {
    width: 100%;
  }

  .header .menu-item-link-wrap {
    justify-content: space-between;
    align-items: center;
    /*border-bottom: 1px solid #eee;*/
  }

  .header .search-form {
    display: flex;
    justify-content: flex-end;
    order: -1;
    flex-grow: 1;
    min-width: 120px;
    font-size: 12px;
  }

  .header .sub-menu {
    display: none !important;
    position: static !important;
    background: #fff;
    padding-left: 20px;
    list-style: none;
    box-shadow: none;
    border: none;
  }

  .header .sub-menu.is-open {
    display: block !important;
    margin-top: 0;
  }

  .header .sub-menu li {
    list-style: none !important;
    border-bottom: 1px solid #eee !important;
  }

  .header .sub-menu li a {
    display: block !important;
    padding: 12px 0 !important;
    color: #333 !important;
    /* メインメニューと同じ文字色 */
    font-size: 15px !important;
    text-decoration: none !important;
    border-bottom: none !important;
  }

  .header .header-nav .menu-item a {
    display: block;
    padding: 15px 0;
    border-bottom: none;
    flex-grow: 1;
  }

  .header .sub-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
  }

  .header .sub-menu-toggle::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
  }

  .header .sub-menu-toggle.is-open::after {
    transform: rotate(135deg);
  }

  /* ==================================
    フッダー・共通設定
    ================================== */
  .footer .info-bottom {
    flex-direction: column;
  }

  /* ==================================
    トップに戻るボタン
    ================================== */
  .scroll-top-btn {
    right: 15px;
    bottom: 15px;
    width: 42px;
    height: 42px;
  }

  .scroll-top-btn .scroll-top-arrow {
    width: 10px;
    height: 10px;
    border-top: 2.5px solid #ffffff;
    border-right: 2.5px solid #ffffff;
  }
  
  /* ==================================
    パンくずリスト
    ================================== */
  .breadcrumb-body {
    margin-top: 10px;
    font-size: 12px;
  }

  /* ==================================
    【共通】リンクコンテナ
     LINK_CONTAINER
     ================================== */
  .link-container.column-2,
  .link-container.column-3 {
    grid-template-columns: 1fr;
  }
}