﻿/* SABOLAY Blog - Monolith-inspired Design System */

:root{--brand:#004741;--brand-light:#007a6a;--brand-glow:#7dd3c0;--bg-primary:#ffffff;--bg-secondary:#f8f9fa;--bg-tertiary:#f1f3f5;--bg-card:#ffffff;--text-primary:#1a1a2e;--text-secondary:#4a5568;--text-tertiary:#718096;--border-light:rgba(0,0,0,0.06);--border-medium:rgba(0,0,0,0.1);--shadow-sm:0 1px 2px rgba(0,0,0,0.04);--shadow-md:0 4px 12px rgba(0,0,0,0.06);--shadow-lg:0 12px 40px rgba(0,0,0,0.08);--radius-sm:6px;--radius-md:12px;--radius-lg:20px;--ease-out:cubic-bezier(0.16,1,0.3,1);--ease-spring:cubic-bezier(0.34,1.56,0.64,1);--duration-fast:150ms;--duration-normal:300ms;--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}

[data-theme="dark"]{--bg-primary:#0d1117;--bg-secondary:#161b22;--bg-tertiary:#21262d;--bg-card:#161b22;--text-primary:#e6edf3;--text-secondary:#8b949e;--text-tertiary:#6e7681;--border-light:rgba(255,255,255,0.04);--border-medium:rgba(255,255,255,0.08);--shadow-sm:0 1px 2px rgba(0,0,0,0.3);--shadow-md:0 4px 12px rgba(0,0,0,0.4);--shadow-lg:0 12px 40px rgba(0,0,0,0.5)}

*{box-sizing:border-box;margin:0;padding:0}

html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased}

body{font-family:var(--font-sans);font-size:16px;line-height:1.6;color:var(--text-primary);background:var(--bg-primary);transition:background var(--duration-normal) var(--ease-out),color var(--duration-normal) var(--ease-out)}

a{color:inherit;text-decoration:none}

img{max-width:100%;height:auto;display:block}

button{font-family:inherit;cursor:pointer;border:none;background:none}

input,textarea,select{font-family:inherit;font-size:inherit}

.container{max-width:1200px;margin:0 auto;padding:0 24px}

.container--narrow{max-width:720px}

.nav{position:sticky;top:0;z-index:100;background:var(--bg-primary);border-bottom:1px solid var(--border-light);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}

.nav-inner{display:flex;align-items:center;justify-content:space-between;height:64px;padding:0 24px;max-width:1400px;margin:0 auto}

.nav-logo{display:flex;align-items:center;gap:12px;font-weight:600;font-size:18px;color:var(--brand)}

.nav-logo img{height:36px;width:auto}

.nav-links{display:flex;align-items:center;gap:4px}

.nav-link{padding:8px 16px;font-size:14px;font-weight:500;color:var(--text-secondary);border-radius:var(--radius-sm);transition:all var(--duration-fast) var(--ease-out)}

.nav-link:hover{color:var(--text-primary);background:var(--bg-tertiary)}

.nav-link.active{color:var(--brand);background:rgba(0,71,65,0.08)}

.nav-actions{display:flex;align-items:center;gap:12px}

.theme-toggle{position:relative;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--text-secondary);transition:all var(--duration-fast) var(--ease-out)}

.theme-toggle:hover{background:var(--bg-tertiary);color:var(--text-primary)}

.theme-toggle svg{width:20px;height:20px}

.theme-toggle .icon-sun{display:none}

.theme-toggle .icon-moon{display:block}

[data-theme="dark"] .theme-toggle .icon-sun{display:block}

[data-theme="dark"] .theme-toggle .icon-moon{display:none}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 24px;font-size:14px;font-weight:600;border-radius:var(--radius-md);transition:all var(--duration-fast) var(--ease-out)}

.btn--primary{background:var(--brand);color:white}

.btn--primary:hover{background:var(--brand-light);transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,71,65,0.25)}

.btn--secondary{background:var(--bg-tertiary);color:var(--text-primary)}

.btn--secondary:hover{background:var(--border-medium)}

.btn--ghost{color:var(--text-secondary)}

.btn--ghost:hover{background:var(--bg-tertiary);color:var(--text-primary)}

.btn--icon{width:40px;height:40px;padding:0;border-radius:var(--radius-md)}

.card{background:var(--bg-card);border-radius:var(--radius-lg);border:1px solid var(--border-light);overflow:hidden;transition:all var(--duration-normal) var(--ease-out)}

.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:var(--brand-glow)}

.card-image{width:100%;height:200px;overflow:hidden;background:var(--bg-tertiary)}

.card-image img{width:100%;height:100%;object-fit:cover;transition:transform var(--duration-normal) var(--ease-out)}

.card:hover .card-image img{transform:scale(1.05)}

.card-body{padding:24px}

.card-meta{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--text-tertiary);margin-bottom:12px}

.card-category{display:inline-block;padding:4px 10px;background:rgba(0,71,65,0.1);color:var(--brand);font-size:12px;font-weight:600;border-radius:20px}

.card-title{font-size:20px;font-weight:600;line-height:1.3;margin-bottom:10px;color:var(--text-primary)}

.card-title a:hover{color:var(--brand)}

.card-excerpt{font-size:14px;color:var(--text-secondary);line-height:1.7;margin-bottom:16px}

.card-footer{display:flex;align-items:center;justify-content:space-between;padding-top:16px;border-top:1px solid var(--border-light)}

.card-author{display:flex;align-items:center;gap:10px}

.card-author-avatar{width:32px;height:32px;border-radius:50%;background:var(--brand);color:white;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600}

.card-author-name{font-size:13px;font-weight:500;color:var(--text-primary)}

.card-date{font-size:12px;color:var(--text-tertiary)}

.card-views{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-tertiary)}

.grid{display:grid;gap:24px}

.grid--2{grid-template-columns:repeat(2,1fr)}

.grid--3{grid-template-columns:repeat(3,1fr)}

@media (max-width:992px){.grid--3{grid-template-columns:repeat(2,1fr)}}

@media (max-width:768px){.grid--2,.grid--3{grid-template-columns:1fr}.nav-links{display:none}.nav-links.active{display:flex;flex-direction:column;position:fixed;top:64px;left:0;right:0;background:var(--bg-primary);padding:20px;border-bottom:1px solid var(--border-light)}.mobile-toggle{display:flex;flex-direction:column;gap:5px;padding:8px;cursor:pointer}

.mobile-toggle span{display:block;width:24px;height:2px;background:var(--text-primary);transition:all 0.3s}}

.mobile-toggle{display:none}

/* Blog Header */

.blog-header{padding:60px 0 40px;text-align:center}

.blog-header h1{font-size:clamp(32px,5vw,48px);font-weight:600;margin-bottom:12px;background:linear-gradient(135deg,var(--brand),var(--brand-light));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}

.blog-header p{font-size:18px;color:var(--text-secondary);max-width:600px;margin:0 auto}

.blog-subtitle{font-size:14px;color:var(--text-tertiary);margin-top:8px}

/* Post Article */

.post-header{padding:50px 0 40px;border-bottom:1px solid var(--border-light);margin-bottom:40px}

.post-category{display:inline-block;padding:6px 14px;background:var(--brand);color:white;font-size:12px;font-weight:600;border-radius:20px;margin-bottom:20px}

.post-title{font-size:clamp(28px,4vw,42px);font-weight:700;line-height:1.2;margin-bottom:20px}

.post-meta{display:flex;align-items:center;gap:20px;font-size:14px;color:var(--text-tertiary);flex-wrap:wrap}

.post-meta-item{display:flex;align-items:center;gap:6px}

.post-cover{width:100%;max-height:500px;object-fit:cover;border-radius:var(--radius-lg);margin-bottom:40px}

.post-content{font-size:17px;line-height:1.8;color:var(--text-secondary)}

.post-content h2{font-size:24px;font-weight:600;color:var(--text-primary);margin:40px 0 16px}

.post-content h3{font-size:20px;font-weight:600;color:var(--text-primary);margin:30px 0 12px}

.post-content p{margin-bottom:20px}

.post-content ul,.post-content ol{margin:20px 0;padding-left:24px}

.post-content li{margin-bottom:8px}

.post-content blockquote{border-left:4px solid var(--brand);padding:16px 20px;background:var(--bg-secondary);margin:24px 0;border-radius:0 var(--radius-md) var(--radius-md) 0}

.post-content code{background:var(--bg-tertiary);padding:2px 6px;border-radius:4px;font-size:14px}

.post-content pre{background:var(--bg-tertiary);padding:20px;border-radius:var(--radius-md);overflow-x:auto;margin:24px 0}

.post-content pre code{background:none;padding:0}

.post-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:40px;padding-top:30px;border-top:1px solid var(--border-light)}

.post-tag{padding:6px 14px;background:var(--bg-tertiary);color:var(--text-secondary);font-size:13px;border-radius:20px;transition:all 0.2s}

.post-tag:hover{background:var(--brand);color:white}

/* Comments */

.comments-section{margin-top:60px;padding-top:40px;border-top:1px solid var(--border-light)}

.comments-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}

.comments-title{font-size:20px;font-weight:600}

.comments-count{font-size:14px;color:var(--text-tertiary)}

.comment-form{background:var(--bg-secondary);padding:24px;border-radius:var(--radius-lg);margin-bottom:30px}

.comment-form-row{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:16px}

@media(max-width:576px){.comment-form-row{grid-template-columns:1fr}}

.comment-input,.comment-textarea{width:100%;padding:12px 16px;background:var(--bg-primary);border:1px solid var(--border-medium);border-radius:var(--radius-md);color:var(--text-primary);transition:border-color 0.2s}

.comment-input:focus,.comment-textarea:focus{outline:none;border-color:var(--brand)}

.comment-textarea{min-height:120px;resize:vertical}

.comment-list{list-style:none}

.comment-item{padding:20px 0;border-bottom:1px solid var(--border-light)}

.comment-item:last-child{border-bottom:none}

.comment-header{display:flex;align-items:center;gap:12px;margin-bottom:10px}

.comment-avatar{width:40px;height:40px;border-radius:50%;background:var(--brand);color:white;display:flex;align-items:center;justify-content:center;font-weight:600}

.comment-author{font-weight:600;font-size:14px}

.comment-date{font-size:12px;color:var(--text-tertiary)}

.comment-content{font-size:14px;color:var(--text-secondary);line-height:1.6}

.comment-actions{display:flex;gap:12px;margin-top:10px}

.comment-action{font-size:12px;color:var(--text-tertiary);cursor:pointer;transition:color 0.2s}

.comment-action:hover{color:var(--brand)}

/* Admin Dashboard */

.admin-layout{display:flex;min-height:100vh}

.admin-sidebar{width:260px;background:var(--bg-secondary);border-right:1px solid var(--border-light);padding:24px 0}

.admin-sidebar-header{padding:0 24px 24px;border-bottom:1px solid var(--border-light);margin-bottom:24px}

.admin-sidebar-logo{font-size:18px;font-weight:600;color:var(--brand)}

.admin-nav{list-style:none}

.admin-nav-item{padding:12px 24px;color:var(--text-secondary);cursor:pointer;transition:all 0.2s;display:flex;align-items:center;gap:12px}

.admin-nav-item:hover{background:var(--bg-tertiary);color:var(--text-primary)}

.admin-nav-item.active{background:rgba(0,71,65,0.1);color:var(--brand)}

.admin-main{flex:1;padding:32px;background:var(--bg-primary)}

.admin-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}

.admin-title{font-size:24px;font-weight:600}

.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:32px}

.admin-stat{background:var(--bg-card);padding:24px;border-radius:var(--radius-lg);border:1px solid var(--border-light)}

.admin-stat-value{font-size:32px;font-weight:700;color:var(--brand)}

.admin-stat-label{font-size:14px;color:var(--text-tertiary);margin-top:4px}

.admin-table{width:100%;background:var(--bg-card);border-radius:var(--radius-lg);border:1px solid var(--border-light);overflow:hidden}

.admin-table th,.admin-table td{padding:16px 20px;text-align:left}

.admin-table th{background:var(--bg-secondary);font-size:13px;font-weight:600;color:var(--text-tertiary);text-transform:uppercase}

.admin-table tr:not(:last-child) td{border-bottom:1px solid var(--border-light)}

.admin-table tr:hover td{background:var(--bg-secondary)}

.status-badge{display:inline-block;padding:4px 10px;font-size:12px;font-weight:600;border-radius:20px}

.status-badge.published{background:rgba(0,71,65,0.1);color:var(--brand)}

.status-badge.draft{background:var(--bg-tertiary);color:var(--text-tertiary)}

.status-badge.approved{background:rgba(0,100,0,0.1);color:#006400}

.status-badge.pending{background:rgba(255,165,0,0.1);color:#ffa500}

.status-badge.spam{background:rgba(220,20,60,0.1);color:#dc143c}

.admin-actions{display:flex;gap:8px}

.admin-action{padding:6px 12px;font-size:13px;border-radius:var(--radius-sm);cursor:pointer;transition:all 0.2s}

.admin-action.edit{background:var(--bg-tertiary);color:var(--text-secondary)}

.admin-action.delete{background:rgba(220,20,60,0.1);color:#dc143c}

.admin-action:hover{transform:translateY(-1px)}

/* Editor */

.editor-container{max-width:800px}

.editor-toolbar{display:flex;gap:8px;padding:12px;background:var(--bg-secondary);border-radius:var(--radius-md) var(--radius-md) 0 0;border:1px solid var(--border-medium);border-bottom:none}

.editor-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);color:var(--text-secondary);transition:all 0.2s}

.editor-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}

.editor-btn.active{background:var(--brand);color:white}

.editor-input{width:100%;padding:12px 16px;background:var(--bg-primary);border:1px solid var(--border-medium);border-radius:var(--radius-md);color:var(--text-primary);font-size:24px;font-weight:600;margin-bottom:16px}

.editor-input:focus{outline:none;border-color:var(--brand)}

.editor-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px}

.editor-select{width:100%;padding:10px 16px;background:var(--bg-primary);border:1px solid var(--border-medium);border-radius:var(--radius-md);color:var(--text-primary)}

.editor-content{width:100%;min-height:400px;padding:20px;background:var(--bg-primary);border:1px solid var(--border-medium);border-radius:0 0 var(--radius-md) var(--radius-md);color:var(--text-primary);font-size:16px;line-height:1.8;resize:vertical}

.editor-content:focus{outline:none;border-color:var(--brand)}

/* Footer - Using shared.css styles */
/* ============================
   FEATURED POST SECTION
   ============================ */
.featured-section {
    background: linear-gradient(135deg, #004741 0%, #007a6a 100%);
    padding: 56px 0;
    position: relative;
    overflow: hidden;
}
.featured-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://sabolay.com/images/banner.jpg') center/cover no-repeat;
    opacity: 0.12;
}
.featured-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.featured-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.28);
    aspect-ratio: 16/10;
    background: rgba(255,255,255,0.08);
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.featured-image:hover img { transform: scale(1.03); }
.featured-content { color: #fff; }
.featured-category {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}
.featured-title { font-size: clamp(20px, 2.5vw, 30px); font-weight: 700; line-height: 1.25; color: #fff; margin-bottom: 14px; }
.featured-excerpt { font-size: 15px; color: rgba(255,255,255,0.82); line-height: 1.7; margin-bottom: 16px; }
.featured-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 20px; }
.featured-meta .dot { opacity: 0.5; }
.featured-link {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: #004741;
    padding: 12px 24px; border-radius: 10px;
    font-size: 14px; font-weight: 700;
    transition: all 0.25s;
}
.featured-link:hover { background: #f0f0f0; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.featured-link .fas { transition: transform 0.2s; }
.featured-link:hover .fas { transform: translateX(4px); }

/* ============================
   BLOG MAIN LAYOUT
   ============================ */
.blog-main { padding: 48px 0 64px; }
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 288px;
    gap: 32px;
    align-items: start;
}
.recent-section {}
.section-title {
    font-size: 18px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 20px; padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--brand); }

/* Recent Grid — 2 cols */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Recent Card */
.recent-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    display: flex; flex-direction: column;
}
.recent-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); border-color: var(--brand-glow); }
.recent-image { display: block; width: 100%; height: 168px; overflow: hidden; background: var(--bg-tertiary); flex-shrink: 0; }
.recent-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.recent-card:hover .recent-image img { transform: scale(1.06); }
.recent-content { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.recent-category {
    display: inline-block; padding: 3px 10px;
    background: rgba(0,71,65,0.1); color: var(--brand);
    font-size: 11px; font-weight: 700; border-radius: 20px;
    margin-bottom: 9px; text-transform: uppercase; letter-spacing: 0.4px; width: fit-content;
}
.recent-title { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text-primary); margin-bottom: 8px; }
.recent-title a { transition: color 0.2s; }
.recent-title a:hover { color: var(--brand); }
.recent-excerpt {
    font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex: 1;
    margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-meta {
    display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-tertiary);
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-light);
}
.recent-meta span { display: flex; align-items: center; gap: 4px; }
.no-more { color: var(--text-tertiary); font-size: 14px; padding: 20px 0; text-align: center; }

/* Loading / Empty states */
.loading-state { text-align: center; padding: 60px 20px; color: var(--text-tertiary); font-size: 15px; }
.loading-state i { font-size: 22px; margin-bottom: 10px; color: var(--brand); display: block; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-tertiary); }
.empty-state i { font-size: 36px; margin-bottom: 10px; color: var(--border-medium); display: block; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination-btn {
    padding: 8px 14px; border-radius: 6px;
    background: var(--bg-tertiary); color: var(--text-secondary);
    font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--border-light); transition: all 0.2s;
}
.pagination-btn:hover, .pagination-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ============================
   SIDEBAR
   ============================ */
.sidebar-section { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 18px; }
.sidebar-card { background: var(--bg-card); border-radius: 14px; border: 1px solid var(--border-light); overflow: hidden; }
.sidebar-title {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 7px;
}
.sidebar-title i { color: var(--brand); font-size: 12px; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-item { border-bottom: 1px solid var(--border-light); }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-link {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 10px 16px; font-size: 13px; color: var(--text-secondary);
    line-height: 1.4; transition: all 0.2s;
}
.sidebar-link i { color: var(--brand-glow); font-size: 11px; margin-top: 4px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--bg-secondary); color: var(--brand); padding-left: 20px; }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-item { border-bottom: 1px solid var(--border-light); }
.category-item:last-child { border-bottom: none; }
.category-item a {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 16px; font-size: 13px; color: var(--text-secondary); transition: all 0.2s;
}
.category-item a i { color: var(--brand-glow); font-size: 11px; }
.category-item a:hover { background: var(--bg-secondary); color: var(--brand); padding-left: 20px; }

/* Responsive */
@media (max-width: 992px) {
    .blog-layout { grid-template-columns: 1fr; }
    .sidebar-section { position: static; }
}
@media (max-width: 768px) {
    .featured-inner { grid-template-columns: 1fr; gap: 24px; }
    .featured-image { aspect-ratio: 16/9; }
    .recent-grid { grid-template-columns: 1fr; }
    .blog-main { padding: 30px 0 48px; }
    .featured-section { padding: 40px 0; }
}
@media (max-width: 576px) {
    .recent-grid { grid-template-columns: 1fr; }
    .featured-title { font-size: 20px; }
}
/* =============================================
   POST ARTICLE PAGE
   ============================================= */

/* Loading */
.post-loading {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-loading-inner {
    text-align: center;
    color: var(--text-tertiary);
}
.post-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero */
.post-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.post-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s;
}
.post-hero:hover .post-hero-bg { transform: scale(1.02); }
.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}
.post-hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 0;
    color: #fff;
    max-width: 780px;
}
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
    transition: color 0.2s;
}
.post-back:hover { color: #fff; }
.post-back .fas { transition: transform 0.2s; }
.post-back:hover .fas { transform: translateX(-3px); }

.post-category-badge {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.post-hero-title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 14px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    flex-wrap: wrap;
}
.post-hero-meta .dot { opacity: 0.5; }

/* Body section */
.post-body-section {
    padding: 48px 0 80px;
}

/* Layout: content + sidebar */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

/* Article */
.post-article { min-width: 0; }

.post-cover-wrap {
    margin-bottom: 36px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.post-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

/* Prose styles */
.post-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-secondary);
}
.post-content p { margin-bottom: 22px; }
.post-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 44px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}
.post-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 14px;
}
.post-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 10px;
}
.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 32px;
    list-style: disc;
}
.post-content ol {
    list-style: decimal;
}
.post-content ul ul, .post-content ol ul {
    list-style: circle;
    margin: 8px 0;
}
.post-content ul ol, .post-content ol ol {
    list-style: decimal;
    margin: 8px 0;
}
.post-content li {
    margin-bottom: 10px;
    padding-left: 6px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.post-content li::marker {
    color: var(--brand);
}
.post-content strong, .post-content b { color: var(--text-primary) !important; font-weight: 700 !important; }
.post-content em { font-style: italic; }
.post-content blockquote {
    border-left: 4px solid var(--brand);
    background: var(--bg-secondary);
    padding: 18px 24px;
    margin: 28px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}
.post-content blockquote p { margin-bottom: 0; }
.post-content code {
    background: var(--bg-tertiary);
    color: var(--brand);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 14px;
    font-family: monospace;
}
.post-content pre {
    background: var(--bg-tertiary);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 28px 0;
}
.post-content pre code {
    background: none;
    color: var(--text-primary);
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}
.post-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}
.post-content a {
    color: var(--brand) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.post-content a:hover {
    text-decoration-thickness: 2px;
}
.post-content a:hover { color: var(--brand-light); }
.post-content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 36px 0;
}

/* Tags */
.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-tertiary);
}
.post-tags i { margin-right: 4px; color: var(--brand); }
.post-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.post-tag:hover { background: var(--brand); color: #fff; }

/* Share */
.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.post-share-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}
.post-share-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-size: 15px;
}
.post-share-btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

/* Author card */
.post-author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}
.post-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.post-author-info { display: flex; flex-direction: column; gap: 2px; }
.post-author-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }
.post-author-name { font-size: 16px; font-weight: 600; color: var(--text-primary); }

/* Comments */
.post-comments-section { margin-top: 52px; }
.post-comments-header { margin-bottom: 24px; }
.post-comments-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-comments-title i { color: var(--brand); }
.post-comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    background: var(--brand);
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}
.post-comment-form {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    border: 1px solid var(--border-light);
}
.post-comment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.post-comment-input, .post-comment-textarea {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.post-comment-input:focus, .post-comment-textarea:focus {
    outline: none;
    border-color: var(--brand);
}
.post-comment-textarea { min-height: 110px; resize: vertical; margin-bottom: 14px; }
.post-comment-submit { margin-top: 4px; }
.post-comment-list { display: flex; flex-direction: column; gap: 0; }
.post-comment-item {
    display: flex;
    gap: 14px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}
.post-comment-item:last-child { border-bottom: none; }
.post-comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.post-comment-body { flex: 1; min-width: 0; }
.post-comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-comment-author { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.post-comment-date { font-size: 12px; color: var(--text-tertiary); }
.post-comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.post-comment-empty {
    text-align: center;
    padding: 32px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}
.post-comment-empty i { font-size: 28px; display: block; margin-bottom: 10px; color: var(--border-medium); }

/* Sidebar */
.post-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 18px; }
.post-sidebar-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.post-sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.post-sidebar-title i { color: var(--brand); font-size: 12px; }
.post-sidebar-list { list-style: none; padding: 0; margin: 0; }
.post-sidebar-item {
    border-bottom: 1px solid var(--border-light);
}

.post-sidebar-item:last-child {
    border-bottom: none;
}
.post-sidebar-item:last-child { border-bottom: none; }
.post-sidebar-link {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    transition: background 0.2s;
    text-decoration: none;
    border-radius: 8px;
    margin: 4px 0;
}

.post-sidebar-link:hover {
    background: var(--bg-tertiary);
}

.post-sidebar-link:hover .post-sidebar-title {
    color: var(--brand);
}
.post-sidebar-link:hover { background: var(--bg-secondary); }
.post-sidebar-thumb {
    width: 68px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}
.post-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-sidebar-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.post-sidebar-cat { font-size: 10px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.4px; }
.post-sidebar-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-sidebar-date { font-size: 11px; color: var(--text-tertiary); }
.post-sidebar-date i { margin-right: 3px; }
.post-sidebar-empty { padding: 14px 16px; font-size: 13px; color: var(--text-tertiary); font-style: italic; }

/* TOC */
.post-toc { padding: 8px 0; }
.toc-item {
    display: block;
    padding: 7px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border-left: 2px solid transparent;
}
.toc-item:hover {
    background: var(--bg-secondary);
    color: var(--brand);
    border-left-color: var(--brand);
    padding-left: 20px;
}
.toc-sub { padding-left: 28px; font-size: 12px; }

/* Category sidebar */
.post-category-list { list-style: none; padding: 0; margin: 0; }
.post-category-item { border-bottom: 1px solid var(--border-light); }
.post-category-item:last-child { border-bottom: none; }
.post-category-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.post-category-item a i { color: var(--brand-glow); font-size: 11px; }
.post-category-item a:hover { background: var(--bg-secondary); color: var(--brand); padding-left: 20px; }

/* Error */
.post-error {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}
.post-error-icon { font-size: 52px; color: var(--border-medium); margin-bottom: 16px; }
.post-error h2 { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.post-error p { font-size: 16px; margin-bottom: 28px; }

/* Responsive */
@media (max-width: 992px) {
    .post-layout { grid-template-columns: 1fr; }
    .post-sidebar { position: static; }
}
@media (max-width: 768px) {
    .post-hero { min-height: 260px; }
    .post-hero-title { font-size: 24px; }
    .post-body-section { padding: 32px 0 60px; }
    .post-comment-fields { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .post-hero-content { padding: 24px 0; }
    .post-content { font-size: 15px; }
    .post-content h2 { font-size: 22px; }
    .post-content h3 { font-size: 18px; }
}
