/* =====================================================================
   MT5メディア「MT5のいろは」 記事詳細画面用スタイル
   コントローラ: catalog/controller/blog/article.php
   主要構造: 記事ヘッダー → 本文 → CTAバナー → 関連EA → 関連記事 → コメント
   ===================================================================== */

.mt5-article-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}
.mt5-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 820px) 240px;
    gap: 40px;
    align-items: start;
}
.mt5-article-main {
    min-width: 0;
}
@media (max-width: 1024px) {
    .mt5-article-layout {
        display: block;
    }
}

/* ---------- パンくず ---------- */
.mt5-blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 18px 0 0;
    padding: 10px 0 2px;
    color: #5b6b7a;
    font-size: 13px;
    line-height: 1.6;
}
.mt5-blog-breadcrumb a {
    color: #008a57;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.mt5-blog-breadcrumb a:hover {
    color: #006f46;
    border-bottom-color: #8fd8b3;
}
.mt5-blog-breadcrumb-sep {
    color: #aebbc7;
    font-size: 15px;
    line-height: 1;
}
.mt5-blog-breadcrumb-current {
    max-width: 52ch;
    overflow: hidden;
    color: #243044;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .mt5-blog-breadcrumb {
        gap: 5px;
        font-size: 12px;
    }
    .mt5-blog-breadcrumb-current {
        max-width: 100%;
        white-space: normal;
    }
}

/* ---------- 記事ヘッダー ---------- */
.mt5-article-header {
    margin: 24px 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8edf2;
}
.mt5-article-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.mt5-article-cat {
    display: inline-block;
    padding: 4px 12px;
    background: #00a661;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.mt5-article-cat:hover { background: #007a47; color: #fff; }

.mt5-article-title {
    font-size: 30px;
    line-height: 1.45;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111827;
    letter-spacing: 0;
}
@media (max-width: 768px) {
    .mt5-article-title { font-size: 22px; }
}

.mt5-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #465264;
}
.mt5-article-meta .mt5-article-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mt5-article-meta .mt5-article-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.mt5-article-meta .mt5-article-date::before { content: "📅 "; }
.mt5-article-meta .mt5-article-comments::before { content: "💬 "; }

/* ---------- アイキャッチ ---------- */
.mt5-article-eyecatch {
    margin: 24px 0 32px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f3f7;
}
.mt5-article-eyecatch img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- 本文 ---------- */
.mt5-article-content {
    font-size: 16px;
    line-height: 1.95;
    color: #111827;
    margin: 32px 0;
}
.mt5-article-content p {
    margin: 0 0 1.5em;
    color: inherit;
}
.mt5-article-content li,
.mt5-article-content td {
    color: inherit;
}
.mt5-article-lead {
    font-size: 17px;
    line-height: 1.9;
    font-weight: 600;
    color: #111827;
    border-left: 3px solid #00a661;
    padding-left: 14px;
}
.mt5-article-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 56px 0 20px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #f0f8f4 0%, #fff 100%);
    border-left: 4px solid #00a661;
    color: #111827;
    scroll-margin-top: 96px;
}
.mt5-article-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d8ebe0;
    color: #111827;
}
.mt5-article-content h4 {
    font-size: 17px;
    font-weight: 700;
    margin: 32px 0 12px;
    color: #00a661;
}
.mt5-article-content a {
    color: #00a661;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.mt5-article-content a:hover { color: #007a47; }
.mt5-article-content code {
    background: #f5f7fa;
    color: #d6336c;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
    font-size: 0.9em;
}
.mt5-article-content pre {
    background: #1a2332;
    color: #e8edf2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
}
.mt5-article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.mt5-article-content blockquote {
    border-left: 4px solid #00a661;
    background: #f9fbfc;
    margin: 24px 0;
    padding: 16px 20px;
    color: #243044;
    border-radius: 0 4px 4px 0;
}
.mt5-article-content ul,
.mt5-article-content ol {
    margin: 1em 0 1.5em;
    padding-left: 1.8em;
}
.mt5-article-content li { margin-bottom: 0.5em; }
.mt5-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.mt5-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}
.mt5-article-content th,
.mt5-article-content td {
    padding: 10px 14px;
    border: 1px solid #e8edf2;
    text-align: left;
}
.mt5-article-content th {
    background: #f0f8f4;
    color: #111827;
    font-weight: 700;
}

/* ---------- 目次 ---------- */
.mt5-article-toc {
    position: sticky;
    top: 96px;
    margin-top: 24px;
}
.mt5-article-toc-inner {
    padding: 20px 18px;
    border: 1px solid #d9e7df;
    border-radius: 8px;
    background: #f8fcfa;
}
.mt5-article-toc-title {
    margin-bottom: 12px;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}
.mt5-article-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mt5-article-toc li {
    margin: 0 0 9px;
    line-height: 1.55;
}
.mt5-article-toc li:last-child {
    margin-bottom: 0;
}
.mt5-article-toc a {
    color: #12324a;
    font-size: 13px;
    text-decoration: none;
}
.mt5-article-toc a:hover {
    color: #00824d;
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 1024px) {
    .mt5-article-toc {
        position: static;
        margin: 0 0 24px;
    }
    .mt5-article-toc-inner {
        padding: 18px 16px;
    }
}

/* ---------- タグ ---------- */
.mt5-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 32px 0 24px;
}
.mt5-article-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f5f7fa;
    color: #465264;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
}
.mt5-article-tag::before { content: "#"; opacity: 0.6; margin-right: 2px; }
.mt5-article-tag:hover { background: #e8edf2; color: #00a661; }

/* ---------- CTAバナー ---------- */
.mt5-article-cta {
    margin: 48px 0;
    padding: 32px;
    background: linear-gradient(135deg, #0a3d2c 0%, #00a661 100%);
    border-radius: 12px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mt5-article-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}
.mt5-article-cta-title {
    /* 共通CSSの h1〜h6{color:#555} を打ち消すため !important で白を指定 */
    color: #fff !important;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    position: relative;
}
.mt5-article-cta-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 20px;
    opacity: 0.95;
    position: relative;
}
.mt5-article-cta-button {
    display: inline-block;
    padding: 14px 36px;
    background: #fff;
    color: #00a661;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mt5-article-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    color: #007a47;
}
@media (max-width: 600px) {
    .mt5-article-cta { padding: 24px 20px; }
    .mt5-article-cta-title { font-size: 18px; }
    .mt5-article-cta-text { font-size: 13px; }
    .mt5-article-cta-button { padding: 12px 28px; font-size: 14px; }
}

/* ---------- 関連セクション (EA・記事共通) ---------- */
.mt5-related-section {
    margin: 48px 0;
}
.mt5-related-heading {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 4px solid #00a661;
    color: #1a2332;
}
.mt5-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .mt5-related-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
    .mt5-related-grid { grid-template-columns: 1fr; }
}
.mt5-related-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
    color: #1a2332;
    display: flex;
    flex-direction: column;
}
.mt5-related-card:hover {
    border-color: #00a661;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 166, 97, 0.1);
}
.mt5-related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.mt5-related-card-body { padding: 12px 16px 16px; }
.mt5-related-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mt5-related-card-price {
    font-size: 14px;
    color: #d6336c;
    font-weight: 700;
}

/* ---------- コメント ---------- */
.mt5-article-comments {
    margin: 48px 0;
    padding: 32px;
    background: #f9fbfc;
    border-radius: 8px;
}
.mt5-comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #e8edf2;
}
.mt5-comment-item:last-child { border-bottom: none; }
.mt5-comment-meta {
    font-size: 12px;
    color: #465264;
    margin-bottom: 6px;
}
.mt5-comment-name { color: #111827; font-weight: 600; }
.mt5-comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: #111827;
}

.mt5-article-feedback {
    margin-top: 32px;
    padding: 20px;
    background: #f0f4f8;
    border-radius: 8px;
    text-align: center;
}
.mt5-article-feedback p {
    margin: 0;
    font-size: 14px;
    color: #243044;
}
.mt5-article-feedback a {
    color: #00824d;
    font-weight: 600;
}
.mt5-comment-form .el-input,
.mt5-comment-form .el-textarea {
    margin-bottom: 12px;
}
