@import url(https://fonts.googleapis.com/earlyaccess/notosansjp.css);
@import url(https://fonts.googleapis.com/css?family=Pacifico);

/* =========================================================
   Reset / Base
========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body,div,dl,dt,dd,ul,ol,li,
h1,h2,h3,h4,h5,h6,pre,form,fieldset,
input,textarea,p,blockquote,th,td {
  margin: 0;
  padding: 0;
}

ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
caption,th { text-align: left; }
q:before,q:after { content: ''; }
object,embed { vertical-align: top; }
legend { display: none; }
h1,h2,h3,h4,h5,h6 { font-size: 100%; }
img,abbr,acronym,fieldset { border: 0; }

:root{
  --content-max: 1024px;
  --innerS-wide: 60%;
  --innerS-narrow: 94%;
  --gutter: 16px;

  --header-h-mobile: 60px;      /* モバイル固定ヘッダー高さ */
  --section-pad-top: 50px;
  --section-pad-bottom: 80px;
}

body{
  font: 14px/1.9 'Noto Sans JP', Arial, Verdana, 游ゴシック, YuGothic,
        'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif;
  font-weight: 300;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  color: #000;
  background-color: #fff;
}

a{
  color: #0066ff;
  text-decoration: none;
}
a:hover, .active{ text-decoration: underline; }
a:active, a:focus, input:active, input:focus { outline: 0; }

img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* 段落とリストの基本（ナビには影響させない） */
p { margin: 0 0 1em; }
.innerS ol { list-style: decimal; padding-left: 1.2em; }
.innerS ul { list-style: disc; padding-left: 1.2em; }
.innerS li { margin: 6px 0; }

/* =========================================================
   Header / Nav (Desktop)
========================================================= */
#header{
  text-align: center;
  background-color: #fff;
}

#headerWrap{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 10px var(--gutter) 0;
}

#header h1{
  padding-top: 20px;
  margin: 0;
}

#header h1 img{
  width: 300px; /* HTMLのwidth指定があっても崩れにくいように */
  max-width: 90vw;
  height: auto;
  margin: 0 auto;
}

#header p{
  margin: 6px 0 0;
}

#mainnav{
  margin-top: 8px;
}

#mainnav a{
  color: #000;
}

#menuWrap{
  display: none; /* デスクトップではハンバーガー非表示 */
}

/* デスクトップ：横並びメニュー */
@media only screen and (min-width: 800px){
  .panel{
    display: block !important;
  }

  #mainnav li{
    display: inline-block;
    padding: 16px 12px;
    font-size: 15px;
    vertical-align: middle;
  }

  #mainnav li a img{
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
  }
}

/* =========================================================
   Main Image (絶対配置をやめて安定させる)
========================================================= */
#mainImg{
  width: 100%;
  text-align: center;
  padding: 20px 0 10px;
}

#mainImg img{
  width: min(600px, 92vw);
  height: auto;
  margin: 0 auto;
}

/* =========================================================
   Sections (重なり対策：負のmargin禁止。アンカーは scroll-margin-top で処理)
========================================================= */
section{
  clear: both;
  background-color: #fff;
  margin: 0;
  padding: var(--section-pad-top) 0 var(--section-pad-bottom);
}

/* 見出し */
section h2{
  font-family: 'Pacifico', cursive;
  width: 60%;
  margin: 0 auto 40px;
  font-size: 22px;
  font-weight: normal;
  text-align: center;
  background: url(../images/borderBlack.png) repeat-x 0 50%;
  background-size: 1px 1px;
}

section h2 span{
  background: #fff;
  padding: 0 80px;
}

/* 中身幅 */
.inner{
  width: 94%;
  margin: 0 auto;
  padding-bottom: 50px;
}

.innerS{
  width: var(--innerS-wide);
  margin: 0 auto;
}

/* 追加のセクション個別指定（過剰な padding/margin を入れない） */
#sec02,#sec03,#sec04,#sec05,#sec06{
  padding-top: 0;
  padding-bottom: 0;
}

/* =========================================================
   Footer
========================================================= */
#footer{
  clear: both;
  padding: 50px 10px 50px 0;
  text-align: center;
  font-size: 12px;
}

/* =========================================================
   Map iframe (元CSSの機能を維持)
========================================================= */
#map{
  position: relative;
  padding-bottom: 75%;
  height: 0;
  overflow: hidden;
  z-index: 0;
}
#map iframe{
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* =========================================================
   Responsive (Tablet/Phone)
========================================================= */
@media only screen and (min-width: 1200px){
  .inner{ width: var(--content-max); }
}

/* 641px以下の幅調整 */
@media only screen and (max-width: 640px){
  .innerS{
    width: var(--innerS-narrow);
  }

  section h2{
    width: 94%;
    margin: 0 auto 20px;
  }

  section h2 span{
    padding: 0 30px;
  }
}

/* =========================================================
   Mobile Header + Hamburger Nav
   - header fixed
   - body padding-top で押し下げ
   - アンカーずれは scroll-margin-top で吸収
========================================================= */
@media only screen and (max-width: 799px){
  body{
    padding-top: var(--header-h-mobile);
  }

  #header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h-mobile);
    z-index: 500;
    border-bottom: 1px solid #ccc;
  }

  #headerWrap{
    height: 100%;
    max-width: none;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* モバイルでは日程行は詰める（必要なら display:block に戻してもOK） */
  #header p{
    display: none;
  }

  #header h1{
    padding-top: 0;
  }

  #header h1 img{
    max-height: 36px;
    width: auto;
    max-width: 70vw;
    margin: 0;
  }

  /* ハンバーガー */
  #menuWrap{ display: block; }
  a#menu{
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
  }

  #menuBtn{
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    margin: -1px 0 0 -9px;
    background: #000;
    transition: .2s;
  }

  #menuBtn:before, #menuBtn:after{
    display: block;
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #000;
    transition: .3s;
  }
  #menuBtn:before{ top: -7px; }
  #menuBtn:after{ top: 7px; }

  /* JSが close クラスを付ける想定（元テンプレ互換） */
  a#menu .close{ background: transparent; }
  a#menu .close:before, a#menu .close:after{ top: 0; }
  a#menu .close:before{ transform: rotate(-45deg); }
  a#menu .close:after{ transform: rotate(-135deg); }

  /* パネル */
  .panel{
    width: 100%;
    display: none;          /* JSで slideToggle 等される前提 */
    position: absolute;
    top: var(--header-h-mobile);
    left: 0;
    z-index: 100;
    background: #fff;
  }

  #mainnav{
    position: static; /* headerWrap内に置くが、panelは absolute で出る */
    width: auto;
    text-align: right;
  }

  #mainnav ul{
    border-bottom: 1px solid #ccc;
    background: #fff;
    text-align: left;
  }

  #mainnav li a{
    position: relative;
    display: block;
    padding: 15px 25px;
    border-bottom: 1px solid #ccc;
    color: #000;
    font-weight: 400;
  }

  #mainnav li a:before{
    display: block;
    content: "";
    position: absolute;
    top: 50%;
    left: 8px;
    width: 6px;
    height: 6px;
    margin: -4px 0 0 0;
    border-top: solid 2px #000;
    border-right: solid 2px #000;
    transform: rotate(45deg);
  }

  /* 固定ヘッダーでアンカーが隠れないように */
  section{
    scroll-margin-top: calc(var(--header-h-mobile) + 10px);
  }
}
