/* =========================================
   page.css - 納入実績詳細ページ用（上下レイアウト版）
   ========================================= */

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: #ffffff;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

article.l-main {
    border-top: 2px solid #f5f5f5;
    background: linear-gradient(180deg, #f9f9f9 0%, #fff 50%, #fff 100%);
}

.page-container {
    max-width: 1040px;
    /* 上下レイアウトのため、横幅を少し絞ると読みやすくなります */
    margin: 0 auto;
    padding: 15px;
}

/* 戻るリンク */
header {
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    color: #14126f;
    text-decoration: none;
    font-weight: bold;
}

.fot-tsukuard {
    font-family: "fot-tsukuardgothic-std", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.fot-udkakugo-large-pr6n {
    font-family: "fot-udkakugo-large-pr6n", sans-serif;
    font-weight: 600;
    font-style: normal;
}

/* レイアウト：PC・スマホ共通で上下並び */
.content-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================================
   名前（最上部固定）- プレミアムグラデーション＋リッチ明朝体版
   ========================================= */
h1#pageName {
    margin: 0 auto 10px auto;
    font-size: 2.4rem;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.02em;

    position: relative;
    padding-bottom: 25px;
    max-width: 500px;

    /* テキストグラデーション */
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* タイトルの下に走る2層のアクセントライン（ここはグラデーションに合わせてもそのまま美しく映えます） */
h1#pageName::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: #6562d5;
    z-index: 2;
}

h1#pageName::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 1px;
    background: #e5e7eb;
    z-index: 1;
}

/* =========================================
   カテゴリタグ - セレクトショップのようなミニマル高級感
   ========================================= */
.category-tags {
    display: flex;
    gap: 10px;
    /* タグ同士の間隔を少しゆったりに */
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 25px;
    /* 画像との間に心地よい余白を確保 */
}

.tag {
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    /* ベタ塗りをやめて白背景に */
    color: #fff;
    /* ニュアンスのあるダークグレーで知的な印象に */
    border: 1px solid #d1d5db;
    /* 繊細な細い境界線 */
    padding: 6px 18px;
    /* 少し横長にしてスマートに */
    border-radius: 0px;
    /* メイン画像と合わせて完全な直線（ソリッド）に */
    font-size: 0.8rem;
    /* わずかに小さくして洗練度をアップ */
    font-weight: 600;
    letter-spacing: 0.05em;
    /* タグ内の文字間も美しくコントロール */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    /* 軽やかな空気感のシャドウ */
    /* transition: all 0.3s ease; */
}

/* タグにマウスを乗せたときに、静かにブランドカラーへ変化するリッチな演出 */
.tag:hover {
    /*
    color: #0c3f83;
    border-color: #0c3f83;
    background: #e2e4ef;
    */
}

/* =========================================
   画像ギャラリー（gallery-wrapper）の調整
   ========================================= */
.main-image {
    position: relative;
    width: 100%;
    height: auto;
    /* max-height: 600px; */
    max-width: 840px;
    margin: 0 auto;
    background: #f8f9fa;
    /* 1. 丸みをなくして直線的に */
    border-radius: 0px;
    overflow: visible;
    border: 12px solid #ffffff;
    /* 2. リッチで深みのあるモダンなシャドウに変更 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.75)
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
}

/* =========================================
   メイン画像のフェードアニメーション設定
   ========================================= */
#displayImg {
    opacity: 1;
    /* 不透明度の変化を 0.25秒 かけて滑らかにする */
    transition: opacity 0.25s ease-in-out;
}

/* サムネイルクリックの瞬間にJSで付与され、透明になるクラス */
#displayImg.fade-out {
    opacity: 0;
}

.thumbnail-list {
    display: flex;
    gap: 12px;
    margin: 25px auto 0 auto;
    flex-wrap: nowrap;
    justify-content: left;
    width: 100%;
    max-width: 840px;
    box-sizing: border-box;
    overflow: hidden;
}

.thumb {
    /* 固定幅（168px）を指定するのではなく、ベース幅を設定します */
    flex-basis: 168px;

    /* 画面が狭いときは、ベース幅を無視して限界まで縮むことを許可 */
    flex-shrink: 1;
    min-width: 0;
    /* ブラウザの「縮まない最小幅」の制限をリセット（超重要） */

    width: 100%;
    /* 縦横比を綺麗に維持（168:114 = 約1.47） */
    aspect-ratio: 168 / 114;
    object-fit: cover;

    cursor: pointer;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.thumb:hover,
.thumb.active {
    opacity: 1;
    border-color: #14126f;
    box-shadow: 0 4px 10px rgba(20, 18, 111, 0.15);
}

/* 情報エリア (info-wrapper) */
.info-wrapper {
    margin-top: 20px;
}

/* =========================================
   情報エリア (info-wrapper)・紹介文のクオリティアップ
   ========================================= */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    border-top: 2px solid #14126f;
    /* 上部にブランドカラーのラインを通す */
}

.info-table th {
    text-align: left;
    padding: 18px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    width: 25%;
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.info-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    color: #1c1c1c;
    font-size: 0.95rem;
}

/* 紹介文 */
.detail-text {
    padding: 25px;
    background: #fdfdfd;
    border-radius: 0px;
    /* 直線デザインに統一 */
    border-left: 3px solid #14126f;
    /* 線を少し細くして上品に */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.detail-text h3 {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
    color: #14126f;
    letter-spacing: 0.03em;
}

.detail-text p {
    margin: 0;
    white-space: pre-wrap;
    color: #374151;
    line-height: 1.75;
    /* 文章を読みやすく */
}

/* =========================================
   その他の納入事例 (ここをリッチなカード型に変更)
   ========================================= */
.other-records-section {
    background: #f4f6f8;
    /* 背景を少しだけ濃くして、白いカードを引き立てる */
    padding: 50px 30px;
    margin-top: 50px;
    border-radius: 0px;
    /* 直線に */
}

.other-records-title {
    text-align: center;
    color: #111827;
    font-size: 1.5rem;
    margin: 0 0 35px 0;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.other-records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    /* 余白を少し広げてゆとりを持たせる */
}

.other-record-card {
    background: #ffffff;
    /* カード本体を白背景に */
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

/* ホバー時にカードが少し浮き上がり、枠線がブランドカラーになるリッチエフェクト */
.other-record-card:hover {
    opacity: 1;
    /* 不透明度は下げず、立体感で魅せる */
    transform: translateY(-5px);
    border-color: #14126f;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.other-record-img-box {
    width: 100%;
    height: 160px;
    background: #f3f4f6;
    overflow: hidden;
    margin-bottom: 0px;
    /* 下部インフォメーションと密着させる */
}

.other-record-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ホバーしたとき、カード内の画像が静かにズームインする演出 */
.other-record-card:hover .other-record-img-box img {
    transform: scale(1.05);
}

.other-record-info {
    padding: 15px;
    /* 内側にゆとりを確保 */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.other-record-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.other-record-cat {
    font-size: 0.75rem;
    color: #14126f;
    background: #f0f2fe;
    /* カテゴリに薄いブランド色を敷く */
    padding: 2px 8px;
    font-weight: bold;
}

.other-record-name {
    font-size: 1.05rem;
    margin: 0 0 10px 0;
    color: #111827;
    font-weight: bold;
    line-height: 1.4;
}

.other-record-location {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: auto;
    display: flex;
    align-items: center;
}

/* 所在地の前に小さなピンマーク風のドットをつける（上品見せ） */
.other-record-location::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    margin-right: 6px;
}



/* =========================================
   レスポンシブ設定 (スマホ版) - 見切れ防止強化版
   ========================================= */
@media (max-width: 768px) {
    h1#pageName {
        font-size: 1.5rem;
        /* スマホ表示用に文字サイズを最適化 */
        padding: 0 10px 18px 10px;
        max-width: 450px;
    }

    .main-image {
        max-height: 400px;
    }

    /* --- テーブルの完全縦並びと見切れ防止 --- */
    .info-table {
        display: block;
        width: 100%;
        table-layout: fixed;
        /* レイアウトを固定せず内容に追従 */
        border: none;
    }

    .info-table tbody,
    .info-table tr {
        display: block;
        width: 100%;
    }

    .info-table th,
    .info-table td {
        display: block;
        width: 100% !important;
        /* 強制的に全幅にする */
        box-sizing: border-box;
        /* パディングを含めて100%にする（超重要） */
        text-align: left;
        word-break: break-all;
        /* 長い英数字などがあっても強制改行して見切れを防ぐ */
        overflow-wrap: break-word;
    }

    .info-table th {
        background: #f8f9fa;
        padding: 10px 15px;
        border-bottom: none;
        font-size: 0.85rem;
        color: #14126f;
    }

    .info-table td {
        padding: 5px 15px 15px 15px;
        /* 下側の余白を確保 */
        border-bottom: 1px solid #eee;
        font-weight: bold;
        font-size: 1rem;
    }

    /* 紹介文エリアの調整 */
    .detail-text {
        width: 100%;
        box-sizing: border-box;
        margin-top: 10px;
    }

    .other-records-section {
        padding: 40px 15px;
    }

    .other-records-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}

.content-layout div.contact {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 25px;
    background: linear-gradient(90deg, #232039 0%, #1C3557 50%, #232039 100%);
    color: #fff;
}

.content-layout div.contact>p:nth-of-type(1) {
    margin: 0 0 25px 0;
    text-align: center;
    font-weight: bold;
}

.content-layout div.contact>p:nth-of-type(2) {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* お問い合わせボタンの改善案 */
.content-layout div.contact>p:nth-of-type(2)>a {
    box-sizing: border-box;
    display: block;
    padding: 12px 24px;
    /* 縦横の余白を広げて押しやすく */
    background: #fff;
    /* グレーからブランドカラーの紺に変更 */
    color: #1C3557;
    /* 文字を白に */
    width: 260px;
    /* 少し幅を広げてゆとりを */
    text-align: center;
    margin: 0 auto;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border: 4px solid #fff;
    transition: all 0.3s ease;
}

.content-layout div.contact>p:nth-of-type(2)>a:hover {
    background: transparent;
    /* ホバー時は背景を透明に */
    color: #fff;
    /* 文字を紺に（反転エフェクト） */
}

.content-layout div.contact>p:nth-of-type(2)>a>i {
    margin: 0 7px 0 0;
}

/* =========================================
   その他の納入事例 (Other Records Section)
   ========================================= */
.other-records-section {
    background: #f8f9fa;
    padding: 40px 20px;
    margin-top: 40px;
    border-radius: 8px;
}

.other-records-title {
    text-align: center;
    color: #555;
    font-size: 1.4rem;
    margin: 0 0 30px 0;
    font-weight: normal;
}

.other-records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.other-record-card {
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.other-record-card:hover {
    opacity: 0.8;
}

.other-record-img-box {
    width: 100%;
    height: 150px;
    background: #e2e2e2;
    overflow: hidden;
    margin-bottom: 15px;
}

.other-record-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.other-record-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.other-record-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

.other-record-cat {
    font-size: 0.75rem;
    color: #888;
}

.other-record-name {
    font-size: 1.05rem;
    margin: 0 0 8px 0;
    color: #1c1c1c;
    font-weight: bold;
}

.other-record-location {
    font-size: 0.8rem;
    color: #888;
    margin-top: auto;
}

@media (max-width: 768px) {
    .other-records-grid {
        grid-template-columns: 1fr;
    }

    /* スマホ表示時は4件目以降を非表示にして3件だけにする */
    .other-record-card:nth-child(n+4) {
        display: none;
    }
}

/* =========================================
   事例詳細ナビゲーション (Detail Page Navigation)
   ========================================= */
.detail-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 840px;
    margin: 10px auto 25px auto;
    padding: 15px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.detail-nav-counter {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 0 10px;
}

.detail-nav-link {
    display: inline-block;
    background: #fff;
    color: #0c3f83;
    border: 1px solid #0c3f83;
    padding: 6px 18px;
    border-radius: 0px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap; /* ボタン内のテキスト改行を防止 */
    flex-shrink: 0;      /* ボタンが押し潰されるのを防止 */
}

.detail-nav-link:hover {
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    color: #fff;
    border-color: #0c3f83;
    text-decoration: none;
}

/* ナビゲーションスマホ対応 */
@media (max-width: 768px) {
    .detail-nav-container {
        margin: 5px auto 15px auto;
        padding: 10px 0;
    }

    .detail-nav-counter {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .detail-nav-link {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
}