/* ================================
   POST & PAGE CONTENT
   ================================ */

/* Post Page Layout */
/* .post-page handled by site-section */

.post-article {
    width: 100%;
}

/* Post Header */
.post-header {
    max-width: 800px;
    margin: 0 auto var(--space-xl);
    text-align: left;
}

/* Post Tags Container */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.post-tag-badge {
    display: inline-block;
    padding: 8px 18px;
    background-color: #333333;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tag-badge:hover,
.post-tag-badge:focus,
.post-tag-badge:active {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.post-title {
    font-family: var(--gh-font-heading, inherit);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.post-feature-image {
    margin: 32px 0 0;
}

.post-feature-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.post-feature-image figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Post Body - Two Column Layout */
.post-body {
    max-width: 800px;
    margin: 0 auto;
}

/* ================================
   TABLE OF CONTENTS SIDEBAR
   ================================ */
.toc-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    order: 2;
}

.toc-container {
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.toc-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 16px 0;
}

.toc-nav {
    font-size: 0.9rem;
}

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

.toc-item {
    margin: 0;
}

.toc-link {
    display: block;
    padding: 8px 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -12px;
}

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

.toc-link.is-active {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
}

/* H3 items indented */
.toc-h3 .toc-link {
    padding-left: 24px;
    font-size: 0.85rem;
}

/* ================================
   POST CONTENT AREA
   ================================ */
article header {
    margin-bottom: var(--space-2xl);
    text-align: center;
}

.post-meta-single {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.post-meta-single time,
.post-meta-single .reading-time {
    display: inline;
    background: none;
    padding: 0;
}

.post-meta-single .meta-dot {
    opacity: 0.5;
}

/* Italic standfirst / summary line under the meta */
.post-standfirst {
    max-width: 800px;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.post-meta-single svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: var(--gh-font-heading, inherit);
    color: var(--text-primary);
    font-weight: 800;
    margin: 48px 0 24px;
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 20px;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.post-content h2 {
    font-size: 2rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 28px;
}

.post-content a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    padding-bottom: 2px;
}

.post-content a:hover {
    color: var(--color-primary-hover);
    border-bottom-color: var(--color-primary-hover);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.post-content img:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-xl);
}

.post-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 24px 32px;
    margin: 32px 0;
    background: var(--bg-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    position: relative;
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 80px;
    color: var(--color-primary);
    opacity: 0.2;
    font-family: serif;
}

.post-content code {
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--color-primary);
    font-family: "Courier New", Courier, monospace;
}

.post-content pre {
    background: var(--color-black);
    color: var(--color-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 32px 0;
    position: relative;
}

.post-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.95em;
}

/* Tables - wrap in container for mobile overflow */
.post-content .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 32px 0;
}

.post-content table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-content th {
    background: var(--color-primary);
    color: var(--bg-body);
    padding: 16px;
    text-align: left;
    font-weight: 700;
}

.post-content td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.post-content tr:nth-child(even) {
    background: var(--bg-light);
}

.post-content tr:hover {
    background: var(--bg-light);
}

/* Lists */
.post-content ul,
.post-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content li::marker {
    color: var(--color-primary);
}

/* Author Bio */
.author-bio {
    margin-top: 60px;
    padding: 40px;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 32px;
}

.author-bio img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--color-primary);
}

.author-bio-content h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.author-bio-content p {
    margin: 0;
    color: var(--text-secondary);
}

/* Post Tags */
.post-tags-single {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-light);
}

.post-tags-single h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

/* ================================
   RESPONSIVE TABLET FOR POST
   ================================ */
@media (max-width: 1023px) {
    .post-body {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .toc-sidebar {
        display: none;
    }

    .post-page {
        padding: 32px 24px 60px;
    }
}

/* ================================
   RESPONSIVE MOBILE FOR POST
   ================================ */
@media (max-width: 767px) {
    .post-page {
        padding: 24px 16px 48px;
    }

    .post-header {
        margin-bottom: 32px;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .post-content h2 {
        font-size: 1.75rem;
    }

    .post-content h3 {
        font-size: 1.35rem;
    }

    .post-meta-single {
        flex-direction: column;
        gap: 12px;
    }

    .author-bio,
    .author-card-single {
        flex-direction: column;
        text-align: center;
        padding: 32px;
    }

    .post-footer {
        margin-top: 48px;
    }
}

/* ================================
   POST SHARE SECTION
   ================================ */
.post-share {
    max-width: 800px;
    margin: 48px auto;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    text-align: center;
}

.share-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: #333333;
    color: #ffffff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-twitter {
    background-color: #000000;
}

.share-twitter:hover {
    background-color: #333333;
}

.share-facebook {
    background-color: #1877f2;
}

.share-facebook:hover {
    background-color: #166fe5;
}

.share-whatsapp {
    background-color: #25d366;
}

.share-whatsapp:hover {
    background-color: #22c55e;
}

.share-linkedin {
    background-color: #0a66c2;
}

.share-linkedin:hover {
    background-color: #004182;
}

.share-copy {
    background-color: #6b7280;
}

.share-copy:hover {
    background-color: #4b5563;
}

.share-copy.copied {
    background-color: #10b981;
}

/* ================================
   POST FOOTER / AUTHOR CARD
   ================================ */
.post-footer {
    max-width: 800px;
    margin: 60px auto 0;
    padding-top: 40px;
    border-top: 2px solid var(--border-light);
}

.author-card-single {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
}

.author-avatar-single {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--color-primary);
    flex-shrink: 0;
}

.author-avatar-single.author-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.author-info-single h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.author-info-single h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-info-single h3 a:hover {
    color: var(--color-primary);
}

.author-info-single p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
/* ================================
   TAGS (footer) + RECENT POSTS
   ================================ */
.post-tags-footer {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light, #e0ddd7);
}

.post-tags-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-tags-footer .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.recent-posts-section {
    max-width: 1000px;
    margin: 80px auto 0;
    padding-top: 48px;
    border-top: 1px solid var(--border-light, #e0ddd7);
}

.recent-posts-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.recent-posts-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin: 0;
}

.recent-posts-seeall {
    color: var(--color-primary, #4a7c59);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.recent-posts-seeall:hover {
    text-decoration: underline;
}

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

.recent-post-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-post-img {
    width: 100%;
    height: 170px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
}

.recent-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.recent-post-card:hover .recent-post-img img {
    transform: scale(1.05);
}

.recent-post-img-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
}

.recent-post-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--text-primary);
}

.recent-post-card:hover .recent-post-title {
    color: var(--color-primary, #4a7c59);
}

.recent-post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .recent-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .recent-posts-grid {
        grid-template-columns: 1fr;
    }
}
