/* ======================
   淀川の植物 シンプル統一スタイル（AI入門準拠）
   ====================== */

/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
body {
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #f9f9f9;
}

/* コンテナ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.site-logo {
    text-align: center;
}

.site-logo h1 {
    font-size: 24px;
    font-weight: normal;
    color: #333;
}

/* パンくずリスト */
.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 8px;
    color: #999;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* タイトルセクション */
.title-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 30px 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-description {
    font-size: 16px;
    opacity: 0.9;
}

/* コンテンツセクション */
.content-section {
    background: white;
    padding: 30px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.content-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
    line-height: 1.6;
    color: #333;
}

.content-section h3 {
    font-size: 19px;
    margin: 25px 0 15px;
    line-height: 1.6;
    color: #333;
}

.content-section h4 {
    font-size: 17px;
    margin: 20px 0 12px;
    line-height: 1.6;
    color: #333;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 18px;
    line-height: 1.8;
    font-size: 16px;
}

/* カテゴリーグリッド（AI入門スタイル準拠） */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* カテゴリーカード（AI入門と同じスタイル） */
.category-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s;
}

.category-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.card-content {
    font-size: 14px;
}

.card-description {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.card-topics {
    list-style: none;
    font-size: 13px;
    color: #555;
    margin: 0;
    padding: 0;
}

.card-topics li {
    padding: 3px 0;
    line-height: 1.5;
}

/* アイコンは削除 - AI入門スタイルに合わせる */
.card-icon {
    display: none;
}

/* リスト改良 */
.content-section ul,
.content-section ol {
    margin: 15px 0 20px 20px;
    padding-left: 0;
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* 目次スタイル追加 */
.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    padding: 5px 0;
}

.table-of-contents a {
    color: #007bff;
    text-decoration: none;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

/* トップに戻るボタン */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.back-to-top.show {
    display: block;
}

/* ナビゲーションボタン */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 2px solid #007bff;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

.nav-link i {
    margin: 0 5px;
}

/* フッター */
footer {
    background: #333;
    color: #ccc;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 12px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fff;
}

footer p {
    font-size: 14px;
    margin: 0;
}

/* 強調テキスト */
strong {
    color: #333;
    font-weight: 600;
}

em {
    font-style: italic;
    color: #666;
}

/* 観察ポイント - よりシンプルに */
.observation-point {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.observation-point h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.observation-point p {
    margin: 0;
    line-height: 1.7;
    color: #333;
}

/* 学術的セクションをシンプル化 */
.scientific-info,
.ecological-features,
.species-detail {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.scientific-info h4,
.ecological-features h4,
.species-detail h3 {
    color: #333;
    margin-bottom: 15px;
}

.scientific-info p,
.ecological-features p,
.species-detail p {
    margin-bottom: 10px;
}

.scientific-info strong,
.ecological-features strong,
.species-detail strong {
    color: #333;
    font-weight: 600;
}

.scientific-info em,
.ecological-features em,
.species-detail em {
    font-style: italic;
    color: #666;
}

/* 統計グリッド - シンプル化 */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.stat-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin: 8px 0;
    display: block;
}

.stat-item p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .category-grid,
    .statistics-grid {
        grid-template-columns: 1fr;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-link {
        justify-content: center;
        width: 100%;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-links a {
        margin: 0;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }
    
    .content-section h2 {
        font-size: 20px;
    }
    
    .content-section h3 {
        font-size: 17px;
    }
    
    .content-section {
        padding: 15px;
    }
    
    .scientific-info,
    .ecological-features,
    .species-detail {
        padding: 15px;
    }
}

/* 印刷用スタイル */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .title-section {
        background: none;
        color: black;
        border: 2px solid black;
    }
    
    .content-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .category-card {
        break-inside: avoid;
        border: 1px solid black;
    }
    
    .nav-link,
    .article-navigation,
    .back-to-top {
        display: none;
    }
    
    .species-detail {
        break-inside: avoid;
    }
}

/* アクセシビリティ改善 */
:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid #fff;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .content-section {
        border: 2px solid #000;
    }
    
    .category-card {
        border: 2px solid #000;
    }
}

/* 動きを減らす設定対応 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}