body {
    background-color: hsl(0, 2%, 11%);
    color:#ffffff;
    letter-spacing: 1px;
    font-weight: 300;
    font-family: 'Merriweather';
}

header{
    font-weight: 700;
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: background-color 0.3s ease-out;
    background-color: rgba(53, 53, 53, 0);
    background-color: transparent;
}

header .container{
    max-width: 1080px;
    width: 90%;
    margin: 0 auto;
    margin-top: 9px;
}

header .raw{
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

header .logo{
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 500;
}

header ul{
    display: flex;
}

header ul li{
    margin-left: 25px;
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 500;
}

header ul li a{
    display: inline-block;
    position: relative;
    overflow: hidden;
    color:#ffffff;
    text-decoration: none;
}

header ul li a::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transform: translate(-100%, 0);
    transition: transform cubic-bezier(0.215, 0.61, 0.355, 1) 0.4s;
    content: "";
    transform: scaleX(0); 
    transform-origin: left;
}

header ul li a:hover:after {
    transform: scaleX(1);
}

/* section1 */

.section1 {
    position: relative;
    height:  100vh;
    width: 100%;
    background-image: url(..//image/Location4.JPG);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    z-index: 0;
}

.section1::after{
    content:"";
    position: absolute;
    background-color: rgb(0, 0, 0);
    width: 100%;
    height: 500vh;
    left: 0;
    top: 0;
    opacity: 0.3;
    z-index: 0;
}

.section1 .container{
    width: 100%;
    max-width:1080px;
    margin:0 auto;
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 20px;
    align-items: center;
    left: 40%;  
    transform: rotateX(-100);
    top: 40%;
    left: 0%;
    font-family: "Rock Salt", cursive;
}


.section1 h1{
    font-size: 70px;
    font-weight: 600;
    margin-bottom: 55px;
    letter-spacing: 6px;
}

/* section2 */

.section2 {
    position: relative;
    /* height:  100vh; */
    width: 100%;
    z-index: 0;
    padding: 120px 0 80px; /* 上下の余白を明示 */
    min-height: auto;
}

.section2 .container{
    z-index: 2;
    color: white;
    margin-top: 10%; 
    position: relative;
}

.section2 h1{
    font-size: 50px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 80px;
    text-align: right;
    margin-right: 45%;
}

.section2 h2{
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 30px;
    margin-left: 10%;
}

.section2 h3{
    font-size: 25ox;
    margin-bottom: 50px;
    line-height: 30px;
    margin-left: 10%;
    max-width: 50vw;          /* ビューポート幅の50%を上限にする（＝真ん中まで） */
    overflow-wrap: break-word; /* 長い単語も折り返す */   
    word-break: break-word
}

.section2 .pic1{
    background-image: url(../image/トンネル１.JPG);
    background-position: center;
    background-size: cover;
    height:250px;
    margin-left: 10%;
    float: right;
    overflow: hidden;

}

.history-row {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* section3 */

.section3 {
    position: relative;
    height:  130vh;
    z-index: 0;
}

.section3 .container {
    z-index: 2;
    color: white;
    margin-top: 10%;
    position: relative;
    text-align: center;
}

.section3 h1{
    font-size: 40px;
    margin-bottom: 50px;
}

.section3 h2, h3{
    font-size: 20px;
}

.Hiroshima {
    width: 100%;
    max-width: auto; 
    object-fit: contain;
    border-radius: 8px;
    padding: 8px;
    margin-top: 30px;
    margin-bottom: 80px;
}

.Hakata {
    width: 100%;
    max-width: auto; 
    object-fit: contain;
}

.picture-column {
    flex: 0 0 35%;
    min-width: 220px;
    display: flex;
    justify-content: flex-end; 
    margin-top: -60%;
}

.Picture {
    display: flex;
    flex-direction: column; 
    align-items: flex-end;  
    gap: 0;
}

.Picture img {
    display: block;
    max-width: 300px; 
    width: 100%;
    height: auto;
    margin-bottom: 60px;
    object-fit: cover;
}

/* 最後の画像だけ下マージンを消す */
/* .Picture img:last-child {
    margin-bottom: 0;
} */

/*footer*/
/*footer*/

/* .footer {
    position: relative;  
    top: 0;
    left: 0;
    width: 100vw;     
    height: auto;    
    padding: 2rem;
    z-index: 100;      
} */

.footer {
    position: relative;
    width: 100%;
    padding: 2rem;
  height: auto; /* 固定をやめる */
    z-index: 10;
    /* margin-top: 40%; */
}

.footer ul {
    padding: 0;
    list-style: none;
}

address {
    margin-top: 20px;
    margin-left: 30px;
    font-style: normal;
    line-height: 25px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .0rem;
    margin-bottom: 30px;
    margin-left: 40px;
    margin-top: 20px;
}


.footer__navi-heading {
    font-weight: 600;
    font-size: 20px;
}

.footer__logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer__navi li {
    margin-bottom: 0.75rem;
    margin-top: 15px;
}

.footer__address {
    margin-bottom: 3rem;
}

.footer__address a {
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}


@media (min-width: 768px) {
    .md-flex {
    display: flex;
    }

    .md-justify-between {
    justify-content: space-between;
    }

    .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .footer__address a {
    text-decoration: none;
    pointer-events: none;
    }
}

@media (min-width: 1024px) {
    .lg-flex {
    display: flex;
    }
}








/* 1. ベース（小さい画面向け）: max-width 480px 相当 */
@media (max-width: 480px) {
  /* セクション高さ自動化＋余白 */
    .section2, .section3 {
    height: auto !important;
    min-height: 60vh !important;
    padding: 1.5rem 1rem !important;
    } 

    html, body {
    overflow-x: hidden !important;
}

  /* 見出しを柔軟に */
    .section2 h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
    max-width: 90% !important;
    margin-left: 35%;
    }
    .section2 h2 {
    font-size: clamp(1.3rem, 5vw, 2rem) !important;
    margin-left: 7% !important;
    }
    .section2 h3 {
    font-size: clamp(1rem, 4vw, 1.5rem) !important;
    margin-left: 7% !important;
    max-width: 90vw !important;
    line-height: 1.4 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    }

  /* 画像の安全 */
    .Picture img,
    .picture-column img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    }

  /* 非表示にしたい大きな構成要素 */
    .picture-column {
    display: none !important;
    }

  /* コンテナ位置リセット */
    .section2 .container,
    .section3 .container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    padding: 2rem 1rem !important;
    z-index: 2 !important;
    }

}


/* 2. 少し広めのスマホ〜小型タブレット向け（481px〜768px） */
@media (min-width: 481px) and (max-width: 768px) {
    .section2, .section3 {
    height: auto !important;
    min-height: 65vh !important;
    padding: 3rem 1.5rem !important;
    }

    .section2 h1 {
    font-size: clamp(2rem, 5vw, 3rem) !important;
    margin-left: 35%;
    max-width: 85% !important;
    }
    .section2 h2 {
    font-size: clamp(1.5rem, 4.5vw, 2.25rem) !important;
    margin-left: 7% !important;
    }
    .section2 h3 {
    font-size: clamp(1.1rem, 4vw, 1.6rem) !important;
    margin-left: 7% !important;
    max-width: 85vw !important;
    }

    .picture-column {
    display: none !important;
    }

    .section2 .container {
    padding-top: 2.5rem !important;
    }
}

/* 3. 中型以上（769px〜1024px） */
@media (min-width: 769px) and (max-width: 1024px) {
    .section2, .section3 {
    height: auto !important;
    min-height: 70vh !important;
    padding: 4rem 2rem !important;
    }

    .section2 h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem) !important;
    max-width: 80% !important;
    margin: 0 auto !important;
    }
    .section2 h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
    margin-left: 5% !important;
    }
    .section2 h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.75rem) !important;
    margin-left: 5% !important;
    }

    .picture-column {
    display: flex !important;
    flex: 0 0 35% !important;
    min-width: 220px !important;
    justify-content: flex-end !important;
    margin-top: 0 !important;
    }

    .Picture img {
    max-width: 100% !important;
    height: auto !important;
    margin-bottom: 2rem !important;
    object-fit: cover !important;
    }
}


@media only screen and (max-width: 768px){
/* メニューのスタイル */
.menu {
    position: fixed;
    top: 0;
    right: -100%; /* 初期状態では画面の外に隠れている */
    width: 250px;
    height: 100%;
    background-color: #333333;
    color: #ffffff;
    transition: right 0.3s ease; /* スライドインのアニメーション */
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
    display:flex;
    flex-flow: column;
}

/* メニューが開いているとき */
.menu.open {
    right: 0;
}

/* ボタンのスタイル */
.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    cursor: pointer;
    z-index: 20;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #ffffff;
    margin: 7px 0;
    transition: 0.4s;
}

/* バツ印に変化するスタイル */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* メニューリストのスタイル */
.menu ul {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    padding: 0;
    margin-top: 80px;
}

header .ul{
    display: block;
}



.menu li a {
    color: #ffffff;
    text-decoration: none;
    display: block;
}

header ul li a::after {
    display: none;
}
}

html {
    scroll-behavior: smooth;
}

@media only screen and (max-width: 375px) {
    .section1 h1{
        font-size: 50px;
    }

    .section2 h1{
        font-size: 37px !important;
        margin-left: 26%;
    }
}

@media only screen and (min-width: 376px) and (max-width: 480px) {
    .section1 h1{
        font-size: 55px;
    }

    .section2 .container {
    margin-top: 10%!important;
    position: relative!important;
}

.section2 h1{
    font-size: 40px!important;
    text-align: center!important;
    margin-left: 30%;
}
    .section1{
    background-attachment: scroll !important;
}

}