/* Blog post page styles */
.post-main {
    background-color: #F7D6F5;
    min-height: 100vh;
    padding: 40px 20px;
}

.post-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 680px 260px;
    gap: 30px;
}

/* Table of Contents Sidebar */
.post-sidebar {
    position: sticky;
    top: 40px;
    align-self: start;
}

.table-of-contents {
    padding: 20px;
    font-size: 16px;
}

.table-of-contents h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.table-of-contents nav a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 8px 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.table-of-contents nav a:last-child {
    border-bottom: none;
}

.table-of-contents nav a:hover {
    color: #000;
    font-weight: 600;
}

.table-of-contents nav a.active {
    color: #000;
    font-weight: 600;
}

/* Main Post Content */
.post-content {
    background: white;
    border: 3px solid black;
    border-radius: 12px;
    padding: 40px;
}

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

.post-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.post-subheader {
    font-size: 1.25rem;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.4;
    font-weight: 400;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-meta span {
    color: #666;
    font-size: 0.9rem;
}

.post-meta #post-tags {
    display: flex;
    gap: 8px;
}

.post-meta .post-tag {
    background: transparent;
    border: 1px solid #666;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
}

.share-button {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.share-button button {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.share-button button:hover {
    /*background: #333;*/
}

.post-image {
    margin: 24px auto 32px auto;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: -0.003em;
    color: #242424;
}

.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 32px 0;
    border-radius: 8px;
}

.post-body h2 {
    font-family: 'Prosa', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 48px 0 16px 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: #000;
}

.post-body h3 {
    font-family: 'Prosa', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #000;
}

.post-body p {
    margin: 0 0 24px 0;
    line-height: 1.7;
    color: #242424;
}

.post-body ul, .post-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

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

.post-body a {
    color: #7367f0;
    text-decoration: underline;
}

.post-body a:hover {
    color: #5a4fd1;
}

.post-body blockquote {
    border-left: 4px solid #7367f0;
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: #555;
    background: rgba(255, 255, 255, 0.5);
    font-size: 1.3em;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
}

.post-body iframe {
    max-width: 100%;
    margin: 24px 0;
    border-radius: 8px;
}

/* Right Sidebar */
.post-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-size: 16px;
}

.author-card {
    background: white;
    border: 3px solid black;
    border-radius: 12px;
    padding: 20px;
    position: static;
}

.author-avatar {
    margin-bottom: 12px;
}

.author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.author-info p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
}

.author-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #0077B5;
    border-radius: 6px;
    text-decoration: none;
}

.sticky-cta-wrapper {
    position: sticky;
    top: 40px;
    align-self: start;
}

.cta-card {
    background: white;
    border: 3px solid black;
    border-radius: 12px;
    padding: 20px;
}

.cta-content {
    text-align: center;
}

.cta-logo {
    margin-bottom: 12px;
}

.cta-logo img {
    width: 120px;
    height: auto;
}

.cta-content p {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
}

.cta-button {
    display: inline-block;
    background: #7367f0;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background: #5a54d6;
}

/* Breadcrumb styles */
nav[aria-label="Breadcrumb"] {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

nav[aria-label="Breadcrumb"] a {
    color: #666;
    text-decoration: none;
}

nav[aria-label="Breadcrumb"] .breadcrumb-separator {
    margin: 0 0.5rem;
    color: #999;
}

nav[aria-label="Breadcrumb"] .breadcrumb-current {
    color: #333;
}

/* Mobile styles */
@media (max-width: 1024px) {
    .post-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .post-sidebar {
        display: none;
    }
    
    .post-right-sidebar {
        flex-direction: row;
        gap: 20px;
    }
    
    .author-card,
    .cta-card {
        flex: 1;
    }
    
    .sticky-cta-wrapper {
        position: static;
    }
}

@media (max-width: 768px) {
    .post-main {
        padding: 20px 16px;
    }

    .post-content {
        padding: 24px;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-right-sidebar {
        flex-direction: column;
    }

    .table-of-contents {
        padding: 16px;
    }

    /* Reduce breadcrumb spacing on mobile */
    nav[aria-label="Breadcrumb"] {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    nav[aria-label="Breadcrumb"] .breadcrumb-separator {
        margin: 0 0.25rem;
    }
}

/* Table Styles - Elevated card look */
.post-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    background-color: white;
    border: none;
    font-size: 0.95rem;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.post-body table thead {
    background-color: white;
}

.post-body table th {
    padding: 16px 20px;
    border: none;
    border-bottom: 3px solid #e0e0e0;
    color: #000;
    font-weight: 700;
    text-align: left;
    font-size: 0.9rem;
}

/* Hide empty headers (when header cells are empty) */
.post-body table thead:has(th:empty) {
    display: none;
}

.post-body table td {
    padding: 16px 20px;
    border: none;
    border-bottom: 3px solid #e0e0e0;
}

/* Remove bottom border from last row */
.post-body table tr:last-child td {
    border-bottom: none;
}

/* First column (labels) - purple background for data tables without headers */
.post-body table td:first-child {
    text-align: left;
    font-weight: 600;
    width: 25%;
    background-color: #5D5DED;
    color: white;
}

/* Second column - left-aligned */
.post-body table td:not(:first-child) {
    text-align: left;
    background-color: white;
}

/* No special row styling */
.post-body table tr:nth-child(even) td:not(:first-child) {
    background-color: white;
}

.post-body table tr:hover td:not(:first-child) {
    background-color: white;
}

/* Table with narrow left column - apply purple to left */
.post-body table.table-left-narrow td:first-child {
    background-color: #5D5DED;
    color: white;
    font-weight: 600;
    width: 30%;
}

.post-body table.table-left-narrow td:not(:first-child) {
    background-color: white;
    width: 70%;
}

.post-body table.table-left-narrow th:first-child {
    width: 30%;
}

.post-body table.table-left-narrow th:not(:first-child) {
    width: 70%;
}

/* Table with narrow right column - apply purple to right */
.post-body table.table-right-narrow td:first-child {
    background-color: white;
    color: #333;
    font-weight: 600;
    width: 70%;
}

.post-body table.table-right-narrow td:last-child {
    background-color: #5D5DED;
    color: white;
    font-weight: 600;
    width: 30%;
}

.post-body table.table-right-narrow th:first-child {
    width: 70%;
}

.post-body table.table-right-narrow th:last-child {
    width: 30%;
}

/* Equal width tables - no purple background, 50-50 split, no bold */
.post-body table:not(.table-left-narrow):not(.table-right-narrow) td:first-child {
    background-color: white;
    color: #333;
    font-weight: normal;
    width: 50%;
}

.post-body table:not(.table-left-narrow):not(.table-right-narrow) td:not(:first-child) {
    width: 50%;
}

.post-body table:not(.table-left-narrow):not(.table-right-narrow) th {
    width: 50%;
    font-weight: 700;
}

/* Mobile table styles */
@media (max-width: 768px) {
    .post-body table {
        font-size: 0.85rem;
    }

    .post-body table th,
    .post-body table td {
        padding: 12px 16px;
    }

    .post-body table td:first-child {
        width: 35%;
    }
}