/* 🎨 共通設定パレット */
:root {
    --hero-height: 350px;
    --bg-investment: #f6f5ee; 
    --bg-collection: #dee2e2; 
    --text-color: #5d4037;
    --accent-color: #d35400;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    margin: 0; padding: 0;
    color: var(--text-color);
    background-color: var(--bg-investment);
}

/* ヘッダー：すべてのページで共通 */
header {
    background-color: #fff;
    padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.logo { font-size: 1.4rem; font-weight: bold; text-decoration: none; color: var(--text-color); display: flex; align-items: center; gap: 8px; }
nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
nav a { text-decoration: none; color: #888; font-weight: bold; transition: 0.3s; }
nav a:hover { color: var(--accent-color); 
}

/* 共通フッター */
footer { text-align: center; padding: 30px; background: #fff; color: #aaa; font-size: 0.8rem; }

/* 共通ボタン（btnクラス） */
.btn {
    background-color: #fff; color: #555; padding: 12px 40px;
    border-radius: 8px; border: 2px solid #ddd;
    text-decoration: none; font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent-color); color: var(--accent-color); }

/* --- 図鑑・比較ページ用の追加スタイル --- */
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
h2 {
    font-size: 1.8rem; 
    margin-bottom: 20px;
    border-bottom: 3px dashed rgba(93, 64, 55, 0.2); 
    display: inline-block; 
    padding-bottom: 10px;
}

/* --- 銘柄図鑑・カードのレイアウト --- */
.stock-grid {
    display: grid;
    /* 画面幅に合わせて、自動で2列〜3列に調整する魔法の1行 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stock-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    border-top: 5px solid #ccc;
    text-align: left; /* 文字を左寄せに固定 */
}

.stock-card:hover {
    transform: translateY(-5px);
}

/* カテゴリ別の色 */
.card-jp { border-top-color: #ef9a9a; }
.card-us { border-top-color: #b39ddb; }
.card-trust { border-top-color: #e67e22; }
.card-gold { 
    border-top: 5px solid #f1c40f; 
    background: linear-gradient(to bottom, #ffffff, #fff9e6);
}

.ticker { font-size: 0.8rem; font-weight: bold; color: #aaa; margin-bottom: 5px; }
.stock-name { font-size: 1.2rem; font-weight: bold; margin-bottom: 10px; }
.tag { font-size: 0.75rem; background: #eee; padding: 2px 8px; border-radius: 10px; margin-right: 5px; }
.comment { font-size: 0.9rem; margin: 15px 0; color: #666; flex-grow: 1; }
.link-btn { text-align: right; text-decoration: none; font-size: 0.85rem; font-weight: bold; color: #5d4037; opacity: 0.6; }
.link-btn:hover { opacity: 1; color: #d35400; }

/* --- 金比較ページ（テーブル）のスタイル --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
}
.comparison-table th, .comparison-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}
.experience-box {
    background-color: #fff9e6;
    border-left: 5px solid #f1c40f;
    padding: 20px;
    margin: 30px 0;
    border-radius: 5px;
    text-align: left;
}

/* 画像ギャラリーのスタイル */
.photo-gallery {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}
.photo-item {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}
.photo-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: zoom-in; /* 虫眼鏡アイコンに */
}

.photo-item img:hover {
    transform: scale(1.03); /* 少しだけ大きく */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.caption {
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
    text-align: left;
}

/* スマホ（画面幅600px以下）用の調整 */
@media (max-width: 600px) {
    /* 全体の余白を少し詰める */
    .container {
        padding: 15px;
    }

    /* ロゴとメニューをスッキリさせる */
    header {
        padding: 10px;
        flex-direction: column; /* 縦並びに */
        gap: 10px;
    }
    nav ul {
        gap: 10px;
        font-size: 0.8rem; /* メニューの文字を少し小さく */
    }

    /* 大きすぎる見出しを調整 */
    h1 {
        font-size: 1.4rem !important;
        margin-bottom: 20px;
    }
    h2 {
        font-size: 1.2rem;
    }

    /* グラフや画像が窮屈にならないように調整 */
    .photo-gallery {
        gap: 15px;
    }
    .photo-item {
        min-width: 100%; /* スマホでは1枚ずつ縦に並べる */
    }
}