:root {
    --primary-color: #2e7d32;
    --secondary-color: #1b5e20;
    --accent-color: #4caf50;
    --background-color: #f1f8e9;
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-color-light: #f5f5f5;
    --border-color: #c8e6c9;
    --shadow-color: rgba(0, 0, 0, 0.1);

    --font-family-base: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    --font-family-heading: 'Georgia', 'Times New Roman', 'Hiragino Mincho ProN', serif;

    --header-height: 70px;
    --transition-speed: 0.3s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition-speed);
}

.header.scrolled {
    box-shadow: 0 2px 10px var(--shadow-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo a {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    max-width: 900px;
    justify-content: center;
}

.nav-item a {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-item a:hover, .nav-item a.active {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color-light);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(46, 125, 50, 0.7), rgba(27, 94, 32, 0.4));
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color-light);
}

.hero p {
    font-size: 1.2rem;
}

/* Main Content */
.page-wrapper {
    padding: 4rem 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .main-content {
        grid-template-columns: 3fr 1fr;
    }
}

.article-content {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.article-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.article-header h1 {
    font-size: 2.5rem;
}

.article-meta {
    font-size: 0.9rem;
    color: #666;
}

.article-content section {
    margin-bottom: 2.5rem;
}

.article-content h2 {
    font-size: 2rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 1rem;
    margin-top: 2rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 1.5rem;
}

.article-content p, .article-content ul {
    margin-bottom: 1rem;
}

.article-content ul {
    padding-left: 1.5rem;
}

.article-content strong {
    color: var(--secondary-color);
}

/* News Items */
.news-list {
    display: grid;
    gap: 1.5rem;
}

.news-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.news-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.news-item p {
    margin: 0;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.sidebar-widget {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 2rem;
}

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

.toc ul {
    list-style: none;
}

.toc ul li a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.toc ul li a:hover {
    background-color: var(--background-color);
    padding-left: 0.5rem;
}

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

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

.sidebar-widget ul li a {
    font-size: 0.9rem;
    padding: 0.3rem 0;
    display: block;
}

.stat-item {
    margin-bottom: 1rem;
    text-align: center;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 6px;
}

.stat-item strong {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: block;
}

.stat-item small {
    color: #666;
    font-size: 0.8rem;
}

.ad-space {
    height: 250px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-light);
    font-weight: bold;
    border-radius: 8px;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-color-light);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.footer-nav a {
    color: var(--text-color-light);
    opacity: 0.8;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 991px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        box-shadow: 0 4px 10px var(--shadow-color);
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        border-radius: 3px;
        position: relative;
        transition: transform 0.3s;
    }

    .hamburger-inner::before,
    .hamburger-inner::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .hamburger-inner::before {
        top: -8px;
    }

    .hamburger-inner::after {
        bottom: -8px;
    }

    .hamburger.active .hamburger-inner {
        transform: rotate(45deg);
    }

    .hamburger.active .hamburger-inner::before {
        top: 0;
        transform: rotate(90deg);
    }

    .hamburger.active .hamburger-inner::after {
        bottom: 0;
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-content h2 {
        font-size: 1.7rem;
    }

    .container {
        padding: 0 15px;
    }

    .article-content {
        padding: 1.5rem;
    }
}