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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
/* headerタグ自体の設定 */
/* 「header」タグそのものの設定 */
.header {
    width: 100%;
    background-color: #fff;
    border-bottom: 2px solid #eee;
    padding: 15px 0;
}

/* 中身を横並びにする最重要設定 */
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;             /* これで横並びになる */
    justify-content: space-between; /* ロゴとナビを両端に離す */
    align-items: center;       /* 上下中央を揃える */
}

/* ナビゲーションのリストを横並びにする */
#g-nav ul {
    display: flex;             /* メニュー項目を横並びにする */
    list-style: none;
    margin: 0;
    padding: 0;
}

#g-nav li {
    margin-left: 20px;         /* メニュー同士の間隔 */
}

/* ロゴの文字設定 */
.header-inner h1 a {
    text-decoration: none;
    color: #004098;
    font-size: 24px;
    font-weight: bold;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ついでに、見切れ防止のためにh1の余計な余白を消す */
.logo {
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* ロゴと社名を横並びにする設定 */
.logo a {
    display: flex;       /* 横並びにする */
    align-items: center; /* 上下の中央を揃える */
    text-decoration: none;
    color: #004098;      /* ケーズデンキ風の濃い青（お好みで変えてください） */
    transition: opacity 0.3s;
}
.logo a:hover {
    opacity: 0.7; /* 少し透明にして「押せる感」を出す */
}

/* ロゴ画像の設定 */
.logo img {
    height: 50px;          /* ここの数値を変えるとロゴの大きさが変わります */
    width: auto;           /* 横幅は比率を保って自動調整 */
    display: block;        /* 画像の下にできる謎の隙間を消す */
    margin-right: 12px;
}

.logo a {
    display: flex;
    align-items: center;   /* 画像とテキストの上下中央を揃える */
    text-decoration: none;
}

/* 社名テキストの設定 */
.company-name {
    font-size: 20px;     /* 文字の大きさ */
    font-weight: bold;   /* 太字 */
    letter-spacing: 1px; /* 文字の間隔を少し広げてプロっぽく */
    line-height: 1;      /* 行の高さを詰めて見切れを防止 */
    white-space: nowrap; /* 画面が狭くなっても社名が途中で改行されないようにする */
}

/* スマホ時の調整 (@media (max-width: 768px) の中に追加) */
@media (max-width: 768px) {
    .company-name {
        font-size: 16px; /* スマホでは文字を少し小さく */
    }
    .logo img {
        height: 35px;    /* スマホでは画像も少し小さく */
    }
}

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

.g-nav li {
    margin-left: 20px;
}

.g-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

/* メインビジュアル */
.hero {
    height: 600px;
    background: url('hero-image.jpg') no-repeat center center / cover;
    position: relative;
    display: flex;
    align-items: center;
}

/* 画像の上に薄い青の膜を張って文字を読みやすくする */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 64, 152, 0.2); /* 企業カラーを薄く被せる */
}

.hero-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* 膜より前に出す */
    z-index: 1;
}

.hero-text {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.sub-copy {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.main-copy {
    font-size: 48px;
    line-height: 1.4;
    margin-bottom: 30px;
}

/* ボタンの作り込み */
.btn-more {
    display: inline-block;
    padding: 15px 40px;
    background-color: #ff0000; /* ケーズ風のアクセントカラー赤 */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: 0.3s;
}

.btn-more:hover {
    background-color: #cc0000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 画像の上に薄い青の膜を張って文字を読みやすくする */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 64, 152, 0.2); /* 企業カラーを薄く被せる */
}

.hero-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* 膜より前に出す */
    z-index: 1;
}

.hero-text {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.sub-copy {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.main-copy {
    font-size: 48px;
    line-height: 1.4;
    margin-bottom: 30px;
}

/* ボタンの作り込み */
.btn-more {
    display: inline-block;
    padding: 15px 40px;
    background-color: #ff0000; /* ケーズ風のアクセントカラー赤 */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: 0.3s;
}

/* ボタンのホバー設定 */
.btn-more:hover, .view-all:hover {
    background-color: #cc0000; /* 少し暗い赤に */
    transform: translateY(-3px); /* 3ピクセル上に浮く */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* 影を付けて浮遊感を出す */
    transition: 0.3s;
}

/* ニュース */
.news {
    padding: 60px 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.news-list .date {
    color: #888;
    margin-right: 20px;
}

.news-list .category {
    background: #004098;
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 15px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 3px solid #004098;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.news-header h2 span {
    font-size: 14px;
    color: #888;
    margin-left: 10px;
}

.news-item a {
    display: flex;
    align-items: center;
    padding: 20px 10px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.news-item a:hover {
    background: #f9f9f9;
}

.news-item time {
    font-family: Arial, sans-serif;
    color: #888;
    width: 120px;
}

/* 重要（赤） */
.label {
    background: #ff0000;
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    margin-right: 15px;
    border-radius: 2px;
}
/* IR・お知らせ（青） */
.label.info {
    background: #004098;
}

.news-title {
    flex: 1;
    font-weight: 500;
}

/* カードレイアウト */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: auto;
}

.card h4 {
    padding: 15px;
    margin: 0;
}

.card p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #666;
}


/* --- レスポンシブ設定 (画面幅768px以下) --- */
@media (max-width: 768px) {
    

    /* メインビジュアル: 文字サイズを調整 */
    .hero {
        height: 250px;
    }

    .hero h2 {
        font-size: 20px;
        padding: 0 15px;
    }

    /* ニュース: 日付とタイトルを縦に並べる */
    .news-list li {
        display: flex;
        flex-direction: column;
    }

    .news-list .category {
        width: fit-content;
        margin: 5px 0;
    }

    /* グリッドレイアウト: 3列から1列へ */
    .grid {
        grid-template-columns: 1fr; /* 1列にする */
        gap: 20px;
    }

    .card img {
        height: 200px;
        object-fit: cover; /* 画像を綺麗に収める */
    }
}

/* --- ハンバーガーメニューのスタイル --- */
.menu-btn {
    display: none; /* 基本は隠す */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
    padding: 10px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    margin-bottom: 5px;
    transition: 0.3s;
}

/* スマホ用のレイアウト修正（@media内に追加） */
@media (max-width: 768px) {
    .menu-btn {
        display: block; /* スマホの時だけ表示 */
    }

    /* 最初は隠しておく */
.g-nav {
    position: fixed;
    top: 0;
    right: -100%; /* 画面の右側に隠す */
    width: 70%;
    height: 100vh;
    background: #fff;
    transition: 0.5s;
    z-index: 99;
}

/* activeクラスが付いたら画面内に入れる */
.g-nav.active {
    right: 0;
}

    .g-nav ul {
        flex-direction: column;
    }

    .g-nav li {
        margin: 20px 0;
        text-align: center;
    }
}

/* メニューのリンク設定 */
#g-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 14px;
    padding: 10px 5px;
    display: inline-block;
    position: relative;        /* 下線の位置を決める基準 */
    transition: color 0.3s;    /* 色の変化を0.3秒で滑らかに */
}

/* マウスを乗せた時の文字色 */
#g-nav a:hover {
    color: #004098;           /* ケーズデンキ風の青に変わる */
}

/* 下線がスッと伸びるアニメーション */
#g-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;                 /* 最初は長さゼロ */
    height: 2px;
    background-color: #004098;
    transition: width 0.3s;   /* 0.3秒かけて伸びる */
}

/* マウスを乗せた時に下線を100%にする */
#g-nav a:hover::after {
    width: 100%;
}

.view-all {
    display: inline-block;
    padding: 8px 20px;
    background-color: #fff;
    color: #004098;
    border: 1px solid #004098;
    text-decoration: none;
    transition: 0.3s;
}

.view-all:hover {
    background-color: #004098;
    color: #fff; /* 色が反転する */
}

.service-detail {
    padding: 60px 0;
}

/* 詳細ページの画像調整 */
#service-content img {
    max-width: 800px;    /* 横幅を最大800pxに抑える */
    width: 60%;        /* 画面が狭いときは自動で縮む */
    height: auto;       /* 比率は維持 */
    display: block;
    margin: 40px auto;  /* 上下に余白を作り、左右中央に寄せる */
    border-radius: 8px; /* 角を少し丸くすると親切な印象に */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* 軽い影をつけるとかっこいい */
}

.post-content {
    line-height: 1.8;
    font-size: 16px;
}

.post-content h2 {
    border-left: 5px solid #004098;
    padding-left: 15px;
    margin: 40px 0 20px;
}

.back-btn {
    margin-top: 50px;
    text-align: center;
}

/* ニュース詳細ページのレイアウト */
.news-detail-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.post-date {
    color: #888;
    margin-bottom: 10px;
}

.post-title {
    font-size: 2rem;
    border-bottom: 3px solid #004098;
    padding-bottom: 15px;
    margin-bottom: 30px;
    line-height: 1.4;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

/* 記事内の画像がはみ出さないように */
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 5px;
}

.btn-area {
    text-align: center;
    margin-bottom: 80px;
}

.btn-back {
    color: #004098;
    text-decoration: none;
    font-weight: bold;
}

/* お問い合わせフォームのスタイル */
.contact-section {
    max-width: 700px;
    margin: 80px auto;
    padding: 0 20px;
}

.contact-lead {
    text-align: center;
    margin-bottom: 40px; 
    color: #666;
}

.form-item {
    margin-bottom: 25px;
}

.form-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.form-item label span {
    background: #ff4d4d;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}

.form-item input,
.form-item select,
.form-item textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* 幅がはみ出さないように */
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #004098;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background-color: #002d6b;
}

/* --- フッター決定版（これ一つにまとめます） --- */
.footer {
    background-color: #1a1a1a !important; /* 背景色：濃いグレー（!importantで強制適用） */
    color: #ffffff !important;           /* 文字色：白 */
    padding: 80px 0 40px;
    margin-top: 80px;
}

/* フッター内のリンク色を白に固定 */
.footer a {
    color: #ccc !important;
    text-decoration: none;
}

.footer a:hover {
    color: #fff !important;
}

/* レイアウト：会社概要とメニューを横並びに */
.footer-flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; 
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-info, .footer-nav {
    flex: 1;
    min-width: 280px;
}

.footer-logo {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fff;
}

.company-details p {
    font-size: 0.9rem;
    line-height: 2;
    margin-bottom: 10px;
    color: #ccc;
}

.company-details strong {
    color: #fff;
    display: inline-block;
    width: 100px;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 60px;
    padding-top: 25px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}