/* リセットとベーススタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #aaaeae;
    margin: 0;
    padding: 0;
}

/* ヘッダー */
.site-header {
    background-color: #aaaeae;
    padding: 32px 16px;
    text-align: center;
    border-bottom: 1px solid #8F9393;
}

.site-branding {
    max-width: 800px;
    margin: 0 auto;
}

.site-logo {
    margin-bottom: 16px;
}

.logo-img {
    max-width: 200px;
    height: auto;
}

.site-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* メインコンテンツ */
.site-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 16px;
    background-color: #aaaeae;
    min-height: calc(100vh - 200px);
}

.main-content {
    width: 100%;
}

.entry-content {
    max-width: 100%;
}

.welcome-text {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
    padding: 12px 16px;
}

.description {
    margin-bottom: 32px;
    color: #333;
    padding: 12px 16px;
    /* 長いURL対応 */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 検索・フィルタ機能 */
.search-filter-container {
    margin: 32px 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: #fff;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 検索候補ドロップダウン */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.suggestions-header {
    padding: 8px 12px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #374151;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #f0f9ff;
    color: #1e40af;
}

.suggestion-item.selected {
    background-color: #dbeafe;
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #64748b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: none;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s ease;
}

.clear-search:hover {
    background-color: #475569;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding: 4px;
    border-radius: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background-color: #fff;
    color: #64748b;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.results-info {
    margin: 16px 0 8px 0;
    padding: 8px 12px;
    background-color: #f1f5f9;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.category-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background-color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2px 4px 2px 0;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.category-tag:active {
    transform: translateY(0);
}

.category-tag:last-child {
    margin-right: 0;
}

/* 動的カテゴリ色生成 - HSLを使用した自動色分け */
.project-row[data-category="測定器"] .category-tag {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.project-row[data-category="音響"] .category-tag {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.project-row[data-category="時計"] .category-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.project-row[data-category="無線"] .category-tag {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.project-row[data-category="電子工作"] .category-tag {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* 将来のカテゴリ用の予備色 */
.category-tag[data-color="6"] {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.category-tag[data-color="7"] {
    background: linear-gradient(135deg, #84cc16, #65a30d);
}

.category-tag[data-color="8"] {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.category-tag[data-color="9"] {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.category-tag[data-color="10"] {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* プロジェクトテーブル */
.projects-table {
    margin: 32px 0;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.projects-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
}

.projects-list th {
    background-color: #4a5568;
    padding: 20px 16px;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.projects-list th:first-child {
    width: 30%;
    min-width: 180px;
}

.projects-list th:nth-child(2) {
    width: 20%;
    min-width: 120px;
}

.projects-list th:last-child {
    width: 50%;
    min-width: 200px;
}

.projects-list td {
    padding: 18px 16px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    transition: all 0.2s ease;
    background-color: #fff;
}

.projects-list tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.projects-list tr:hover td {
    background-color: #e3f2fd;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.projects-list tr:last-child td {
    border-bottom: none;
}

.projects-list td:first-child {
    font-weight: 600;
}

/* リンク */
a {
    color: #2563eb;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

a:hover {
    color: #1d4ed8;
    background-color: rgba(37, 99, 235, 0.1);
    text-decoration: none;
}

.projects-list a {
    font-weight: 600;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s ease;
}

.projects-list a:hover {
    background-color: #dbeafe;
    color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.misc-link {
    margin-top: 32px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ページネーション */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
    padding: 16px 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 16px;
}

/* 上部ページネーション用のスタイル */
.pagination-container.pagination-top {
    margin: 16px 0 20px 0;
}

/* 下部ページネーション用のスタイル */
.pagination-container.pagination-bottom {
    margin: 20px 0 16px 0;
}

.pagination-info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #2563eb;
    color: #2563eb;
    background-color: #f8fafc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 4px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-number:hover {
    border-color: #2563eb;
    color: #2563eb;
    background-color: #f8fafc;
}

.pagination-number.active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-size-select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    color: #374151;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.page-size-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
    }
    
    /* 上下ページネーションで異なるマージンを適用 */
    .pagination-container.pagination-top {
        margin: 12px 0 16px 0;
    }
    
    .pagination-container.pagination-bottom {
        margin: 16px 0 12px 0;
    }
    
    .pagination-info {
        order: 1;
    }
    
    .pagination {
        order: 2;
        gap: 6px;
    }
    
    .pagination-btn,
    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .pagination-size {
        order: 3;
        font-size: 0.8rem;
    }
    
    /* モバイルではページサイズ選択を簡略化 */
    .pagination-size label {
        display: none;
    }
    
    .page-size-select {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .pagination-numbers {
        gap: 2px;
    }
    
    .pagination-btn,
    .pagination-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ソーシャルリンクセクション */
.social-links-section {
    margin: 24px 0 32px 0;
    text-align: center;
    padding: 24px;
}

.social-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.social-link:hover::before {
    left: 100%;
}

.social-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 1;
}

/* GitHub リンク */
.social-link.github {
    background: linear-gradient(135deg, #010409, #000000);
    color: white;
}

.social-link.github:hover {
    background: linear-gradient(135deg, #000000, #000000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 4, 9, 0.6);
}

.social-link.github:hover .social-icon {
    transform: rotate(5deg) scale(1.1);
}

/* YouTube リンク */
.social-link.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
}

.social-link.youtube:hover {
    background: linear-gradient(135deg, #ff1a1a, #ff0000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.social-link.youtube:hover .social-icon {
    transform: scale(1.15);
}

/* X（旧Twitter）リンク */
.social-link.twitter {
    background: linear-gradient(135deg, #111827, #000000);
    color: white;
}

.social-link.twitter:hover {
    background: linear-gradient(135deg, #000000, #000000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.social-link.twitter:hover .social-icon {
    transform: rotate(5deg) scale(1.1);
}

/* ニコニコ動画リンク */
.social-link.niconico {
    background: white;
    color: #000;
    border: 2px solid #666;
}

.social-link.niconico:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #333;
}

.social-link.niconico:hover .social-icon {
    transform: rotate(5deg) scale(1.15);
    color: #000;
}

/* アクティブ状態 */
.social-link:active {
    transform: translateY(-1px);
}

/* ソーシャルリンクのレスポンシブ対応 */
@media (max-width: 768px) {
    .social-links {
        gap: 12px;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    .social-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .social-links-section {
        margin: 20px 0 24px 0;
        padding: 20px 16px;
    }

    .social-links {
        gap: 10px;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-icon {
        width: 22px;
        height: 22px;
    }

    .social-title {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
}

/* 免責事項セクション */
.disclaimer-section {
    margin: 48px 0 32px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #64748b;
}

.disclaimer-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #64748b;
    letter-spacing: 0.2px;
}

.disclaimer-content {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #64748b;
}

.disclaimer-content p {
    margin-bottom: 8px;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .disclaimer-section {
        margin: 32px 0 24px 0;
        padding: 16px;
    }

    .disclaimer-title {
        font-size: 0.9rem;
    }

    .disclaimer-content {
        font-size: 0.8rem;
    }
}

/* フッター */
.site-footer {
    background-color: #8F9393;
    color: #fff;
    text-align: center;
    padding: 24px 16px;
    margin-top: auto;
}

.site-info {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }

    .site-header {
        padding: 48px 32px;
    }

    .site-main {
        padding: 48px 32px;
    }

    .projects-list th,
    .projects-list td {
        padding: 20px 16px;
    }

    .projects-list {
        font-size: 16px;
    }

    .site-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 767px) {
    .projects-list {
        font-size: 14px;
    }

    .projects-list th,
    .projects-list td {
        padding: 12px 8px;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .projects-list th:first-child {
        width: 35%;
    }

    .projects-list th:nth-child(2) {
        width: 20%;
    }

    .projects-list th:last-child {
        width: 45%;
    }

    .filter-buttons {
        justify-content: flex-start;
        max-height: 80px;
    }

    .filter-btn {
        font-size: 11px;
        padding: 5px 10px;
    }

    .category-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* スクロールバー（WebKit系ブラウザ） */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* アクセシビリティ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* プリント用スタイル */
@media print {

    .site-header,
    .site-footer {
        background: none !important;
        color: black !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
        text-decoration: underline !important;
    }
}


/* =========================== */
/* 記事ページ用スタイル (自動統合) */
/* =========================== */

/* クイックナビゲーション */
.quick-nav {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quick-nav-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-nav-link:hover {
    background-color: #2563eb;
    color: white;
    text-decoration: none;
}

.quick-nav-link::before {
    content: '←';
    font-weight: bold;
}

/* パンくずリスト */
.breadcrumb {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin: 0 8px;
    color: #64748b;
    font-weight: bold;
}

.breadcrumb-link {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #374151;
    font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin: 0 4px;
    }
    
    .quick-nav {
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quick-nav-link {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* 記事ページ専用スタイル */

/* 記事ヘッダー */
.article-header {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 32px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
    line-height: 1.3;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 12px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.article-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-date {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* 記事コンテンツ */
.article-content {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px 32px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.article-section {
    margin-bottom: 48px;
}

.article-section:last-child {
    margin-bottom: 0;
}

.article-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.article-section h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #2563eb;
}

.article-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    margin: 32px 0 16px 0;
}

.article-section p {
    margin-bottom: 16px;
    color: #374151;
}

.article-section ul,
.article-section ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.article-section li {
    margin-bottom: 8px;
    color: #374151;
}

/* 概要セクション */
.article-overview {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.article-overview h2 {
    color: #0369a1;
    border-bottom: 2px solid #0ea5e9;
}

/* 注意ボックス */
.notice-box {
    background-color: #fef2f2;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #dc2626;
}

.notice-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
    margin: 0 0 12px 0;
}

.notice-box p {
    margin: 0;
    color: #7f1d1d;
    font-weight: 500;
}

/* 仕様リスト */
.spec-list {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 0;
    list-style: none;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-list strong {
    color: #475569;
    min-width: 120px;
}

/* テーブル */
.parts-table,
.measurement-table {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parts-list,
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}

.parts-list th,
.results-table th {
    background-color: #475569;
    color: #fff;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.parts-list td,
.results-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e9ecef;
    color: #374151;
}

.parts-list tr:nth-child(even) td,
.results-table tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.parts-list tr:hover td,
.results-table tr:hover td {
    background-color: #e3f2fd;
}

/* 製作過程 */
.process-step {
    background-color: #fafafa;
    border-left: 4px solid #2563eb;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
}

.process-step h3 {
    margin-top: 0;
    color: #1e40af;
}

/* 画像プレースホルダー */
.image-placeholder {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    color: #64748b;
    font-style: italic;
}

.image-placeholder p {
    margin: 0;
    font-size: 1.1rem;
}

/* 本番画像用のスタイル */
.article-image {
    margin: 24px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto;
}

.image-caption {
    margin: 12px 0 0 0;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
}

/* 記事内画像の自動調整（汎用） */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 16px auto;
    display: block;
}

/* 小さい画像の中央配置を強化 */
.article-content img:not([style*="width"]) {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 横並び画像用のスタイル */
.image-row {
    display: flex;
    gap: 20px;
    margin: 24px 0;
    align-items: flex-start;
}

.image-item {
    flex: 1;
    text-align: center;
}

.image-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto 12px auto;
}

.image-item .image-caption {
    margin: 12px 0 0 0;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
}

/* レスポンシブ対応：モバイル端末では縦並びに */
@media (max-width: 768px) {
    .image-row {
        flex-direction: column;
        gap: 16px;
    }
}

/* 動画埋め込み用のレスポンシブコンテナ */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9のアスペクト比 */
    margin: 24px 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* プレースホルダー内の画像は無効にする（本来は画像を入れるべきではない） */
.image-placeholder img {
    display: none;
}

/* 参考資料リスト */
.reference-list {
    list-style: none;
    margin-left: 0;
}

.reference-list li {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.reference-list a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.reference-list a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 記事フッター */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding: 24px 0;
    border-top: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    background-color: #2563eb;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.back-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

.article-info {
    color: #64748b;
    font-size: 0.9rem;
}

/* サイトタイトルのリンク */
.site-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover {
    color: #2563eb;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }

    .article-content {
        padding: 24px 20px;
    }

    .article-header {
        padding: 24px 20px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .spec-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .parts-table,
    .measurement-table {
        font-size: 0.85rem;
    }

    .parts-list th,
    .parts-list td,
    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }

    .process-step {
        padding: 16px;
    }

    /* 画像のモバイル対応 */
    .article-image {
        margin: 16px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .article-image img {
        border-radius: 6px;
        margin: 0 auto;
    }

    /* 動画のモバイル対応 */
    .video-container {
        margin: 16px 0;
        border-radius: 6px;
    }

    .image-caption {
        font-size: 0.85rem;
        margin-top: 8px;
    }

    .image-placeholder {
        padding: 30px 16px;
        margin: 16px 0;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.6rem;
    }

    .article-section h2 {
        font-size: 1.4rem;
    }

    .article-section h3 {
        font-size: 1.2rem;
    }

    /* 小画面での画像調整 */
    .image-placeholder {
        padding: 24px 12px;
        margin: 12px 0;
    }

    .image-placeholder p {
        font-size: 0.9rem;
    }
}

/* ソースコード表示用クラス */
.code-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
}

.code-block pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    white-space: pre;
    overflow-x: auto;
}

.code-block code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    padding: 0;
    color: inherit;
}

/* インラインコード用 */
.inline-code {
    background-color: #f1f3f4;
    color: #e83e8c;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Consolas', monospace;
    font-size: 0.9em;
}

/* 言語ラベル付きコードブロック */
.code-container {
    margin: 20px 0;
}

.code-header {
    background-color: #e9ecef;
    color: #495057;
    padding: 8px 16px;
    border-radius: 6px 6px 0 0;
    border: 1px solid #e9ecef;
    border-bottom: none;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Consolas', monospace;
    text-transform: uppercase;
}

.code-container .code-block {
    margin: 0;
    border-radius: 0 0 6px 6px;
    border-top: none;
}

/* コピーボタン付きコードブロック */
.code-wrapper {
    position: relative;
    margin: 20px 0;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.copy-button:hover {
    opacity: 1;
}

.copy-button:active {
    background-color: #5a6268;
}

/* ダークテーマのコードブロック */
.code-block.dark {
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-color: #3e3e3e;
}

.code-block.dark .code-header {
    background-color: #2d2d30;
    color: #cccccc;
    border-color: #3e3e3e;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .code-block {
        font-size: 13px;
        padding: 12px;
        margin: 16px 0;
    }
    
    .code-header {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .copy-button {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .code-block {
        font-size: 12px;
        padding: 10px;
        margin: 12px 0;
    }
}

/* =========================== */
/* ブログページ用スタイル */
/* =========================== */

/* ナビゲーション */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
}

.nav-link {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* ブログコンテナ */
.blog-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ブログフィルタ */
.blog-filters {
    margin-bottom: 32px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-filters .filter-buttons {
    justify-content: center;
}

/* 記事グリッド */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* 記事カード */
.article-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 1);
}

.article-card .article-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.article-card .article-date {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.article-card .article-categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.article-card .category-tag {
    font-size: 10px;
    padding: 2px 6px;
}

.article-card .article-title {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.article-card .article-title a {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card .article-title a:hover {
    color: #2563eb;
}

.article-card .article-summary {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ブログ記事のレスポンシブ対応 */
@media (max-width: 768px) {
    .site-nav {
        gap: 12px;
        margin-top: 12px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .blog-filters {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .article-card {
        padding: 20px;
    }
    
    .article-card .article-title {
        font-size: 1.2rem;
    }
    
    .article-card .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .article-card {
        padding: 16px;
    }
    
    .article-card .article-title {
        font-size: 1.1rem;
    }
    
    .article-card .article-summary {
        font-size: 0.9rem;
    }
}

/* ブログ記事ページ用の追加スタイル */
.blog-article .article-content {
    /* 記事ページのコンテンツ幅を少し広げる */
    max-width: 1000px;
    margin: 0 auto;
}

/* ブログ専用のコードブロック */
.blog-article .code-block {
    background-color: #1a1a1a;
    color: #f8f8f2;
    border: 1px solid #333;
}

.blog-article .code-header {
    background-color: #2d2d2d;
    color: #f8f8f2;
    border-color: #333;
}

/* コンテンツ用の注意ボックス（ブログ・記事共通） */
.content-notice,
.blog-notice {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.content-notice h4,
.blog-notice h4 {
    color: #92400e;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.content-notice p,
.blog-notice p {
    color: #78350f;
    margin: 0;
    font-weight: 500;
}

/* コンテンツ用のTips（ブログ・記事共通） */
.content-tip,
.blog-tip {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-left: 4px solid #10b981;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.content-tip h4,
.blog-tip h4 {
    color: #065f46;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.content-tip p,
.blog-tip p {
    color: #047857;
    margin: 0;
    font-weight: 500;
}

/* リンク集セクション（ホームページ用） */
.links-section {
    margin: 32px 0 16px 0;
    padding: 24px;
}

.links-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.links-content {
    text-align: center;
}

.links-content p {
    margin-bottom: 16px;
    color: #555;
}

.links-page-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.links-page-link:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* リンク集ページ用スタイル */
.links-page-content {
    margin: 32px 0;
}

.links-category {
    margin-bottom: 48px;
}

.links-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.link-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-item h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.link-item h3 a {
    color: #007bff;
    text-decoration: none;
}

.link-item h3 a:hover {
    text-decoration: underline;
}

.link-description {
    color: #555;
    margin: 0 0 12px 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

.link-tag {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* バナー集ページ */
.banner-page-content {
    margin-top: 32px;
}

.banner-description {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 32px;
    border-left: 4px solid #1976d2;
}

.banner-description p {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.6;
    /* 長いURL対応 */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.banner-description p:last-child {
    margin-bottom: 0;
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    justify-items: center;
}

.banner-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
}

.banner-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #1976d2;
}

.banner-img {
    width: 200px;
    height: 40px;
    display: block;
    border-radius: 4px;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
}

.banner-item:hover .banner-img {
    opacity: 0.9;
}

.banner-description {
    text-align: center;
    padding: 8px 4px 0;
}

.banner-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.banner-text {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
    /* 長いURL対応 */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .link-item {
        padding: 16px;
    }
    
    .links-category-title {
        font-size: 1.3rem;
    }
    
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .banner-item {
        padding: 8px;
        width: 100%;
        max-width: 216px;
        margin: 0 auto;
        min-height: 110px;
    }
    
    .banner-description {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .banner-title {
        font-size: 0.85rem;
    }
    
    .banner-text {
        font-size: 0.75rem;
        /* 長いURL対応（モバイル） */
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}