/* 
==============================================
   Single Post Page Styles (Redesign)
==============================================
*/

.post-layout .container {
    max-width: 800px; /* Narrower container for better readability */
}

.post-content {
    background-color: var(--color-white);
    padding: 2rem 0;
}

.post-content h1 {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.post-meta {
    font-size: var(--font-size-sm);
    color: var(--color-gray);
    margin-bottom: 2rem;
}

.post-featured-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.post-body {
    font-size: 1.125rem;
    line-height: 1.7;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body a {
    text-decoration: underline;
}
.post-body a:hover {
    color: var(--color-primary-dark);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

/* Table Styles for Blog Post Content */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.post-body table th,
.post-body table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.post-body table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-body table td {
    color: #212529;
    line-height: 1.5;
}

.post-body table tr:last-child td {
    border-bottom: none;
}

.post-body table tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.post-body table tr:hover td {
    background-color: #f8f9fa;
}

/* Table with borders */
.post-body table.table-bordered {
    border: 1px solid #dee2e6;
}

.post-body table.table-bordered th,
.post-body table.table-bordered td {
    border: 1px solid #dee2e6;
}

/* Striped table */
.post-body table.table-striped tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.post-body table.table-striped tbody tr:nth-child(odd):hover {
    background-color: #e9ecef;
}

/* Compact table */
.post-body table.table-sm th,
.post-body table.table-sm td {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Responsive table */
.post-body .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-body .table-responsive table {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Table with specific widths */
.post-body table.table-fixed {
    table-layout: fixed;
}

.post-body table.table-auto {
    table-layout: auto;
}

/* Table header styles */
.post-body table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
}

/* Table footer styles */
.post-body table tfoot th,
.post-body table tfoot td {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: 2px solid #dee2e6;
}

/* Table caption */
.post-body table caption {
    caption-side: bottom;
    padding: 8px 16px;
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* Table with alternating row colors */
.post-body table.table-alternate tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Table with hover effects */
.post-body table.table-hover tbody tr:hover {
    background-color: #e3f2fd;
    cursor: pointer;
}

/* Table with condensed spacing */
.post-body table.table-condensed th,
.post-body table.table-condensed td {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* Table with centered content */
.post-body table.table-centered th,
.post-body table.table-centered td {
    text-align: center;
}

/* Table with right-aligned content */
.post-body table.table-right th,
.post-body table.table-right td {
    text-align: right;
}

/* Table with specific column widths */
.post-body table .col-1 { width: 8.333333%; }
.post-body table .col-2 { width: 16.666667%; }
.post-body table .col-3 { width: 25%; }
.post-body table .col-4 { width: 33.333333%; }
.post-body table .col-5 { width: 41.666667%; }
.post-body table .col-6 { width: 50%; }
.post-body table .col-7 { width: 58.333333%; }
.post-body table .col-8 { width: 66.666667%; }
.post-body table .col-9 { width: 75%; }
.post-body table .col-10 { width: 83.333333%; }
.post-body table .col-11 { width: 91.666667%; }
.post-body table .col-12 { width: 100%; }

/* Mobile responsive table adjustments */
@media (max-width: 768px) {
    .post-body table {
        font-size: 0.85rem;
    }
    
    .post-body table th,
    .post-body table td {
        padding: 8px 10px;
    }
    
    .post-body .table-responsive {
        margin: 1rem 0;
    }
    
    .post-body table.table-sm th,
    .post-body table.table-sm td {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .post-body table {
        font-size: 0.8rem;
    }
    
    .post-body table th,
    .post-body table td {
        padding: 6px 8px;
    }
    
    .post-body table.table-condensed th,
    .post-body table.table-condensed td {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
}
