@media (max-width: 767px) {
    
/* 全体 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

    .img {
        max-width: 100%;
    }
    
body, html {
  overflow-x: hidden;
}
    body {
        font-size: 12px; /* 画面幅が768px以下の場合にフォントをさらに縮小 */
        line-height: 1;
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        height: 100%;
        box-sizing: border-box;
        line-height: 1.6;
        overflow-x: hidden;
        font-size: 16px; /* 基本のフォントサイズ */
        transform: scale(var(--scale-factor));
        transform-origin: top left;
    }
    
    .navbar .logo{
        margin: 0 0 0 auto;
    }
    .logo img{
        width: 45vw;
        vertical-align: middle;
    }
    
    /* Navbar */
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%; /* 画面幅100%に設定 */
        background: linear-gradient(0deg, rgba(220, 95, 37, 0.8), rgba(255, 255, 255, 0.8)); /* 背景色を設定 */
        position: absolute; /* 上部に固定 */
        top: 80px; /* ナビバーの高さに応じて調整 */
        left: 0;
        z-index: 10;
        gap: 1rem;
        padding-inline-start: 0; /* 調整 */
        margin-block-start: 0; /* 調整 */
    }

    .navbar.active .nav-links {
        display: flex; /* ハンバーガーメニューがクリックされたときに表示 */
    }

    .nav-links li {
        text-align: center;
        padding: 1rem 0; /* 項目の上下余白 */
        border-bottom: 1px solid #ddd; /* 項目間の区切り線 */
        width: 100%; /* リンク項目を幅いっぱいに配置 */
    }

    .nav-links li:last-child {
        border-bottom: none; /* 最後の項目の区切り線を削除 */
    }

    .hamburger {
        display: block;
        position: absolute;
        cursor: pointer;
        font-size: 3rem;
        margin-left: auto;
        margin-right: 1rem;
        
    }

/* hero */

    .hero-content {
        position: relative;
        z-index: 1;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
        margin-top: 11rem;
        margin-left: 2rem;
    }
    
    .hero-content h1{
        text-align: left;
        line-height: 1em;
    }
    
    #hero-title {
        font-size: 10vw; /* サイズを調整 */
        text-align: left; /* 必要に応じて位置を調整 */
        line-height: 1.2; /* 改行後の行間を調整 */
    }
/* About Section */
.about {
    padding: 3rem;
}

.about h1 {
    margin-left: -2rem;
    line-height: 1em;
}


.about h2 {
    margin-top: -7rem;
    line-height: 1em;
}

.about p{
    margin-top: 3rem;
}


/* Services Section */
.services {
    padding: 3rem 3rem 3rem 0;
}

.services h1 {
     margin-left: -9rem;
    line-height: 1em;
}

.services h2 {
    margin: 1.5rem 0 1rem -6.8rem;
    line-height: 1em;
}

.service-card{
    padding-bottom: 3rem;
    padding-top: 0.8rem;
    background-color: #f8f8f8;
    display: flex;
    flex-wrap: wrap; /* 折り返しを許可 */
    justify-content: space-between; /* 子要素の間隔を均等に配置 */
    gap: 1rem; /* カード間のスペース */
}

.service-card-box {
    margin-top: 1.5rem;
}

.service-card-title {
  display: flex; /* Flexboxを適用 */
  justify-content: center; /* 水平方向に中央揃え */
  align-items: center; /* 垂直方向に中央揃え */
  padding: 15px; /* 内側の余白を調整 */
  background-color: #1A1A40; /* 背景色を設定 */
  box-sizing: border-box; /* サイズ計算にパディングとボーダーを含める */
  height: auto; /* 高さを内容に合わせる（必要に応じて変更） */
  text-align: left; /* テキストを中央揃え */
  width: 950%;
  }

  .service-card-title h3 {
    font-size: 5vw; /* フォントサイズを調整 */
    color: #FFF; /* テキストの色 */
    margin: 0; /* マージンをリセット */
    padding: 0 0 0 3rem; /* 内側の余白を調整 */
    line-height: 1.4; /* 行間を調整 */
    word-break: break-word; /* 長い単語を改行 */
    text-align: left; /* テキストを中央揃えにする */
  }



.service-card-title:after {
  position: absolute;
  content: '';
  width: 0px;
  height: 0px;
  z-index: 1;
  top: 0;
  right: 0;
  border-width: 0 0 0 0;
  border-color: #f8f8f8 transparent  #f8f8f8 transparent;
  border-style: solid;
}

.services table{
    display: inline-block;
    position: relative;
    padding: 1rem 0 0 3rem;
    width: 100%; /* テーブル全体の幅を統一 */
    table-layout: fixed; /* 各列の幅を固定 */
}

.services th {
    display: block;
    width: 100%;
    font-size: 1.2rem;
    color: #1A1A40;
    font-weight: normal; /* 太字を解除 */
}
    
.services td {
    display: block;
    width: 100%;
    margin: 1.5rem 0 0 0;
    padding: 0;
}

.services table td img {
    width: 100%; /* 画像の横幅を統一 */
    object-fit: cover; /* 画像の比率を維持しながらトリミング */
}

/* Choose Section */
.choose {
    padding: 3rem;
}

.choose h1 {
    margin: 0 2rem 0 -2rem;
    line-height: 1em;
    text-align: left;
}

.choose h2 {
    margin-left: 0rem;
    line-height: 1em;
}

.choose table {
    display: flex;
    justify-content: center;
    width: 100%; /* テーブル全体の幅を統一 */
    table-layout: fixed; /* 各列の幅を固定 */
    padding-top: 4rem;
    
}

.choose td {
    width: 80%;
    color: #f8f8f8;
    font-size: 18px;
    padding-bottom: 3rem;
}
    

.choose img {
    padding-bottom: 3rem;
}

.choose p {
}

.choose h3 {
    color: white;
    font-size: 150%;
    margin-bottom: 0.5rem;
}



/* Banking Section */
.banking {
}

.banking h1 {
    margin: 3rem 1rem 0 -9rem;
    line-height: 1em;
}

.banking h2 {
    line-height: 1em;
    margin: -5.5rem -10rem -0.2rem -7.5rem;
}

.banking h2.visible {
    opacity: 1;
    transform: translateX(0); /* 元の位置に戻る */
}

.banking-card {
    display: flex;
    flex-wrap: wrap; /* flexアイテムを折り返す（複数行に配置する） */
    justify-content: center;
    column-gap: 40px;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 5rem;
    gap: 1rem;
}

.banking-card-item {
    background-color: white;
    border-radius: 20px; /* 角丸にする */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 軽い影を追加 */
    display: flex; /* Flexboxで画像とテキストを横並び */
    flex-wrap: wrap;
    align-items: center; /* 中央揃え */
    padding: 1rem;
    width: 90%; /* カード幅を調整 */
    box-sizing: border-box; /* ボックスのサイズをpadding含めて計算 */
    text-align: center;
    
}

.banking-card img {
    border-radius: 50%; /* 丸い画像 */
    width: 23%;
    margin-left: 0.5rem;
    margin-right: 2rem; /* テキストとの隙間 */
    border: solid 1px gray;
}

.banking-card a {
    text-decoration: none;
    font-size: 4.2vw;
    color: #1A1A40;
    font-weight: bold;
    position:relative;
    margin: 0;
}

a::before {
    display: block;
    position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
}

/* Contact */

.contact img {
    width: 100%;       /* 横幅を親要素に合わせる */
    height: 100%;      /* 高さを親要素に合わせる */
    object-fit: cover; /* 縦横比を保ちながら親要素を埋める */
    display: block;
}

.contact .overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
    
.contact h2 {
    font-size: 4rem;
    margin: 0;
    color: white;
}

.contact p {
    margin: 0.5rem 0 0;
    font-size: 2rem;
    color: white;
}



/* Footer */
footer {
    text-align: center;
    background-color: darkgray;
    padding-top: 0.3rem;
    padding-bottom: 1.5rem;
}

    
/* END ↑ここまで
--------------------------------------------------------- */

    