﻿/* =========================================
   基本設定
========================================= */

html, body{
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

*, *::before, *::after{
  box-sizing: inherit;
}

/* =========================================
   PCヘッダー（960以上）
========================================= */

.main-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #00489B;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

/* PCサブメニュー */
.sidebar-header{
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: 60px;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  z-index: 90;
}

@media(max-width:959px){
  .sidebar-header{
    display: none;
  }
}
@media(min-width:960px){

  .pc-slide{
    margin-top: 130px; /* header(70)+sidebar(60) */
  }

}

/* =========================================
   スマホ用スライドヘッダー（959以下）
========================================= */

@media(max-width:959px){
  .main-header{
    display: flex;
  } 
  
  .sp-header{
    position: static;
    width: 100%;
  }
  
  .sp-header,
  .pc-slide{
    margin-top: 70px;
  }/* PCヘッダーを消す */
  /* スライドをヘッダー化 */

  /* スライド背景 */
  .img-frame{
    width: 100%;
    height: 20vh;
    margin: 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
  }

  .sp-logo img{
    height: 45px;
    width: auto;
  }
  
  .toggle-btn::after{
    content: "MENU";
    position: absolute;
    top: 30px;          /* ハンバーガーの下 */
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
  }

  /* 本文が隠れないように */
  body{
    padding-top: 0;
  }
}

/* =========================================
   ハンバーガーメニュー
========================================= */

.toggle-btn{
  position: fixed;
  top: 15px;
  left: 15px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 2001;
}

@media(min-width:960px){
  .toggle-btn{
    display: none;
  }
}

.toggle-btn span{
  position: absolute;
  left: 0;
  width: 30px;
  height: 2px;
  border-bottom: solid 2px #fff;
  transition: 0.4s;
}

.toggle-btn span:nth-child(1){ top: 5px; }
.toggle-btn span:nth-child(2){ top: 15px; }
.toggle-btn span:nth-child(3){ top: 25px; }

/* open状態 */
.open .toggle-btn span {
    background-color: #333;
  }

.open .toggle-btn span:nth-child(1){
  transform: translateY(10px) rotate(-315deg);
}
.open .toggle-btn span:nth-child(2){
  opacity: 0;
}
.open .toggle-btn span:nth-child(3){
  transform: translateY(-10px) rotate(315deg);
}

/* メニュー本体 */
nav{
  width: 300px;
  position: fixed;
  top: 0;
  left: -300px;
  bottom: 0;
  background: #fff;
  transition: 0.4s;
  z-index: 1500;
  opacity: 0;
}

.open nav{
  left: 0;
  opacity: 1;
}

nav .inner{
  padding: 50px 20px;
}

nav ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li{
  border-bottom: 1px solid #ccc;
}

nav a{
  display: block;
  padding: 15px;
  text-decoration: none;
  color: #333;
}

/* マスク */
#mask{
  display: none;
}

.open #mask{
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1200;
}

/* =========================================
   top-text（文章幅）
========================================= */

.top-text{
  max-width: 700px;
  margin: 10px auto 30px;
  line-height: 1.8;
  font-size: 16px;
  width: 50%;
}

@media(max-width:959px){
  .top-text{
    width: 90%;
  }
}

/* =========================================
   infoArea（お知らせなど）
========================================= */

.info-wrapper{
  display: grid;
  gap: 20px;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 15px;
}

@media(min-width:960px){
  .info-wrapper{
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
  }
}

@media(max-width:959px){
  .info-wrapper{
    grid-template-columns: 1fr;
  }

  .infoArea{
    width: 90%;
    margin: 0 auto;
  }
}

/* =========================================
   menuArea（画像メニュー：常に2列）
========================================= */

#menuArea ul.menuList{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#menuArea ul.menuList li{
  margin: 0;
  padding: 0;
}

#menuArea ul.menuList img{
  width: 100%;
  height: auto;
  display: block;
}

@media(min-width:960px){

  .pc-slide{
    margin-bottom: 0;
  }

  .top-text{
    margin-top: 0;
    padding-top: 0;
  }

}
/* =========================================
   フッター
========================================= */

footer{
  background: #00489B;
  padding: 20px;
  text-align: center;
}

footer p{
  margin: 0;
  color: #fff;
  font-weight: bold;
}
