.header-menu a {
    color: black; /* ハンバーガーメニューで表示されるときの文字色 */
}

@media screen and (min-width: 768px) {
    .header-menu a {
        color: white;
        padding: 0px 20px 0px 20px;
        font-size: 14px;
        display: inline-block;
        white-space: nowrap;
    }
}

header .logo {
  margin-top: 10px;
}

body {
    background-color: #333;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-x: hidden; /* 水平方向のオーバーフローを防ぐ */
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

header {
    background: url('images/header-background.jpg') no-repeat center center/cover; /* ヘッダーに背景画像を設定 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 130px; /* ヘッダーの高さを設定 */
    color: white; /* テキストカラーを白に設定 */
}

.header-overlay {
    position: absolute;
    bottom: 10px; /* ヘッダーの下から10pxの位置 */
    left: 20px; /* ヘッダーの左から20pxの位置 */
    color: white; /* 文字の色は白 */
    font-weight: bold; /* 文字は太字 */
    z-index: 10; /* ヘッダー画像よりも前面に表示 */
    font-size: 18px; /* 文字サイズを18pxに設定 */
}

h2 {
    margin-bottom: 10px; /* 下の余白を10pxに設定 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    height: auto; /* 高さを自動で調整 */
    max-height: 80px; /* ヘッダーの高さに合わせて最大高さを設定 */
    width: auto; /* 幅は自動で調整 */
}

nav {
    position: relative;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu span {
    height: 3px;
    width: 25px;
    background: white; /* ハンバーガーアイコンの色を白に設定 */
    margin-bottom: 4px;
    border-radius: 3px;
}

#business {
    background-color: #333; /* 背景色 */
    color: white; /* 文字色 */
    margin-bottom: 0px; /* セクション下のマージンを10pxに変更 */
}

#business .table-container table {
    width: 100%; /* テーブルの幅 */
    margin: auto; /* 中央揃え */
    border-collapse: separate; /* ボーダーの設定 */
    border-spacing: 0;
    margin: 0 0 5px 0; /* テーブル間のマージンを10pxに設定 */
}

#business .table-container img {
    max-width: 200px;
    max-height: 150px;
    display: block; /* ブロック表示 */
    margin: 0 auto; /* 画像のマージン */
}

#business .table-container tr td {
    display: flex; /* Flexboxを使用 */
    flex-direction: column; /* 縦方向の配置 */
    align-items: center; /* 中央寄せ */
    justify-content: center; /* 中央寄せ */
    text-align: center; /* テキストを中央寄せ */
    width: 100%; /* 幅 */
    padding: 10px; /* パディングを15pxから10pxに変更 */
}

#business .table-container h3 {
    text-align: center; /* タイトルを中央寄せに */
    color: #fff; /* 白色でテキストを表示 */
    margin: 5px 0; /* 上下のマージンを5pxに縮小 */
}

.table-container table + table {
    border-top: 1px solid white; /* 上のテーブルに白い線を追加 */
}

#business a {
    color: #ff9122; /* リンクの色をオレンジに設定 */
    text-decoration: none; /* 下線を非表示に */
}

#business a:hover {
    color: #ff5722; /* ホバー時に色を変更 */
}

#business .portfolio-link {
    margin-top: 20px; /* 上部に20pxのスペースを追加 */
    display: block; /* リンクをブロックレベル要素として扱う */
}

#business .instagram-link {
    margin-top: 20px; /* 上部に20pxのスペースを追加 */
    display: block; /* リンクをブロックレベル要素として扱う */
}

#business .sns-link {
    margin-top: 20px; /* 上部に20pxのスペースを追加 */
    display: block; /* リンクをブロックレベル要素として扱う */
}

.steps-wrapper {
    display: flex;
    overflow-x: auto; /* 横スクロールを有効にする */
    white-space: nowrap; /* 子要素を横に並べる */
    gap: 20px; /* ステップ間のスペース */
    padding: 10px;
}

.step {
    display: inline-block;
    vertical-align: top;
    white-space: normal;
    width: 80%; /* スマートフォン表示のために幅を調整 */
    min-width: 200px;
    max-width: 300px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start; /* スクロールスナップの位置を調整 */
}

.num {
    font-size: 2.5em;
    color: #555;
    margin-bottom: 10px;
}

.step-detail h3 {
    font-size: 1.0em;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.step-detail p {
    font-size: 1em;
    color: #666;
}

/* 横スクロール対応 */
@media (max-width: 768px) {
    .step {
        width: 90%; /* 幅を調整 */
    }

    .step-detail {
        text-align: left;
    }
}

#menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

#menu-toggle {
    display: none;
}

#menu-toggle:checked + .hamburger-menu + #menu {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 50%;
    background-color: #fff;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    flex-direction: column;
    justify-content: center; /* 上下の中央に配置 */
    align-items: center;
    gap: 20px;
    padding: 20px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

#menu-toggle:checked + .hamburger-menu + #menu + .close-menu {
    display: flex;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    display: none;
    flex-direction: column;
}

.close-menu span {
    height: 3px;
    width: 25px;
    background: black;
    margin-bottom: 4px;
    border-radius: 3px;
}

#menu li {
    text-align: center;
    width: 100%;
}

#menu a {
    display:block;
    padding: 10px 0;
    width: 100%;
}

@media (max-width: 768px) {
    .hamburger-menu {
        position: absolute;
	    top: 50%;
	    transform: translateY(-50%);
	    right: 0px;
        display: flex;
    }
    #menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 0;
        right: 0;
    }
}

.contact {
    background-color: #f2f2f2;
    padding: 50px 20px;
    text-align: left;
}

.form-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.contact-form {
    width: 100%;
    max-width: 500px; /* 最大幅を設定して中央揃え */
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 10px;
}

@media (max-width: 600px) {
    .contact-form {
        padding: 10px; /* スマホ表示の時はパディングを減らす */
    }
}

.contact .container {
    max-width: 800px;
    margin: 0 auto;
}

.contact .title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.contact .description {
    font-size: 0.7em;
    margin-bottom: 20px;
    color: #000;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #f2f2f2;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 1em;
    color: #333;
    margin-bottom: 5px;
}

.form-group .required {
    color: red;
}

.form-group input,
.form-group textarea {
    font-size: 1em;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.contact-form .btn {
    padding: 10px 20px;
    font-size: 1em;
    color: #fff;
    background-color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

.contact-form .btn:hover {
    background-color: #555;
}

.company {
    background: url('images/company_bg.jpg') no-repeat center center/cover;
    padding: 50px 20px;
    text-align: center;
    position: relative;
    color: #fff; /* 文字色を白に設定 */
}

.company::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* 黒のオーバーレイを追加してテキストを見やすくする */
    z-index: 0;
}

.company .container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1; /* オーバーレイの上に表示 */
	display: flex;        /* Flexboxを有効化 */
    justify-content: center; /* 水平方向の中心に配置 */
    align-items: center;     /* 垂直方向の中心に配置 */
    width: 100%;         /* コンテナの幅を100%に設定 */
    height: 100%;        /* 必要に応じて高さを100%に設定 */
}

.company .title {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #fff;
}

.company-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.company-text {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.company-text h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #fff;
}

.company-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
}

.company-table th,
.company-table td {
    padding: 10px;
    border: 1px solid #fff;
    text-align: left;
    color: #fff;
}

.company-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.company-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#about {
    position: relative; /* 絶対位置指定された子要素の基準点を設定 */
    background-image: url('/images/about-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#about::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(109, 109, 109, 0.90); /* オーバーレイとして半透明のグレーを設定 */
    z-index: 2; /* テキストより前面に */
}

#about table {
    width: 100%;
    height: 100%;
    position: relative; /* 疑似要素との関係で relative が必要 */
    z-index: 3; /* テキストがオーバーレイより上に来るように設定 */
}

#about td {
    padding: 20px;
    text-align: center;
}

#about a {
    color: #ff9122; /* リンク色 */
    text-decoration: none;
    font-weight: bold;
    margin: 0 10px;
}

main {
    padding: 165px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    padding: 20px;
    background-color: #fff;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 0px 0;
    margin-top: 0px;
}

footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap:0px; /* リンク間のスペース */
    padding: 0px 0;
}

.footer-links a {
    text-decoration: none;
    color: white;
    padding: 0px;
    flex: 1 1 auto;
    text-align: center;
    min-width: 100px;
}

/* 画面が狭いときの設定 */
@media (max-width: 768px) {
    .footer-links a {
        flex: 1 1 33%; /* 1行目に3つのリンク */
    }
    .footer-links a:nth-last-child(-n+2) {
        flex: 1 1 50%; /* 最後の2つのリンクを次の行で50%ずつに */
    }
}

/* 画面が広いときの設定 */
@media (min-width: 768px) {
    .footer-links a {
        flex: 1 1 20%; /* 画面が広い場合は各リンクが20%の幅を取る */
    }
}

/* Back to top button */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #555;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* -----------------------------------------------
   @ スマホ（767px以下）でハンバーガーメニューを右端に寄せる
----------------------------------------------- */
@media screen and (max-width: 767px) {
  header .container {
    position: relative;     /* @-1. container を相対配置に */
    justify-content: center;/* （既存の中央寄せを維持） */
  }

  .hamburger-menu {
    position: absolute;     /* @-2. アイコンを絶対配置 */
    right: 20px;            /* 画面右端から20px内側に寄せる */
    top: 50%;               /* 親要素（header）の中央に */
    transform: translateY(-50%);
  }
}

/* -----------------------------------------------
   A PC（768px以上）でメニューを右端に寄せる
----------------------------------------------- */
@media screen and (min-width: 768px) {
  nav {
    margin-left: auto;      /* A-1. nav（＝ul.menu を内包）のみ右端に寄せる */
  }
  /* もし ul.header-menu に直接付けたい場合は下記でも可
  .header-menu {
    margin-left: auto;
  }
  */
}

header .logo img {
    transform: scale(0.5);
    transform-origin: left center;  /!* 縮小の基準点を左中央にするとズレにくい *!/
  }