/* Post Page Styles */

.post-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0 3rem;
}

.post-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-category {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-header .post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.post-header .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-header .post-tags span {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0.375rem 0.875rem;
    border-radius: 15px;
    font-size: 0.875rem;
}

.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.post-main-content {
    max-width: 800px;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.content-section p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.content-section ul,
.content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.content-section code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
}

.content-section pre {
    background-color: #1e293b;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-section pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Info Boxes */
.info-box,
.warning-box,
.success-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box {
    background-color: #dbeafe;
    border-left: 4px solid #2563eb;
}

.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.success-box {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
}

.info-box i,
.warning-box i,
.success-box i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.info-box i {
    color: #2563eb;
}

.warning-box i {
    color: #f59e0b;
}

.success-box i {
    color: #10b981;
}

.info-box strong,
.warning-box strong,
.success-box strong {
    display: block;
    margin-bottom: 0.5rem;
}

.info-box p,
.warning-box p,
.success-box p {
    margin: 0;
    line-height: 1.6;
}

/* Parts List */
.parts-list {
    list-style: none;
    margin-left: 0;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.parts-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.parts-list li:last-child {
    border-bottom: none;
}

.parts-list i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* Wiring Table */
.wiring-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.wiring-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.wiring-table th,
.wiring-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.wiring-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.wiring-table tr:last-child td {
    border-bottom: none;
}

.wiring-table tr:hover {
    background-color: var(--bg-secondary);
}

/* Share Section */
.share-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    text-align: center;
}

.share-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s, background-color 0.3s;
}

.share-buttons button:hover {
    transform: translateY(-2px);
    background-color: var(--accent-color);
}

.share-buttons i {
    margin-right: 0.5rem;
}

/* Sidebar */
.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.toc {
    list-style: none;
    margin-left: 0;
}

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
}

.toc a:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.related-posts a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, background-color 0.3s;
}

.related-posts a:hover {
    transform: translateX(5px);
    background-color: var(--primary-color);
    color: white;
}

.related-posts i {
    color: var(--primary-color);
}

.related-posts a:hover i {
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .post-content-wrapper {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: static;
        margin-top: 3rem;
    }

    .sidebar-widget {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .post-header {
        padding: 2rem 0;
    }

    .post-header h1 {
        font-size: 1.75rem;
    }

    .post-header .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.25rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-buttons button {
        width: 100%;
    }
}
