/* ベース設定 */

/* ===== モバイルファーストの共通設定 ===== */
:root{
  --space-1: clamp(8px, 1.2vw, 12px);
  --space-2: clamp(12px, 1.6vw, 16px);
  --space-3: clamp(16px, 2.4vw, 24px);
  --space-4: clamp(24px, 3.6vw, 36px);
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  font-family: "Kiwi Maru", system-ui, sans-serif;
  font-size: clamp(15px, 1.5vw, 17px);
  overflow-x: hidden; /* 横スクロール防止 */
  padding: 0;
  color: #000;
  background-color: #fefbf4;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}
/* レイアウト */
main {
  padding: 1rem 1rem;
  max-width: 1000px;
  margin: 0 auto;

}
h2 {
  border-bottom: 2px solid #b22222;
  padding-bottom: 0.3rem;
  margin-top: 2rem;
  color: #b22222;
}






/* ================ページ別のデザイン =================== */


/* トップページの大きなヘッダー */
.main-header {
  background-color: #425b6e;
  text-align: center;
  padding: 3rem 1rem; /* 上下余白をさらに広げる */
  margin-top: 0; /* ヒーロー画像の直下 */
  z-index: 1;
  position: relative;
  opacity: 1;
}

.main-header h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem); /* 大きく */
  color: #fdbd46;
  font-weight: 900;
  margin: 0.5rem 0;
  letter-spacing: 0.05em;
}
/* アクセスページ - 和風地図風の渋い青系 */
.access-header {
  background: linear-gradient(to right, #2c3e50, #4a6fa5);
}
/* 企画紹介ページ - 縁日っぽい赤・金系 */
.kikaku-header {
  background: linear-gradient(to right, #b22222, #f2c94c);
}
/* 委員会ページ - 和紙風の落ち着いた白茶背景 */
.committee-header {
  background: url("images/washi_bg.jpg") no-repeat center/cover;
  background: linear-gradient(to right, #b22222, #f2c94c);
}
/* タイムスケジュールページ - 時の流れイメージ青グラデ */
.schedule-header {
  background: linear-gradient(135deg, #3e8acc, #a1c4fd);
}
/* ================ページ別のデザイン =================== */
.sub-header {
  background-color: #b22222;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  font-family: 'Kiwi Maru', serif;
  position: relative;
  z-index: 1;
}

.sub-header h1 {
  margin: 0;
  font-size: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.sub-header .committee-header{
  color: #b22222;
}
/* ================ページ別のデザイン =================== */





/* --------------フッター---------------------- */
footer {
  background-color: #eee;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}
/*---------------フッター----------------------*/


/*--------------ここからナビゲーションバー--------------*/
.page-nav{
  background-color: floralwhite;
  flex-wrap: nowrap;
}
.page-nav ul {
  display: flex;
  justify-content: flex-end; /* 右寄せ */
  align-items: center;       /* ← 垂直方向に中央配置 */
  flex-wrap: nowrap;         
  white-space: nowrap;       
  overflow-x: auto;          
  gap: 16px;
  height: 60px;              /* ナビ全体の高さを決める */
  margin: 0;
  padding: 0;
}

.page-nav li {
  flex: 0 0 auto;
  display: flex;
  align-items: center;       /* ← li の中でも中央配置 */
}

.page-nav a {
  display: flex;             /* ← a タグ自体も flex に */
  align-items: center;       /* 垂直中央 */
  justify-content: center;   /* 水平方向中央 */
  height: 100%;              /* li の高さに合わせる */
  padding: 12px 6px;           /* 左右余白 */
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-family: 'Kiwi Maru', serif;
}
/*--------------ナビゲーションバー終わり--------------*/




/* 画像・動画ははみ出さない */
img, video, svg { max-width: 100%; height: auto; display: block; }

/* 見出しは流体タイポグラフィで */
h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.2; margin: var(--space-3) 0; }
h2 { font-size: clamp(22px, 4.5vw, 32px); line-height: 1.25; margin: var(--space-3) 0 var(--space-2); }
h3 { font-size: clamp(18px, 3.5vw, 24px); line-height: 1.3; margin: var(--space-2) 0; }

/* ボタン/リンクはタッチターゲット44px以上に */
a, button {
  min-height: 44px;
  line-height: 1.2;
  text-decoration: none;
}
:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 2px; }

/* 表のはみ出し対策 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 640px; }



/* トップページの大きなヘッダー */
.main-header {
  background-color: #425b6e;
  text-align: center;
  padding: 3rem 1rem; /* 上下余白をさらに広げる */
  margin-top: 0; /* ヒーロー画像の直下 */
  z-index: 1;
  position: relative;
  opacity: 1;
}

.main-header h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem); /* 大きく */
  color: #fdbd46;
  font-weight: 900;
  margin: 0.5rem 0;
  letter-spacing: 0.05em;
}







/*-----------------トップページ---------------*/

.date {
  font-size: clamp(2.8rem, 4.2vw, 3.8rem); /* h1に近いサイズ */
  margin-top: 0.5rem;
  font-weight: 850;
  display: block;
  color: #fdbd46;
  white-space: nowrap;
}
.subtitle {
  margin-bottom: 0.5rem;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  color: #fdbd46;
  white-space: nowrap;
}
/* ヒーロー画像 */
.hero-image img {
  width: 100%;
  height: 70vh;         
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}
body.top-page{
  background-color:  #425b6e ;;
}
.hero-image {
  margin: 0;
  padding: 0;
}
.greeting-flex {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap; /* スマホで折り返すため */
}

/* 写真のスタイル */
.greeting-photo-left {
  width: 180px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* テキスト部分の見た目調整 */
.greeting-flex p {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
}
.message{
  background-color:#425b6e ;
  color: #fdbd46;
}
.sub-header-bar {
  width: 100%;
  background-color: #b22222; /* 帯の色 */
  padding: 1rem 0;           /* 帯の高さを調整 */
  text-align: center;
  margin: 0rem 0;            /* 上下の余白 */
}
.sub-header-bar h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  color: #fff;               /* 文字色は白 */
  font-weight: bold;
}
.introduction {
  margin-top: 0.5em;
  font-size: 0.95rem;
  line-height: 1.7;
  text-decoration: underline;
  color: #444;
}
.greeting-flex {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap; /* スマホでは縦並びに */
  margin: 1rem 0;
}
.greeting-photo-left {
  width: 250px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
.greeting-text {
  flex: 1;
  min-width: 200px;
}
.introduction {
  margin-top: 0.5em;
  font-size: 0.95rem;
  text-decoration: underline;
  color: #f2c94c;
}
.hero {
  position: relative;
  min-height: clamp(40vh, 50vw, 68vh);
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-4) var(--space-2);
  color: #111;
}
/* ===== ヒーロー/タイトル周り：整理版（style.css の末尾に） ===== */

/* ヒーロー画像：高さの単位修正 */
.hero-image img{
  width: 100%;
  height: 70vh;           /* ← "vh" 単位の数値を指定 */
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}

/* === 最小パッチ：スマホでも各行を1行で表示 === */
.main-header .title,
.main-header .subtitle,
.main-header .date {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(100%, 92vw);
}

/* 必要ならスマホで少し縮小（任意） */
@media (max-width: 600px){
  .main-header .title   { font-size: 1.6rem !important; }
  .main-header .subtitle,
  .main-header .date    { font-size: 1.2rem !important; }
}

/* ===== ご来場の注意 ===== */
.notice {
  background-color: #fefbf4; /* トップページと調和する色 */
  color: #333;
  margin: 2rem auto;
  padding: 1.5rem;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notice-content ul {
  margin: 0;
  padding-left: 1.2em;
}

.notice-content li {
  margin: 0.6em 0;
  line-height: 1.6;
}




/*------------------トップページ終わり-----------------*/



/*------------------アクセス----------------------*/
.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.access-img {
  flex: 0 0 700px;   /* 左カラムは固定幅にする */
  max-width: 500px;   /* 小さい画面では縮む */
  height: auto;
  margin-top: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.text-image-box {
  display: flex;
  align-items: stretch;
  gap: 0px;
  flex-wrap: nowrap;
  margin: 1.5rem 0;
  flex: 0 0 auto;
  min-width: 0;
  z-index: 1;
}
/* 右側に地図＋文章を詰める */
.access-layout {
  flex: 1 1 auto;  /* 余った幅を全部使う */
  display: flex;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 9fr);
  gap: 20px;
  align-items: start;
  min-width: 0;    /* 押し潰し防止 */
  flex-direction: column;
}
/* 右側の縦並びコンテナ */
.access-right{
  flex: 1 1 360px;
  min-width: 320px;             /* 押し潰し対策 */
  min-height: 0;
  display: flex;
  flex-direction: column;   /* ← 縦に並べる */
  height: auto;
  gap: 3px;
  overflow-wrap: anywhere;
  position: relative;
  margin: 0;
  padding: 0;
}
.access-left{
  flex: 1 1 420px;
  min-width: 320px;
  min-height: 0;
  margin: 0;
  padding: 0;
}
/* カード風ボックス（駅・住所・地図・注意） */
.info-card{
  border: 1.5px solid #000;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  overflow: hidden;
}
.info-card h3{ 
  margin: 0 0 .4rem; 
  font-size: 1.05rem; }
.address{ 
  margin: 0; 
  line-height: 1.7; 
}
.bullets{ 
  margin: 0; 
  padding-left: 1.1em;
 }
.bullets li{ 
  margin: .35em 0; 
}
.access-layout > .map-col,
.access-layout > .info-col {
  min-width: 0;
}
.map-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
  border: 1.5px solid #000;
  max-width: 800px;
  width: 100%;
  margin-top: 8px;
  position: relative;
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.map-col{
display: flex;
justify-content: center;
}
.info-col {
  overflow-wrap: anywhere;
}

/* ---- ここから“狭い時は下に回り込む” ---- */
@media (max-width: 980px){
  .text-image-box{
    display: flex;
    flex-wrap: wrap;     /* 折り返しON */
    gap: 0;
  }
  .access-left{
    order: 1;            /* 先に画像 */
    flex: 1 1 100%;      /* 全幅で1段目 */
    min-width: 0;
    margin: 0 0 12px 0;  /* 画像の下にだけ少し余白 */
  }
  .access-right{
    order: 2;            /* 次に文章ブロック */
    flex: 1 1 100%;      /* 全幅で2段目 */
    min-width: 0;
  }
.access-img{
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
}

/*--------------------アクセス終わり---------------------*/





/* タイムテーブル：左右2枚レイアウト */
.timetable-grid{
  display: grid;
  grid-template-columns: 1fr 1fr; /* 左右で等幅 */
  gap: 16px;
  align-items: start;
}

.timetable-card{
  margin: 0; /* figure のデフォルト余白をリセット */
}

.timetable-card figcaption{
  text-align: center;
  font-weight: 700;
  margin: 0 0 .5rem;
  font-size: 1.05rem;
}

.timetable-card img{
  display: block;
  width: 100%;     /* カラム幅にフィット（=左右で同じ幅） */
  height: auto;    /* 比率維持で縮尺 */
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  background: #fff;
}

/* スマホは縦並びに */
@media (max-width: 820px){
  .timetable-grid{
    grid-template-columns: 1fr;
  }
  .timetable-card{
    max-width: 900px;
    margin: 0 auto;
  }
}




/*---------------委員会---------------------*/
.bunjitsu {
  padding: 2em;
  background-color: #fdf6f0;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}
.bunjitsu-intro {
  font-size: 1rem;
  margin-top: 0.5em;
  margin-bottom: 1.5em;
  line-height: 1.8;
  color: #555;
}
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5em;
  margin-top: 1em;
}
.section-card:hover {
  transform: translateY(-5px);
}
.section-card h2 {
  font-size: 1.25em;
  margin-bottom: 0.5em;
  color: #c1440e;
}
.section-card p {
  font-size: 0.95em;
  line-height: 1.6;
}
.section-card {
  background-color: #fff;
  border-radius: 1em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5em;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: #333;
  z-index: 0;
  overflow: hidden;
}

.section-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(255,255,255,0.85); /* 白っぽいフィルター */
  z-index: -1;
}
/* 各課の背景画像 */
.section-card.honbu {
  background-image: url("images/honbu.png");
}
.section-card.kikan {
  background-image: url("images/kikan.png");
}
.section-card.kaikei {
  background-image: url("images/kaikei.png");
}
.section-card.baiten {
  background-image: url("images/baiten.png");
}
.section-card.soushoku {
  background-image: url("images/soushoku.png");
}
.section-card.okunai {
  background-image: url("images/okunai.png");
}
.section-card.soumu {
  background-image: url("images/soumu.png");
}
/*----------------------委員会終わり-----------------*/


/* ─────────--- 灰色の謎図形 消滅パッチ ─────────------- */

/* 一時的にPC強制モード */
@media all {
  body { outline: 5px solid red !important; } /* デバッグ用: ちゃんと効いてるか確認 */
  .page-nav ul { flex-direction: row !important; }
  .hero-image img { max-width: 100% !important; height: auto !important; }
}
/* PCではハンバーガーを完全に隠す */
.nav-toggle{ display: none !important; }
/* nav をシンプルなフレックスに統一（空き列を無くす） */
.page-nav .nav-inner{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.nav-left{ margin-right: auto !important; }
/* メニュー行の背景や上ボーダーを消す（モバイル用が残った時の保険） */
.nav-links{
  background: transparent !important;
  border-top: 0 !important;
  margin-top: 0 !important;
}
/* 仕切り線は“項目間”だけ（左端やロゴの横に変な線が出ないように） */
.nav-links li{ position: relative; }
.nav-links li:first-child .nav-link{ border-left: none !important; }
.nav-links li:not(:first-child) .nav-link{
  border-left: 1px solid var(--nav-sep, #d8d8d8) !important;
}
/* 5等分で横並び（PC） */
@media (min-width: 881px){
  .nav-links{
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    align-items: stretch !important;
    gap: 0 !important;
  }
}
/* モバイルは縦積み。開閉は後で戻すとしても、灰色帯を出さない */
@media (max-width: 880px){
  .nav-links{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  /* モバイルの区切りは横線だけに（灰色の帯を作らない） */
  .nav-links li:not(:first-child) .nav-link{
    border-left: none !important;
    border-top: 1px dashed var(--nav-sep, #d8d8d8) !important;
  }
}
/*----------------------修正用--------------------*/














/* メニューリスト */
.menu ul {
  list-style: none;
  padding: 0;
  display: inline-block;
  text-align: left;
}
.menu-list li {
  margin: 0.5rem 0;
}

/* コンテナの左右余白は自動で調整 */
.container {
  width: min(100% - 24px, 1000px);
  margin-inline: auto;
}

.map-image {
  width: 100%;
  height: auto;
  margin-top: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}





nav ul{
display: table;
margin: 0 auto;
padding: 0 ;
width: 100%;
text-align: center;
}
nav li{
display: table-cell;
min-width: 50px;
}
nav a{
display: block;
width: 100%;
text-decoration: none;
color: #555;
padding-bottom: 5px;
}
nav li.current{
border-bottom: 3px solid #92D050;
}
nav li:hover{
color: #E7DA66;
border-bottom: 3px solid #F0E475;
}