/* ニュース記事専用スタイルシート */

/* カラーパレット（CSS変数） */
:root {
    --primary-green: #2E7D32;
    --secondary-green: #4CAF50;
    --accent-green: #66BB6A;
    --light-green: #E8F5E8;
    --dark-green: #1B5E20;
    --tech-blue: #1565C0;
    --light-blue: #E3F2FD;
    --dark-gray: #212121;
    --medium-gray: #757575;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --gradient-bg: linear-gradient(135deg, #2E7D32, #4CAF50);
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.2);
}

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

/* 基本設定 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--dark-gray);
    background: var(--white);
    overflow-x: hidden;
}
/* Responsive media handling */
.article-image,
.news-article-image,
.news-card img,
.news-card-image img,
.article-hero-image img,
.featured-image img,
.article-hero img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* 見出しフォント設定 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-green);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* リンクスタイル */
a {
    color: var(--tech-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

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

/* ヘッダー */
.header {
    background: var(--gradient-bg);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
}

.logo:hover {
    color: var(--light-green);
    text-decoration: none;
}

/* ナビゲーション */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu li a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* 記事コンテナ */
.article-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* 2カラムレイアウト */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

/* メインコンテンツエリア */
.article-main {
    background: var(--white);
}

/* 記事ヘッダー */
.article-header {
    background: var(--light-green);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.article-date, .article-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.article-category {
    background: var(--primary-green);
    color: var(--white);
}

.article-title {
    font-size: 2.5rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-excerpt {
    font-size: 1.1rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

/* メイン画像 */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
}

/* 記事本文 */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-green);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--medium-gray);
    font-style: italic;
}

/* サイドバー */
.article-sidebar {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-green);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.sidebar-list li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-size: 0.8rem;
}

.sidebar-list a {
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.sidebar-list a:hover {
    color: var(--primary-green);
}

/* 関連記事 */
.related-articles {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--light-green);
    border-radius: 8px;
}

.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-green);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.related-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.related-card p {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* フッター */
.footer {
    background: var(--dark-green);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: var(--light-green);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
}

.footer-links a:hover {
    color: var(--light-green);
}

.related-sites {
    margin-bottom: 2rem;
}

.related-sites h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.related-sites ul {
    list-style: none;
}

.related-sites li {
    margin-bottom: 0.5rem;
}

.related-sites a {
    color: var(--light-green);
}

/* レスポンシブ対応 */
@media (max-width: 968px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }

    .nav-menu {
        font-size: 0.9rem;
        gap: 1rem;
    }

    .nav-menu li a {
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }

    .article-header {
        padding: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-menu li {
        text-align: center;
    }
}
