/* ==========================================
   共通リセット＆基本設定
   ========================================== */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
}

a {
    color: #005caf;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #003a70;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

/* ==========================================
   レイアウトコンテナ
   ========================================== */
.header-container,
.main-container,
.footer-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ★ナビゲーション枠の幅拡張 */
.nav-container {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 10px;
}

/* ==========================================
   ヘッダー
   ========================================== */
header {
    background-color: #ffffff;
    border-top: 5px solid #005caf;
    padding: 25px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 26px;
    font-weight: bold;
    color: #333333;
    letter-spacing: 1px;
}

.logo p {
    font-size: 12px;
    color: #005caf;
    font-weight: bold;
    margin-bottom: 2px;
}

.header-contact-btn {
    display: inline-block;
    background-color: #005caf;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.header-contact-btn:hover {
    background-color: #003a70;
}

/* ==========================================
   ナビゲーション
   ========================================== */
nav {
    background-color: #f4f4f4;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.nav-list {
    display: flex;
}

.nav-list li {
    flex: 1;
    text-align: center;
}

.nav-list a {
    display: block;
    padding: 15px 0;
    color: #444444;
    font-weight: bold;
    border-right: 1px solid #e0e0e0;
    white-space: nowrap; /* 1列にするための改行防止 */
}

.nav-list li:first-child a {
    border-left: 1px solid #e0e0e0;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: #ffffff;
    color: #005caf;
}

/* ==========================================
   メインビジュアル / ページタイトル
   ========================================== */
.main-visual {
    background-color: #ffffff;
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.main-visual img {
    width: 100%;
    max-width: 960px;
    height: auto;
}

.page-header {
    background-color: #fcfcfc;
    padding: 30px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 24px;
    color: #333333;
    border-left: 5px solid #005caf;
    padding-left: 15px;
}

/* ==========================================
   コンテンツエリア
   ========================================== */
main {
    padding: 40px 0 60px;
}

.section-title {
    font-size: 20px;
    color: #333333;
    border-bottom: 2px solid #005caf;
    padding-bottom: 8px;
    margin-bottom: 25px;
    font-weight: bold;
}

section {
    margin-bottom: 50px;
}

.welcome-text {
    line-height: 2;
    margin-bottom: 30px;
    color: #444444;
}

/* 製品情報用レイアウト */
.product-intro-block {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
    background-color: #fcfcfc;
    padding: 20px;
    border: 1px solid #eef2f6;
}

.product-intro-img {
    flex: 0 0 240px;
}

.product-intro-img img {
    width: 100%;
    border: 1px solid #dddddd;
}

.product-intro-text h3 {
    font-size: 18px;
    color: #005caf;
    margin-bottom: 12px;
}

.product-intro-text p {
    font-size: 15px;
    color: #555555;
    margin-bottom: 15px;
}

/* ==========================================
   ★ 会社案内・設備一覧・採用情報用の表組み
   ========================================== */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    table-layout: fixed; /* ★追加：列幅を固定し、表示崩れを防ぐ */
}

.info-table th, 
.info-table td {
    padding: 15px;
    border: 1px solid #dddddd;
    text-align: left !important; /* ★修正：強制的に左寄せ */
    vertical-align: top !important; /* ★修正：強制的に上揃え */
    font-size: 15px;
}

.info-table th {
    background-color: #f9f9f9;
    color: #333333;
    width: 25%; /* 左側の見出し幅 */
    font-weight: bold;
}

/* コピーボタンの装飾 */
.copy-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    font-size: 12px;
    color: #005caf;
    background-color: #ffffff;
    border: 1px solid #005caf;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.copy-btn:hover {
    background-color: #005caf;
    color: #ffffff;
}

/* ==========================================
   アコーディオン形式（アプリケータ一覧用）
   ========================================== */
.accordion {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #ffffff;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8fafd;
    cursor: pointer;
    list-style: none; /* デフォルトの三角形を消す */
    transition: background-color 0.2s ease;
}

.accordion-header::-webkit-details-marker {
    display: none; /* Safari用の三角形消去 */
}

.accordion-header:hover {
    background-color: #eef2f6;
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.accordion-header h3 {
    font-size: 18px;
    margin: 0;
    color: #005caf;
}

/* 展開アイコン（＋と－が切り替わる） */
.accordion-icon {
    font-size: 24px;
    color: #005caf;
    font-weight: normal;
    transition: transform 0.3s ease;
    line-height: 1;
}

details[open] .accordion-icon {
    transform: rotate(45deg); /* 開いたときに＋を×にする */
}

.official-link {
    font-size: 12px;
    color: #ffffff !important;
    background-color: #888888;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.official-link:hover {
    background-color: #005caf;
}

/* アコーディオンの中身 */
.accordion-content {
    padding: 25px 20px;
    border-top: 1px solid #e0e0e0;
}

/* シンプルな3列箇条書きリスト */
.ap-simple-list {
    columns: 3; /* 3列表示 */
    column-gap: 30px;
    list-style-type: none;
    padding: 0;
}

.ap-simple-list li {
    font-size: 15px;
    color: #444444;
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
    break-inside: avoid; /* 段組途中での改行を防ぐ */
}

.ap-simple-list li::before {
    content: "・";
    position: absolute;
    left: 0;
    color: #005caf;
}

/* ==========================================
   タブ切り替え（アプリケータ JST用）
   ========================================== */
.ap-tab-nav {
    display: flex;
    flex-wrap: nowrap; /* 折り返しを禁止し、強制的に横一列にする */
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 0 10px 0; /* 横スクロールバー用の下余白 */
    list-style: none;
    overflow-x: auto; /* 画面幅が狭い場合は横スクロール（スワイプ）可能にする */
    border-bottom: 2px solid #e0e0e0;
}

/* 横スクロールバーの見た目を整える */
.ap-tab-nav::-webkit-scrollbar {
    height: 6px;
}
.ap-tab-nav::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 3px;
}
.ap-tab-nav::-webkit-scrollbar-thumb {
    background: #cccccc; 
    border-radius: 3px;
}

.ap-tab-nav li {
    flex-shrink: 0; /* 文字が潰れないようにする */
}

.ap-tab-btn {
    display: block;
    padding: 10px 20px;
    border: 1px solid #dddddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0; /* 上の角を丸くしてタブっぽく */
    color: #555555;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* --- それぞれのタブに別々の淡い色を設定 --- */
.ap-tab-nav li:nth-child(1) .ap-tab-btn { background-color: #eaf3ff; }
.ap-tab-nav li:nth-child(1) .ap-tab-btn:hover, 
.ap-tab-nav li:nth-child(1) .ap-tab-btn.active { background-color: #cce3ff; color: #004499; }

.ap-tab-nav li:nth-child(2) .ap-tab-btn { background-color: #eaffea; }
.ap-tab-nav li:nth-child(2) .ap-tab-btn:hover, 
.ap-tab-nav li:nth-child(2) .ap-tab-btn.active { background-color: #cceacc; color: #006600; }

.ap-tab-nav li:nth-child(3) .ap-tab-btn { background-color: #fff9ea; }
.ap-tab-nav li:nth-child(3) .ap-tab-btn:hover, 
.ap-tab-nav li:nth-child(3) .ap-tab-btn.active { background-color: #ffebcc; color: #996600; }

.ap-tab-nav li:nth-child(4) .ap-tab-btn { background-color: #ffeaea; }
.ap-tab-nav li:nth-child(4) .ap-tab-btn:hover, 
.ap-tab-nav li:nth-child(4) .ap-tab-btn.active { background-color: #ffcccc; color: #990000; }

.ap-tab-nav li:nth-child(5) .ap-tab-btn { background-color: #f3eaff; }
.ap-tab-nav li:nth-child(5) .ap-tab-btn:hover, 
.ap-tab-nav li:nth-child(5) .ap-tab-btn.active { background-color: #e0ccff; color: #440099; }

/* アクティブ（選択中）のタブは少し浮き上がる */
.ap-tab-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 -3px 5px rgba(0,0,0,0.05);
}

/* 【重要】タブコンテンツの表示・非表示制御 */
.ap-tab-content {
    display: none; /* 初期状態は非表示 */
    animation: fadeIn 0.4s ease;
}

/* activeクラスが付いたときだけ表示される */
.ap-tab-content.active {
    display: block;
}

/* タブ切り替え時のフワッとするアニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   フッター
   ========================================== */
footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 40px 0;
    font-size: 14px;
    color: #666666;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-info h4 {
    font-size: 16px;
    color: #333333;
    margin-bottom: 5px;
}

.copyright {
    font-size: 12px;
}

/* ==========================================
   上に戻るボタン
   ========================================== */
.page-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #005caf;
    color: #ffffff !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}

.page-top-btn:hover {
    background-color: #003a70;
}

.page-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   レスポンシブ表示（スマートフォン対応）
   ========================================== */
@media (max-width: 768px) {
    header {
        padding: 15px 0;
    }

    .header-inner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-list li a {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .product-intro-block {
        flex-direction: column;
    }

    .product-intro-img {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .info-table th, 
    .info-table td {
        display: block;
        width: 100%;
    }
    
    .info-table th {
        border-bottom: none;
        background-color: #eef2f6;
    }
    
    /* スマホ時のアコーディオン・タブ調整 */
    .accordion-header {
        position: relative;
        align-items: flex-start;
    }
    .accordion-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .accordion-icon {
        position: absolute;
        right: 20px;
        top: 20px;
    }
    .ap-simple-list {
        columns: 1; /* スマホでは1列にする */
    }
    .ap-tab-btn {
        padding: 8px 12px;
        font-size: 13px; /* スマホではボタンを少し小さく */
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .page-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}