/* ===================================
   ブログ記事専用スタイルシート
   Markdown要素の装飾
   =================================== */

/* --- 基本設定 --- */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin: 30px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- 見出し --- */
.post-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    color: var(--secondary-color);
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 35px 0 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--secondary-color);
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--secondary-color);
    position: relative;
    padding-left: 20px;
}

.post-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.post-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0 12px;
    color: var(--secondary-color);
}

.post-content h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--secondary-color);
}

.post-content h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 18px 0 8px;
    color: #666;
}

/* --- 段落 --- */
.post-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

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

/* --- リンク --- */
.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.post-content a:hover {
    color: #0085b3;
    border-bottom-color: #0085b3;
    background-color: rgba(0, 164, 212, 0.05);
}

/* --- 強調 --- */
.post-content strong {
    color: var(--secondary-color);
    font-weight: 700;
    background: linear-gradient(transparent 60%, rgba(0, 164, 212, 0.2) 40%);
    padding: 0 2px;
}

.post-content em {
    color: #555;
    font-style: italic;
}

/* --- リスト --- */
.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content ul {
    list-style-type: none;
}

.post-content ul li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
}

.post-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content ol li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.post-content li ul,
.post-content li ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* --- 引用 --- */
.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    position: relative;
    font-style: italic;
    color: #495057;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.post-content blockquote p {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* --- コード --- */
.post-content code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
}

.post-content pre {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.post-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, #4a5568 0%, #2d3748 100%);
    border-radius: 8px 8px 0 0;
}

.post-content pre::after {
    content: '● ● ●';
    position: absolute;
    top: 12px;
    left: 15px;
    color: #718096;
    font-size: 12px;
    letter-spacing: 3px;
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: 0.9rem;
    line-height: 1.6;
    display: block;
    margin-top: 10px;
}

/* --- テーブル --- */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.post-content th,
.post-content td {
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.post-content th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.post-content tr:hover {
    background-color: rgba(0, 164, 212, 0.05);
}

.post-content tr:last-child td {
    border-bottom: none;
}

/* --- 水平線 --- */
.post-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 3rem 0;
    position: relative;
}

.post-content hr::before {
    content: '※';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 0 1rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* --- 画像 --- */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
}

/* --- 定義リスト --- */
.post-content dl {
    margin: 1.5rem 0;
}

.post-content dt {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.post-content dd {
    margin-bottom: 1rem;
    margin-left: 1rem;
    color: #666;
}

/* --- 注釈 --- */
.post-content .footnote {
    font-size: 0.85rem;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    margin-top: 3rem;
}

/* --- 装飾クラス --- */
.post-content .highlight {
    background: linear-gradient(120deg, rgba(255, 235, 59, 0.3) 0%, rgba(255, 235, 59, 0.3) 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.post-content .info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid #2196f3;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.post-content .warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.post-content .success-box {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-left: 5px solid #4caf50;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
        margin: 20px 0;
    }
    
    .post-content h1 {
        font-size: 1.8rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
    
    .post-content blockquote {
        padding: 1rem 1.5rem;
    }
    
    .post-content pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    .post-content table {
        font-size: 0.9rem;
    }
    
    .post-content th,
    .post-content td {
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .post-content ul,
    .post-content ol {
        padding-left: 1.5rem;
    }
    
    .post-content blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .post-content pre {
        padding: 0.8rem;
    }
    
    .post-content th,
    .post-content td {
        padding: 0.6rem 0.8rem;
    }
}
