/* 変数定義 (変更なし) */
:root {
    --primary-color: #003366;
    --accent-color: #007bff;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --header-height: 70px;
    --card-bg: #ffffff;
}

/* リセット & 基本設定 (変更なし) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
}

/* ヘッダー固定 (変更なし) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* オーバーレイメニュー (変更なし) */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 20px 5%;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
}

.nav-overlay.active {
    transform: translateY(0);
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-items a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    width: 80%;
    max-width: 400px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.3);
    text-align: center;
    border-radius: 5px;
    transition: 0.3s;
}

.nav-items a:hover {
    background: rgba(255,255,255,0.1);
}

/* セクション設定 (変更なし) */
section {
    padding: 100px 10% 60px;
}

section:nth-child(even) {
    background: var(--bg-light);
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    text-align: center; /* タイトルを中央に */
}

/* ミッション・ビジョンのテキスト調整 */
.section-content-center {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.mission-text, .vision-text {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* メインビジュアル (変更なし) */
.hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
    text-align: center;
    margin-top: var(--header-height);
}

/* ★カードレイアウト設定 */
.card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* スマホで折り返す */
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 40px 30px;
    width: calc(33.333% - 20px); /* 3段組み */
    min-width: 280px; /* スマホ時の最小幅 */
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Products用カード (4段組みにする) */
.product-card {
    width: calc(25% - 23px);
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* 会社概要テーブル (変更なし) */
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.company-table th, .company-table td {
    border-bottom: 1px solid #ddd;
    padding: 15px;
}

.company-table th {
    width: 30%;
    background: #f2f2f2;
    text-align: left;
}

.map-container {
    width: 100%;
    height: 400px;
}

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
}

/* レスポンシブ調整 (スマホ) */
@media (max-width: 768px) {
    .card, .product-card {
        width: 100%; /* スマホでは1段組み */
    }
}


/* --- 既存のスタイルに以下を追加 --- */

/* お問い合わせフォーム用 */
.contact-container {
    max-width: 700px;
    margin: 50px auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    text-align: left; /* セクションの中央揃えに引っ張られないよう左寄せ */
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.form-group label .required {
    color: #e63946;
    margin-left: 5px;
    font-size: 0.8rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

/* エラー時のスタイル */
.form-group.error input, 
.form-group.error textarea {
    border-color: #e63946;
    background-color: #fff5f5;
}

.error-message {
    color: #e63946;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.address-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

.submit-btn:hover {
    background: var(--accent-color);
}

/* レスポンシブ調整（スマホで住所欄を縦に） */
@media (max-width: 480px) {
    .address-group {
        grid-template-columns: 1fr;
    }
}
