/* 全体のマージン、パディング、ボックスサイズをリセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

main {
    margin-top: 87.2px; /* ヘッダーの高さを確保する（20pxのpadding + 40pxのheight） */
}

/* スマホ画面向けのスタイル */
@media (max-width: 891px) {
    main {
        margin-top: 119.4px; /* ヘッダーの高さを確保する */
    }
}
body {
    font-family: 'Montserrat', sans-serif; /* カッコいい感じのフォント */
    color: #333; /* テキストの色 */
}

/* ヘッダーのスタイル */
header {
    background-color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

ol {
    list-style-position: outside;
    padding-left: 2em;
  }

/* ヘッダーのスタイル */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    background-color: #fff;
}

/* ロゴのスタイル */
.logo {
    max-height: 30px;
    min-height: 20px;
    height: auto;
}

/* メニューと画像のスタイル */
.menu-and-image {
    display: flex;
    align-items: center;
}

/* 画像のスタイル */
.header-image img {
    height: 40px;
    margin-left: 10px;
}

/* メニューのスタイル */
.menu {
    display: flex; /* 常に横並び */
    flex-wrap: nowrap; /* 文字列が折り返されないようにする */
}

/* メニューのリストのスタイルをリセット */
.menu ul {
    display: flex;
    list-style: none; /* リストマークを消す */
    flex-wrap: nowrap; /* 文字列が縦にならないようにする */
    position: relative; /* サブメニューの位置調整 */
    z-index: 10; /* スライドショーの上に表示 */
}

/* 各メニューアイテムの余白 */
.menu ul li {
    margin-left: 20px;
    position: relative;
}

/* メニューリンクのスタイル */
.menu ul li a {
    text-decoration: none; /* 下線を消す */
    color: #333; /* 文字色を指定 */
    font-size: 18px; /* 文字サイズを指定 */
    white-space: nowrap; /* 文字列の折り返しを防止 */
    padding: 10px; /* メニューの余白 */
    display: block; /* クリック領域を広げる */
    position: relative;
    transition: all 0.2s ease; /* アニメーションのためのトランジション */
}

/* マウスオーバー時のポンというアニメーション */
.menu ul li a:hover {
    transform: translateY(-3px); /* 軽く上に動く */
}

/* 下から出てくる下線のスタイル */
.menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff; /* 下線の色 */
    transform: scaleX(0); /* 初期状態では下線を隠す */
    transform-origin: right; /* 右から左に伸びる */
    transition: transform 0.3s ease; /* 下線のアニメーション */
}

/* マウスオーバー時に下線が左に伸びる */
.menu ul li a:hover::after {
    transform: scaleX(1); /* 下線が伸びて表示される */
    transform-origin: left; /* 左から右に */
}

/* サブメニューのスタイル */
.menu ul li .submenu {
    transform: scaleY(0); /* デフォルトでは非表示 */
    transform-origin: top; /* 上部を基準に変形 */
    transition: transform 0.3s ease, opacity 0.3s ease; /* 表示の変化を0.3秒で */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ddd;
    list-style: none;
    padding: 10px 0;
    width: 200px;
    z-index: 20; /* スライドショーよりも上に表示 */
    opacity: 0; /* 非表示時に透明 */
    overflow: hidden; /* アニメーション中に内容がはみ出ないように */
}

/* サブメニューリンクのスタイル */
.menu ul li .submenu li a {
    padding: 10px;
    display: block;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease; /* サブメニューもアニメーション */
}


/* サブメニューをホバー時に表示し、フェードインとスライドイン */
.menu ul li:hover .submenu {
    display: block;
    transform: scaleY(1); /* スケールでサブメニューが伸びる */
    opacity: 1; /* フェードイン */
}

/* サブメニューリンクのスタイル */
.menu ul li .submenu li {
    margin-left: 0;
}

/* サブメニューリンクのスタイル */
.menu ul li .submenu li a {
    padding: 10px;
    display: block;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease; /* サブメニューもアニメーション */
}

/* スマホ画面向けのスタイル */
@media (max-width: 891px) {

    .header-container {
        flex-direction: column; /* 画面が狭くなったときは縦並びに */
        align-items: center;
        padding: 2px 10px;
    }

    /* メニューは横並びのまま中央揃えにする */
    .menu ul {
        justify-content: center;
        flex-wrap: nowrap;
        width: 100%;
    }

    .menu ul li {
        margin: 0 5px; /* 横並びで各メニューに余白を追加 */
    }

    .logo {
        height: 30px;
    }

    .header-image img {
        height: 20px;
        margin: 0px;
    }
    /* メニューリンクのスタイル */
    .menu ul li a {
        font-size: 15px; /* 文字サイズを指定 */
        padding: 5px; /* メニューの余白 */
    }
}

/* 見出し（h1）の中央揃えと装飾スタイル */
main h1 {
    position: relative; /* 疑似要素のためにrelativeを指定 */
    font-family: 'Montserrat', sans-serif; /* カッコいい感じのフォント */
    font-size: 1.7rem; /* 少し大きめの文字サイズ */
    font-weight: normal;
    margin-bottom: 20px; /* 下に少し余白 */
    margin-top: 30px; /* 上に少し余白 */
    padding: 15px 50px;
    color: #ffffff; /* 文字色を白に */
    background-color: #0065D0; /* 背景を青に */
    z-index: 1; /* テキストを疑似要素の上に表示 */
}

main h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40px;
    width: 100px; /* 幅を調整 */
    height: 100%; /* 高さはh1の高さに合わせる */
    background-color: #7BB822; /* 緑色を設定 */
    z-index: -2; /* 他の疑似要素より背面に配置 */
    transform: skewX(-30deg); /* 斜めにする */
    transform-origin: top left; /* 変形の基点を左上にする */
}

main h1::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80px; /* 少しずらして配置 */
    width: 120px; /* 幅を調整 */
    height: 100%; /* 高さはh1の高さに合わせる */
    background-color: #8ED227; /* 濃い緑色を設定 */
    z-index: -1; /* ::before の上に重なる */
    transform: skewX(-30deg); /* 斜めにする */
    transform-origin: top left; /* 変形の基点を左上にする */
}


/* 見出し（h2）の中央揃えと下線スタイル */
main h2 {
    font-family: 'Montserrat', sans-serif; /* カッコいい感じのフォント */
    font-weight:normal;
    text-align: center; /* 見出しを中央揃え */
    font-size: 1.3rem; /* 少し大きめの文字サイズ */
    position: relative; /* 擬似要素の位置調整のために必要 */
    margin-bottom: 20px; /* 下に少し余白 */
    margin-top: 30px; /* 下に少し余白 */
    color: #333; /* 文字色を濃いグレーに */
}

main h2::after {
    content: '';
    display: block;
    width: 60px; /* 下線の長さ */
    height: 3px; /* 下線の太さ */
    background-color: #007bff; /* 下線の色を青に */
    margin: 10px auto 0; /* 上に少し余白を追加し、中央に配置 */
    border-radius: 5px; /* 丸みを帯びた下線 */
}

/* 見出し（h3）の中央揃えと下線スタイル */
main h3 {
    font-family: 'Montserrat', sans-serif; /* カッコいい感じのフォント */
    font-weight:normal;
    text-align: left; /* 見出しを左揃え */
    font-size: 0.9rem; /* 少し大きめの文字サイズ */
    position: relative; /* 擬似要素の位置調整のために必要 */
    width: 100%; /* 幅を調整 */
    color: #333; /* 文字色を濃いグレーに */
}

main h3::after {
    content: '';
    display: block;
    width: 100%; /* 下線の長さ */
    height: 1px; /* 下線の太さ */
    background-color: #007bff; /* 下線の色を青に */
    margin: 5px auto 0; /* 上に少し余白を追加し、中央に配置 */
    border-radius: 5px; /* 丸みを帯びた下線 */
}

/* スライドショー */
#product-slideshow-img {
    transition: opacity 1s ease-in-out;
    opacity: 1;
  }


  

/* 企業情報セクションを横に3つ並べる */
.info-item-container {
    display: flex;
    justify-content: space-between; /* 各セットの間にスペースを均等にする */
    align-items: center; /* 各要素を上揃えにする */
    padding: 20px;
    gap: 20px; /* 各要素の間に余白を追加 */
}

/* レスポンシブ対応：画面が狭い場合は縦に並べる */
@media (max-width: 891px) {
    .info-item-container {
        flex-direction: column; /* スマホでは縦に並べる */
        align-items: center;
    }
}

/* 製品情報、採用情報、会社概要のセクション */
.info-section1 {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* 縦方向に要素を配置 */
    text-align: center; /* テキストも中央揃え */
    padding: 20px;
    margin: 0 0;
    background-color: #e6f8fc; /* 背景をグレーに */
}

.info-section2 {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* 縦方向に要素を配置 */
    text-align: center; /* テキストも中央揃え */
    padding: 20px;
    margin: 0 0;
    background-color: #ffffff; /* 背景を白に */
}

/* セクションのスタイル */
.info-section3 {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* 動画のスタイル */
.video-pc {
    position: absolute;
    top: 0;
    left: 0; /* 左寄せ */
    object-fit: cover; /* 動画が左右や上下に切れるようにカバーする */
}

/* デフォルトではスマホ用動画を非表示に */
#homeVideo-sp {
    display: none;
}

/* スマホ画面では homeVideo を非表示にし、homeVideo-sp を表示する */
@media (max-width: 891px) {
    .video-pc {
        display: none !important;
    }

    #homeVideo-sp {
        display: block !important;
    }
}

/* 右下に重ねて表示する画像のスタイル */
.overlay-text {
    position: absolute;
    bottom: 0px; /* 動画の右下から20pxの余白を持たせる */
    right: 0px; /* 右側から20pxの余白を持たせる */
    width: 500px; /* 画像の幅を調整 */
    height: auto; /* アスペクト比を維持して画像の高さを自動調整 */
    z-index: 10; /* 動画より前面に表示するためにz-indexを設定 */
}

.info-item {
    flex-grow: 1; /* 各要素が同じ比率で拡張される */
    flex-basis: 0; /* 初期幅をゼロにし、flex-growに従う */
    display: flex;
    flex-direction: column;
    align-items: center; /* コンテンツを中央に揃える */
    text-align: center; /* テキストを中央揃え */
    justify-content: center; /* 縦方向中央揃え */
}
.info-item-right {
    flex-grow: 1; /* 各要素が同じ比率で拡張される */
    flex-basis: 0; /* 初期幅をゼロにし、flex-growに従う */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* コンテンツを右に揃える */
    text-align: right; /* テキストを右揃え */
    justify-content: center; /* 縦方向中央揃え */
}

.info-item div {
    max-width: 650px;
}

/* ボタンの基本スタイル */
.button-link {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    position: relative;
    overflow: hidden; /* エフェクトがボタンの外にはみ出さないように */
    transition: background-color 0.3s ease;
}

/* 光が走るエフェクト */
.button-link::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -150%;
    width: 150%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    transition: left 0.4s ease;
}

/* ボタンのマウスオーバー時の光の動き */
.button-link:hover::before {
    left: 100%;
    transition: left 0.6s ease;
}

/* ボタンのマウスオーバー時の光の効果 */
.button-link:hover {
    transform: scale(1.05);
}


/* info-item内の画像をアスペクト比を保ちながら大きく表示 */
.info-item img {
    width: 100%; /* 親要素の幅にフィットさせる */
    max-width: 600px; /* 最大幅を指定して、画像が大きくなりすぎないようにする */
    height: auto; /* アスペクト比を保ちながら高さを自動調整 */
    display: block; /* 隙間をなくすためにblockにする */
    margin: 20px 20px; /* 余白を追加 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item img:hover {
    transform: scale(1.05); /* 画像を少し拡大 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* 影を追加して強調 */
}

/* .no-hover クラスがある場合はホバー効果を無効化 */
.no-hover img:hover {
    transform: none; /* ホバー時の拡大効果を無効化 */
    box-shadow: none; /* ホバー時の影の効果も無効化 */
}

/* 画像リンク用のスタイル（必要に応じて追加） */
.image-link {
    display: block;
    text-align: center; /* 画像の親要素が中央揃えになるように */
}

.image-link img {
    display: block;
    max-width: 100%; /* 親要素を超えない */
    height: auto; /* アスペクト比を維持 */
    margin: 10px auto; /* 画像を中央揃えにする */
}

/* 目立たせるキャッチフレーズのスタイル */
.highlighted-text {
    font-size: 24px; /* 文字を大きく */
    font-weight: bold; /* 太字 */
    color: #007bff; /* 目立つ青色に */
    text-align: center; /* 中央ぞろえ */
    margin-bottom: 20px; /* 下に余白を追加 */
}

/* 表全体のスタイル */
.styled-table {
    width: 95%; /* 全体の幅を少し狭めて余白を持たせる */
    margin: 0px auto; /* 自動で中央に配置 */
    border-collapse: collapse;
    font-size: 16px; /* 文字を少し小さく */
    text-align: left;
    table-layout: fixed; /* 列幅を固定 */
}

.styled-table th, .styled-table td {
    padding: 10px 12px;
    border-top: 1px solid #ddd; /* 上線を表示 */
    border-bottom: 1px solid #ddd; /* 下線を表示 */
}

.styled-table th {
    background-color: #f4f4f4;
    font-weight: bold;
    text-align: center;
    width: 300px; /* 項目名の列幅を広く設定 */
    white-space: nowrap; /* 項目名が改行されないように設定 */
}

/* レスポンシブ対応：画面が狭い場合は縦に並べる */
@media (max-width: 891px) {
    .styled-table th {
        background-color: #f4f4f4;
        font-weight: bold;
        text-align: center;
        width: 120px; /* 項目名の列幅を広く設定 */
        white-space: nowrap; /* 項目名が改行されないように設定 */
        font-size: 0.6em; /* フォントサイズを小さく設定 */
    }

    .styled-table td {
        font-size: 0.6em; /* フォントサイズを小さく設定 */
    }

}

/* 福利厚生や各種保険のリストスタイル */
.styled-table ul {
    list-style-type: none; /* デフォルトのリストスタイルを無効化 */
    padding-left: 0; /* 左の余白を削除 */
}

.styled-table ul li {
    padding-left: 10px; /* リスト項目に余白を追加 */
}

/* 箇条書きのスタイルをカッコよく */
.custom-list {
    list-style-type: none; /* デフォルトの箇条書きを無効化 */
    padding-left: 0;
}

.custom-list li {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px; /* 角を丸める */
}

/* 中の要素を左揃えにするクラス */
.left-align {
    text-align: left; /* テキストを左揃え */
}

/* フッター */
.footer-container {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
}

@media (max-width: 891px) {
    .footer-container {
        font-size: 0.7em; /* フォントサイズを小さく設定 */
    }
}

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

.footer-container ul li {
    display: inline;
    margin: 0 10px;
}

.footer-container ul li a {
    color: white;
    text-decoration: none;
}

.footer-container ul li a:hover {
    text-decoration: underline;
}
