/* ============================================================
   BLOG — Dark Luxury Interior Theme
   ============================================================ */

/* --- Blog Layout --- */
.blog-container {
    max-width: var(--max-width, 1280px);
    margin: 0 auto;
    padding: 0 24px;
    padding-top: calc(var(--header-h, 80px) + 24px);
}
.blog-container.has-transparent-header { padding-top: 0; }

.blog-post-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: flex-start;
}
.blog-container:not(.has-sidebar) .blog-post-layout { grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }

/* --- Blog List Page --- */
.blog-hero {
    text-align: center;
    padding: 60px 0 40px;
}
.blog-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}
.blog-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.post-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.post-card .post-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.post-card .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.post-card:hover .post-image img {
    transform: scale(1.05);
}
.post-card .no-image {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}
.post-card .post-content {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-card .post-category {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(201,169,110,0.12);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    width: fit-content;
}
.post-card .post-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card .post-excerpt {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card .post-meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: auto;
}
.post-card .post-meta i {
    color: var(--gold);
    margin-right: 4px;
}

/* Featured post (first card bigger) */
.blog-grid .post-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
}
.blog-grid .post-card:first-child .post-image {
    aspect-ratio: auto;
    min-height: 300px;
}
.blog-grid .post-card:first-child .post-title {
    font-size: 1.5rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.blog-grid .post-card:first-child .post-content {
    padding: 32px;
    justify-content: center;
}

/* --- Single Post --- */
.single-post {
    min-width: 0;
}

.post-header {
    margin-bottom: 32px;
}
.post-category-badge {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(201,169,110,0.12);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    margin-bottom: 16px;
    transition: all 0.3s;
}
.post-category-badge:hover {
    background: var(--gold);
    color: var(--text-dark, #1a1a1a);
}

.post-main-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text);
}

.post-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.post-info i {
    color: var(--gold);
    margin-right: 6px;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Body / Content */
.post-body {
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(245,240,232,0.85);
}
.post-body h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.post-body h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 32px 0 12px;
    color: var(--text);
}
.post-body h4 {
    font-size: 1.1rem;
    margin: 24px 0 10px;
    color: var(--text);
}
.post-body p {
    margin-bottom: 18px;
}
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 32px auto;
    display: block;
}
.post-body a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-body a:hover {
    color: var(--gold-light);
}
.post-body blockquote {
    border-left: 3px solid var(--gold);
    margin: 24px 0;
    padding: 16px 24px;
    background: rgba(201,169,110,0.06);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
}
.post-body ul, .post-body ol {
    margin: 16px 0;
    padding-left: 24px;
}
.post-body li {
    margin-bottom: 8px;
}
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.post-body table th, .post-body table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}
.post-body table th {
    background: rgba(201,169,110,0.08);
    color: var(--gold);
    font-weight: 600;
}
.post-body pre, .post-body code {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.88rem;
}
.post-body pre {
    padding: 16px 20px;
    overflow-x: auto;
    margin: 20px 0;
}
.post-body code {
    padding: 2px 8px;
}

/* Inline Related */
.inline-related-single {
    background: rgba(201,169,110,0.06) !important;
    border-left: 3px solid var(--gold) !important;
    padding: 14px 20px !important;
    margin: 24px 0 !important;
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    line-height: 1.6 !important;
}
.inline-related-single .label {
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}
.inline-related-single a {
    color: var(--gold) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}
.inline-related-single a:hover {
    color: var(--gold-light) !important;
    text-decoration: underline !important;
}

/* Tags & Share */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 32px 0 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.post-tags strong {
    color: var(--text-muted);
    font-size: 0.88rem;
}
.post-tags .tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(201,169,110,0.1);
    color: var(--gold);
    font-size: 0.78rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}
.post-tags .tag:hover {
    background: var(--gold);
    color: var(--text-dark, #1a1a1a);
}

.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 32px;
}
.post-share strong {
    color: var(--text-muted);
    font-size: 0.88rem;
}
.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
}
.share-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201,169,110,0.1);
}
.share-btn.facebook:hover { color: #1877f2; border-color: #1877f2; }
.share-btn.twitter:hover { color: #1da1f2; border-color: #1da1f2; }
.share-btn.telegram:hover { color: #0088cc; border-color: #0088cc; }

/* Author Box — Dark Theme */
.author-box {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 28px !important;
    margin: 32px 0 !important;
}
.author-box h4 { color: var(--text) !important; }
.author-box p { color: var(--text-muted) !important; }
.author-box a { color: var(--gold) !important; }
.author-box svg { fill: var(--gold) !important; }

/* --- Sidebar --- */
.blog-sidebar {
    position: sticky;
    top: calc(var(--header-h, 80px) + 24px);
}
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title i { font-size: 0.85rem; }

.sidebar-cat-item {
    display: flex !important;
    justify-content: space-between;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--border) !important;
    text-decoration: none !important;
    color: var(--text-muted) !important;
    font-size: 0.88rem !important;
    transition: color 0.3s;
}
.sidebar-cat-item:last-child { border-bottom: none !important; }
.sidebar-cat-item:hover { color: var(--gold) !important; }
.sidebar-cat-item span:last-child {
    background: rgba(201,169,110,0.1) !important;
    color: var(--gold) !important;
    padding: 1px 10px !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
}

/* Latest posts in sidebar */
.latest-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}
.latest-post-item:last-child { border-bottom: none; }
.latest-post-item:hover { color: var(--gold); }
.latest-post-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    border-radius: var(--radius);
    overflow: hidden;
}
.latest-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.latest-post-thumb .no-thumb {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.latest-post-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-post-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
}
.latest-post-info p i { color: var(--gold); margin-right: 4px; }

/* --- Related Posts --- */
.related-posts {
    margin: 48px 0;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.related-posts .section-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 28px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.related-posts .section-heading i { color: var(--gold); font-size: 0.9rem; }
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* --- TOC — Dark Luxury --- */
.toc-inline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 24px 0;
    overflow: hidden;
}
.toc-inline .toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    background: rgba(201,169,110,0.06);
}
.toc-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
}
.toc-toggle-icon { color: var(--gold); transition: transform 0.3s; }
.toc-inline.toc-collapsed .toc-toggle-icon { transform: rotate(-90deg); }
.toc-inline.toc-collapsed .toc-content { display: none; }
.toc-content { padding: 0 20px 16px; }
.toc-list { display: flex; flex-direction: column; }
.toc-item {
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    border-left: 2px solid var(--border);
    transition: all 0.3s;
}
.toc-item:hover, .toc-item.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(201,169,110,0.05);
}

/* TOC Sidebar (desktop sticky) */
.toc-sidebar {
    position: fixed;
    right: -320px;
    top: calc(var(--header-h, 80px) + 24px);
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    z-index: 100;
    transition: right 0.4s ease;
    max-height: 60vh;
    overflow-y: auto;
}
.toc-sidebar.toc-visible { right: 24px; }
.toc-sidebar.toc-hidden { right: -320px !important; }
.toc-sidebar .toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.toc-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.3s;
}
.toc-close:hover { color: var(--gold); }
.toc-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: rgba(201,169,110,0.08);
    border: none;
    border-radius: var(--radius);
    color: var(--gold);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.3s;
}
.toc-expand-btn:hover { background: rgba(201,169,110,0.15); }
.toc-expand-btn i { transition: transform 0.3s; }

/* Mobile TOC */
.toc-mobile-toggle {
    display: none;
    position: fixed;
    left: 16px;
    bottom: 80px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--text-dark, #1a1a1a);
    border: none;
    font-size: 1.1rem;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(201,169,110,0.3);
    cursor: pointer;
}
.toc-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger, #e94560);
    color: #fff;
    font-size: 0.65rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toc-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
}
.toc-mobile-overlay.active { display: block; }
.toc-mobile-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px;
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
    transition: bottom 0.4s ease;
}
.toc-mobile-panel.active { bottom: 0; }
.toc-mobile-panel .toc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* --- Pagination --- */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 48px 0;
}
.blog-pagination a, .blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.3s;
}
.blog-pagination a:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.blog-pagination .active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--text-dark, #1a1a1a);
    font-weight: 600;
}

/* --- Category Filter --- */
.blog-categories-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}
.blog-categories-filter a {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.3s;
}
.blog-categories-filter a:hover, .blog-categories-filter a.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--text-dark, #1a1a1a);
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .blog-post-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid .post-card:first-child { grid-template-columns: 1fr; }
    .related-posts-grid { grid-template-columns: repeat(3, 1fr); }
    .toc-sidebar { display: none !important; }
}
@media (max-width: 768px) {
    .blog-container { padding: 0 16px; padding-top: calc(var(--header-h, 64px) + 16px); }
    .blog-grid { grid-template-columns: 1fr; }
    .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .post-main-title { font-size: 1.5rem; }
    .post-info { gap: 12px; font-size: 0.8rem; }
    .toc-mobile-toggle { display: flex; align-items: center; justify-content: center; }
    .post-body { font-size: 0.95rem; }
    .post-body h2 { font-size: 1.3rem; }
}