/* =========================================
   共通設定・変数 (CSS Variables)
   ========================================= */
:root {
    /* カラーパレット */
    --color-primary: #202f55; /* ネイビー (信頼感、ベースカラー) */
    --color-primary-light: #2c4279;
    --color-accent: #0067c0; /* 青色 (アクセント、先進性) */
    --color-accent-hover: #0056a0;
    --color-white: #ffffff;
    --color-bg-light: #f4f7fb;
    --color-text-main: #333333;
    --color-text-muted: #666666;
    --color-border: #e2e8f0;

    /* フォント */
    /* JetBrains Mono: 英語、数字、見出しなどのアクセント用 */
    /* Noto Sans JP: 日本語の本文用 */
    --font-heading: 'JetBrains Mono', 'Noto Sans JP', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;

    /* その他 */
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --header-height: 80px;
}

/* =========================================
   リセットCSS & ベーススタイル
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

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

/* =========================================
   ヘッダー (Header)
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: transform var(--transition-speed);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    letter-spacing: 1px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    position: relative;
    padding: 5px 0;
}

/* ナビゲーションのホバーアニメーション */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-accent);
}

/* ハンバーガーメニュー (モバイル用) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--color-primary);
    transition: 0.3s;
}

/* =========================================
   ページ共通レイアウト (SPA処理用)
   ========================================= */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 100px); /* フッター考慮 */
}

.page-section {
    display: none; /* デフォルトは非表示 */
    animation: fadeIn 0.5s ease-in-out;
}

.page-section.active {
    display: block; /* アクティブなセクションのみ表示 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 汎用ボタンスタイル */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(0, 103, 192, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 103, 192, 0.4);
}

/* セクションタイトル */
.section-title {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title span {
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-accent);
    margin-top: 5px;
    font-weight: normal;
}

/* サブページのヒーローエリア */
.hero-sub {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 60px;
}

.hero-sub-title {
    font-family: var(--font-heading);
    font-size: 40px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* =========================================
   トップページ (Home)
   ========================================= */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    background-image: url('hero-bg.png'); /* 生成した画像へのパス */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

/* 背景を少し暗くして文字を見やすくするオーバーレイ */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(32, 47, 85, 0.8) 0%, rgba(0, 103, 192, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}

.text-accent {
    color: #aed6f1; /* アクセント用の明るい水色 */
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* ニュースセクション */
.news-section {
    padding: 80px 0;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #202f55, #0067c0);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 15px;
    padding: 30px;
    color: var(--color-white);
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-family: var(--font-heading);
    color: rgba(255, 255, 255, 0.8);
    width: 120px;
}

.news-category {
    background-color: var(--color-white);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 20px;
    width: 100px;
    text-align: center;
}

.news-title {
    flex-grow: 1;
    font-weight: bold;
    color: var(--color-white);
}

.news-title:hover {
    color: #aed6f1; /* 明るい水色 */
}

/* ミッション・ビジョン */
.mission-vision {
    padding: 80px 0 100px;
    background-color: var(--color-bg-light);
    border-radius: 20px;
    margin-bottom: 80px;
}

.mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 40px;
}

.mv-card {
    background: linear-gradient(135deg, #202f55, #0067c0);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    color: var(--color-white);
}

.mv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.mv-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-white);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
}

.mv-title {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--color-white);
    margin-bottom: 15px;
}

.mv-text {
    color: rgba(255, 255, 255, 0.8);
}

/* =========================================
   事業内容 (Business)
   ========================================= */
.services-intro {
    text-align: center;
    margin-bottom: 60px;
    font-size: 18px;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 100px;
}

.service-card {
    background: linear-gradient(135deg, #202f55, #0067c0);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
    color: var(--color-white);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.service-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: none;
}

.service-info {
    padding: 30px;
}

.service-name {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--color-white);
    margin-bottom: 15px;
}

.service-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

/* =========================================
   会社概要 (Company) & 採用情報 (Recruit)
   ========================================= */
.company-wrapper, .recruit-info {
    max-width: 800px;
    margin: 0 auto 100px;
    background: linear-gradient(135deg, #202f55, #0067c0);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    color: var(--color-white);
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th, .company-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.company-table th {
    width: 30%;
    color: var(--color-white);
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.1);
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.recruit-message {
    text-align: center;
    margin-bottom: 60px;
}

.recruit-message h3 {
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.recruit-action {
    text-align: center;
    margin-top: 40px;
}

/* =========================================
   お問い合わせ (Contact)
   ========================================= */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto 100px;
}

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

.contact-form {
    background: linear-gradient(135deg, #202f55, #0067c0);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    color: var(--color-white);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--color-white);
}

.required {
    background-color: #e74c3c;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 15px;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 103, 192, 0.1);
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

/* =========================================
   フッター (Footer)
   ========================================= */
.footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-copy {
    font-size: 13px;
    opacity: 0.6;
}

/* =========================================
   モーダルウィンドウ (Modal)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 40, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #202f55, #0067c0);
    color: var(--color-white);
    width: 90%;
    max-width: 600px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

/* クリック可能なカードのアフォーダンス */
.clickable-card {
    cursor: pointer;
    position: relative;
}

.clickable-card::after {
    content: '詳細を見る';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.clickable-card:hover::after {
    opacity: 1;
}

/* =========================================
   レスポンシブデザイン (Media Queries)
   ========================================= */
@media (max-width: 768px) {
    /* モバイルナビゲーション設定 */
    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left var(--transition-speed);
    }

    .nav.open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .nav-link {
        font-size: 18px;
    }

    /* ヒーロータイトルの縮小 */
    .hero-title {
        font-size: 32px;
    }

    /* ニュースのレイアウト変更 */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .news-date, .news-category {
        width: auto;
    }

    /* ミッション・ビジョンの2列を1列に */
    .mv-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    /* テーブルのモバイル対応 */
    .company-table th, .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background-color: transparent;
        border-bottom: none;
        padding-bottom: 5px;
    }
}
