/* ベース設定 */
.case-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding:40px 2px;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    line-height: 1.8;
}

/* --- 一覧ページ（タイルレイアウト） --- */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* レスポンシブ対応 */
    gap: 30px;
    margin-top: 40px;
}

.case-item {
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.case-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #f0f0f0;
}

.case-info {
    padding: 20px;
}

.case-cat {
    font-size: 1.6rem;
    color: #8c7b6c; /* 木目製品に合う落ち着いた色 */
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.case-title {
    font-size: 2.0rem;
    font-weight: bold;
    margin: 0;
}

/* --- 詳細ページ（雑誌風レイアウト） --- */
.article-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.article-sub {
    text-align: center;
    color: #666;
    font-size: 2.0rem;
}

/* 雑誌風の本文レイアウト */
.article-section {
    margin-bottom: 60px;
    opacity: 0; /* JSでフェードインさせるため初期は隠す */
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.article-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 画像とテキストの横並び設定 */
.layout-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.layout-split.reverse {
    flex-direction: row-reverse;
}

.layout-split > * {
    flex: 1;
    min-width: 300px;
}

.article-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.article-text h3 {
    font-size: 2.4rem;
    margin-bottom: 20px;
    /* border-left: 5px solid #8c7b6c;  ←古い線は削除またはコメントアウト */
    padding-left: 0; /* 左の余白をリセット */
    position: relative;
    padding-top: 15px; /* 上側に線を出すためのスペースを確保 */
}

/* <h3>の前に表示されるグラデーションの線 */
.article-text h3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 150px; /* 線の長さ（お好みで調整してください） */
    height: 8px;   /* 線の太さ */
    background: linear-gradient(to right, #8c7b6c, rgba(255, 255, 255, 0)); /* 茶色から透明（白）へのグラデーション */
}
}

/* フル幅画像 */
.layout-full img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}

/* --- スマホ対応 --- */
@media (max-width: 768px) {
    .article-title { font-size: 1.5rem; }
    .layout-split { flex-direction: column; }
    .layout-split.reverse { flex-direction: column; }
}

/*
 * 固定ヘッダーの裏側にコンテンツが隠れるのを防ぐための修正
 * (グローバルヘッダー + AVAWOODサブナビの高さに合わせて調整)
 */
.contents {
    /* PC表示での調整例 (ヘッダー+パンくず+サブナビの合計高さに合わせて調整してください) */
    padding-top: 20px; 
    box-sizing: border-box;
}

@media screen and (max-width: 768px) {
    /* スマートフォン表示での調整例 (モバイルヘッダーの高さに合わせて調整) */
    .contents {
        padding-top: 10px; /* 適切な高さに調整してください */
    }
}