/* News Article Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f9f9f9;
}
/* 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;
}


/* Header */
.header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu li {
    white-space: nowrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.8;
    text-decoration: underline;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

/* Article Container */
.article-container,
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* News Container Layout (2-column grid) */
.news-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    max-width: 1400px;
}

/* Hero Section */
.article-hero {
    margin-bottom: 2rem;
}

.article-hero img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Article Header */
.article-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.article-category {
    display: inline-block;
    background: #3182ce;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a365d;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.article-excerpt {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-top: 1rem;
}

/* Two Column Layout */
.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-main {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Article Body */
.article-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c5282;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3182ce;
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin: 1.5rem 0 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.8rem;
}

.article-body strong {
    font-weight: 700;
    color: #2c5282;
}

.article-body a {
    color: #3182ce;
    text-decoration: none;
    border-bottom: 1px solid #3182ce;
}

.article-body a:hover {
    opacity: 0.8;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border-left: 4px solid #3182ce;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.highlight-box h3 {
    margin-top: 0;
    color: #2c5282;
}

/* Stats Box */
.stats-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #3182ce;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

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

.sidebar-widget li {
    margin-bottom: 0.8rem;
}

.sidebar-widget a {
    color: #3182ce;
    text-decoration: none;
    transition: opacity 0.3s;
}

.sidebar-widget a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.toc-list {
    list-style: none;
    padding-left: 0;
}

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

.toc-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #3182ce;
}

/* Related Articles */
.related-articles {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.related-articles h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 1.5rem;
}

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

.related-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c5282;
    padding: 1rem;
    margin: 0;
}

.related-card p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Footer */
.footer {
    background: #1a365d;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #90cdf4;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #e2e8f0;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 0.8;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #cbd5e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .article-content-wrapper {
        grid-template-columns: 1fr;
    }

    .article-sidebar,
    .sidebar {
        position: static;
        order: -1;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}
