/* 基本設定 */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    /* 中央揃え */
    padding: 0 15px;
}

/* ヘッダー */
header {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    /* z-indexを1000に変更 */
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header p {
    margin: 5px 0 0;
    font-size: 1.1em;
}

/* ナビゲーション */
nav {
    background-color: #444;
    padding: 10px 0;
    position: fixed;

    top: 100px;
    /* 削除 */
    width: 100%;
    z-index: 1000;
    display: flex;
    /* 追加 */
    justify-content: center;
    /* 追加 */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    /* 上下0、左右autoで中央配置 */
    text-align: center;
    display: flex;
    justify-content: center;
    /* 追加 */
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    color: #f0db4f;
}

main {
    padding-top: 100px;
    /* 追加：ナビゲーションバーの高さ分だけpadding */
}

.menu-toggle {
    display: none;
    /* デフォルトで非表示 */
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #fff;
    margin: 3px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* チェックボックスの状態に応じてハンバーガーメニューの動き */
#menu-checkbox:checked+.menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

#menu-checkbox:checked+.menu-toggle span:nth-child(2) {
    opacity: 0;
}

#menu-checkbox:checked+.menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

#menu-checkbox:checked~nav {
    display: block;
}

#menu-checkbox {
    display: none;
    /* チェックボックス自体を非表示にする */
}


/* メインコンテンツ共通 */
.content-section {
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    color: #333;
}

/* 背景色が交互になるスタイル */
.alt-bg {
    background-color: #fff;
}

/* 事業内容 */
.business-items {
    display: flex;
    flex-wrap: wrap;
    /* 折り返しを許可 */
    gap: 30px;
    /* アイテム間の隙間 */
    justify-content: center;
}

.business-item {
    flex-basis: calc(50% - 40px);
    min-width: 280px;
    min-height: 250px;
    /* 背景画像が見えるように最低限の高さを指定 */
    border-radius: 8px;
    overflow: hidden;
    /* 疑似要素がはみ出ないように */
    position: relative;
    /* 疑似要素の配置基準 */
    display: flex;
    /* コンテンツを中央揃えにしやすくする */
    align-items: center;
    /* 垂直中央揃え */
    justify-content: center;
    /* 水平中央揃え */
    padding: 25px;
    /* 内側の余白 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* 影を少し濃く */
    color: #fff;
    /* 文字色を白に */
    text-align: center;
    /* テキストを中央揃え */
    background-size: cover;
    /* 画像を要素全体を覆うように */
    background-position: center;
    /* 画像を中央に配置 */
    background-repeat: no-repeat;
    /* 画像を繰り返さない */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* ホバー効果用トランジション */
    /* border プロパティは不要なら削除 */
}

/* オーバーレイ用の疑似要素 */
.business-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明の黒いオーバーレイ (0.5は透明度) */
    z-index: 0;
    /* テキストの下に配置 */
    transition: background-color 0.3s ease;
    /* ホバー効果用 */
}

.business-item-content {
    position: relative;
    /* テキストをオーバーレイの上に表示 */
    z-index: 1;
}

.business-item:hover {
    transform: scale(1.03);
    /* 少し拡大 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    /* border-color は不要 */
}

.business-item:hover::before {
    background-color: rgba(0, 0, 0, 0.65);
    /* ホバー時にオーバーレイを少し濃く */
}


.business-item img {
    max-width: 100px;
    /* 画像サイズ調整 */
    height: auto;
    margin-bottom: 15px;
    border-radius: 5px;
    /* 画像の角を少し丸める */
}

.business-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4em;
    /* 少し大きめに */
    color: #fff;
    /* 文字色を強制的に白に */
}

.business-item p {
    margin-bottom: 0;
    font-size: 0.95em;
    color: #eee;
    /* 少しだけ暗い白 */
}

#business-ai {
    background-image: url('images/services/AI.png');
}

#business-video-production {
    background-image: url('images/services/video-creation.jpg');
}

#business-video-streaming {
    background-image: url('images/services/live-streaming.jpg');
}

#business-consulting {
    background-image: url('images/services/consulting.PNG');
}

/* ビジョン・ミッション */
.vision-mission-content {
    margin-bottom: 30px;
    text-align: center;
}

.vision-mission-content h3 {
    color: #555;
    margin-bottom: 10px;
}

/* 料金表 */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    /* ボーダーを重ねる */
    margin: 30px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pricing-table th,
.pricing-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.pricing-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

.pricing-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
    /* 偶数行の背景色 */
}

.pricing-table tbody tr:hover {
    background-color: #f1f1f1;
    /* ホバー時の背景色 */
}

.cta-button {
    display: inline-block;
    background-color: #5cb85c;
    /* ボタンの色 */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 20px;
    /* テーブルとの間隔 */
}

.cta-button:hover {
    background-color: #4cae4c;
    /* ホバー時のボタンの色 */
}


/* ポートフォリオ */

.portfolio-item-title {
    font-size: 1.1em;
    /* フォントサイズ調整 */
    font-weight: bold;
    /* 太字に */
    color: #333;
    /* 文字色 */
    margin-top: 10px;
    /* 画像との間隔 */
    margin-bottom: 5px;
    /* 説明文との間隔 */
    padding: 0 15px;
    /* 左右に少しパディング */
}

.portfolio-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.portfolio-item {
    flex-basis: calc(33.333% - 20px);
    min-width: 250px;
    background-color: #f9f9f9;
    /* alt-bgが白なので少し色をつける */
    /* border: 1px solid #eee; */
    /* ← この行を削除またはコメントアウト */
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* ▼▼▼ 追加・変更 ▼▼▼ */
    box-sizing: border-box;
    /* paddingとborderを要素サイズに含める */
    border: 2px solid transparent;
    /* 通常時は透明な枠線 */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    /* transitionにborder-colorを追加 */
    /* ▲▲▲ ここまで ▲▲▲ */
}

.portfolio-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* ▼▼▼ 追加 ▼▼▼ */
    border-color: #5cb85c;
    /* ホバー時に緑色の枠線を表示 */
    /* ▲▲▲ ここまで ▲▲▲ */
}

.portfolio-item-description {
    font-size: 0.9em;
    color: #555;
    padding: 0 15px 15px;
    /* 左右と下にパディング */
    margin: 0;
    min-height: 3em;
    /* 高さをある程度揃える（調整してください）*/
}

.portfolio-item a {
    text-decoration: none;
    color: #333;
    display: block;
    /* リンク領域を全体に広げる */
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    /* 高さを固定 */
    object-fit: cover;
    /* 画像の比率を保ちつつコンテナに合わせる */
    display: block;
    /* 下部の余白をなくす */
}

.portfolio-item p {
    padding: 15px;
    margin: 0;
    font-size: 0.9em;
    min-height: 4em;
    /* 説明文の高さをある程度揃える */
}

/* 会社詳細 */
.company-info {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    /* マップとの間隔 */
}

.company-info dt {
    font-weight: bold;
    color: #555;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    /* 区切り線 */
    margin-top: 15px;
}

.company-info dt:first-of-type {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}

.company-info dd {

    font-size: larger;
    margin-left: 0;
    /* デフォルトのマージンをリセット */
    margin-bottom: 15px;
    padding-bottom: 15px;
    /* dtとの間隔調整 */
}

/* Google Map */
.map-container {
    text-align: center;
    /* iframeを中央に */
    margin-top: 20px;
}

.map-container h3 {
    margin-bottom: 15px;
}

.map-container iframe {
    max-width: 100%;
    /* 親要素の幅を超えないように */
    border-radius: 8px;
    /* 角を丸める */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* フッター */
footer {
    background-color: #333;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    /* mainとの間隔 */
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    nav {
        display: none;
        /* 修正 */
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background-color: #333;
        z-index: 1000;
        flex-direction: column;
    }

    nav ul {
        nav ul {
            display: block;
            /* スマホでは非表示 */
            position: absolute;
            top: 60px;
            /* ヘッダーの高さに合わせる */
            left: 0;
            width: 100%;
            background-color: #333;
            z-index: 999;
            flex-direction: column;
        }
    }

    nav ul li {
        display: block;
        margin: 10px 0;
    }

    nav ul li a {
        display: block;
        padding: 10px;
        border-bottom: 1px solid #555;
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    .menu-toggle {
        display: flex;
        /* スマホでは表示 */
    }

    /* チェックボックスがチェックされたらメニューを表示 */
    #menu-checkbox:checked~nav ul {
        display: flex;
    }

    #menu-checkbox:checked~nav {
        display: block;
        /* メニュー表示 */
    }


    .business-items,
    .portfolio-items {
        flex-direction: column;
        /* 縦積みにする */
        align-items: center;
        /* 中央揃え */
    }

    .business-item,
    .portfolio-item {
        flex-basis: 80%;
        /* 幅を調整 */
        min-width: unset;
        /* min-widthを解除 */
        min-height: 200px;
        /* 高さを少し調整 */
    }

    .pricing-table th,
    .pricing-table td {
        font-size: 0.9em;
        padding: 8px 10px;
    }

}



/* ▼▼▼ ダークモード切り替えボタンのスタイル ▼▼▼ */
#darkModeToggle {
    position: absolute;
    /* ヘッダー右上に配置する場合 */
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    border: 1px solid #fff;
    background-color: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s, color 0.3s;
}

#darkModeToggle:hover {
    background-color: #fff;
    color: #333;
}

/* 画面幅が狭いときのボタン位置調整 */
@media (max-width: 768px) {
    #darkModeToggle {
        position: static;
        /* 通常の配置に戻す */
        display: block;
        /* ブロック要素にして中央揃えしやすくする */
        margin: 15px auto 0;
        /* 上にマージン、左右中央揃え */
    }

    .menu-toggle {
        display: flex;
        /* スマホでは表示 */
    }
}


/* ▼▼▼ ダークモード用のスタイル定義 ▼▼▼ */
body.dark-mode {
    background-color: #1a1a1a;
    /* 暗い背景色 */
    color: #e0e0e0;
    /* 明るい文字色 */
}

/* ダークモード時の各要素のスタイル調整 */
body.dark-mode header {
    background-color: #111;
    /* ヘッダー背景 */
    color: #f0f0f0;
}

body.dark-mode nav {
    background-color: #222;
    /* ナビゲーション背景 */
}

body.dark-mode nav ul li a {
    color: #f0f0f0;
}

body.dark-mode nav ul li a:hover,
body.dark-mode nav ul li a:focus {
    color: #f0db4f;
    /* ダークモード時のホバー色 */
}

body.dark-mode .content-section {
    border-bottom-color: #333;
    /* 区切り線の色 */
}

body.dark-mode .content-section h2 {
    color: #f5f5f5;
    /* 見出しの色 */
}

body.dark-mode .alt-bg {
    background-color: #252525;
    /*交互背景の色 */
}

body.dark-mode .business-item,
body.dark-mode .company-info,
body.dark-mode .portfolio-item {
    background-color: #2c2c2c;
    /* 各要素の背景 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    /* ダークモードでは影が目立ちにくいので濃く */
    /* 影を少し明るく */
    border-color: #444;

    border: 2px solid transparent;
    /* ダークモードでも通常時は透明 */
    padding: calc(25px - 2px);
    /* パディング調整 */
    color: #e0e0e0;
    /* 文字色も確認 */

}

body.dark-mode .business-item h3,
body.dark-mode .vision-mission-content h3,
body.dark-mode .company-info dt {
    color: #ccc;
    /* やや暗めの見出し色 */
}

/* ▼▼▼ ダークモード時の .business-item ホバー効果を追加 ▼▼▼ */
body.dark-mode .business-item:hover {
    transform: translateY(-5px);
    /* 上に移動 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    /* 少し明るい影 */
    border-color: #fff;
    /* ホバー時に白い枠線を表示 */
}

body.dark-mode .pricing-table th {
    background-color: #333;
    color: #f0f0f0;
    border-color: #444;
}

body.dark-mode .pricing-table td {
    border-color: #444;
}

body.dark-mode .pricing-table tbody tr {
    background-color: #2c2c2c;
    /* 通常行 */
}


body.dark-mode .pricing-table tbody tr:nth-child(even) {
    background-color: #313131;
    /* 偶数行 */
}

body.dark-mode .pricing-table tbody tr:hover {
    background-color: #404040;
    /* ホバー時 */
}

body.dark-mode .portfolio-item-title {
    color: #eee;
}

body.dark-mode .portfolio-item-description {
    color: #bbb;
}

body.dark-mode .cta-button {
    background-color: #4cae4c;
    /* 少し濃い緑 */
    color: #fff;
}

body.dark-mode .portfolio-item {
    background-color: #2c2c2c;
    /* border-color: #444; */
    /* ← 既存のborder-color指定があれば削除 */
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
    /* ▼▼▼ 追加 ▼▼▼ */
    box-sizing: border-box;
    /* ダークモードでも指定 */
    border: 2px solid transparent;
    /* 通常時は透明 */
    /* ▲▲▲ ここまで ▲▲▲ */
}

body.dark-mode .portfolio-item:hover {
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    /* 少し明るい影 */
    border-color: #fff;
    /* ホバー時に白い枠線を表示 */
}

body.dark-mode .portfolio-item a {
    color: #e0e0e0;
    /* ポートフォリオのリンク色 */
}

body.dark-mode .portfolio-item p {
    color: #bbb;
}

body.dark-mode .map-container iframe {
    filter: invert(100%) hue-rotate(180deg);
    /* 地図の色を反転（簡易的なダークモード対応） */
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}


body.dark-mode footer {
    background-color: #111;
    /* フッター背景 */
    color: #888;
}

/* ダークモード時の切り替えボタン */
body.dark-mode #darkModeToggle {
    border-color: #555;
    background-color: #333;
    color: #f0f0f0;
}

body.dark-mode #darkModeToggle:hover {
    background-color: #444;
    color: #fff;
}

/* (オプション) 画像の明るさを少し調整 */
body.dark-mode img {
    /* filter: brightness(0.8) contrast(1.2); */
    /* ↑ 画像によっては見づらくなる可能性があるので、必要に応じて調整 */
}