/* dynamic-content.css - 動的コンテンツ用の追加スタイル */

/* サイドバーボタンのスタイル調整 */
.sidebar button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* single-menu-itemをcommon.cssの元のスタイルに合わせる */
.sidebar .single-menu-item {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #eee;
    background: none;
    border-top: none;
    border-right: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar .single-menu-item:hover {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
    color: #dc3545;
}

.sidebar .single-menu-item.active {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
    color: #dc3545;
    font-weight: bold;
}

/* アコーディオンメニューヘッダーのスタイル修正 */
.sidebar .menu-header {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #eee;
}

.sidebar .menu-header:hover {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
    color: #dc3545;
}

.sidebar .menu-header.active {
    background-color: #f8f9fa;
    color: #dc3545;
    border-left-color: #dc3545;
}

/* メニュー矢印のスタイル */
.menu-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
    margin-left: auto;
}

.menu-arrow.rotated {
    transform: rotate(180deg);
}

/* 会員専用メニューヘッダー */
.sidebar .member-menu-header {
    border-left: 4px solid #007bff;
}

.sidebar .member-menu-header:hover {
    border-left-color: #0056b3;
    color: #0056b3;
}

.sidebar .member-menu-header.active {
    border-left-color: #0056b3;
    color: #0056b3;
}

/* サブメニューアイテムのスタイル */
.submenu .submenu-item {
    display: block;
    padding: 12px 20px 12px 40px;
    font-size: 14px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.submenu .submenu-item:hover {
    background-color: #c82333;
    border-left: 12px solid white;
}

.submenu .submenu-item.active {
    background-color: #c82333;
    border-left: 12px solid white;
}

/* 会員専用サブメニュー */
.member-submenu .submenu-item {
    color: white;
}

.member-submenu .submenu-item:hover,
.member-submenu .submenu-item.active {
    background-color: #0056b3;
    border-left: 12px solid white;
}

/* サブメニューコンテナのスタイル確保 */
.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #dc3545;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.submenu.open {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
}

/* 会員専用サブメニューの背景色 */
.member-submenu {
    background-color: #007bff;
}

/* サイドバーメニューのリストスタイル */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu>li {
    border-bottom: 1px solid #eee;
}

.sidebar-menu>li:last-child {
    border-bottom: none;
}

/* 会員専用セクション */
.member-section {
    border-top: 2px solid #007bff;
    margin-top: 20px;
    padding-top: 15px;
}

.member-section-title {
    font-size: 12px;
    color: #007bff;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px;
}

/* ローディング表示 */
.loading-content {
    position: relative;
    min-height: 300px;
    width: 100%;
}

.content-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
    color: #007bff;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-spinner p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* エラーメッセージ */
.error-message {
    text-align: center;
    padding: 40px;
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    margin: 20px 0;
}

.error-message h3 {
    margin-bottom: 15px;
    color: #c53030;
}

.retry-button {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background-color: #b71c1c;
}

/* ページ遷移アニメーション */
.content {
    transition: opacity 0.3s ease-in-out;
}

.content.page-transition {
    opacity: 0;
}

/* 重要：common.cssのスタイルが優先されるように調整 */
.sidebar .menu-header,
.sidebar .single-menu-item {
    box-sizing: border-box;
}

/* レスポンシブ対応も確保 */
@media (max-width: 768px) {

    .sidebar .menu-header,
    .sidebar .single-menu-item {
        padding: 12px 15px;
        font-size: 15px;
    }

    .submenu .submenu-item {
        padding: 10px 15px 10px 30px;
        font-size: 13px;
    }
}

/* ========================================
   動的コンテンツ用CSS
   Dynamic Content Styles
   ======================================== */

/* ========================================
   共通スタイル
   ======================================== */

/* ページタイトル */
.page-title {
    font-size: 2em;
    color: #dc3545;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #dc3545;
    text-align: center;
}

/* セクション共通スタイル */
.section {
    margin-bottom: 40px;
    padding: 25px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.4em;
    color: #dc3545;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dc3545;
    font-weight: bold;
}

.section-content {
    color: #555;
    line-height: 1.8;
    font-size: 1.05em;
}

/* ========================================
   設立趣旨ページ専用スタイル
   ======================================== */

.purpose-content {
    max-width: 900px;
    margin: 0 auto;
}

.purpose-content .section:first-of-type {
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    border: 1px solid #fed7d7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature-title {
    font-size: 1.2em;
    color: #dc3545;
    margin-bottom: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.feature-title:before {
    content: "●";
    color: #dc3545;
    margin-right: 8px;
    font-size: 1.5em;
}

.feature-content {
    color: #666;
    line-height: 1.6;
}

.highlight-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #b3d9ff;
    position: relative;
    overflow: hidden;
}

.highlight-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #357abd);
}

.invitation-section {
    background: linear-gradient(135deg, #f8fff0 0%, #f0fff0 100%);
    border: 1px solid #c3e6c3;
    text-align: center;
}

.invitation-section .section-title {
    color: #28a745;
    border-bottom-color: #28a745;
}

/* ========================================
   役員紹介ページ専用スタイル
   ======================================== */

.officers-content {
    max-width: 900px;
    margin: 0 auto;
}

.officers-content .section {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.officers-content .section-title {
    font-size: 1.5em;
    color: white;
    background-color: #dc3545;
    /* background: linear-gradient(135deg, mediumorchid 0%, #c82333 100%); */
    padding: 15px 20px;
    margin: 0;
    font-weight: bold;
    border-bottom: none;
}

.officers-content .section-content {
    padding: 25px;
}

.officer-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.officer-table th {
    background: #e9ecef;
    color: #495057;
    font-weight: bold;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 1.1em;
    min-width: 120px;
}

.officer-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #333;
    line-height: 1.6;
}

.officer-table tr:hover {
    background-color: #fff;
}

.officer-names {
    font-size: 1.05em;
}

.committee-note {
    margin-top: 20px;
    padding: 10px 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
    font-size: 0.9em;
}

.secretariat-section .section-title {
    background-color: #dc3545;
    /* background: linear-gradient(135deg, mediumorchid 0%, #c82333 100%); */
}

/* ========================================
   会則ページ専用スタイル
   ======================================== */

.constitution-content {
    max-width: 900px;
    margin: 0 auto;
}

.chapter-title {
    font-size: 1.4em;
    color: #dc3545;
    margin: 40px 0 20px 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #dc3545;
    border-radius: 5px;
}

.chapter-title:first-of-type {
    margin-top: 20px;
}

.article {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.article-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.article-content {
    color: #555;
    line-height: 1.8;
}

.supplementary {
    margin-top: 50px;
    padding: 25px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 2px solid #4a90e2;
}

.supplementary-title {
    font-size: 1.3em;
    color: #4a90e2;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

.provision {
    margin-bottom: 10px;
    color: #333;
}

/* ========================================
   目次（TOC）スタイル
   ======================================== */

.toc {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.toc-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 15px;
    text-align: center;
}

.toc-list {
    list-style: none;
    columns: 2;
    column-gap: 30px;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
    break-inside: avoid;
}

.toc-link {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
}

.toc-link:hover {
    color: #dc3545;
    background-color: white;
}

/* ========================================
   ニュースセクション
   ======================================== */

.news-section {
    margin-bottom: 40px;
}

.news-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.news-date {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.news-content {
    color: #555;
    line-height: 1.6;
}

/* ========================================
   研究大会セクション
   ======================================== */

.conference-section {
    margin-bottom: 40px;
}

.conference-grid {
    display: grid;
    gap: 20px;
}

.conference-detail {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.conference-info {
    margin-top: 20px;
}

.info-item {
    margin-bottom: 20px;
}

.info-item h3 {
    font-size: 1.1em;
    color: #dc3545;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.info-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.taikai-button {
    display: inline-block;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.taikai-button:hover {
    background: #c82333;
    color: white;
}

.post-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #6c757d;
}

.author {
    font-weight: 500;
}

.upload-date {
    font-style: italic;
}

/* ========================================
   レスポンシブデザイン
   ======================================== */

@media (max-width: 768px) {
    .page-title {
        font-size: 1.6em;
    }

    .section {
        padding: 20px;
    }

    .officers-content .section-content {
        padding: 15px;
    }

    .officer-table th,
    .officer-table td {
        padding: 10px;
        font-size: 0.9em;
    }

    .officer-table th {
        min-width: 80px;
    }

    .toc-list {
        columns: 1;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .post-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.4em;
    }

    .section {
        padding: 15px;
    }

    .officer-table {
        font-size: 0.85em;
    }

    .officer-table th,
    .officer-table td {
        padding: 8px;
    }

    .conference-detail {
        padding: 20px;
    }

    .news-item {
        padding: 15px;
    }
}

/* ========================================
   印刷スタイル
   ======================================== */

@media print {
    .page-title {
        color: #000;
        border-bottom-color: #000;
    }

    .section-title {
        color: #000;
        border-bottom-color: #000;
    }

    .section {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .toc {
        border: 1px solid #ccc;
    }

    .feature-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .highlight-section:before {
        display: none;
    }

    .officer-table th {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
    }
}

/* ========================================
   アクセシビリティ対応
   ======================================== */

/* フォーカス表示の改善 */
.toc-link:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.taikai-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .section {
        border: 2px solid #000;
    }

    .section-title {
        color: #000;
        border-bottom-color: #000;
    }

    .feature-card {
        border: 2px solid #000;
    }
}

/* アニメーション無効化対応 */
@media (prefers-reduced-motion: reduce) {
    .feature-card {
        transition: none;
    }

    .toc-link {
        transition: none;
    }

    .taikai-button {
        transition: none;
    }
}

/* ========================================
ダークモード対応（オプション）
======================================== */

/* @media (prefers-color-scheme: dark) {
    .section {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .section-content {
        color: #cbd5e0;
    }

    .news-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .news-title {
        color: #f7fafc;
    }

    .feature-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .feature-content {
        color: #cbd5e0;
    }

    .toc {
        background: #2d3748;
        border-color: #4a5568;
    }

    .toc-link {
        color: #e2e8f0;
    }

    .toc-link:hover {
        background-color: #4a5568;
    }

    .officer-table th {
        background: #4a5568;
        color: #f7fafc;
    }

    .officer-table td {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }

    .officer-table tr:hover {
        background-color: #4a5568;
    }
} */