body {
    font-family: "Arial", sans-serif;
    background-color: #2c3e50;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  header,
  footer {
    width: 100%;
  }
.header-container.cover {
    position: relative;
    background-image: url(../images/works.jpeg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  .header-container.cover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 高さを100%に変更して要素全体を覆う */
    background-color: rgba(0, 0, 0, 0.3); /* 黒の半透明色 */
    z-index: 1; /* 背景画像より前面に表示 */
}

/* 子要素は背景オーバーレイよりも前面に表示 */
.header-container * {
    position: relative;
    z-index: 2;
}
  
  .header-container * {
    position: relative;
    z-index: 2; 
  }
  .header-container h1{
    width: 50%;
    padding-top: 25%;
    border-bottom: #fff 3px solid;
    padding-left: 15%;
  }
  .toptxt{
    padding-top: 10px;
    padding-bottom: 150px;
    padding-left: 15%;
  }
main{
    margin-left: 15%;
    margin-right: 15%;
}
.container{
    margin-bottom: 150px;
}
.container h2{
    padding-top: 50px;
    border-bottom: #fff 1px solid;
    text-align: center;
    padding-bottom: 10px;
}
.gallery{
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    margin-bottom: 25px;
}
.gallery-item{
  width: 45%;
  gap: 20px;
}
.gallery-item img{
  width: 100%;
  height: auto;
}
.yoko img{
    height: 100%;
    width: 100%;
}
.tate img {
  width: 100%;
  height: 100%;
}
.mobile{
    display: none;
}
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #007BFF;
  color: white;
  text-align: center;
  line-height: 40px;
  font-size: 20px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  background-color: #0056b3;
}

@media screen and (max-width: 765px) {
    main{
        margin: 0;
    }
    .header-container h1{
        width: 100%;
        padding: 0;
        padding-top: 150px;
        text-align: center;
        border: 0px solid white;
    }
      .toptxt{
        padding: 0;
        padding-top: 10px;
        padding-bottom: 100px;
        text-align: center;
      }
    .container{
        width: 90%;
        margin-left: 5%;
        margin-right: 5%;
    }
    .gallery{
        display: block;
    }
    .gallery-item{
        width: 90%;
        gap: 20px;
        margin-bottom: 25px;
    }
    .gallery-item img{
      width: 100%;
      margin-left: 5%;
    }
    .details{
      margin-left: 5%;
    }
    .mobile{
        display: block;
    }
}