@charset "UTF-8";

/* =========================================
   Blog Detail (Refined Tech Style + Contact Fix)
   ========================================= */

/* Base */
body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #111;
    background-color: #fff;
}

/* 1. Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 80px; left: 0;
    height: 3px;
    background: var(--accent-color);
    width: 0%;
    z-index: 1001;
    transition: width 0.1s;
}

/* 2. Hero Section */
.bd-hero {
    padding-top: 100px;
    padding-bottom: 60px;
    text-align: center;
}

.bd-hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.bd-hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-family: 'Manrope', sans-serif;
}

.bd-cat {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 50px;
}

.bd-date { font-size: 0.9rem; color: #666; }

.bd-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #111;
}

.bd-author-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #444;
}

.bd-author-top img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}

/* Eye Catch */
.bd-eyecatch { margin-bottom: 80px; }
.bd-eyecatch img {
    width: 100%; height: auto; max-height: 500px; object-fit: cover;
    border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* 3. Layout Container */
.bd-layout {
    display: flex; gap: 60px;
    align-items: flex-start;
    padding-bottom: 100px;
}

.bd-article { flex: 1; min-width: 0; }

/* -----------------------------------------
   4. In-Article TOC Box (New!)
----------------------------------------- */
.bd-toc-box {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0 60px;
    border: 1px solid #eee;
}

.toc-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list > li {
    margin-bottom: 10px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
}

.toc-list > li:last-child { border-bottom: none; margin-bottom: 0; }

.toc-list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.toc-list a:hover { color: var(--accent-color); }

.toc-list ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
}

.toc-list ul li a {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

/* Body Content */
.bd-body {
    font-size: 1.05rem;
    line-height: 2;
    color: #333;
}

.bd-body p { margin-bottom: 30px; }
.bd-body .lead { font-weight: 500; font-size: 1.15rem; color: #111; }

.bd-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 60px 0 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    color: #111;
}

.bd-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 40px 0 20px;
    color: #222;
}

.bd-body blockquote {
    background: #f9f9f9;
    border-left: 4px solid var(--accent-color);
    padding: 30px;
    margin: 40px 0;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
}

.bd-body cite {
    display: block; margin-top: 10px;
    font-size: 0.85rem; font-weight: 700;
    color: #111; font-style: normal;
}

.bd-body ul {
    list-style: disc; padding-left: 20px;
    margin-bottom: 40px; background: #fff;
}
.bd-body li { margin-bottom: 10px; }

/* Share & Related */
.bd-footer-share {
    margin-top: 80px; padding: 40px 0;
    border-top: 1px solid #eee; text-align: center;
}
.bd-footer-share p {
    font-family: 'Manrope', sans-serif; font-weight: 700;
    color: #999; margin-bottom: 20px; letter-spacing: 0.1em;
}
.share-links { display: flex; justify-content: center; gap: 20px; }
.share-links a {
    width: 50px; height: 50px; border-radius: 50%;
    background: #f4f5f7; display: flex; align-items: center;
    justify-content: center; font-size: 1.2rem; color: #333;
    transition: all 0.3s;
}
.share-links a:hover {
    background: var(--accent-color); color: #fff;
    transform: translateY(-3px);
}

.bd-related { margin-top: 60px; }
.related-head {
    font-family: 'Manrope', sans-serif; font-size: 1.5rem;
    font-weight: 700; margin-bottom: 30px; border-bottom: 2px solid #111;
    padding-bottom: 10px; display: inline-block;
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.rel-card { text-decoration: none; color: inherit; transition: opacity 0.3s; }
.rel-card:hover { opacity: 0.7; }
.rel-img {
    height: 180px; border-radius: 8px; overflow: hidden; margin-bottom: 15px;
}
.rel-img img { width: 100%; height: 100%; object-fit: cover; }
.rel-card p { font-weight: 700; font-size: 1rem; line-height: 1.5; }

/* -----------------------------------------
   5. Sidebar (Right)
----------------------------------------- */
.bd-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-inner {
    position: sticky;
    top: 120px;
}

.widget { margin-bottom: 50px; }

.widget-title {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Sidebar TOC (Simplified & Clean) */
.toc-nav-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #f0f0f0;
}

.toc-nav-sidebar li { position: relative; }

.toc-link {
    display: block;
    padding: 8px 0 8px 15px;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
    border-left: 2px solid transparent; /* Prepare for active */
    margin-left: -2px; /* Overlap border */
}

.toc-link:hover { color: var(--accent-color); }

.toc-link.active {
    color: var(--accent-color);
    font-weight: 700;
    border-left-color: var(--accent-color);
    background: linear-gradient(to right, #f9f9f9, transparent);
}

.toc-nav-sidebar ul ul {
    border-left: none;
    margin-left: 0;
}

.toc-nav-sidebar ul ul .toc-link {
    font-size: 0.85rem;
    padding-left: 30px;
}

/* Author Widget */
.author-widget {
    text-align: center;
    background: #f9f9f9;
    padding: 30px 20px;
    border-radius: 12px;
}
.w-author-img {
    width: 80px; height: 80px; border-radius: 50%;
    overflow: hidden; margin: 0 auto 15px;
}
.w-author-img img { width: 100%; height: 100%; object-fit: cover; }
.w-author-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 5px; }
.w-author-role { font-size: 0.8rem; color: var(--accent-color); font-weight: 700; margin-bottom: 15px; }
.w-author-desc { font-size: 0.85rem; color: #666; line-height: 1.6; text-align: left; }

/* Tag Widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    font-size: 0.8rem; color: #555; background: #fff;
    border: 1px solid #e0e0e0; padding: 5px 12px;
    border-radius: 4px; text-decoration: none; transition: all 0.3s;
}
.tag-cloud a:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* -----------------------------------------
   6. Contact Area (Added)
----------------------------------------- */
.contact-area {
    background: #fff;
    padding-bottom: 100px;
}

.contact-box {
    background: #f4f8ff;
    padding: 80px 40px;
    text-align: center;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.contact-desc {
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: #666;
}

.contact-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-contact-primary {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.3);
}

.btn-contact-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 86, 179, 0.4);
}

/* -----------------------------------------
   7. Responsive
----------------------------------------- */
@media (max-width: 900px) {
    .bd-layout { flex-direction: column; }
    .bd-sidebar { width: 100%; }
    .sidebar-inner { position: static; }
    .toc-widget { display: none; /* Mobile hides sidebar TOC, uses in-article box */ }
    .related-grid { grid-template-columns: 1fr; }
    
    /* Contact Mobile */
    .contact-btns { flex-direction: column; }
    .contact-box { padding: 40px 20px; }
}

@media (max-width: 600px) {
    .bd-title { font-size: 1.8rem; }
    .bd-hero { padding-top: 80px; }
}