/* DroneGIS ブログ共通スタイル（docsスタイルベース） */
:root {
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-subtle: rgba(0,0,0,0.08);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.8;
}

/* Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Main Content */
main {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: left;
}

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

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

.breadcrumb span {
    color: var(--text-secondary);
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header .tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.page-header .tool-icon svg {
    width: 48px;
    height: 48px;
    color: #fff;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Blog Index - Article Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-card-category {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.blog-card-category.coord { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.blog-card-category.kml { background: linear-gradient(135deg, #f97316, #eab308); }
.blog-card-category.survey { background: linear-gradient(135deg, #10b981, #14b8a6); }
.blog-card-category.data { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

.blog-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.blog-card-arrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-card-arrow svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-arrow svg {
    transform: translateX(4px);
}

/* Article Page */
.article-header {
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.article-hero {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Table of Contents */
.toc {
    display: inline-block;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
    text-align: left;
}

.toc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.95rem;
}

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

/* Section */
.section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-blue);
}

.section-title svg {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.section p {
    margin-bottom: 1rem;
}

.section p:last-child {
    margin-bottom: 0;
}

.section ul, .section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

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

/* Tips */
.tip {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-green);
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

.tip svg {
    width: 24px;
    height: 24px;
    color: var(--accent-green);
    flex-shrink: 0;
}

.tip-content {
    font-size: 0.95rem;
}

/* Coordinate Table */
.coord-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch;
}

.coord-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    white-space: nowrap;
}

.coord-table thead {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
}

.coord-table th {
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    text-align: center;
}

.coord-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border-subtle);
}

.coord-table td:first-child {
    font-weight: 600;
    text-align: center;
    color: var(--accent-blue);
}

.coord-table td:nth-child(2),
.coord-table td:nth-child(3) {
    text-align: center;
    font-family: 'Consolas', 'Monaco', monospace;
}

.coord-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.coord-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.coord-table tbody tr:nth-child(even):hover {
    background: rgba(59, 130, 246, 0.05);
}

.coord-table .area-cell {
    white-space: normal;
    min-width: 200px;
    font-size: 0.8rem;
    line-height: 1.6;
}

/* Related Tools */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.related-tool {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.related-tool:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-tool-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.related-tool-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.related-tool-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Table (blog articles) */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table-wrapper thead {
    background: #f1f5f9;
}

.table-wrapper th {
    padding: 0.6rem 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #d1d5db;
    border-right: 1px solid #e5e7eb;
    color: #374151;
}

.table-wrapper th:last-child {
    border-right: none;
}

.table-wrapper td {
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

.table-wrapper td:last-child {
    border-right: none;
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.table-wrapper tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.table-wrapper tbody tr:nth-child(even) {
    background: #f9fafb;
}

.table-wrapper tbody tr:nth-child(even):hover {
    background: rgba(59, 130, 246, 0.04);
}

/* Diagram */
.diagram {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.diagram svg {
    max-width: 100%;
    height: auto;
}

.diagram-caption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Article Figure */
.article-figure {
    margin: 1.5rem 0;
    text-align: center;
}

.article-figure img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.article-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Code Block */
.code-block {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

.code-block .tag { color: #7dd3fc; }
.code-block .attr { color: #fbbf24; }
.code-block .val { color: #86efac; }
.code-block .comment { color: #64748b; }

/* Responsive */
@media (max-width: 768px) {
    main {
        padding: 6rem 1rem 3rem;
    }

    .section {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

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

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

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