@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Japanese:wght@400;700&display=swap');

body {
    margin: 0;
    font-family: "Noto Sans Japanese", Arial, sans-serif;
    overflow-x: hidden; /* 横スクロールを非表示にする */
    /* padding-top: 90px; /* ヘッダーの高さに合わせて調整 */
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent; /* 透明に変更 */
    color: white; /* デフォルトの文字色 */
    display: flex;
    justify-content: space-between; /* 要素を両端に配置 */
    align-items: center;
    height: 90px; /* 縦幅を約1.5倍に */
    box-sizing: border-box;
    z-index: 1000;
    transition: background-color 0.3s ease; /* 背景色のトランジション */
    padding-right: 20px; /* 右にパディングを追加 */
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* 初期状態では透明に変更 */
    transform: translateY(-100%); /* 初期状態では画面外に配置 */
    transition: transform 0.3s ease, background-color 0.3s ease; /* background-colorのトランジションを追加 */
    z-index: -1; /* ヘッダーコンテンツの下に配置 */
}

header.hovered::before,
header.scrolled::before {
    transform: translateY(0); /* ホバー時とスクロール時にスライドイン */
    background-color: white; /* ホバー時とスクロール時に白に */
}

.header-left {
    display: flex;
    align-items: center;
    height: 100%; /* ヘッダーの縦幅に合わせる */
    padding-left: 0; /* 左側のパディングを削除 */
}

.header-left .home-button {
    background-color: #00729f;
    color: white;
    height: 90px; /* ヘッダーの縦幅に合わせる */
    display: flex;
    align-items: center;
    padding: 0 22.5px 0 0; /* 横幅を約1.5倍に、左パディングを削除 */
    text-decoration: none;
    font-weight: bold;
    border-radius: 0;
    font-size: 1.1em; /* 文字サイズを5px大きく */
    transition: background-color 0.3s ease, color 0.3s ease; /* フェード効果を追加 */
}

.header-left .home-button:hover {
    background-color: white;
    color: #00729f;
}

nav {
    display: flex;
    justify-content: center; /* 中央に整列 */
    /* position: absolute; */ /* 絶対配置を削除 */
    /* left: 50%; */
    /* transform: translateX(-50%); */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 25px; /* リンク間の間隔を広げる */
}

nav ul li a {
    color: white; /* デフォルトの文字色 */
    text-decoration: none;
    padding: 10px 0; /* 上下にパディングを追加 */
    display: flex; /* flexboxを使用 */
    align-items: center; /* 垂直方向中央揃え */
    height: 100%; /* 親要素の高さに合わせる */
    line-height: 1.2; /* 行の高さを設定 */
    transition: border-bottom 0.3s ease, color 0.3s ease; /* 文字色のトランジションを追加 */
}

nav ul li a:hover {
    border-bottom: 2px solid white;
}

header.hovered nav ul li a {
    color: black; /* ホバー時に黒に */
}

header.hovered nav ul li a:hover {
    border-bottom: 2px solid black; /* ホバー時にアンダーバーを黒に */
}

header.scrolled nav ul li a {
    color: black; /* スクロール時に黒に */
}

header.scrolled nav ul li a:hover {
    border-bottom: 2px solid black; /* スクロール時にアンダーバーを黒に */
}

/* ヘッダーコンテナのスタイル */
.header-container {
    position: relative;
    z-index: 1000; /* ヘッダーと画像を一番手前に */
}

/* 事業内容ホバー時の画像表示 */
.business-hover-image {
    position: fixed; /* fixedに変更 */
    top: 90px; /* ヘッダーの高さのすぐ下に配置 */
    left: 50%; /* 中央に配置 */
    transform: translateX(-50%); /* 中央に配置 */
    width: 50%; /* 画像の幅を半分に */
    height: 300px; /* 画像の高さ */
    background-image: url('images/home_back_i1.jpg');
    background-size: cover; /* 画像をコンテナ全体に広げる */
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999; /* ヘッダーの下、コンテンツの上に配置 */
    display: flex; /* flexboxを有効にする */
    flex-direction: row; /* 横に並べる */
    background-color: rgba(0, 0, 0, 0.5); /* 半透明の黒いオーバーレイ */
    background-blend-mode: multiply; /* 背景画像とオーバーレイをブレンド */
}

.business-hover-image.active {
    opacity: 1;
    visibility: visible;
}

.business-hover-item {
    flex: 1; /* 各アイテムが均等な幅を占める */
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3); /* 区切り線 */
}

.business-hover-item:last-child {
    border-right: none; /* 最後のアイテムには区切り線を適用しない */
}

.business-hover-button {
    color: white;
    text-decoration: none;
    padding-left: 20px; /* 左にスペース */
    text-align: left; /* 左寄せ */
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; /* 親要素の高さに合わせる */
    width: 100%; /* クリック可能な領域を広げる */
    transition: background-color 0.3s ease; /* ホバー効果のトランジション */
}

.business-hover-button:hover {
    background-color: rgba(0, 114, 159, 0.5); /* 半透明の#00729f */
}

.business-hover-button .main-text {
    font-size: 1.2em;
    font-weight: bold;
}

.business-hover-button .sub-text {
    font-size: 0.9em;
}

.business-hover-image.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .business-hover-image {
        width: 90%; /* モバイルでの幅 */
    height: 90px; /* ヘッダーの縦幅を固定 */
        flex-direction: column; /* 縦に並べる */
        top: 60px; /* ヘッダーの高さに合わせて調整 */
    }

    .business-hover-item {
        width: 100%; /* 幅を100%に */
        border-right: none; /* 区切り線を削除 */
        border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* 下に区切り線を追加 */
        padding: 10px 0; /* パディングを調整 */
    }

    .business-hover-item:last-child {
        border-bottom: none; /* 最後のアイテムの下線は削除 */
    }
}

/* 会社概要ホバー時の画像オーバーレイ */
.company-overlay {
    position: fixed;
    top: 90px; /* ヘッダーの高さのすぐ下に配置 */
    left: 50%; /* 中央に配置 */
    transform: translateX(-50%); /* 中央に配置 */
    width: 50vw; /* 画面の幅の半分 */
    height: 300px; /* 画像の高さ */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998; /* business-hover-image の下に、コンテンツの上に配置 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('images/company_back_1i1.jpg'); /* 1枚の背景画像を設定 */
    background-size: cover; /* コンテナ全体を覆う */
    background-position: center; /* 中央に配置 */
}

@media (max-width: 768px) {
    .company-overlay {
        width: 90%; /* モバイルでの幅 */
        height: auto; /* 高さを自動調整 */
        top: 60px; /* ヘッダーの高さに合わせて調整 */
    }
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列 */
    grid-template-rows: repeat(2, 1fr); /* 2行 */
    width: 100%;
    height: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.3); /* 上の区切り線 */
    border-left: 1px solid rgba(255, 255, 255, 0.3); /* 左の区切り線 */
}

@media (max-width: 768px) {
    .company-grid {
        grid-template-columns: repeat(2, 1fr); /* モバイルでは2列 */
        grid-template-rows: auto; /* 行を自動調整 */
    }
}

.grid-item {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none; /* リンクの下線を削除 */
    color: white; /* テキストの色 */
    font-weight: bold;
    font-size: 1.2em;
    border-right: 1px solid rgba(255, 255, 255, 0.3); /* 右の区切り線 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* 下の区切り線 */
    background-color: rgba(0, 0, 0, 0.3); /* 半透明の黒い背景 */
    transition: background-color 0.3s ease; /* ホバー効果のトランジション */
}

/* ホバー時に背景色を変更 */
.grid-item:hover {
    background-color: rgba(0, 114, 159, 0.5); /* 半透明の#00729f */
}

/* テキストは疑似要素の上に表示 */
.grid-item span {
    position: relative;
    z-index: 2; /* テキストを画像の上に表示 */
    text-align: center;
    padding: 10px;
    border-radius: 5px;
}

/* テキストを中央揃えにする */
.grid-item span {
    text-align: center;
    padding: 10px;
    /* background-color: rgba(0, 0, 0, 0.3); */ /* テキストの背景を無色に */
    border-radius: 5px;
}

/* 会社概要リンクホバー時、またはcompany-overlay自身がアクティブな場合 */
#company-link:hover ~ .company-overlay,
.company-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ハンバーガーメニューのスタイル */
.menu-toggle {
    display: none; /* デフォルトでは非表示 */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* ヘッダー背景の上に表示 */
    margin-left: auto; /* 右端に寄せる */
}

@media (max-width: 768px) {
    .business-title-block {
        width: 90%; /* モバイルでの幅 */
        height: auto; /* 高さを自動調整 */
        padding: 10px 0; /* パディングを調整 */
    }

    .business-title-block .block-main-title {
        font-size: 1.5em; /* モバイルでの文字サイズ */
    }

    .business-title-block .block-sub-title {
        font-size: 0.8em; /* モバイルでの文字サイズ */
    }

    .business-image-item .business-image {
        transform: scale(1); /* モバイルではズームしない */
    }

    .image-overlay {
        position: relative; /* モバイルでは相対配置に */
        left: 0;
        width: 100%; /* 幅を100%に */
        height: auto; /* 高さを自動調整 */
        padding: 20px; /* パディングを調整 */
        background-color: rgba(0, 0, 0, 0.7); /* 背景色を調整 */
    }

    .image-overlay.left-half {
        left: 0;
        width: 100%;
    }

    .overlay-content {
        padding-left: 0; /* パディングをリセット */
        align-items: center; /* 中央揃え */
        text-align: center; /* テキストを中央揃え */
    }

    .overlay-main-title {
        font-size: 1.2em; /* モバイルでの文字サイズをさらに小さく */
    }

    .overlay-sub-title {
        font-size: 0.8em; /* モバイルでの文字サイズをさらに小さく */
    }

    .overlay-description {
        font-size: 0.7em; /* モバイルでの文字サイズをさらに小さく */
    }

    .detail-button {
        padding: 8px 15px; /* モバイルでのパディングを調整 */
        font-size: 0.8em; /* モバイルでのフォントサイズを調整 */
    }
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

header.hovered .menu-toggle .bar {
    background-color: #00729f; /* ホバー時に#00729fに */
}

header.scrolled .menu-toggle .bar {
    background-color: #00729f; /* スクロール時に#00729fに */
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    body {
        /* padding-top: 60px; /* モバイルヘッダーの高さに合わせて調整 */
    }

    header {
        height: 60px; /* モバイルでのヘッダーの高さ */
        /* padding: 0 15px; /* モバイルでの左右のパディングを削除 */
    }

    .header-left {
        height: 100%; /* ヘッダーの縦幅に合わせる */
        padding-left: 0; /* モバイルでの左パディングを削除 */
    }

    .header-left .home-button {
        height: 60px; /* モバイルでのホームボタンの高さ */
        padding: 0 15px 0 0; /* モバイルでのホームボタンのパディング、左パディングを削除 */
        font-size: 1em; /* モバイルでの文字サイズ */
    }

    .menu-toggle {
        display: flex; /* 小画面で表示 */
    }

    .main-nav {
        display: none; /* デフォルトでは非表示 */
        flex-direction: column;
        width: 100vw; /* ビューポートの幅全体に広がるように */
        position: fixed; /* 画面全体に広がるようにfixedに */
        top: 0; /* 画面上部から展開 */
        left: 50%; /* 水平方向の中央に配置 */
        transform: translateX(-50%); /* 水平方向の中央に配置 */
        height: 100vh; /* 画面全体を覆う */
        background-color: rgba(255, 255, 255, 0.9); /* 半透明の白 */
        text-align: center;
        overflow-y: auto; /* メニュー項目が多い場合にスクロール可能にする */
        justify-content: flex-start; /* 垂直方向の上部に配置 */
        align-items: center; /* 水平方向の中央に配置 */
        padding-top: 80px; /* ヘッダーの高さと少しの余白を考慮 */
        opacity: 0; /* 初期状態では非表示 */
        visibility: hidden; /* 初期状態では非表示 */
        transition: opacity 0.3s ease, visibility 0.3s ease; /* フェードイン/アウト */
    }

    .main-nav.active {
        opacity: 1; /* アクティブ時に表示 */
        visibility: visible; /* アクティブ時に表示 */
        display: flex; /* アクティブ時に表示 */
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        align-items: center; /* 中央に整列 */
        padding: 0; /* パディングをリセット */
    }

    .main-nav ul li {
        margin: 10px 0;
    }

    .main-nav ul li a {
        color: black; /* メニューの文字色を黒に */
    }

    header {
        /* justify-content: space-between; */ /* これを削除 */
    }
}

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh; /* ビューポートの高さに合わせる */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden; /* 画像がはみ出さないように */
}

.thumbnail-container {
    position: absolute;
    bottom: 20px; /* 画面下部からの距離 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px; /* サムネイル間のスペース */
    z-index: 2; /* メッセージや背景画像の上に表示 */
    max-width: calc(100% - 40px); /* 左右に20pxずつの余白を確保 */
}

.thumbnail-image {
    position: relative; /* ホバー時のオーバーレイのために必要 */
    width: 20vw; /* 画面幅に応じて調整 */
    height: 8vw; /* アスペクト比を維持 (20vw * 100/250 = 8vw) */
    max-width: 250px; /* 元の最大幅を維持 */
    max-height: 100px; /* 元の最大高さを維持 */
    object-fit: cover; /* 画像がアスペクト比を保ちつつコンテナを埋める */
    border: 2px solid transparent; /* デフォルトのボーダー */
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.2s ease; /* filterのトランジションを削除 */
    overflow: hidden; /* ホバー時のコンテンツがはみ出さないように */
}

.thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.5); /* 非アクティブなサムネイルをさらに暗く */
    transition: filter 0.3s ease; /* filterのトランジションをimgタグに移動 */
}

.thumbnail-image:hover img {
    filter: brightness(1); /* ホバー時に明るく */
}

.thumbnail-image:hover {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* 白地に半透明 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* 初期状態では非表示 */
    transform: translateX(-100%); /* 左からスライドイン */
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: black; /* メッセージの色 */
    font-size: 0.8vw; /* 画面サイズに応じて調整 */
    text-align: center;
    padding: 10px; /* パディングを調整 */
    box-sizing: border-box;
}

.thumbnail-image:hover .thumbnail-overlay {
    opacity: 1;
    transform: translateX(0);
}

.thumbnail-overlay .thumbnail-message {
    opacity: 0; /* 初期状態では非表示 */
    transition: opacity 0.5s ease 0.3s; /* オーバーレイがスライドインした後にフェードイン */
    text-shadow: none; /* ドロップシャドウを解除 */
    color: black; /* 視認性向上のため黒字に */
}

.thumbnail-image:hover .thumbnail-overlay .thumbnail-message {
    opacity: 1;
}

.thumbnail-image.active {
    border-color: #00729f; /* アクティブなサムネイルのボーダー色 */
    box-shadow: 0 0 8px rgba(0, 114, 159, 0.8); /* アクティブなサムネイルの影 */
}

.thumbnail-image.active img {
    filter: brightness(1); /* アクティブなサムネイルは明るく */
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover; /* 画像がコンテナを覆うように */
    background-position: center; /* 画像を中央に配置 */
    z-index: -1; /* メッセージの下に配置 */
    opacity: 0; /* 初期状態は非表示 */
    transform: scale(1); /* 初期状態はズームなし */
    transition: opacity 1s ease-in-out, transform 8s linear; /* フェードとズームのアニメーションを8秒に */
}

#hero-bg-1 {
    background-image: url('images/home_back_i1.jpg');
}

#hero-bg-2 {
    background-image: url('images/home_back_i2.jpg');
}

#hero-bg-3 {
    background-image: url('images/home_back_i3.jpg');
}

#hero-bg-4 {
    background-image: url('images/home_back_i4.jpg');
}

.hero-background-image.active {
    opacity: 1; /* アクティブな画像をフェードイン */
    transform: scale(1.1); /* ズームアップ */
}

.hero-message {
    text-align: center;
    z-index: 1; /* ヘッダーの下に隠れないように */
    position: absolute; /* 絶対配置に変更 */
    top: 50%; /* 上からの位置を調整 */
    left: 50%;
    transform: translate(-50%, -50%); /* 中央揃えを維持 */
}

.hero-message {
    text-align: center;
    z-index: 1; /* ヘッダーの下に隠れないように */
    position: absolute; /* 絶対配置に変更 */
    top: 50%; /* 上からの位置を調整 */
    left: 50%;
    transform: translate(-50%, -50%); /* 中央揃えを維持 */
    width: 90%; /* モバイル対応：幅を調整 */
    max-width: 800px; /* 最大幅を設定 */
}

.hero-message h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9); /* ドロップシャドウを強くする */
    color: white; /* 白字に戻す */
}

.hero-message p {
    font-size: 1em; /* 小さいサブ見出しに */
    transition: opacity 0.5s ease-in-out; /* フェードトランジションを追加 */
    color: white; /* 白字に戻す */
    background-color: rgba(0, 0, 0, 0.5); /* 黒い半透明の背景 */
    display: inline-block; /* テキストの幅にのみ背景を適用し、改行可能に */
    padding: 0 5px; /* 上下のパディングは0、左右は5px */
    box-decoration-break: clone; /* 複数行にわたるテキストの背景が途切れないように */
}

@media (max-width: 768px) {
    .hero-message h1 {
        font-size: 2em; /* モバイルでの見出しサイズ */
    }

    .hero-message p {
        font-size: 0.8em; /* モバイルでのサブ見出しサイズ */
    }

    .thumbnail-container {
        bottom: 10px; /* モバイルでの距離 */
    }

    .thumbnail-image {
        width: 25vw; /* モバイルでのサムネイル幅を調整 */
        height: 10vw; /* モバイルでのサムネイル高さを調整 (25vw * 100/250 = 10vw) */
    }

    .thumbnail-overlay {
        font-size: 1.2vw; /* モバイルでのテキストサイズを調整 */
    }
}

.main-content .main-title {
    margin-top: 3.6em; /* 見出し1行分下に */
}

.main-content .main-description {
    margin-top: 3.6em; /* 見出し1行分下に */
}

main {
    padding-top: 90px; /* ヘッダーの高さに合わせて調整 */
}

.main-container {
    max-width: 1200px; /* フッターのコンテンツ幅に合わせる */
    margin: 0 auto; /* 中央揃え */
    padding: 100px 10% 0 10%; /* パディングを調整して上部のスペースを狭める */
    box-sizing: border-box; /* パディングを幅に含める */
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 2% 0 2%; /* モバイルでのパディングを調整 */
    }
}

.main-content {
    margin-top: 80px; /* タブとコンテンツの間にさらにスペースを確保 */
    /* flex-grow: 1; */ /* サイドバーがないため不要 */
    /* padding-right: 30px; */ /* サイドバーがないため不要 */
    /* text-align: center; */ /* 中央寄せを解除 */
}

.main-content p,
.main-content ul {
    text-align: left; /* 左寄せ */
    font-size: 1em; /* デスクトップでのデフォルトフォントサイズ */
}

@media (max-width: 768px) {
    .main-content p,
    .main-content ul {
        font-size: 0.9em; /* モバイルでのフォントサイズを小さく */
        max-width: 90%; /* 幅を制限 */
        margin: 0 auto; /* 中央寄せ */
        text-align: left; /* 左寄せ */
    }
}

.main-content-wrapper {
    display: flex;
    flex-direction: row-reverse; /* 左右を反転 */
    justify-content: space-between;
    align-items: flex-start; /* 上揃え */
    margin-top: 0; /* 上のコンテンツとの間隔をなくす */
    gap: 30px; /* カラム間の間隔 */
}

@media (max-width: 768px) {
    .main-content-wrapper {
        flex-direction: column; /* モバイルでは縦に並べる */
        gap: 20px; /* モバイルでの間隔 */
    }
}

.left-column { /* サイドバーコンテンツ用 */
    flex: 1; /* サイドバーの幅を2倍に */
    padding-right: 0; /* 不要 */
    border-left: none; /* 不要 */
    padding-left: 0; /* 不要 */
}

@media (max-width: 768px) {
    .left-column {
        flex: auto; /* モバイルでは自動調整 */
        width: 100%; /* 幅を100%に */
        order: 2; /* メインコンテンツの下に配置 */
    }
}

.right-sidebar { /* メインコンテンツ用 */
    flex: 3; /* メインコンテンツの幅を広く */
    min-width: auto; /* 最小幅をリセット */
    background-color: transparent; /* 背景色を透明に */
    padding: 0; /* パディングをリセット */
    border-radius: 0; /* 角ばったデザイン */
    box-shadow: none; /* 影を削除 */
    border-left: 1px solid #eee; /* 左側に区切り線 */
    padding-left: 30px; /* 区切り線との間隔 */
}

@media (max-width: 768px) {
    .right-sidebar {
        flex: auto; /* モバイルでは自動調整 */
        width: 100%; /* 幅を100%に */
        border-left: none; /* 左の区切り線を削除 */
        padding-left: 0; /* パディングをリセット */
        order: 1; /* メインコンテンツを上に配置 */
    }
}

.sidebar-service-block {
    background-color: #00729f;
    color: white;
    font-weight: bold;
    padding: 15px;
    text-align: center;
    margin-bottom: 0; /* 下の要素との間隔をなくす */
    border-radius: 0; /* 角ばったデザイン */
}

.sidebar-block {
    margin-bottom: 0; /* 下の要素との間隔をなくす */
    border-bottom: none; /* 区切り線を削除 */
    padding: 0; /* パディングをリセット */
    background-color: transparent; /* 背景色を透明に */
}

.sidebar-block:last-child {
    border-bottom: none; /* 最後のブロックには区切り線を適用しない */
}

.sidebar-block h3 {
    display: none; /* タイトルを非表示に */
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-block ul li {
    margin-bottom: 8px;
}

.sidebar-block ul li a {
    color: #00729f;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block; /* リンク全体をクリック可能に */
    padding: 10px 15px; /* パディングを調整 */
    border: 1px solid #ccc; /* 角ばった区切り線 */
    margin-bottom: -1px; /* ボーダーの重複を避ける */
}

.sidebar-block ul li a:hover {
    color: white; /* ホバー時の文字色 */
    background-color: #00729f; /* ホバー時の背景色 */
}

/* 新しいコンテンツセクションのスタイル */
.content-section {
    margin-top: 40px; /* 画像との間隔 */
    padding: 30px; /* パディングを追加 */
    background-color: #fff; /* 白い背景色 */
    border-radius: 8px; /* 角を丸く */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 影を追加 */
    display: block; /* デフォルトで表示する */
}

.main-content h1,
.main-content h2,
.content-section h2 {
    color: #00729f;
    font-size: 1.8em;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: center; /* contact.html の H1 を中央揃えにする */
}

.content-section h3 {
    color: rgb(222,0,0); /* 赤色に変更 */
    font-size: 1.4em; /* h2より小さく、pより大きく */
    margin-top: 30px; /* 上にスペース */
    margin-bottom: 10px; /* 下にスペース */
    text-align: left; /* 左寄せ */
    border-bottom: 1px solid #eee; /* 下線を追加 */
    padding-bottom: 5px; /* 下線とテキストの間にパディング */
}

.content-section p,
.content-section ul { /* ul要素も左寄せにする */
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
    text-align: left; /* 左寄せ */
}

.president-content {
    display: flex;
    flex-wrap: wrap; /* 小さい画面で折り返す */
    align-items: flex-start; /* 上揃え */
    gap: 20px; /* カラム間の間隔 */
}

.president-text {
    flex: 1; /* テキストが残りのスペースを占める */
    min-width: 300px; /* 最小幅を設定 */
}

.president-image {
    flex: 0 0 auto; /* 画像の幅に合わせて調整 */
    order: 1; /* 画像を右に配置 */
    max-width: 200px; /* 親要素の幅を超えないように */
    height: 200px; /* アスペクト比を維持 */
    margin-bottom: 20px; /* 下に余白を追加 */
}

.president-image img {
    display: block; /* 余白をなくす */
    width: 100%; /* 親要素の幅いっぱいに */
    height: 100%;
    object-fit: contain; /* アスペクト比を維持しつつ、要素内に収める */
}

.step-block {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.step-block h3 {
    color: #00729f;
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
}

.step-block p {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 0;
}

.sidebar-block ul li span.active {
    color: white; /* 選択時の文字色 */
    background-color: #00729f; /* 選択時の背景色 */
    display: block; /* リンクと同じ表示形式 */
    padding: 10px 15px; /* リンクと同じパディング */
    border: 1px solid #00729f; /* 選択時のボーダー色 */
    margin-bottom: -1px; /* ボーダーの重複を避ける */
    cursor: default; /* カーソルをデフォルトに */
}

.scroll-to-top-button {
    position: fixed;
    bottom: 20px; /* 画面下からの距離 */
    right: 20px; /* 画面右からの距離 */
    background-color: white; /* 白い背景 */
    width: 50px; /* ボタンの幅 */
    height: 50px; /* ボタンの高さ */
    border-radius: 50%; /* 円形 */
    display: flex;
    justify-content: center; /* 水平方向中央揃え */
    align-items: center; /* 垂直方向中央揃え */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 影 */
    cursor: pointer;
    z-index: 1000; /* 他の要素の上に表示 */
}

.scroll-to-top-button img {
    width: 24px; /* 画像の幅 */
    height: 24px; /* 画像の高さ */
}

footer {
    background-color: white; /* 白地 */
    color: black; /* デフォルトの文字色を黒に */
    text-align: center;
    padding: 20px 0; /* 上下のパディングを増やす */
    box-sizing: border-box;
    width: 100%;
}

.footer-content {
    max-width: 1200px; /* コンテンツの最大幅を設定 */
    margin: 0 auto; /* 中央揃え */
    padding: 0 10%; /* 左右のパディングをさらに調整 */
}

@media (max-width: 768px) {
    .footer-content {
        padding: 0 5%; /* モバイルでのパディング */
    }
}

.footer-title {
    font-size: 1.5em; /* 文字サイズを調整 */
    font-weight: bold; /* 太字 */
    color: black; /* 黒字 */
    margin-bottom: 15px; /* 下の区切り線との間隔 */
}

.social-icons {
    display: flex;
    justify-content: center; /* 中央揃え */
    gap: 15px; /* アイコン間のスペース */
    margin-top: 15px;
    margin-bottom: 15px;
}

.social-icons img {
    width: 16px !important; /* アイコンのサイズを原寸サイズに強制 */
    height: 16px !important;
    vertical-align: middle; /* テキストとアイコンの垂直方向の配置を調整 */
}

.footer-divider {
    border: none;
    border-top: 1px solid #ccc; /* 薄い灰色の区切り線 */
    margin: 20px auto; /* 上下のマージンと中央揃え */
    width: 100%; /* 親要素のパディングで制御するため100%に */
}

.footer-sitemap {
    display: flex;
    justify-content: space-around; /* 列間のスペースを均等に分散 */
    flex-wrap: wrap; /* 小さい画面で折り返す */
    gap: 15px; /* 列間のスペースを狭く */
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%; /* 親要素のパディングで制御するため100%に */
    margin-left: auto; /* 中央揃え */
    margin-right: auto; /* 中央揃え */
}

@media (max-width: 768px) {
    .footer-sitemap {
        flex-direction: column; /* モバイルでは縦に並べる */
        gap: 20px; /* モバイルでの間隔 */
        align-items: center; /* 中央揃え */
    }
}

.sitemap-column {
    flex: 1; /* 各列が均等な幅を占める */
    min-width: 160px; /* 最小幅をさらに調整 */
    text-align: left; /* 列内のテキストを左揃え */
    padding-left: 150px; /* 左側にスペースを追加 */
}

@media (max-width: 768px) {
    .sitemap-column {
        min-width: auto; /* 最小幅をリセット */
        width: 100%; /* 幅を100%に */
        padding-left: 0; /* パディングをリセット */
        text-align: center; /* 中央揃え */
    }
}

.sitemap-column h3 {
    font-size: 0.9em; /* 文字サイズを2px小さく */
    color: black; /* 見出しの色 */
    margin-bottom: 15px;
    border-bottom: 1px solid #eee; /* 見出しの下に薄い線 */
    padding-bottom: 5px;
}

.sitemap-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-column ul li {
    margin-bottom: 8px;
}

.sitemap-column ul li a {
    color: #555; /* リンクの色 */
    text-decoration: none;
    font-size: 0.9em; /* 文字サイズを2px小さく */
    transition: color 0.3s ease;
}

.sitemap-column ul li a:hover {
    color: #00729f; /* ホバー時の色 */
}

.main-image {
    width: 84.375%; /* サイズをさらに1.5倍に (56.25% * 1.5) */
    height: auto; /* アスペクト比を維持 */
    display: block; /* 中央揃えのためにブロック要素に */
    margin: 4.25em auto; /* 上下のマージンと中央揃え (2段落分下に) */
}

.section-divider {
    border: none;
    border-top: 1px solid #ccc; /* 薄い灰色の区切り線 */
    margin: 3em auto; /* 画像の下に間隔を空ける */
    width: 100%; /* フッターの区切り線と同じ横幅に */
}

.section-title-container {
    text-align: center;
    margin-bottom: 40px; /* タブとの間にスペースを確保 */
    margin-top: 60px; /* 上のコンテンツとの間にスペースを確保 */
}

.section-main-title {
    font-size: 4.5vw; /* 60pxからvw単位に変更 */
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.entry-title-60px-black {
    font-size: 4.5vw; /* 60pxからvw単位に変更 */
    color: black;
}

.section-sub-title {
    font-size: 0.9em; /* さらに小さく */
    color: #555;
    margin-top: 0;
}

.think-about-it-section {
    text-align: center; /* 中央揃え */
    margin-top: 80px; /* 上のコンテンツとの間隔 */
    margin-bottom: 40px; /* 下のコンテンツとの間隔 */
}

.think-about-it-title {
    font-size: 4.5vw; /* 60pxからvw単位に変更 */
    font-weight: bold;
    color: #333; /* 黒に近い色 */
    margin-bottom: 10px; /* サブタイトルとの間隔 */
}

.think-about-it-subtitle {
    font-size: 0.9em; /* 適切なサイズ */
    color: #555; /* やや薄い色 */
    margin-top: 0;
}

@media (max-width: 768px) {
    .section-main-title,
    .entry-title-60px-black,
    .think-about-it-title {
        font-size: 7vw; /* モバイルでの調整 */
    }
}

.think-about-it-content {
    font-size: 1em; /* 適切なサイズ */
    line-height: 2.5; /* 行間をさらに広く調整 */
    color: #333;
    margin-top: 40px; /* サブタイトルとの間隔を広く */
    max-width: 700px; /* テキストの最大幅を調整 */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* 左右のパディング */
    box-sizing: border-box;
    text-align: left; /* 左揃えに */
}

.section-title {
    color: #00729f; /* 指定された色 */
    font-size: 2em; /* 適度なサイズ */
    margin-top: 1em; /* 区切り線の下に間隔を空ける */
    margin-bottom: 0.5em; /* サブタイトルとの間隔 */
}

.section-subtitle {
    font-size: 0.9em; /* フッターの4ブロック内の文字と同じサイズ */
    color: #333; /* デフォルトの文字色 */
    margin-top: 0; /* SERVICEのすぐ下に配置 */
}

.fade-in-slide-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-slide-up.active {
    opacity: 1;
    transform: translateY(0);
}

.footer-copyright {
    font-size: 0.9em; /* コピーライトの文字サイズ */
    color: #555; /* やや薄い色 */
    margin-top: 15px; /* 上の区切り線との間隔 */
}

.image-band {
    width: 100%; /* 100vw から 100% に変更 */
    height: 400px; /* 画像の高さの半分 */
    margin-top: 3em; /* 上のコンテンツとの間隔 */
    margin-bottom: 3em; /* 下のコンテンツとの間隔 */
    position: relative; /* image-displayを絶対配置するため */
}

/* recruit_im_4.png 用のスタイル */
.recruit-banner-image {
    width: 100vw; /* ビューポートの全幅 */
    height: 700px; /* 帯の高さ */
    overflow: hidden; /* はみ出た部分を隠す */
    position: relative; /* 疑似要素の基準 */
    margin-top: 60px; /* 上のコンテンツとの間隔 */
    margin-bottom: 60px; /* 下のコンテンツとの間隔 */
    left: 50%;
    transform: translateX(-50%);
    background-image: url('../images/recruit_im_4.png'); /* 画像を背景として設定 */
    background-size: cover; /* 画像がコンテナ全体を覆うように */
    background-position: 50% 20%; /* クロップ位置を上下にして、やや上が表示されるように */
    background-attachment: fixed; /* パララックス効果 */
}

.recruit-banner-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* 半透明を濃くする */
    z-index: 1; /* 画像の上に重ねる */
}

.recruit-banner-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 2; /* オーバーレイの上に表示 */
}

.recruit-banner-message .message-main-title {
    font-size: 5.5vw; /* 80pxからvw単位に変更 */
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.recruit-banner-message .message-sub-text {
    font-size: 1.25vw; /* 16pxからvw単位に変更 */
    line-height: 1.5;
    margin-bottom: 10px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .recruit-banner-message .message-main-title {
        font-size: 8vw; /* モバイルでの調整 */
    }
    .recruit-banner-message .message-sub-text {
        font-size: 2.5vw; /* モバイルでの調整 */
    }
}

.image-button {
    flex: 1; /* 均等な幅に分割 */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* 子要素を縦に並べる */
    justify-content: flex-start; /* 上部に寄せる */
    align-items: center;
    cursor: pointer;
    border-right: 1px solid #ccc; /* 区切り線 */
    z-index: 3; /* ボタンを画像の上に表示 */
}

.image-button:last-child {
    border-right: none; /* 最後のボタンには区切り線を適用しない */
}

.image-button .button-initial-text {
    position: absolute;
    top: 0;
    padding-top: 20px;
    color: #00729f;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.image-button:hover .button-initial-text {
    opacity: 0;
    transform: translateY(-100%);
}

.button-initial-text .initial-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    padding: 0 5px;
    box-decoration-break: clone;
}

.button-initial-text .initial-subtitle {
    font-size: 0.9em;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    padding: 0 5px;
    box-decoration-break: clone;
}

.image-button .button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    transform: translateY(100%);
    z-index: 1;
}

.image-button:hover .button-overlay {
    opacity: 1;
    transform: translateY(0);
}

.button-overlay .overlay-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.button-overlay .overlay-subtitle {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.button-overlay .overlay-description {
    font-size: 0.9em;
}

.image-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image: url('images/home_back_i1.jpg'); */
    /* background-size: 110%; */
    /* background-position: center; */
    /* opacity: 1; */
    /* transition: opacity 0.5s ease-out, background-size 0.5s ease-out; */
    z-index: 0;
    overflow: hidden;
}

.image-display-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 110%;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-out, background-size 0.5s ease-out;
}

.image-display-item.active {
    opacity: 1;
    background-size: 100%;
}

.image-buttons-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .image-band {
        height: 200px; /* 固定の高さ、または min-height を設定 */
        display: flex; /* flexboxを有効にする */
        flex-direction: row; /* 横並びを維持 */
    }

    .image-buttons-container {
        flex-direction: row; /* 横並びを維持 */
    }

    .image-button {
        flex: 1; /* 均等な幅に分割 */
        border-right: 1px solid #ccc; /* 区切り線を維持 */
        height: 100%; /* 親要素の高さに合わせる */
    }

    .image-button:last-child {
        border-right: none; /* 最後のボタンの右線は削除 */
    }

    .image-button .button-initial-text .initial-title,
    .image-button .button-overlay .overlay-title {
        font-size: 0.9em; /* モバイルでのタイトルサイズを調整 */
    }

    .image-button .button-initial-text .initial-subtitle,
    .image-button .button-overlay .overlay-subtitle,
    .image-button .button-overlay .overlay-description {
        font-size: 0.7em; /* モバイルでのサブタイトル・説明文サイズを調整 */
    }
}

.business-hero-section {
    height: 60vh;
    background-image: url('images/business_back_i1.jpg');
    background-size: cover;
    background-position: center;
}

/* ホームコンテンツと動的コンテンツの表示/非表示 */
#home-main-content {
    display: block;
}

#dynamic-content {
    display: none;
}

.business-main-content {
    padding-top: 80px;
}

.business-title-block {
    position: absolute;
    bottom: 0;
    width: 80%;
    height: 80px;
    background-color: #00729f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin: 0 auto;
    left: 0;
    right: 0;
}

.business-title-block .block-main-title {
    color: white;
    font-weight: bold;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.business-title-block .block-sub-title {
    color: white;
    font-size: 0.9em;
}

.business-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
    margin-bottom: 60px;
    transform: scale(1.2);
}

.business-image-container {
    margin-top: 70px;
    display: flex; /* Flexboxを有効にする */
    flex-direction: column; /* 縦に並べる */
    gap: 0; /* アイテム間の間隔をなくす */
}

.business-image-item {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 0;
}

.business-image-item .business-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    display: block;
    margin-bottom: 0;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    color: white;
    z-index: 1;
}

.image-overlay.left-half {
    left: 0;
    width: 50%;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    color: white;
    z-index: 1;
}

.overlay-content {
    padding: 30px; /* 上下左右にパディングを適用 */
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.overlay-main-title {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.overlay-sub-title {
    display: block;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.overlay-description {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 20px;
}

.detail-button {
    background-color: white;
    color: #00729f;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: center;
}

.detail-button:hover {
    background-color: #00729f;
    color: white;
}

@media (max-width: 768px) {
    .business-image-container {
        gap: 0; /* モバイルでのアイテム間の間隔をなくす */
    }

    .business-image-item {
        height: auto; /* 高さを自動調整 */
        min-height: 200px; /* モバイルでの最小高さを設定 */
        margin-bottom: 0; /* マージンをリセット */
    }

    .business-image-item .business-image {
        position: relative; /* 相対配置に変更 */
        transform: scale(1); /* ズームを解除 */
        height: 100%; /* 親要素の高さに合わせる */
        margin-bottom: 0; /* マージンをリセット */
    }

    .image-overlay {
        position: absolute; /* 絶対配置に戻す */
        left: 0; /* 左端に配置 */
        transform: translateX(0); /* 中央寄せを解除 */
        width: 100%; /* 幅を100%に */
        height: 100%; /* 親要素の高さに合わせる */
        padding: 20px; /* パディングを調整 */
        background-color: rgba(0, 0, 0, 0.7); /* 背景色を調整 */
        /* margin: 0 auto; */ /* transformと競合するため削除 */
    }

    .image-overlay.left-half {
        left: 0; /* 左端に配置 */
        transform: translateX(0); /* 中央寄せを解除 */
        width: 100%; /* 幅を100%に */
        /* margin: 0 auto; */ /* transformと競合するため削除 */
    }

    .overlay-content {
        padding: 10px; /* モバイルでのパディングを調整 */
        align-items: flex-start; /* アイテムを上端に揃える */
        text-align: left; /* テキストを左揃えにする */
    }

    .overlay-main-title {
        font-size: 0.9em; /* モバイルでの文字サイズをさらに小さく */
        max-width: 100%; /* 幅を親要素いっぱいに */
        margin: 0 auto; /* 中央寄せ */
        text-align: left; /* 左寄せ */
    }

    .overlay-sub-title {
        font-size: 0.5em; /* モバイルでの文字サイズをさらに小さく */
        max-width: 100%; /* 幅を親要素いっぱいに */
        margin: 0 auto; /* 中央寄せ */
        text-align: left; /* 左寄せ */
    }

    .overlay-description {
        font-size: 0.3em; /* モバイルでの文字サイズをさらに小さく */
        max-width: 100%; /* 幅を親要素いっぱいに */
        margin: 0 auto; /* 中央寄せ */
        text-align: left; /* 左寄せ */
    }

    .detail-button {
        padding: 8px 15px; /* モバイルでのパディングを調整 */
        font-size: 0.8em; /* モバイルでのフォントサイズを調整 */
    }
}

/* 階層リンクのスタイル */
.breadcrumb {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 20px;
    text-align: left;
}

.breadcrumb a {
    color: #00729f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #00567a;
}

.breadcrumb a:visited {
    color: #00729f;
}

.breadcrumb span {
    margin: 0 5px;
    color: #999;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed; /* テーブルのレイアウトを固定 */
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 10px;
    text-align: left;
    word-break: break-word; /* 長い単語を途中で改行 */
}

th {
    background-color: #f2f2f2;
    width: 15%; /* 左列の幅を15%に設定 */
}

td {
    width: 85%; /* 右列の幅を85%に設定 */
}

/* お問い合わせフォームのスタイル */
.main-content form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"], /* 追加 */
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: "Noto Sans Japanese", Arial, sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus, /* 追加 */
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00729f;
    outline: none;
}

.form-group textarea {
    resize: vertical; /* 垂直方向のみリサイズ可能に */
}

.main-content button[type="submit"] {
    background-color: #00729f;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: block; /* ボタンをブロック要素に */
    margin: 0 auto; /* 中央揃え */
}

.main-content button[type="submit"]:hover {
    background-color: #00567a;
}

.contact-type-selector {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.contact-type-selector input[type="radio"] {
    display: none;
}

.contact-type-selector label {
    padding: 10px 20px;
    border: 1px solid #00729f;
    color: #00729f;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    flex-grow: 1; /* 各ボタンが均等な幅を占める */
    text-align: center;
}

.contact-type-selector label:first-of-type {
    border-radius: 5px 0 0 5px;
}

.contact-type-selector label:last-of-type {
    border-radius: 0 5px 5px 0;
    border-left: none; /* 中央のボーダーを結合 */
}

.contact-type-selector input[type="radio"]:checked + label {
    background-color: #00729f;
    color: white;
}

@media (max-width: 768px) {
    .contact-type-selector {
        flex-direction: column;
    }

    .contact-type-selector label {
        border-radius: 5px !important; /* モバイルでは角を丸く */
        margin-bottom: 10px; /* ボタン間にスペース */
        border-left: 1px solid #00729f !important; /* ボーダーを再表示 */
    }

    .contact-type-selector label:last-of-type {
        margin-bottom: 0;
    }

    /* テーブルのレスポンシブ対応 */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    table {
        table-layout: auto; /* 固定レイアウトを解除 */
        overflow-x: auto; /* 必要に応じて横スクロールを可能に */
        white-space: nowrap; /* セル内のテキストが改行されないように */
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        display: flex;
        /* flex-wrap: wrap; を削除して横並びを維持 */
    }

    th {
        background-color: #f2f2f2;
        width: 30%; /* モバイルでの左列の幅を30%に設定 */
        text-align: left; /* 左揃え */
        padding: 10px;
        box-sizing: border-box;
        border-bottom: none; /* 下のボーダーを削除 */
        font-size: 3vw; /* モバイルでのthのフォントサイズをvw単位で調整 */
    }

    td {
        width: 70%; /* モバイルでの右列の幅を70%に設定 */
        border-top: none; /* 上のボーダーを削除 */
        padding: 10px;
        box-sizing: border-box;
        text-align: left; /* 左揃え */
        white-space: normal; /* テキストの改行を許可 */
        font-size: 2.5vw; /* モバイルでのtdのフォントサイズをvw単位で調整 */
    }
}

.contact-button {
    display: inline-block;
    background-color: #FF8C00; /* オレンジ色 */
    color: white;
    padding: 15px 30px;
    border-radius: 30px; /* 左右を丸くする */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
    margin-top: 20px; /* メッセージとの間にスペースを空ける */
}

.contact-button:hover {
    background-color: #E67E00; /* ホバー時の色を少し濃く */
}

.inquiry-button {
    display: inline-block;
    background-color: #00BFFF; /* 水色 */
    color: white;
    padding: 15px 30px;
    border-radius: 30px; /* 左右を丸くする */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
    margin-top: 20px; /* メッセージとの間にスペースを空ける */
}

.inquiry-button:hover {
    background-color: #009ACD; /* ホバー時の色を少し濃く */
}

/* .content-section 内のリンクの色をグレーに */
.content-section a {
    color: #666; /* グレー */
    text-decoration: none; /* 下線を削除 */
}

.content-section a:hover {
    color: #333; /* ホバー時に少し濃いグレー */
    text-decoration: underline; /* ホバー時に下線を表示 */
}

/* Tab Selection Styles (for forms, existing) */
.tab-selection {
    display: flex;
    width: 50%; /* フォームの幅の半分に調整 */
    margin: 0 auto 20px auto; /* 中央寄せ */
    border: 1px solid #00729f;
    border-radius: 5px;
    overflow: hidden;
}

.tab-selection .tab-button {
    flex: 1;
    padding: 10px 0;
    border: none;
    background-color: white;
    color: #00729f;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tab-selection .tab-button:not(:last-child) {
    border-right: 1px solid #00729f;
}

.tab-selection .tab-button.active {
    background-color: #00729f;
    color: white;
}

.tab-selection .tab-button:hover:not(.active) {
    background-color: #e0f2f7; /* 薄い青 */
}

/* recruit.html 専用スタイル */
#recruit-header {
    background-color: white; /* 白い背景 */
    position: fixed; /* 画面上部に固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; /* ヘッダーの縦幅を固定 */
    padding: 20px 20px; /* 左右のパディングを均等に */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 影を追加 */
    z-index: 1000; /* 他のコンテンツの上に表示 */
    display: flex; /* flexboxを追加 */
    justify-content: space-between; /* 両端に配置 */
    align-items: center; /* 垂直方向中央揃え */
}

#recruit-header .header-left {
    padding-left: 0; /* 左パディングをリセット */
    display: flex; /* flexboxを追加 */
    align-items: center; /* 垂直方向中央揃え */
}

#recruit-header .header-button {
    background-color: transparent; /* 背景色を透明に */
    color: black; /* 黒文字 */
    font-weight: bold; /* 太字 */
    font-size: 1.8em; /* フォントサイズを小さく */
    height: auto; /* 高さを自動調整 */
    padding: 0; /* パディングをリセット */
    text-decoration: none; /* アンダーバーを削除 */
}

#recruit-header .header-text {
    color: black; /* 黒文字 */
    font-size: 0.8em; /* 小さい文字 */
    margin-left: 30px; /* 左側にさらに間隔を空ける */
}

.header-right {
    display: flex;
    align-items: center;
    height: 100%; /* ヘッダーの高さに合わせる */
    justify-content: center; /* 中央に配置 */
}

/* 新しい recruit-nav のスタイル (main-container 内に移動) */
.recruit-nav {
    display: flex;
    justify-content: center; /* 中央揃え */
    margin-top: 20px; /* 上部のコンテンツとの間隔 */
    margin-bottom: 30px; /* 元に戻す */
}

.recruit-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    border: 1px solid rgb(222,0,0); /* タブ全体のボーダー */
    border-radius: 5px; /* 角を丸く */
    overflow: hidden; /* ボーダーがはみ出さないように */
}

.recruit-nav ul li {
    margin: 0; /* マージンをリセット */
}

.recruit-nav ul li a {
    display: block; /* クリック可能な領域を広げる */
    padding: 10px 20px;
    color: rgb(222,0,0);
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(14px, 1.2vw, 16px); /* レスポンシブなフォントサイズ */
    border-right: 1px solid rgb(222,0,0); /* タブ間の区切り線 */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.recruit-nav ul li:last-child a {
    border-right: none; /* 最後のタブには右ボーダーなし */
}

.recruit-nav ul li a:hover {
    background-color: rgba(222,0,0,0.1); /* 薄い赤 */
    color: rgb(222,0,0);
}

.recruit-nav ul li a.active {
    background-color: rgb(222,0,0);
    color: white;
}

.entry-button {
    background-color: rgb(222,0,0); /* 赤い背景 */
    color: white;
    padding: 20px 60px; /* 左右上下のパディングを大きくする */
    display: flex; /* flexboxを使用 */
    align-items: center; /* 垂直方向中央揃え */
    border-radius: 5px; /* 角を丸める */
    text-decoration: none;
    font-weight: normal;
    margin-left: 20px; /* ナビゲーションリンクとの間隔 */
    font-size: 14px; /* テキストサイズを2px小さく */
    transition: background-color 0.3s ease;
}

.entry-button:hover {
    background-color: rgb(180,0,0); /* ホバーで少し濃い赤 */
}

.top-content {
    display: flex;
    height: 100vh; /* ビューポートの高さの100% */
}

.top-content-left {
    flex: 1; /* 左半分 */
    background-color: rgb(222,0,0); /* 赤い背景 */
    display: flex; /* Flexboxを有効にする */
    justify-content: center; /* 水平方向の中央揃え */
    align-items: center; /* 垂直方向の中央揃え */
}

.top-content-message {
    color: white; /* 文字色を白に */
    text-align: left; /* 文字を左寄せに */
    font-weight: bold; /* 太字 */
    margin-left: -20%; /* テキストをさらに左に寄せる */
}

.top-content-message .message-recruit {
    font-size: 1em; /* RECRUITING 2025のフォントサイズをさらに小さく */
    margin-bottom: -10px; /* 下の余白を負の値にして間隔をかなり狭くする */
    font-weight: normal; /* 太字を解除 */
}

.top-content-message .message-text {
    font-size: 3.5em; /* 枠に収まるなのフォントサイズを大きく */
    line-height: 1.5; /* 行の高さを調整 */
}

.top-content-right {
    flex: 1; /* 右半分 */
    position: relative; /* 疑似要素の基準にする */
    overflow: hidden; /* はみ出たコンテンツを隠す */
    background-color: lightgray; /* 仮のメディア領域 */
}

@media (max-width: 768px) {
    .top-content {
        flex-direction: column; /* 縦に並べる */
        height: auto; /* 高さを自動調整 */
    }

    .top-content-left {
        height: 50vh; /* モバイルでの左側の高さ */
        margin-left: 0; /* 左マージンをリセット */
    }

    .top-content-message {
        margin-left: 0; /* モバイルでの左マージンをリセット */
        padding: 0 20px; /* 左右にパディングを追加 */
        text-align: center; /* 中央揃え */
    }

    .top-content-message .message-recruit {
        font-size: 0.9em; /* モバイルでのフォントサイズを調整 */
    }

    .top-content-message .message-text {
        font-size: 2.5em; /* モバイルでのフォントサイズを調整 */
    }

    .top-content-right {
        height: 50vh; /* モバイルでの右側の高さ */
    }

    #recruit-header {
        height: 60px; /* モバイルでのヘッダーの高さ */
        padding: 10px 15px; /* モバイルでのパディング */
    }

    #recruit-header .header-button {
        font-size: 1.2em; /* モバイルでのフォントサイズ */
    }

    #recruit-header .header-text {
        font-size: 0.6em; /* モバイルでのフォントサイズ */
        margin-left: 15px; /* モバイルでのマージン */
    }

    .entry-button {
        padding: 10px 20px; /* モバイルでのパディング */
        font-size: 12px; /* モバイルでのフォントサイズをさらに小さく */
        margin-left: 10px; /* モバイルでのマージン */
    }
}

.top-content-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 114, 159, 0.5); /* 青緑（#00729f）を半透明に */
    z-index: 1; /* 動画の上に表示 */
}

/* 動画の上に被せるメッセージのスタイル */
.video-overlay-message-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2; /* オーバーレイの上に表示 */
    overflow: hidden; /* ハイライトがはみ出さないように */
}

.video-overlay-message {
    position: relative;
    font-size: 2em; /* メッセージのフォントサイズ */
    font-weight: bold;
    color: white; /* メッセージ文字は白 */
    text-align: center;
    padding: 10px 20px;
    opacity: 0; /* 初期状態では非表示 */
    transition: opacity 0.5s ease-out; /* フェードアニメーションのみ */
}

.video-overlay-message.active {
    opacity: 1;
}

.video-overlay-message .message-line {
    position: relative;
    display: inline-block; /* テキストの幅に合わせて調整 */
}

/* ハイライトオーバーレイは不要になったため削除 */
/* .video-overlay-message .highlight-overlay を削除 */
/* .video-overlay-message.active .highlight-overlay を削除 */

/* 3つのブロックコンテナのスタイル */
.block-container {
    display: flex;
    justify-content: space-between; /* 均等な間隔で配置 */
    align-items: flex-start; /* 上揃え */
    margin-top: 80px; /* 上のコンテンツとの間隔 */
    margin-bottom: 60px; /* 下のコンテンツとの間隔 */
    width: 100vw; /* ビューポートの全幅に */
    margin-left: calc(-50vw + 50%); /* 中央寄せ */
    padding: 0 10%; /* コンテンツの左右パディングを維持 */
    box-sizing: border-box; /* パディングを幅に含める */
}

@media (max-width: 768px) {
    .block-container {
        flex-direction: column; /* モバイルでは縦に並べる */
        align-items: center; /* 中央揃え */
    }
}

.block-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* 中央揃え */
    flex: 1; /* 各アイテムが均等な幅を占める */
    padding: 0 10px; /* アイテム間のパディング */
}

.block {
    width: 100%; /* block-itemの幅いっぱいに */
    height: 400px; /* 高さを固定 */
    box-sizing: border-box; /* パディングを幅に含める */
    border-radius: 0; /* 角ばった長方形 */
    margin-top: 10px; /* タイトルとの間隔 */
    display: flex; /* flexboxで内容を配置 */
    align-items: center; /* 垂直方向中央寄せ */
    padding: 0 40px; /* 左右のパディングを広く */
    position: relative; /* 拡張ブロックの基準にする */
    overflow: hidden; /* はみ出たコンテンツを隠す */
    z-index: 1; /* 画像の上に表示 */
}

@media (max-width: 768px) {
    .block {
        width: 90%; /* モバイルでの幅 */
        height: 300px; /* モバイルでの高さ */
    }
}

.block-title {
    font-size: 60px; /* 指定された60px */
    font-weight: bold;
    text-align: center;
    margin: 0; /* マージンをリセット */
    width: 100%; /* 中央寄せのために追加 */
}

/* 各ブロックの背景色と文字色 */
.company-block {
    background-color: rgb(222,0,0); /* 赤色 */
}

.company-title {
    color: rgb(222,0,0); /* 赤色 */
}

.block-extension {
    width: 100%;
    height: 400px; /* blockと同じ高さ */
    background-color: lightgray; /* グレー色 */
    display: flex; /* 画像を中央に配置するためにflexboxを使用 */
    justify-content: center; /* 水平方向中央寄せ */
    align-items: center; /* 垂直方向中央寄せ */
}

.extension-image {
    width: 100%; /* 親要素に収まるように */
    height: 100%; /* 親要素に収まるように */
    object-fit: cover; /* アスペクト比を維持して要素を埋める */
}

.company-extension {
    background-color: lightgray;
}

.business-extension {
    background-color: lightgray;
}

.recruit-extension {
    background-color: lightgray;
}

.block-content {
    color: white; /* 白文字 */
    text-align: left; /* 左寄せ */
}

.block-main-text {
    font-size: 2vw; /* 26pxからvw単位に変更 */
    font-weight: normal; /* 太字を解除 */
    margin-bottom: 30px; /* 下の余白を増やす */
    line-height: 1.5; /* 行の高さを調整 */
}

.block-sub-text {
    font-size: 1.1vw; /* 14pxからvw単位に変更 */
    line-height: 1.5; /* 行の高さを調整 */
}

.business-block {
    background-color: #004b67; /* 指定された色 */
}

.business-title {
    color: #004b67; /* 指定された色 */
}

.recruit-block {
    background-color: #006667; /* 指定された色 */
}

.recruit-title {
    color: #006667; /* 指定された色 */
}

@media (max-width: 768px) {
    .block-main-text {
        font-size: 3.5vw; /* モバイルでの調整 */
    }
    .block-sub-text {
        font-size: 2vw; /* モバイルでの調整 */
    }
}

/* 画面が縦向きのときにblock-container内の画像を非表示にする */
@media (orientation: portrait) {
    .block-container .block-extension {
        display: none;
    }
}
