/* ════════════════════════════════════
   common.css — 共通スタイル
   【横浜グリーンエクスポ】こどもプロジェクト
════════════════════════════════════ */

/* ════════ RESET & BASE ════════ */
:root {
  --accent:  #0068b7;
  --accent2: #48bbc6;
  --accent3: #ea4d49;
  --shadow: 0 6px 28px rgba(0,0,0,0.22);
  --header-h: 74px;
  --focus-ring: 3px solid #005fcc;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

body {
  background: #b8dff5;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* iPhoneのSafariはbackground-attachment:fixedを非対応のため疑似要素で代替 */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url("../images/bk_img2.jpg") no-repeat center top / cover;
  z-index: -1;
}

/* 太字要素はM PLUS 1pを使用 */
h1, h2, h3, h4, h5, h6,
.page-title,
#hamburger,
.back-btn,
.company-card__link,
.page-inner p.company-card__org,
.page-inner p.company-card__name,
strong, b,
/* モーダル・UI要素 */
#modal-title,
#modal-close,
.modal-btn,
#tutorial-close,
#tut-title,
.tutorial-items strong,
.node-label,
#reset-btn,
#show-tutorial-btn,
.zoom-btn,
#copyright,
#video-player-close,
#video-player-title,
/* ドロワーナビ */
#nav-drawer li a,
.video-title,
.page-title,
.breadcrumb {
  font-family: "M PLUS 1p", sans-serif;
}

/* ════════ SKIP LINK ════════ */
#skip-link {
  position: fixed; top: -999px; left: 20px;
  z-index: 9999;
  background: #005fcc; color: #fff;
  padding: 10px 20px; border-radius: 6px;
  font-weight: 700; font-size: 14px;
  text-decoration: none;
}
#skip-link:focus { top: 10px; }

/* ════════ HEADER ════════ */
#site-header {
  position: fixed; top: 20px; left: 0; right: 0;
  height: var(--header-h);
  z-index: 2000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}
#logo-header,
#hamburger { pointer-events: auto; }
#site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #1a1a2e; }
#site-logo img { max-height: 72px; }
#logo-header {
  display: flex; justify-content: space-between;
  border-radius: 8px; background: #fff;
  height: var(--header-h);
  padding: 6px 10px; align-items: center;
  box-shadow: var(--shadow);
}
#logo-header .yokohama-logo { height: 34px; width: auto; margin-left: 30px; }
#hamburger {
  width: 134px; height: var(--header-h); border: none;
  background: var(--accent); color: #fff;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px; font-weight: 700; padding-right: 6px;
  transition: background 0.2s;
}
#hamburger:hover { background: #404549; }
#hamburger .bar_btn {
  width: 44px; height: 44px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px;
}
#hamburger .bar {
  width: 22px; height: 2px; background: #fff;
  border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
#hamburger[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#hamburger[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
#hamburger[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ════════ ドロワー ════════ */
#nav-drawer {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1999;
  background: #1a7e80;
  padding: 120px 40px 40px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; /* 上揃えに変更 */
  transform: translateY(-100%); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s;
  pointer-events: none;
}
#nav-drawer.open { transform: translateY(0); opacity: 1; pointer-events: all; }
#nav-drawer ul {
  list-style: none; display: flex; flex-direction: column;
  align-items: center; gap: 8px; width: 100%;
  margin: auto 0; /* 上下にautoでできるだけ中央寄せ */
  min-height: min-content;
}
#nav-drawer a {transition: 0.15s;}
#nav-drawer li a {
  display: block; padding: 20px 0; margin: 0 auto;
  font-size: 24px; font-weight: 700;
  color: #fff; text-decoration: none;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  width: 580px; max-width: 96vw; text-align: center;
  transition: color 0.15s, letter-spacing 0.2s;
}
#nav-drawer a:hover { color: #f6ff39; }
#nav-drawer li a:hover { letter-spacing: 0.18em; }
#nav-drawer-yokohama { display: flex; justify-content: center; margin-top: 24px; flex-shrink: 0; }
#nav-drawer-yokohama img { height: 60px; width: auto; background: #fff; padding: 10px; }

/* お問い合わせ・プライバシーポリシー */
#inquiry{
	margin: 30px auto;
	color: #fff;
	text-align: center;
}
#inquiry h2{padding-bottom: 12px;font-size: 20px;}
#inquiry .tmp_inquiry_cnt{line-height: 1.8;}
#inquiry a{color: #fff;}

.privacy-policy a{color: #fff;}

/* ════════ フッター ════════ */
#site-footer {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 11px;
  padding: 10px;
}

/* ════════ メインコンテンツ共通 ════════ */
#main-content {
  flex: 1;
  margin-top: calc(var(--header-h) + 40px);
  padding: 40px 20px 80px;
}
.page-inner {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 48px 48px 56px;
  box-shadow: var(--shadow);
  position: relative; /* ×ボタンの基準点 */
}

/* 下層ページの×ボタン（トップページへ戻る） */
.page-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: none; background: rgba(0,0,0,0.08);
  border-radius: 50%; cursor: pointer;
  font-size: 18px; color: #333;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
}
.page-close-btn:hover { background: rgba(0,0,0,0.15); }
/* パンくず */
.breadcrumb {
  font-size: 13px; color: #595959;
  margin-bottom: 24px;
  display: flex; gap: 8px; flex-wrap: wrap;
	line-height: 3;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ページタイトル */
.page-title {
  font-size: 28px; font-weight: 700;
  color: #fff;
  background: var(--accent); border-radius: 8px;
	margin-bottom: 32px;
	padding: 16px 24px;
	line-height: 1.8;
  border-bottom: 3px solid var(--accent);
}
.page-inner .page-title ruby rt {  font-size: 0.4em; color: #fff; }

/* 本文 */
.center{ text-align: center; }
.page-inner p { font-size: 16px; line-height: 1.9; color: #333; padding-bottom: 16px; }
.page-inner h2 {
  font-size: 20px; font-weight: 700; color: #1a1a2e;
  margin: 32px 0 12px;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  background: rgba(0,104,183,0.05);
  border-radius: 0 6px 6px 0;
}
.page-inner h3 {
  font-size: 17px; font-weight: 700; color: var(--accent);
  margin: 24px 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
}
.page-inner img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 8px; display: block; }
.page-inner figure { margin-bottom: 24px; }
.page-inner figcaption { font-size: 14px; color: #595959; text-align: center; }
.page-inner ul, .page-inner ol { padding-left: 1.5em; margin-bottom: 16px; }
.page-inner li { font-size: 16px; line-height: 1.9; color: #333; padding-bottom: 6px; }
.page-inner ruby rt { font-size: 0.6em; color: #666; }

/* 戻るボタン */
.back-btn {
  display: inline-flex; align-items: baseline; gap: 6px;
  margin-top: 40px;
  padding: 12px 28px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px;
  text-decoration: none;
  transition: filter 0.2s, transform 0.1s;
}
.page-inner .back-btn ruby rt{
	color: #fff;
}
.back-btn:hover { filter: brightness(0.88); transform: scale(1.02); }

/* 企業カード */
.company-section { margin-bottom: 48px; }
.company-card {
  border: 1px solid #e0e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.company-card__img { margin-bottom: 30px;}
.company-card__img .logo-placeholder {
  width: 100%; height: 60px;
  background: #e8f0f8; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #595959; margin-bottom: 8px;
}
.company-card__img .pars-placeholder {
  width: 100%; height: 100px;
  background: #e8f0f8; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #595959;
}
.company-card__img img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 8px; }
.company-card__body { flex: 1; }
.page-inner p.company-card__org { font-size: 24px; font-weight: 700; text-align: center; color:var(--accent); padding-bottom: 4px; }
.page-inner p.company-card__name { font-size: 18px; font-weight: 700; text-align: center; color: var(--accent); margin-bottom: 10px; }
.page-inner p.company-card__org ruby rt,.page-inner p.company-card__name ruby rt { color: var(--accent); }

.page-inner p.company-card__desc { font-size: 18px; line-height: 1.8; color: #444; margin-bottom: 12px; }
.page-inner p.company-card__note { font-size: 14px; color: #595959;  width: 100%;
	background: #ebf2f8;
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 30px;
}
.company-card__note ul { list-style: none; padding-left: 0; line-height: 1.4; margin-bottom: 0; }
.company-card__note ul li { font-size: 14px; margin-bottom: 0; }
.company-card__link {
  display: block;
  font-size: 16px; font-weight: 700; text-align: center;
	color: var(--accent);
  text-decoration: none;
  border: 2px solid var(--accent);
  padding: 16px; border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.company-card__link ruby rt{ color: var(--accent); transition: color 0.2s; }
.company-card__link:hover { background: var(--accent); color: #fff; }
.company-card__link:hover ruby rt{ color: #fff; }
.page-inner p.other_site{ 
	font-size: 14px;
	margin-top: 8px;
}

@media (min-width: 681px) {
	.company-card__img { display: flex; justify-content: space-between; align-items: center;}
	.company-card__img img {
		width: 49%;
	}
	.company-card__link br{display: none;}
}

/* ════════ 当サイトについて ════════ */
.p-txtpage__nav>ol>li{
	color: var(--accent);
}
.p-txtpage__nav>ol>li>a{
	text-decoration: none;
	font-weight: bold;
	color: var(--accent);
}
.p-txtpage__nav ol ol{
	margin-bottom: 0;
}
.p-txtpage__nav ol ol li a{
	color: #666;
}

/* ════════ ページトップへ戻るボタン ════════ */
#page-scroll-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.1s;
  z-index: 1000;
}
#page-scroll-top.show { display: flex; }
#page-scroll-top:hover { background: #004f8a; transform: scale(1.08); }

/* プロフィール・開催情報テーブル */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 16px;
	border-top: 1px solid #d0e0ee;
}
.profile-table th {
  width: 7em;
  padding: 12px 14px;
  background: rgba(0,104,183,0.07);
  color: var(--accent);
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid #d0e0ee;
  white-space: nowrap;
	vertical-align: middle;
}
.profile-table td {
  padding: 12px 14px;
  color: #333;
  line-height: 1.8;
  border-bottom: 1px solid #d0e0ee;
  vertical-align: top;
}
.profile-table ruby rt { font-size: 0.6em; color: #666; }
.profile-table th ruby rt { color: var(--accent); }

/* ════════ レスポンシブ ════════ */
@media (max-width: 680px) {
  #nav-drawer li a { font-size: 18px; padding: 10px 0; }
  #logo-header .yokohama-logo { display: none; }
  #site-logo img { height: 60px; width: auto; }
  #hamburger { width: 100px; font-size: 10px; }
}
@media (max-width: 600px) {
  .page-inner { padding: 28px 20px 36px; }
  .page-title { font-size: 22px; }
  .company-card { flex-direction: column; }
  .company-card__img { width: 100%; }
}
@media (max-width: 480px) {
	#logo-header {width: calc(100% - 115px);justify-content: center;}	
}

/* ════════ ページ内リンク ════════ */

/* スムーズスクロール */
html,
#modal{
  scroll-behavior: smooth;
}

/* 固定ヘッダー分スクロール位置をオフセット */
:target {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.contents-nav{
	display: flex;
	align-content: center;
	flex-wrap: wrap;
	justify-content: center;
	list-style: none;
	padding: 0!important;
}
.contents-nav li a{
	margin: 5px;
	display: block;
	border: 1px solid var(--accent);
	color: var(--accent);
	padding: 8px 20px;
	border-radius: 500px;
	text-decoration: none;
	font-weight: bold;
}
.contents-nav li a rt{
	color: var(--accent)!important;
}

