/* リセットと基本スタイル */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Verdana, Arial, sans-serif;
    font-size: 14px;
    color: #656565;
    background-color: #f4f4f4; /* 元の背景色 */
    line-height: 1.6;
}

.wrapper {
    max-width: 1000px; /* 元のテーブル幅 */
    margin: 0 auto;
    background-color: #fff; /* コンテンツエリアの背景色 */
}

.container {
    width: 95%; /* 内部コンテンツの幅 */
    max-width: 944px; /* 元のコンテンツ幅に相当 */
    margin: 0 auto;
}

a:link, a:visited {
    color: #323361; /* 元のリンク色 */
    text-decoration: none;
}

a:hover {
    color: #ff8100; /* 元のホバー色 */
    text-decoration: underline;
}

h1.site-title {
    font-size: 14px; /* 元のsize="2"に相当 */
    font-weight: normal;
}

.responsive-image {
    max-width: 100%;
    height: auto;
    display: block; /* インライン要素の画像から変更 */
}

/* ---------------------------------
 * ヘッダーセクション
 * --------------------------------- */
.top-header {
    background-color: #323361; /* 元のbg_top.gifから近似色 */
    padding: 8px 0;
    color: #dddbdc;
}

.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* メインヘッダーエリア - ロゴ、言語、ナビゲーション */
.main-header-area {
    background-image: url('/image/top.png'); /* 元の背景画像 */
    background-size: cover;
    background-position: center;
    padding-bottom: 27px; /* 元のスペーサーに合わせて調整 */
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 20px;
    flex-wrap: wrap; /* モバイル対応 */
}

.logo-link {
    flex-shrink: 0;
    margin-right: 20px;
}

.header-utilities {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 右寄せ */
}

.language-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.language-selector img {
    height: 20px; /* 画像の高さ調整 */
    width: auto;
}

/* メインナビゲーション (レスポンシブ対応) */
.main-nav ul {
    list-style: none;
    display: flex; /* 横並び */
    gap: 0; /* 元の画像ベースのメニューに合わせて隙間なし */
}

.main-nav a {
    display: block;
    /* ナビゲーション画像のサイズに合わせる */
    width: auto;
    height: 39px;
    text-indent: -9999px; /* 画像を使用しているためテキストを非表示 */
    background-repeat: no-repeat;
    background-size: contain;
}

/* 疑似的に画像メニューを再現する（画像パスは元のものを利用） */
.main-nav li:nth-child(1) a { background-image: url('/image/1top_08.png'); width: 145px; } /* Home */
.main-nav li:nth-child(2) a { background-image: url('/image/1top_09.png'); width: 152px; } /* About us */
.main-nav li:nth-child(3) a { background-image: url('/image/1top_10.png'); width: 189px; } /* Company group */
.main-nav li:nth-child(4) a { background-image: url('/image/1top_11.png'); width: 151px; } /* Product */
.main-nav li:nth-child(5) a { background-image: url('/image/1top_12.png'); width: 142px; } /* Service */
.main-nav li:nth-child(6) a { background-image: url('/image/1top_13.png'); width: 172px; } /* Contact us */

/* サブメニュー */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    list-style: none;
    background-color: #f3f3f3; /* 元のメニュー背景色 */
    border: 1px solid #909090;
    top: 39px; /* ナビゲーション項目の高さ分下に配置 */
    left: 0;
    z-index: 100;
    width: 180px; /* 元のメニュー幅 */
    display: none; /* 初期非表示 */
}

.submenu a {
    text-indent: 3px;
    padding: 3px 5px;
    line-height: 1.4;
    text-decoration: none;
    font-size: 12px;
    color: #333333;
    display: block;
    width: 100%;
    height: auto; /* 画像メニューのスタイルを上書き */
    background-image: none !important;
}

.submenu a:hover {
    background-color: #bbc9ff; /* 元のホバー背景色 */
    text-decoration: none;
}

.full-width-banner {
    margin-top: 20px; /* バナーとナビゲーションの間にスペース */
}

.full-width-banner img {
    width: 100%;
    height: auto;
}

/* ---------------------------------
 * メインコンテンツ
 * --------------------------------- */
.main-content-layout {
    display: grid;
    gap: 30px;
    padding: 30px 0;
    /* デスクトップ用レイアウト: ニュース・在庫セクションが下に配置される */
    grid-template-areas:
        "main-info sidebar"
        "news-stock news-stock";
    grid-template-columns: 2fr 1fr; /* 左側を広く、右側を狭く */
}

.main-info { grid-area: main-info; }
.sidebar { grid-area: sidebar; }
.news-stock-layout {
    grid-area: news-stock;
    display: flex; /* ニュースと在庫を横並びにするため */
    gap: 30px;
}

.text-box {
    background-image: url('/image/main_03.gif'); /* 元の背景画像 */
    background-repeat: repeat-x;
    background-position: bottom;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #cccccc; /* 視覚的な区切りを追加 */
}

.text-box h2 {
    color: #000080;
    font-size: 14px;
    margin-bottom: 10px;
}

.text-box p {
    font-size: 14px;
    margin-bottom: 10px;
}

.sidebar .product-link img {
    margin-bottom: 15px;
}

.affiliated-companies {
    background-color: #f8f8f8;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.affiliated-companies ul {
    list-style: none;
    padding-top: 10px;
}

.affiliated-companies li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.affiliated-companies li a {
    font-size: 14px;
}

.affiliated-companies li img {
    margin-right: 5px;
    height: 20px; /* ロゴの高さ調整 */
    width: auto;
    vertical-align: middle;
}

/* ニュース＆在庫の2カラムレイアウト */
.news-section, .stock-section {
    flex: 1; /* 等幅 */
    min-width: 0; /* Flexアイテムの最小幅を設定 */
}

.news-list {
    border: 1px solid #cccccc;
    padding: 20px;
}

.news-item {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.news-item img {
    width: 30%;
    max-width: 120px;
    flex-shrink: 0;
}

.news-item hr {
    border: none;
    border-top: 1px solid #cccccc;
    margin: 5px 0;
}

.news-item a {
    color: #363b75;
    font-size: 14px;
}

.stock-section {
    text-align: center;
}

.stock-item {
    display: flex;
    justify-content: center;
    padding: 20px;
    border: 1px solid #cccccc;
    background-color: #ffffff;
}

.stock-card {
    border: 1px solid #cccccc;
    background-color: #ffffff;
    padding: 10px;
    text-align: center;
}

.stock-card img {
    margin: 10px auto;
    width: 150px;
}

.stock-card .detail-link {
    color: #494949;
    font-size: 14px;
}

/* ---------------------------------
 * フッターセクション
 * --------------------------------- */
.footer {
    background-color: #373b7a; /* 元のフッター背景色 */
    color: #ffffff;
    padding: 10px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.footer a {
    color: #ffffff;
}

.footer-nav a {
    margin: 0 5px;
}


/* ---------------------------------
 * レスポンシブデザイン (モバイルファースト)
 * --------------------------------- */
/* ナビゲーション画像が多いので、モバイルではドロップダウンにする */
@media (max-width: 768px) {
    .top-header-content {
        flex-direction: column;
        text-align: center;
    }

    .top-header-content h1, .top-header-content p {
        margin: 5px 0;
    }

    .main-header-content {
        flex-direction: column;
        align-items: center;
    }

    .logo-link {
        margin-bottom: 15px;
    }

    .header-utilities {
        width: 100%;
        align-items: center;
    }

    .language-selector {
        margin-bottom: 20px;
    }

    /* メインナビゲーションを縦並びにするか、ハンバーガーメニューにするか */
    .main-nav ul {
        flex-direction: column; /* 縦並び */
        align-items: center;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        width: 100% !important; /* 画像の幅を無視してフル幅に */
        background-image: none !important; /* 画像を非表示 */
        text-indent: 0; /* テキストを表示 */
        height: auto;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    /* サブメニューのスタイルを調整 */
    .has-submenu {
        width: 100%;
    }

    .submenu {
        position: static; /* 通常のフローに戻す */
        width: 100%;
        border-left: none;
        border-right: none;
    }

    .submenu a {
        padding-left: 30px; /* インデント */
    }

    /* 2カラムレイアウトを1カラムに */
    .main-content-layout {
        grid-template-areas:
            "main-info"
            "sidebar"
            "news-stock";
        grid-template-columns: 1fr;
    }

    .news-stock-layout {
        flex-direction: column;
    }

    .news-item {
        flex-direction: column;
        text-align: center;
    }

    .news-item img {
        width: 80%;
        max-width: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .copyright {
        margin-bottom: 10px;
    }
}
