/*
Theme Name: b0k Theme
Theme URI: https://b0k.ir
Author: Rick Sanchez
Author URI: https://b0k.ir
Description: قالب مدرن و اختصاصی شبکه و اجتماع بوک‌بلاگرهای ایران
Version: 1.0.0
Text Domain: b0k
*/

:root {
    --bg-dark: #09090b;
    --bg-card: #121215;
    --bg-card-hover: #18181c;
    --border: #27272a;
    --border-subtle: #1f1f23;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-gold: #f59e0b;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.logo-badge {
    background: #2563eb;
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: monospace;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: #fff;
}

.auth-btn {
    background: #18181b;
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.auth-btn:hover {
    background: #27272a;
    border-color: #3f3f46;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
    color: #fff;
}

.hero-desc {
    max-width: 680px;
    margin: 0 auto 28px;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Featured Bloggers Grid */
.bloggers-section {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.bloggers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.blogger-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
}

.blogger-card:hover {
    background: var(--bg-card-hover);
    border-color: #3f3f46;
    transform: translateY(-2px);
}

.blogger-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #27272a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.blogger-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blogger-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.blogger-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Post Grid */
.posts-section {
    padding: 40px 0 80px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
}

.post-card:hover {
    border-color: #3f3f46;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
}

.post-thumb {
    width: 100%;
    height: 200px;
    background: #18181b;
    position: relative;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.book-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(8px);
    color: #f4f4f5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #fff;
}

.post-title a:hover {
    color: var(--accent);
}

.post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    flex-grow: 1;
}

.post-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.author-mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #27272a;
}

.rating-badge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* Single Post View */
.single-container {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.single-header {
    margin-bottom: 30px;
}

.single-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 16px;
}

.single-author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.single-author-card .author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #27272a;
}

.single-body {
    font-size: 17px;
    line-height: 2;
    color: #d4d4d8;
}

.single-body p {
    margin-bottom: 24px;
}

.single-body h2, .single-body h3 {
    color: #fff;
    margin: 32px 0 16px;
}

.single-body blockquote {
    border-right: 3px solid var(--accent);
    padding: 12px 20px;
    background: var(--bg-card);
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    color: #e4e4e7;
    font-style: italic;
}

/* Author Archive Page */
.author-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 30px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.author-header-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #27272a;
    flex-shrink: 0;
}

.author-header-info h1 {
    font-size: 26px;
    color: #fff;
    margin-bottom: 6px;
}

.author-header-info p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    background: var(--bg-card);
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    .footer-inner {
        flex-direction: column;
        gap: 16px;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .author-header {
        flex-direction: column;
        text-align: center;
    }
}
