@charset "UTF-8";
*{
  margin: 0 ;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  font-size: 100%;
  letter-spacing: 0.1rem;
}

a{
  text-decoration: none;
  cursor: pointer;
  color: black;
}
a:visited{
  color: black;
}
.flex{
  display: flex;
}

header{
  background-image: url(./images/logo.png);
  background-repeat: no-repeat;
  background-size: 300px;
  height: 70px;
  font-size: 23px;
}
nav{
margin-left: 40%;
gap: 40px;
padding-top: 20px;

}
a {
  position: relative; /*アンダーラインの位置を決めるための基準 */
  }
  
  a::after {
  position: absolute; /*親要素であるaタグを基準に位置を指定*/
  left: 0;            /*アンダーラインを各メニュー（aタグ）の左端に指定*/
  content: '';        /*本来は、擬似要素に入るテキストなどを’’内に指定。今回はアンダーラインなので何も記載しない*/
  width: 100%;        /*アンダーラインを各aタグの幅に合わせる*/
  height: 2px;        /*アンダーラインの高さ（太さ）*/
  background: #000000;/*アンダーラインの色*/
  }
  a::after {
    position: absolute;
    left: 0;
    content: '';
    width: 100%;
    height: 2px;
    background: #000000;
    bottom: 10px; /*アンダーラインが現れ始める位置（aタグの下辺からの高さ）*/
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    }
    
    a:hover::after {
    visibility: visible;
    bottom: -5px; /*アニメーションが止まる位置*/
    opacity: 1;
    }

    @media screen and (max-width:920px){
      header{
        background-image: url(./images/logo.png);
        background-repeat: no-repeat;
        background-size: 150px;
        height: 60px;
        font-size: 15px;
        font-weight:500;
      }
      nav{
        margin: 0 auto;
      gap: 15px;
      padding-top: 35px;
      justify-content: center;
      }
    }


    h1{
      font-size: 40px;
      font-family: serif;
      margin-top: 60px;
      margin-bottom: 60px;
      margin-left: 10%;
    }
     #section1 ul{
      text-align: center;
      display: flex;
     margin: 0 auto;
      flex-wrap: wrap;
      justify-content: center;
      gap: 3%;
    }
    #section1  li{
      width: 30%;
      margin-bottom: 20px;
    }
    #section1 ul img{
      width:100%;

    }
    @media screen and (max-width:800px){
      #section1  li{
        width: 60%;
        margin-bottom: 50px;
      }
    }
    @media screen and (min-width:800px) and ( max-width: 1050px){
      #section1  li{
        width: 40%;
        margin-bottom: 50px;
      }
    }