@charset "UTF-8";

/* Typography & Content Layout */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 60px;
}

.entry-content p {
    margin-bottom: 1.5em;
    text-align: justify;
}

/* Headings */
.entry-content h2 {
    font-size: 24px;
    font-weight: 700;
    padding: 15px 20px;
    margin: 60px 0 30px;
    background-color: var(--color-base);
    border-left: 5px solid var(--color-brand);
    border-radius: 4px;
}

.entry-content h2:first-of-type {
    margin-top: 0;
}

.entry-content h3 {
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 10px;
    margin: 40px 0 20px;
    border-bottom: 2px solid var(--color-brand);
}

.entry-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 30px 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--color-accent);
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin: 0 0 1.5em 2em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

/* Blockquote */
.entry-content blockquote {
    margin: 2em 0;
    padding: 1.5em;
    background-color: #f0f0f0;
    border-left: 5px solid #ccc;
    font-style: italic;
    color: #555;
}

/* Image */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

/* Table Wrapper for Horizontal Scroll */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2em;
    border: 1px solid #eee;
    border-radius: 4px;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensure it triggers scroll if compressed too much on mobile */
}

.entry-content th,
.entry-content td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    line-height: 1.6;
}

.entry-content th {
    background-color: var(--color-base);
    font-weight: bold;
    color: var(--color-main);
    text-align: left;
    white-space: nowrap;
}

/* Table of Contents (TOC) */
.yoriai-toc {
    background-color: var(--color-base);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 0 0 40px;
}

.yoriai-toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-main);
    text-align: center;
}

.yoriai-toc ul {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.yoriai-toc ul li {
    margin-bottom: 0.5em;
    padding-left: 0;
}

.yoriai-toc ul li a {
    text-decoration: none;
    color: var(--color-brand);
    transition: color 0.3s;
    font-weight: 500;
}

.yoriai-toc ul li a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Compact Author Info */
.post-header-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.post-header-author-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #eee;
}

.post-header-author-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.post-header-author-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-header-author-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-main);
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-posts-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    display: inline-block;
}

.related-posts-title-wrapper {
    text-align: center;
}

.related-posts-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-post-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.related-post-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-post-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--color-main);
}

.related-post-date {
    font-size: 12px;
    color: #888;
    margin-top: auto;
}

/* Type for No Thumbnail */
.related-post-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--color-base);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .related-posts-list {
        grid-template-columns: 1fr;
    }

    .entry-content h2 {
        font-size: 20px;
        padding: 12px 15px;
    }

    .entry-content {
        font-size: 15px;
    }
}