/* ═══════════════════════════════════════════
   ANALYSIS HUB CSS - Dark Professional Theme
   Palette: #0A192F | #112240 | #1D4ED8 | #F59E0B
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #0A192F;
    --bg-card: #112240;
    --bg-card-hover: #1A3050;
    --brand-blue: #1D4ED8;
    --brand-blue-light: #3B82F6;
    --accent-gold: #F59E0B;
    --accent-gold-light: #FBBF24;
    --accent-gold-dark: #D97706;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-dark: #0F172A;
    --border-light: rgba(203, 213, 225, 0.1);
    --border-gold: rgba(245, 158, 11, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.analysis-hub-page {
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ═══════════════ HERO ═══════════════ */
.hub-hero {
    background: linear-gradient(160deg, #0A192F 0%, #112240 50%, #1D4ED8 120%);
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.hub-hero__bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hub-hero__content {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid var(--border-gold);
}

.hub-hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    word-break: break-word;
}

.hub-hero__title span {
    color: var(--accent-gold);
}

.hub-hero__desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 25px;
    line-height: 1.8;
    padding: 0 15px;
}

/* ═══════════════ SEARCH - SIMPLE & RESPONSIVE ═══════════════ */
.hub-search-form-simple {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
}

.hub-search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    width: 100%;
}

.hub-search-wrapper:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.hub-search-icon {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-right: -35px;
    margin-left: 15px;
    z-index: 2;
    pointer-events: none;
}

.hub-search-input {
    flex: 1;
    padding: 14px 45px 14px 45px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 100%;
    min-width: 0;
}

.hub-search-input::placeholder {
    color: var(--text-muted);
}

.hub-search-input:focus {
    outline: none;
}

.hub-search-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--accent-gold);
    color: var(--text-dark);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.hub-search-submit:hover {
    background: var(--accent-gold-dark);
}

/* حذف استایل‌های قبلی search card */
.hub-search-card,
.hub-search-grid,
.hub-search-field,
.hub-search-btn {
    display: none;
}

/* ═══════════════ POST HERO ═══════════════ */
.post-hero {
    background: linear-gradient(160deg, #0A192F 0%, #112240 50%, #1D4ED8 120%);
    padding: 60px 0 40px;
    position: relative;
}

.post-hero-small {
    padding: 50px 0 35px;
}

.post-hero-content {
    width: 100%;
    max-width: 100%;
}

.post-breadcrumb {
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.post-breadcrumb a {
    color: var(--accent-gold);
    text-decoration: none;
}

.breadcrumb-sep {
    margin: 0 8px;
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-secondary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-gold);
    text-decoration: none;
    margin-bottom: 16px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--accent-gold-light);
}

.post-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.post-hero-topic {
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.post-hero-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.post-author-big {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.post-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
    flex-shrink: 0;
}

.post-author-placeholder {
    background: var(--brand-blue);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.post-author-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.post-author-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ═══════════════ POST LAYOUT ═══════════════ */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-top: 40px;
    padding-bottom: 60px;
}

.post-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ═══════════════ DESCRIPTION CARD ═══════════════ */
.post-description-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border-light);
}

.post-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-section-title i {
    color: var(--accent-gold);
}

.post-description-text {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 0.95rem;
    word-break: break-word;
}

.post-result-link {
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(29, 78, 216, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(29, 78, 216, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-result-link a {
    color: var(--brand-blue-light);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

/* ═══════════════ COMMENTS SECTION ═══════════════ */
.post-comments-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border-light);
}

.post-comments-header {
    margin-bottom: 20px;
}

.comments-count-badge {
    background: var(--brand-blue);
    color: var(--text-primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.comment-card {
    display: flex;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-card:last-child {
    border-bottom: none;
}

.comment-avatar-col {
    position: relative;
    flex-shrink: 0;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
}

.comment-avatar-placeholder {
    background: var(--brand-blue);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.expert-verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #10B981;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    border: 2px solid var(--bg-card);
}

.comment-content-col {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.comment-expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    margin-right: 8px;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 0.9rem;
    word-break: break-word;
}

/* پاسخ‌ها */
.comment-replies {
    margin-top: 16px;
    margin-right: 20px;
    border-right: 3px solid var(--brand-blue);
}

.reply-card {
    background: rgba(29, 78, 216, 0.05);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 8px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.reply-header i {
    color: var(--brand-blue);
}

.reply-badge {
    background: var(--brand-blue);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.reply-body {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.8;
    word-break: break-word;
}

.reply-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* دکمه پاسخ */
.reply-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--brand-blue-light);
    border: 1px solid var(--brand-blue);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 12px;
    transition: var(--transition);
}

.reply-toggle-btn:hover {
    background: var(--brand-blue);
    color: var(--text-primary);
}

.reply-form-wrap {
    margin-top: 12px;
}

.reply-form textarea {
    width: 100%;
    background: rgba(203, 213, 225, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-primary);
    min-height: 80px;
    resize: vertical;
}

.reply-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--accent-gold);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
    transition: var(--transition);
}

.reply-submit-btn:hover {
    background: var(--accent-gold-dark);
}

/* فرم ثبت نظر */
.add-comment-card {
    margin-top: 30px;
    padding: 24px;
    background: rgba(29, 78, 216, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.add-comment-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.comment-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
}

.comment-form-field textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-primary);
    min-height: 120px;
    resize: vertical;
}

.comment-form-field textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.comment-form-notice {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--accent-gold);
    color: var(--text-dark);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-submit-btn:hover {
    background: var(--accent-gold-dark);
    transform: translateY(-2px);
}

/* بدون نظر */
.no-comments-yet {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.no-comments-yet i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

/* نیاز به ورود */
.login-to-comment,
.expert-only-notice {
    text-align: center;
    padding: 30px;
    background: rgba(203, 213, 225, 0.03);
    border-radius: var(--radius);
    margin-top: 20px;
}

.login-to-comment i,
.expert-only-notice i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.login-to-comment p,
.expert-only-notice p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ═══════════════ SIDEBAR ═══════════════ */
.post-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    overflow: visible;
}

.sidebar-card .hub-btn {
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

.sidebar-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h4 i {
    color: var(--accent-gold);
}

.sidebar-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.post-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-info-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.post-info-list li:last-child {
    border-bottom: none;
}

.post-info-list i {
    color: var(--accent-gold);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.post-info-list span {
    color: var(--text-muted);
}

.post-info-list strong {
    color: var(--text-primary);
    margin-right: auto;
}

.share-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-btn-vertical {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: var(--brand-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.share-btn-vertical:hover {
    background: var(--accent-gold);
    color: var(--text-dark);
}

/* ═══════════════ CREATE POST ═══════════════ */
.create-post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 40px;
    padding-bottom: 60px;
}

.create-post-form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border-light);
}

.form-field {
    margin-bottom: 24px;
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-field label i {
    color: var(--accent-gold);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(203, 213, 225, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-field textarea {
    min-height: 180px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.field-help {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.create-post-guide {
    position: relative;
}

.guide-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-gold);
    position: sticky;
    top: 20px;
}

.guide-icon {
    width: 50px;
    height: 50px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 16px;
}

.guide-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.guide-card ul {
    list-style: none;
    padding: 0;
}

.guide-card ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.guide-card ul li i {
    color: #10B981;
    flex-shrink: 0;
}

/* ═══════════════ STATS ROW ═══════════════ */
.hub-posts-section {
    padding-top: 30px;
    padding-bottom: 0;
    margin-bottom: 0;
}

.hub-posts-section > .container {
    padding-bottom: 0;
    margin-bottom: 0;
}

.hub-stats-row {
    display: flex;
    gap: 16px;
    margin: 0 0 30px 0;
    flex-wrap: wrap;
}

.hub-stat-card {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    padding: 20px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.hub-stat-card i {
    font-size: 1.5rem;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.hub-stat-card strong {
    display: block;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.hub-stat-card span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══════════════ POSTS GRID ═══════════════ */
.hub-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.hub-post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.hub-post-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-lg);
}

/* سورس بج */
.hub-post-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
    width: fit-content;
}

.hub-source-smart_calc {
    background: rgba(29, 78, 216, 0.15);
    color: var(--brand-blue-light);
}

.hub-source-business_analysis {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold-light);
}

/* PREVIEW CARD */
.post-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.preview-score-ring {
    flex-shrink: 0;
}

.preview-ring-svg {
    width: 70px;
    height: 70px;
    transform: rotate(-90deg);
}

.preview-ring-bg {
    fill: none;
    stroke: rgba(203, 213, 225, 0.15);
    stroke-width: 5;
}

.preview-ring-fill {
    fill: none;
    stroke: #F59E0B;
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.preview-icon-wrap {
    width: 70px;
    height: 70px;
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-icon-wrap i {
    font-size: 1.8rem;
    color: #F59E0B;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-label {
    font-size: 0.8rem;
    color: #F59E0B;
    font-weight: 600;
}

.preview-desc {
    font-size: 0.78rem;
    color: #CBD5E1;
    line-height: 1.5;
}

/* آواتار نویسنده */
.hub-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.hub-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
    flex-shrink: 0;
}

.hub-author-placeholder {
    background: var(--brand-blue);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.hub-author-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hub-post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* محتوای پست */
.hub-post-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: break-word;
}

.hub-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.hub-post-title a:hover {
    color: var(--accent-gold);
}

.hub-post-topic {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-post-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

/* آمار پست */
.hub-post-stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hub-stat-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hub-stat-item i {
    color: var(--accent-gold);
}

.hub-post-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: var(--brand-blue);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.hub-post-link:hover {
    background: var(--accent-gold);
    color: var(--text-dark);
}

/* ═══════════════ PAGINATION ═══════════════ */
.hub-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 40px;
    flex-wrap: wrap;
}

.hub-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    font-size: 0.85rem;
    transition: var(--transition);
}

.hub-page-btn:hover,
.hub-page-btn.active {
    background: var(--brand-blue);
    color: var(--text-primary);
    border-color: var(--brand-blue);
}

/* ═══════════════ EMPTY STATE ═══════════════ */
.hub-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.hub-empty-icon {
    width: 100px;
    height: 100px;
    background: rgba(29, 78, 216, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: var(--brand-blue-light);
}

.hub-empty-state h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.hub-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hub-empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════ BUTTONS ═══════════════ */
.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hub-btn-primary {
    background: var(--accent-gold);
    color: var(--text-dark);
}

.hub-btn-primary:hover {
    background: var(--accent-gold-dark);
    transform: translateY(-2px);
    color: var(--text-dark);
}

.hub-btn-secondary {
    background: var(--brand-blue);
    color: var(--text-primary);
}

.hub-btn-secondary:hover {
    background: var(--brand-blue-light);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.hub-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.hub-btn-ghost:hover {
    background: rgba(203, 213, 225, 0.05);
    color: var(--text-primary);
}

.hub-btn-block {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.hub-btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 992px) {
    .post-layout,
    .create-post-layout {
        grid-template-columns: 1fr;
    }
    
    .hub-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .hub-hero {
        padding: 40px 0 30px;
    }
    
    .hub-hero__title {
        font-size: 1.8rem;
    }
    
    .hub-hero__desc {
        font-size: 0.9rem;
    }
    
    .post-hero-title {
        font-size: 1.5rem;
    }
    
    .hub-search-wrapper {
        flex-direction: column;
        border-radius: 14px;
    }
    
    .hub-search-icon {
        display: none;
    }
    
    .hub-search-input {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-light);
    }
    
    .hub-search-submit {
        width: 100%;
        justify-content: center;
        padding: 12px;
        border-radius: 0 0 14px 14px;
    }
    
    .hub-stats-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .hub-stat-card {
        min-width: 100%;
    }
    
    .hub-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hub-post-card {
        padding: 20px;
    }
    
    .post-preview-card {
        flex-direction: column;
        text-align: center;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .hub-btn {
        width: 100%;
        justify-content: center;
    }
    
    .post-hero {
        padding: 40px 0 30px;
    }
    
    .post-description-card,
    .post-comments-section,
    .create-post-form-card {
        padding: 20px;
    }
    
    .comment-replies {
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .hub-hero__title {
        font-size: 1.5rem;
    }
    
    .post-hero-title {
        font-size: 1.3rem;
    }
    
    .hub-badge {
        font-size: 0.75rem;
        padding: 6px 16px;
    }
    
    .hub-search-form-simple {
        padding: 0 10px;
    }
    
    .post-hero-small {
        padding: 30px 0 25px;
    }
    
    .guide-card {
        padding: 20px;
    }
}

/* ═══════════════ REMOVE WHITE SPACE ═══════════════ */
.analysis-hub-page {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.hub-posts-section {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.hub-posts-section .container,
.post-layout,
.create-post-layout {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.hub-pagination {
    margin-bottom: 0 !important;
}

.container.py-4,
.container.pt-4,
.container.pb-4,
.container.my-4,
.container.mt-4,
.container.mb-4 {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

main {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body {
    background: var(--bg-primary) !important;
}

footer {
    margin-top: 0 !important;
}

/* استایل پست حذف شده */
.post-deleted-notice {
    text-align: center;
    padding: 80px 20px;
}

.pending-reply-notice {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== لایت مود ==================== */
[data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --brand-blue: #1E40AF;
    --brand-blue-light: #3B82F6;
    --accent-gold: #1E40AF;
    --accent-gold-light: #3B82F6;
    --accent-gold-dark: #1E3A8A;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-dark: #FFFFFF;
    --border-light: rgba(0, 0, 0, 0.08);
    --border-gold: rgba(30, 64, 175, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ==================== فیکس هیرو صفحه اصلی هاب - لایت مود ==================== */
[data-theme="light"] .hub-hero {
    background: linear-gradient(160deg, #1E40AF 0%, #1E3A8A 100%) !important;
}

[data-theme="light"] .hub-hero__title {
    color: #FFFFFF !important;
}

[data-theme="light"] .hub-hero__title span {
    color: #FBBF24 !important;
}

[data-theme="light"] .hub-hero__desc {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .hub-badge {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

[data-theme="light"] .hub-stat-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .hub-stat-card strong {
    color: #0F172A !important;
}

[data-theme="light"] .hub-stat-card span {
    color: #475569 !important;
}

[data-theme="light"] .hub-stat-card i {
    color: #F59E0B !important;
}

/* ==================== فیکس هیرو پست دیتیل - لایت مود ==================== */
[data-theme="light"] .post-hero,
[data-theme="light"] .post-hero-small {
    background: linear-gradient(160deg, #1E40AF 0%, #1E3A8A 100%) !important;
}

[data-theme="light"] .post-hero-title {
    color: #FFFFFF !important;
}

[data-theme="light"] .post-hero-desc,
[data-theme="light"] .post-hero-topic {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .post-author-name {
    color: #FFFFFF !important;
}

[data-theme="light"] .post-author-meta {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .post-breadcrumb a,
[data-theme="light"] .back-link {
    color: #FBBF24 !important;
}

[data-theme="light"] .breadcrumb-current {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .breadcrumb-sep {
    color: rgba(255, 255, 255, 0.4) !important;
}

[data-theme="light"] .post-author-avatar {
    border-color: #FBBF24 !important;
}