/* =================================================================
   Base Styles & Layout
   ================================================================= */

/* Reset and Font Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================================================================
   Theme Variables & Typography
   ================================================================= */

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Colors */
:root {
    --primary-color: #16a34a;
    --primary-hover: #15803d;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
}

/* =================================================================
   Reusable Components
   ================================================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-white {
    background-color: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background-color: #f8fafc;
}

.btn-full {
    width: 100%;
}

/* Header */
.header {
    background-color: white;
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.logo-subtitle {
    color: var(--primary-color);
}

.nav-desktop {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
}

.nav-link-mobile {
    display: block;
    padding: 12px 0;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link-mobile:hover {
    color: var(--primary-color);
}

/* =================================================================
   Page Sections
   ================================================================= */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.text-primary {
    color: var(--primary-color);
    font-size: 36px;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Category Filter */
.category-filter {
    background-color: white;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-block-end: 40px;
}

.top-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sub-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.top-categories>button {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background-color: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.top-categories>button.selected,
.top-categories>button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sub-categories>button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: white;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sub-categories>button.selected,
.sub-categories>button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Articles Section */
.articles {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* Hide section-header when #root .main-contents exists */
body:has(#root .main-contents) .hero,
body:has(#root .main-contents) .about,
body:has(#root .main-contents) .footer-cta,
body:has(#root .main-contents) .section-header {
    display: none;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.articles-grid a {
    display: flex;
}

.article-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 24px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.article-category {
    /* Base styles are in the new structure below */
    background-color: var(--primary-color);
    color: #fff;
}

.badge-E01 {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-E02 {
    background-color: #dcfce7;
    color: #166534;
}

.badge-E03 {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.badge-E04 {
    background-color: #fed7aa;
    color: #ea580c;
}

.badge-E05 {
    background-color: #fecaca;
    color: #dc2626;
}

.badge-emergency {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-analysis {
    background-color: #e0e7ff;
    color: #4338ca;
}

.badge-strategy {
    background-color: #fce7f3;
    color: #be185d;
}

.badge-management {
    background-color: #fef3c7;
    color: #d97706;
}

.article-date {
    font-size: 14px;
    color: var(--text-muted);
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* pagenation */
.pagenation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.pagenation button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagenation button:hover:not(:disabled) {
    background-color: var(--light-bg);
}

.pagenation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.about-subtitle {
    font-size: 24px;
    margin-bottom: 24px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin: 0 auto 16px;
}

.feature-icon svg {
    color: var(--primary-color);
}

.feature-icon {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-description {
    color: var(--text-muted);
}

.cta-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 48px;
    border-radius: 12px;
    text-align: center;
}

.cta-box h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 24px;
}

.contact-details {
    margin: 32px 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    font-size: 20px;
    margin-top: 4px;
}

.contact-icon svg {
    color: var(--primary-color);
}

.contact-icon {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-item p {
    margin: 0;
}

.contact-item small {
    color: var(--text-muted);
    font-size: 14px;
}

.contact-note {
    background-color: #f0fdf4;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.contact-note h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.contact-form {
    background-color: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    font-size: 20px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
}

.footer-cta {
    background-color: var(--primary-color);
    padding: 60px 0;
    text-align: center;
}

.footer-cta .btn-white:hover {
    background-color: #fff;
    color: var(--primary-color);
}

.footer-cta h2 {
    font-size: 36px;
    margin-bottom: 16px;
    color: #fff;
}

.footer-cta p {
    font-size: 20px;
    color: #fff;
    margin-bottom: 32px;
}

.footer-main {
    padding: 60px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-info p {
    color: #94a3b8;
    margin-bottom: 24px;
}

.footer-contact p {
    color: #94a3b8;
    margin-bottom: 8px;
}

.footer-links h4,
.footer-categories h4 {
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-links ul,
.footer-categories ul {
    list-style: none;
}

.footer-links li,
.footer-categories li {
    margin-bottom: 8px;
}

.footer-categories li {
    color: #666;
}

.footer-content a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 24px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    flex: 1;
    padding-right: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.modal-body img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 24px;
}

.modal-content-text {
    line-height: 1.8;
    margin-bottom: 32px;
}

.modal-content-text h2 {
    font-size: 24px;
    margin: 32px 0 16px 0;
}

.modal-content-text h3 {
    font-size: 20px;
    margin: 24px 0 12px 0;
}

.modal-content-text p {
    margin-bottom: 16px;
}

.modal-content-text ul,
.modal-content-text ol {
    margin: 16px 0;
    padding-left: 24px;
}

.modal-content-text li {
    margin-bottom: 8px;
}

.modal-cta {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    padding: 32px;
    border-radius: 8px;
    text-align: center;
}

.modal-cta h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.modal-cta p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-desktop {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 32px;
    }

    .text-primary {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer-bottom-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

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

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

    .filter-content {
        gap: 16px;
    }

    .top-categories,
    .sub-categories {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .text-primary {
        font-size: 20px;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-box {
        padding: 32px 24px;
    }

    .contact-form {
        padding: 24px;
    }

    .modal-content {
        width: 95%;
        margin: 2% auto;
    }

    .modal-header,
    .modal-body {
        padding: 16px;
    }
}

/* Article Page Styles */
.article-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

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

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.breadcrumb-current {
    color: var(--text-muted);
}

.article-header {
    margin-bottom: 2rem;
}

.article-header .article-meta {
    margin-bottom: 1rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-excerpt {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.article-image-container {
    margin-bottom: 3rem;
}

.article-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #333;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-cta {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 3rem 0;
    color: white;
}

.article-cta h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.related-articles {
    margin-top: 4rem;
}

.related-articles h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 1.5rem;
}

.related-content .badge {
    margin-bottom: 0.5rem;
}

.related-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.related-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Logo link styling */
.logo a {
    text-decoration: none;
    color: inherit;
}

.logo a:hover {
    color: var(--primary);
}

/* New DOM Structure Styles (sample.html compatible) */
#root article {
    background: white;
}

#root article>header {
    margin-bottom: 2rem;
    padding: 50px 40px 1rem;
    border-bottom: 1px solid var(--border-color);
}

#root article>header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #333;
}

#root article>header div {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#root article>header div span {
    margin-left: 0.5rem;
}

.main-contents {
    padding: 40px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.main-contents h2 {
    margin-block-start: 5rem !important;
}

.main-contents h3 {
    margin-block-start: 3rem !important;
}

.main-contents ol {
    margin-inline-start: 1rem !important;
}

.main-contents p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.main-contents img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.main-contents ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.main-contents li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.main-contents strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-heading h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

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

.related-posts {
    margin-top: 4rem;
    padding: 3rem 30px 0;
    border-top: 2px solid var(--border-color);
}

.related-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-posts li {
    margin-bottom: 0;
}

.related-posts a {
    text-decoration: none;
    color: inherit;
}

.article-card {
    height: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: var(--primary-color);
    color: #fff;
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #333;
}

.article-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

#root article>footer {
    margin-top: 3rem;
    padding-block: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

#root article>footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

#root article>footer a:hover {
    text-decoration: underline;
}


.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-numbers {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.page-numbers.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers:hover:not(.current):not(.dots) {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-numbers.dots {
    border: none;
    padding: 8px 4px;
}
.category-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}
.category-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #343a40;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}
.category-nav { margin-bottom: 0; display: flex; flex-direction: column; gap: 20px; }

/* 親カテゴリ */
.parent-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 20px;
    border-radius: 12px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #495057;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 100px;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.category-card.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(22, 163, 74, 0.3);
}
.category-card-bg {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: #f1f3f5;
    z-index: 0;
    font-family: sans-serif;
    transition: all 0.3s ease;
    user-select: none;
}
.category-card:hover .category-card-bg {
    color: #e9ecef;
    transform: scale(1.1) rotate(-5deg);
}
.category-card.active .category-card-bg {
    color: rgba(255, 255, 255, 0.15);
}
.category-card-text {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.4;
    width: 100%;
}
.category-card:hover .category-card-text,
.category-card.active .category-card-text {
    color: #fff;
}
.article-tag {
    background-color: #f0f0f0; /* グレー系の背景色 */
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

/* サブカテゴリ用スタイル */
.sub-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px; background-color: #fff; border-radius: 8px; border: 1px dashed #ced4da; }
.sub-label { font-size: 0.9rem; font-weight: bold; color: #666; margin-right: 8px; }
.category-pill-sm { display: inline-block; padding: 6px 14px; border-radius: 50px; text-decoration: none; transition: all 0.3s ease; font-size: 0.9rem; background-color: #f1f3f5; border: 1px solid #e9ecef; color: #333; }
.category-pill-sm:hover { background-color: #e9ecef; text-decoration: none; }
.category-pill-sm.active,
.category-pill-sm:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .category-section { padding: 16px; }
    .category-section-title { font-size: 1.1rem; margin-bottom: 16px; }
    .parent-group { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .category-card { padding: 16px 16px; }
    .category-card-icon { width: 32px; height: 32px; }
    .category-card-text { font-size: 0.85rem; }
    .sub-group { padding: 12px; }
}
@media (max-width: 480px) {
    .parent-group { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #root {
        padding: 1rem 0.5rem;
    }

    #root article>header {
        padding-inline: 20px;
    }

    #root article>header h1 {
        font-size: 1.8rem;
    }

    .main-contents {
        padding: 30px 20px;
        font-size: 1rem;
    }

    .main-contents h2 {
        margin-block-start: 4rem !important;
    }

    .article-heading h2 {
        font-size: 1.5rem;
    }

    .article-heading h3 {
        font-size: 1.3rem;
    }

    .article-card {
        flex-direction: column;
    }

    .article-image {
        width: 100%;
        height: 200px;
    }

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

    .article-excerpt {
        font-size: 1.1rem;
    }

    .article-main-image {
        height: 250px;
    }

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

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

    .article-content h3 {
        font-size: 1.3rem;
    }

    .article-cta {
        padding: 2rem 1rem;
    }

    .article-cta h3 {
        font-size: 1.5rem;
    }

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