/* ============================================================
   2059 Search Engine - Master CSS
   Path: /assets/css/app.css
   ============================================================ */

/* ================== FONT ================== */
@font-face {
    font-family: 'Yekan';
    src: url('https://2059.ir/fonts/Yekan.woff2') format('woff2'),
         url('https://2059.ir/fonts/Yekan.woff') format('woff'),
         url('https://2059.ir/fonts/Yekan.ttf') format('truetype');
    font-display: swap;
}

/* ================== RESET ================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Vazirmatn', 'Yekan', Tahoma, sans-serif;
    background: #ffffff;
    color: #202124;
    font-size: 14px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: inline-block; vertical-align: middle; }
mark { background: #fef3c7; color: #92400e; padding: 0 3px; border-radius: 3px; font-weight: 600; }

/* ================== VARIABLES ================== */
:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --primary-soft: #eef2ff;
    --text: #202124;
    --text-2: #5f6368;
    --text-3: #80868b;
    --border: #e8eaed;
    --border-soft: #f1f3f4;
    --bg: #f8f9fa;
    --success: #10b981;
    --danger: #ef4444;
    --warn: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(60,64,67,.08);
    --shadow-md: 0 4px 16px rgba(60,64,67,.10);
    --shadow-lg: 0 10px 40px rgba(60,64,67,.15);
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================== SCROLLBAR ================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 5px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }
html { scrollbar-width: thin; scrollbar-color: var(--primary) #f1f1f1; }

/* ================== HEADER ================== */
.pub-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pub-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.pub-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.pub-logo img {
    height: 42px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    border-radius: 8px;
}
.pub-logo .logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

/* ---- search in header ---- */
.pub-search-header {
    flex: 1;
    max-width: 620px;
    position: relative;
    margin: 0 auto;
}
.pub-search-header input {
    width: 100%;
    padding: 10px 46px 10px 18px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    transition: var(--transition);
}
.pub-search-header input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.pub-search-header .pub-search-btn {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.pub-search-header .pub-search-btn:hover {
    background: var(--primary-dark);
}

/* RTL: search btn on right */
[dir="rtl"] .pub-search-header input { padding: 10px 18px 10px 46px; }
[dir="rtl"] .pub-search-header .pub-search-btn { left: auto; right: 5px; }

/* ---- actions ---- */
.pub-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ================== LANGUAGE SWITCHER ================== */
.pub-lang-switch { position: relative; }

.pub-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    background: #fff;
    transition: var(--transition);
    white-space: nowrap;
}
.pub-lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pub-lang-btn i {
    font-size: 10px;
    color: var(--text-2);
}

.pub-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition);
    z-index: 100;
}
.pub-lang-switch.open .pub-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
[dir="rtl"] .pub-lang-menu { left: auto; right: 0; }

.pub-lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: 0.12s;
}
.pub-lang-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.pub-lang-menu a.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}
.pub-lang-menu a .flag { font-size: 16px; }
.pub-lang-menu a .check {
    margin-inline-start: auto;
    font-size: 11px;
    color: var(--primary);
}

/* ================== BUTTONS ================== */
.pub-btn-login {
    background: transparent;
    border: 1.5px solid var(--border);
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}
.pub-btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pub-btn-post {
    background: var(--primary);
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}
.pub-btn-post:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* ================== HERO (HOME) ================== */
.pub-hero {
    padding: 70px 20px 50px;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #f8f9ff 100%);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pub-hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.pub-hero-logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.pub-hero-subtitle {
    font-size: 15px;
    color: var(--text-2);
    font-weight: 500;
    margin-bottom: 36px;
}

/* ---- hero search ---- */
.pub-hero-search {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.pub-hero-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--border);
    padding: 6px 6px 6px 18px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}
.pub-hero-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 14px 50px rgba(79, 70, 229, 0.22);
}
[dir="rtl"] .pub-hero-search-box { padding: 6px 18px 6px 6px; }

.pub-hero-search-box .search-icon-left {
    color: var(--text-3);
    font-size: 20px;
    margin-inline-end: 12px;
    flex-shrink: 0;
}
.pub-hero-search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    padding: 12px 0;
    min-width: 0;
}
.pub-hero-search-box input::placeholder { color: var(--text-3); }

.pub-hero-search-submit {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}
.pub-hero-search-submit:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* ---- suggestions dropdown ---- */
.pub-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    text-align: start;
}
.pub-suggestions.visible { display: block; }

.pub-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.12s;
}
.pub-suggestion-item::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: var(--text-3);
    flex-shrink: 0;
}
.pub-suggestion-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.pub-suggestion-item:hover::before { color: var(--primary); }

/* ---- hero tags ---- */
.pub-hero-tags {
    max-width: 900px;
    margin: 30px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.pub-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    transition: var(--transition);
}
.pub-hero-tag i { font-size: 13px; color: var(--primary); }
.pub-hero-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.pub-hero-tag:hover i { color: #fff; }

/* ================== TABS ================== */
.pub-tabs-wrapper {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 68px;
    z-index: 900;
}
.pub-tabs-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pub-tabs-inner::-webkit-scrollbar { display: none; }

.pub-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
    background: none;
}
.pub-tab:hover {
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 10px 10px 0 0;
}
.pub-tab.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom-color: var(--primary);
}
.pub-tab i { font-size: 16px; }
.pub-tab .badge {
    background: #ff4757;
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.4;
}

/* ================== LAYOUT ================== */
.pub-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    flex: 1;
    width: 100%;
}

/* ================== SIDEBAR ================== */
.pub-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 16px;
    position: sticky;
    top: 148px;
    height: fit-content;
    align-self: start;
}
.pub-sidebar h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 4px;
}
.pub-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pub-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}
.pub-sidebar-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.pub-sidebar-link.active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.pub-sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.pub-sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 4px;
}

/* ================== MAIN ================== */
.pub-main { min-width: 0; }

.pub-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
}
.pub-results-info strong {
    color: var(--primary);
    font-weight: 700;
}

/* ================== SORT BAR ================== */
.pub-sort-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pub-sort-btn {
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pub-sort-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pub-sort-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

/* ================== RESULT LIST ================== */
.pub-result-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pub-result-item {
    padding: 14px 16px;
    border-radius: 12px;
    transition: var(--transition);
    border: none;
    background: transparent;
}
.pub-result-item:hover {
    background: var(--primary-soft);
}

.pub-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.pub-result-favicon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.pub-result-item:hover .pub-result-favicon {
    background: #fff;
}

.pub-result-source {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.pub-result-source-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pub-result-source-url {
    font-size: 11.5px;
    color: #0d652d;
    direction: ltr;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

.pub-result-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    display: inline-block;
    line-height: 1.5;
    transition: color 0.15s;
}
.pub-result-title:hover {
    text-decoration: underline !important;
    color: var(--primary-dark);
}
.pub-result-title mark {
    background: #fef3c7;
    color: #92400e;
    padding: 0 2px;
    border-radius: 3px;
}

.pub-result-desc {
    color: var(--text-2);
    line-height: 1.8;
    font-size: 13.5px;
    text-align: justify;
    margin-bottom: 8px;
    word-break: break-word;
}

.pub-result-meta {
    display: flex;
    gap: 18px;
    color: var(--text-3);
    font-size: 11.5px;
    flex-wrap: wrap;
}
.pub-result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pub-result-meta i { font-size: 10px; }

/* ---- image result ---- */
.pub-result-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    margin-inline-start: auto;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

/* ---- video result ---- */
.pub-result-video {
    position: relative;
    width: 140px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}
.pub-result-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pub-result-video .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ================== EMPTY STATE ================== */
.pub-empty-state {
    text-align: center;
    padding: 70px 30px;
    background: #fff;
    border-radius: 20px;
    border: 2px dashed var(--border);
}
.pub-empty-state i {
    font-size: 70px;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 20px;
    display: block;
}
.pub-empty-state h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}
.pub-empty-state p {
    color: var(--text-2);
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ================== PAGINATION ================== */
.pub-pagination-wrap {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.pub-pagination-label {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
}
.pub-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pub-page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-family: inherit;
    text-decoration: none !important;
}
.pub-page-link:hover:not(.disabled):not(.active):not(.dots) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}
.pub-page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    cursor: default;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.pub-page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.pub-page-link.dots {
    border: none;
    background: none;
    cursor: default;
    color: var(--text-3);
    pointer-events: none;
}

/* ================== FOOTER ================== */
.pub-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--border);
    padding: 24px 20px 16px;
    font-size: 13px;
    color: var(--text-2);
    margin-top: auto;
}
.pub-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.pub-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}
.pub-footer-link {
    color: var(--text-2);
    font-size: 13px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pub-footer-link:hover { color: var(--primary); }
.pub-footer-copy {
    color: var(--text-3);
    font-size: 12px;
}

/* ================== SUBMIT PAGE ================== */
.pub-submit-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #fff 0%, #f8f9ff 100%);
}
.pub-submit-box {
    max-width: 520px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
}
.pub-submit-box h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}
.pub-submit-box .subtitle {
    color: var(--text-2);
    font-size: 13.5px;
    margin-bottom: 24px;
    line-height: 1.7;
}
.pub-submit-box label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 6px;
    font-weight: 600;
}
.pub-submit-box input[type="text"],
.pub-submit-box input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
    margin-bottom: 16px;
}
.pub-submit-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.pub-captcha-q {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 15px;
}
.pub-submit-box .btn-submit {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 13px 25px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
}
.pub-submit-box .btn-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}
.pub-submit-box .msg {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
}
.pub-submit-box .msg.ok {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #a7f3d0;
}
.pub-submit-box .msg.err {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #fecaca;
}
.pub-submit-box .back-link {
    display: inline-block;
    color: var(--text-2);
    font-size: 13px;
    margin-top: 16px;
    transition: var(--transition);
}
.pub-submit-box .back-link:hover { color: var(--primary); }

/* ================== RESPONSIVE ================== */
@media (max-width: 1000px) {
    .pub-layout {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .pub-header-inner {
        height: 60px;
        gap: 10px;
        padding: 0 14px;
    }
    .pub-logo img {
        height: 36px;
        max-width: 110px;
    }
    .pub-logo .logo-text { display: none; }
    .pub-btn-login span,
    .pub-btn-post span { display: none; }
    .pub-btn-login,
    .pub-btn-post {
        padding: 8px 10px;
    }
    .pub-lang-btn .lang-name { display: none; }
    .pub-search-header input {
        padding: 9px 40px 9px 14px;
        font-size: 12.5px;
    }
    [dir="rtl"] .pub-search-header input {
        padding: 9px 14px 9px 40px;
    }
    .pub-tabs-wrapper { top: 60px; }
    .pub-tabs-inner { padding: 0 14px; }
    .pub-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 14px;
    }
    .pub-sidebar { display: none; }
    .pub-tab {
        font-size: 12px;
        padding: 12px 10px;
    }
    .pub-tab i { font-size: 14px; }
    .pub-footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .pub-footer-links { justify-content: center; }
}

@media (max-width: 600px) {
    .pub-hero {
        padding: 40px 16px 30px;
    }
    .pub-hero-logo img {
        height: 70px;
    }
    .pub-hero-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    .pub-hero-search-box {
        flex-wrap: wrap;
        padding: 6px;
        gap: 6px;
    }
    .pub-hero-search-box .search-icon-left { display: none; }
    .pub-hero-search-box input {
        padding: 10px 14px;
        font-size: 14px;
        width: 100%;
    }
    .pub-hero-search-submit {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    .pub-hero-tag {
        font-size: 11.5px;
        padding: 6px 11px;
    }
    .pub-result-title { font-size: 15px; }
    .pub-result-desc { font-size: 12.5px; }
    .pub-result-item { padding: 12px 10px; }
    .pub-result-thumb,
    .pub-result-video {
        width: 90px;
        height: 68px;
    }
    .pub-page-link {
        min-width: 34px;
        height: 34px;
        font-size: 12px;
        padding: 0 8px;
    }
}

/* ================== RTL/LTR misc ================== */
[dir="ltr"] .pub-hero-search-box .search-icon-left {
    margin-inline-end: 0;
    margin-inline-start: 12px;
}
[dir="ltr"] .pub-lang-menu { left: 0; right: auto; }

/* ================== PRINT ================== */
@media print {
    .pub-header, .pub-tabs-wrapper, .pub-sidebar,
    .pub-footer, .pub-pagination-wrap, .pub-sort-bar {
        display: none !important;
    }
    .pub-layout {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .pub-result-item {
        page-break-inside: avoid;
    }
}

/* Media wrapper */
.pub-result-media {
    position: relative;
    flex-shrink: 0;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pub-result-media:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.pub-result-thumb {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #f3f4f6;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.pub-result-media:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    color: #fff;
    font-size: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

@media (max-width: 600px) {
    .pub-result-thumb {
        width: 90px;
        height: 66px;
    }
}





/* ============================================================
   هدر ثابت - همیشه: راست=لوگو+دکمه، وسط=جستجو، چپ=زبان
   بدون توجه به RTL/LTR
   ============================================================ */

.pub-header-fixed {
    direction: rtl; /* ثابت، مستقل از lang */
}

.pub-header-fixed .pub-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}

/* گروه راست: لوگو + دکمه‌ها */
.pub-header-fixed .pub-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    order: 1; /* راست */
}

.pub-header-fixed .pub-right-group .pub-logo {
    flex-shrink: 0;
    margin-inline-end: 6px;
}

/* وسط: جستجو */
.pub-header-fixed .pub-search-header {
    order: 2;
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

/* چپ: زبان */
.pub-header-fixed .pub-lang-switch {
    order: 3;
    flex-shrink: 0;
}

/* ============================================================
   دکمه جستجو در هدر - بر اساس زبان (برعکس همیشه)
   فارسی: راست | انگلیسی: چپ
   ============================================================ */

/* RTL (فارسی/عربی) → دکمه سمت راست */
[dir="rtl"] .pub-header-fixed .pub-search-header input {
    padding: 10px 18px 10px 46px;
    text-align: right;
}
[dir="rtl"] .pub-header-fixed .pub-search-header .pub-search-btn {
    left: auto;
    right: 5px;
}

/* LTR (انگلیسی/ترکی/آلمانی/اسپانیایی) → دکمه سمت چپ */
[dir="ltr"] .pub-header-fixed .pub-search-header input {
    padding: 10px 46px 10px 18px;
    text-align: left;
}
[dir="ltr"] .pub-header-fixed .pub-search-header .pub-search-btn {
    right: auto;
    left: 5px;
}

/* ============================================================
   منوی زبان - همیشه به سمت چپ باز می‌شه
   ============================================================ */

.pub-header-fixed .pub-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition);
    z-index: 200;
}

.pub-header-fixed .pub-lang-switch {
    position: relative;
}

.pub-header-fixed .pub-lang-switch.open .pub-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================================
   ریسپانسیو
   ============================================================ */

@media (max-width: 900px) {
    .pub-header-fixed .pub-header-inner {
        height: 60px;
        gap: 8px;
        padding: 0 12px;
    }
    .pub-header-fixed .pub-right-group .pub-logo img {
        height: 34px;
        max-width: 100px;
    }
    .pub-header-fixed .pub-btn-login span,
    .pub-header-fixed .pub-btn-post span {
        display: none;
    }
    .pub-header-fixed .pub-btn-login,
    .pub-header-fixed .pub-btn-post {
        padding: 8px 10px;
    }
    .pub-header-fixed .pub-lang-btn .lang-name {
        display: none;
    }
    .pub-header-fixed .pub-search-header input {
        font-size: 12.5px;
        padding-left: 40px;
        padding-right: 40px;
    }
}



.pub-header-fixed {
    direction: rtl; /* برای متن فارسی */
}

.pub-header-fixed .pub-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}

/* لوگو → سمت راست */
.pub-header-fixed .pub-logo {
    order: 1;
    flex-shrink: 0;
}

/* جستجو → وسط */
.pub-header-fixed .pub-search-header {
    order: 2;
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
}

/* اکشن‌ها → سمت چپ */
.pub-header-fixed .pub-actions {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    direction: ltr; /* ← مهم: چیدمان دکمه‌ها از چپ به راست */
}

/* داخل اکشن‌ها: دکمه‌ها سمت چپ، زبان سمت راست */
.pub-header-fixed .pub-actions .pub-lang-fixed {
    order: 1; /* ← اولین (سمت چپ) */
}

.pub-header-fixed .pub-actions .pub-btn-login {
    order: 2;
}

.pub-header-fixed .pub-actions .pub-btn-post {
    order: 3; /* ← آخرین (سمت راست) */
}

/* ============================================================
   دکمه جستجو در صفحه نتایج — برعکس زبان
   ============================================================ */

/* فارسی (RTL): دکمه جستجو سمت راست */
[dir="rtl"] .pub-search-header .pub-search-btn {
    left: auto;
    right: 5px;
}
[dir="rtl"] .pub-search-header input {
    padding: 10px 46px 10px 18px;
}

/* انگلیسی (LTR): دکمه جستجو سمت چپ */
[dir="ltr"] .pub-search-header .pub-search-btn {
    right: auto;
    left: 5px;
}
[dir="ltr"] .pub-search-header input {
    padding: 10px 18px 10px 46px;
}

/* ============================================================
   دکمه‌های جستجوی هدر — بدون تغییر جهت
   ============================================================ */

[dir="rtl"] .pub-header-fixed .pub-search-header input,
[dir="ltr"] .pub-header-fixed .pub-search-header input {
    /* فاصله مناسب هر دو طرف */
    padding-left: 46px;
    padding-right: 46px;
    text-align: right;
}

[dir="ltr"] .pub-header-fixed .pub-search-header input {
    text-align: left;
}

/* ============================================================
   زبان همیشه سمت راست
   ============================================================ */

[dir="rtl"] .pub-header-fixed .pub-actions,
[dir="ltr"] .pub-header-fixed .pub-actions {
    /* هیچ تغییری نکن */
}

[dir="rtl"] .pub-header-fixed .pub-lang-menu {
    right: auto;
    left: 0;
}

[dir="ltr"] .pub-header-fixed .pub-lang-menu {
    left: auto;
    right: 0;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */

@media (max-width: 900px) {
    .pub-header-fixed .pub-header-inner {
        height: 60px;
        gap: 10px;
        padding: 0 14px;
    }
    .pub-header-fixed .pub-logo img {
        height: 36px;
        max-width: 110px;
    }
    .pub-header-fixed .pub-btn-login span,
    .pub-header-fixed .pub-btn-post span {
        display: none;
    }
    .pub-header-fixed .pub-lang-btn .lang-name {
        display: none;
    }
    .pub-header-fixed .pub-search-header input {
        font-size: 12.5px;
    }
}

.pub-header-fixed .pub-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.pub-header-fixed .pub-btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pub-header-fixed .pub-btn-post {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.pub-header-fixed .pub-btn-post:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.pub-header-fixed .pub-btn-post i { font-size: 12px; }

.pub-header-fixed .pub-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.pub-header-fixed .pub-lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pub-header-fixed .pub-lang-btn i { font-size: 10px; color: var(--text-2); }

.pub-header-fixed .pub-search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}
.pub-header-fixed .pub-search-btn:hover {
    background: var(--primary-dark);
}

.pub-header-fixed .pub-search-header input {
    width: 100%;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    transition: var(--transition);
}
.pub-header-fixed .pub-search-header input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

/* ============================================================
   آیکون پیشنهادها - بازنویسی
   ============================================================ */

.pub-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.12s;
}

.pub-suggestion-item::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
    display: inline-block;
    width: 14px;
    text-align: center;
}

.pub-suggestion-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.pub-suggestion-item:hover::before {
    color: var(--primary);
}

/* برای RTL: آیکون قبل از متن */
[dir="rtl"] .pub-suggestion-item::before {
    order: -1;
}

[dir="ltr"] .pub-suggestion-item::before {
    order: -1;
}

/* ============================================================
   گرید تصاویر (مثل گوگل)
   ============================================================ */

.pub-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.pub-image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pub-image-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 2;
}

.pub-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.pub-image-card:hover img {
    transform: scale(1.08);
}

.pub-image-card .pub-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    max-height: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0;
    transition: opacity 0.2s;
}

.pub-image-card:hover .pub-image-title {
    opacity: 1;
}

@media (max-width: 600px) {
    .pub-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}

/* ============================================================
   گرید ویدئوها (با پلی‌آیکون)
   ============================================================ */

.pub-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.pub-video-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.pub-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pub-video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.pub-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

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

.pub-video-thumb .pub-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s;
    pointer-events: none;
}

.pub-video-card:hover .pub-video-thumb .pub-play-btn {
    background: rgba(79, 70, 229, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.pub-video-info {
    padding: 12px 14px;
}

.pub-video-info .pub-video-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.pub-video-info .pub-video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-3);
}

@media (max-width: 600px) {
    .pub-video-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============================================================
   کارت نتیجه با تصویر کوچک (برای news, sport, music, film, ad)
   ============================================================ */

.pub-result-thumb-sm {
    width: 110px;
    height: 82px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: #f3f4f6;
}

@media (max-width: 600px) {
    .pub-result-thumb-sm {
        width: 80px;
        height: 60px;
    }
}

/* suggest در هدر */
.pub-search-header .pub-suggestions-header {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 500;
    text-align: start;
}
.pub-search-header .pub-suggestions-header.visible {
    display: block;
}

/* ============================================================
   هدر ثابت
   ============================================================ */

.pub-header-fixed {
    direction: rtl;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pub-header-fixed .pub-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
}

.pub-header-fixed .pub-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    order: 1;
}

.pub-header-fixed .pub-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-end: 6px;
}
.pub-header-fixed .pub-logo img {
    height: 42px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    border-radius: 8px;
}

.pub-header-fixed .pub-search-header {
    order: 2;
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.pub-header-fixed .pub-lang-switch {
    order: 3;
    flex-shrink: 0;
    position: relative;
}

/* دکمه‌ها */
.pub-header-fixed .pub-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pub-header-fixed .pub-btn-post {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-btn-post:hover {
    background: var(--primary-dark);
}

/* input جستجو */
.pub-header-fixed .pub-search-header input {
    width: 100%;
    padding: 10px 46px 10px 18px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    transition: all 0.2s;
}
.pub-header-fixed .pub-search-header input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.pub-header-fixed .pub-search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.pub-header-fixed .pub-search-btn:hover {
    background: var(--primary-dark);
}

/* RTL / LTR - دکمه جستجو */
[dir="rtl"] .pub-header-fixed .pub-search-header input {
    padding: 10px 18px 10px 46px;
    text-align: right;
}
[dir="rtl"] .pub-header-fixed .pub-search-header .pub-search-btn {
    left: auto;
    right: 5px;
}
[dir="ltr"] .pub-header-fixed .pub-search-header input {
    padding: 10px 46px 10px 18px;
    text-align: left;
}
[dir="ltr"] .pub-header-fixed .pub-search-header .pub-search-btn {
    right: auto;
    left: 5px;
}

/* ============================================================
   منوی زبان — باز شدن تمیز
   ============================================================ */

.pub-header-fixed .pub-lang-btn,
.home-lang-switch .pub-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-lang-btn:hover,
.home-lang-switch .pub-lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pub-header-fixed .pub-lang-btn i,
.home-lang-switch .pub-lang-btn i {
    font-size: 10px;
    color: #6b7280;
    transition: transform 0.2s;
}
.pub-lang-switch.open .pub-lang-btn i {
    transform: rotate(180deg);
}

/* منو */
.pub-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s;
    z-index: 2000;
    pointer-events: none;
}
.pub-lang-switch.open .pub-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.pub-lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: 0.12s;
}
.pub-lang-menu a:hover,
.pub-lang-menu a.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.pub-lang-menu a .flag { font-size: 16px; }
.pub-lang-menu a .check {
    margin-inline-start: auto;
    font-size: 11px;
    color: var(--primary);
}

/* ============================================================
   suggest در هدر
   ============================================================ */

.pub-search-header .pub-suggestions-header {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 1500;
    text-align: start;
}
.pub-search-header .pub-suggestions-header.visible {
    display: block;
}

/* ============================================================
   ریسپانسیو هدر
   ============================================================ */

@media (max-width: 900px) {
    .pub-header-fixed .pub-header-inner {
        height: 60px;
        gap: 8px;
        padding: 0 12px;
    }
    .pub-header-fixed .pub-logo img { height: 34px; max-width: 100px; }
    .pub-header-fixed .pub-btn-login span,
    .pub-header-fixed .pub-btn-post span { display: none; }
    .pub-header-fixed .pub-btn-login,
    .pub-header-fixed .pub-btn-post { padding: 8px 10px; }
    .pub-header-fixed .pub-lang-btn .lang-name { display: none; }
    .pub-header-fixed .pub-search-header input {
        font-size: 12.5px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* ============================================================
   هدر ثابت
   ============================================================ */

.pub-header-fixed {
    direction: rtl;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pub-header-fixed .pub-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
}

.pub-header-fixed .pub-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    order: 1;
}

.pub-header-fixed .pub-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-end: 6px;
}
.pub-header-fixed .pub-logo img {
    height: 42px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    border-radius: 8px;
}

.pub-header-fixed .pub-search-header {
    order: 2;
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
    position: relative;
    /* ✅ مهم: direction را از عنصر به ارث نبر، خودت تعیین کن */
    direction: inherit;
}

.pub-header-fixed .pub-lang-switch {
    order: 3;
    flex-shrink: 0;
    position: relative;
}

/* ============================================================
   دکمه جستجو در هدر — برعکس زبان
   RTL (فارسی) → چپ | LTR (انگلیسی) → راست
   ============================================================ */

.pub-header-fixed .pub-search-header input {
    width: 100%;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    transition: all 0.2s;
}
.pub-header-fixed .pub-search-header input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.pub-header-fixed .pub-search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.pub-header-fixed .pub-search-btn:hover {
    background: var(--primary-dark);
}

/* ✅ برای فارسی: دکمه سمت چپ */
[dir="rtl"] .pub-header-fixed .pub-search-header input {
    padding: 10px 18px 10px 46px;
    text-align: right;
}
[dir="rtl"] .pub-header-fixed .pub-search-header .pub-search-btn {
    left: 5px;
    right: auto;
}

/* ✅ برای انگلیسی: دکمه سمت راست */
[dir="ltr"] .pub-header-fixed .pub-search-header input {
    padding: 10px 46px 10px 18px;
    text-align: left;
}
[dir="ltr"] .pub-header-fixed .pub-search-header .pub-search-btn {
    right: 5px;
    left: auto;
}

/* ============================================================
   دکمه‌های هدر
   ============================================================ */

.pub-header-fixed .pub-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pub-header-fixed .pub-btn-post {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-btn-post:hover {
    background: var(--primary-dark);
}

/* ============================================================
   منوی زبان
   ============================================================ */

.pub-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pub-lang-btn i {
    font-size: 10px;
    color: #6b7280;
    transition: transform 0.2s;
}
.pub-lang-switch.open .pub-lang-btn i {
    transform: rotate(180deg);
}

.pub-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s;
    z-index: 2000;
    pointer-events: none;
}
.pub-lang-switch.open .pub-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.pub-lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: 0.12s;
}
.pub-lang-menu a:hover,
.pub-lang-menu a.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.pub-lang-menu a .flag { font-size: 16px; }
.pub-lang-menu a .check {
    margin-inline-start: auto;
    font-size: 11px;
    color: var(--primary);
}

/* ============================================================
   suggest در هدر
   ============================================================ */

.pub-search-header .pub-suggestions-header {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 1500;
    text-align: start;
}
.pub-search-header .pub-suggestions-header.visible {
    display: block;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */

@media (max-width: 900px) {
    .pub-header-fixed .pub-header-inner {
        height: 60px;
        gap: 8px;
        padding: 0 12px;
    }
    .pub-header-fixed .pub-logo img { height: 34px; max-width: 100px; }
    .pub-header-fixed .pub-btn-login span,
    .pub-header-fixed .pub-btn-post span { display: none; }
    .pub-header-fixed .pub-btn-login,
    .pub-header-fixed .pub-btn-post { padding: 8px 10px; }
    .pub-header-fixed .pub-lang-btn .lang-name { display: none; }
    .pub-header-fixed .pub-search-header input {
        font-size: 12.5px;
        padding-left: 40px;
        padding-right: 40px;
    }
}


/* ============================================================
   بج نوع ویدئو/فیلم
   ============================================================ */

.pub-video-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(79, 70, 229, 0.9);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* اگر عکس خراب شد، آیکون نمایش داده بشه */
.pub-video-thumb.no-thumb {
    background: linear-gradient(135deg, #1f2937, #374151);
}

/* ============================================================
   پلی‌آیکون - بهبود
   ============================================================ */

.pub-video-thumb .pub-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s;
    pointer-events: none;
}

.pub-video-card:hover .pub-video-thumb .pub-play-btn {
    background: rgba(79, 70, 229, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ============================================================
   اسلایدر تصاویر بالای نتایج (مثل گوگل)
   ============================================================ */

.pub-image-slider-wrapper {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pub-image-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pub-image-slider-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-image-slider-title i {
    color: var(--primary);
}

.pub-image-slider-more {
    font-size: 12.5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}
.pub-image-slider-more:hover {
    color: var(--primary-dark);
    gap: 8px;
}

.pub-image-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

.pub-image-slider::-webkit-scrollbar {
    height: 6px;
}
.pub-image-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.pub-image-slider::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.pub-image-slide {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #f3f4f6;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pub-image-slide:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.pub-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.pub-image-slide:hover img {
    transform: scale(1.08);
}

.pub-image-slide-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.3;
    max-height: 50%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0;
    transition: opacity 0.2s;
}

.pub-image-slide:hover .pub-image-slide-title {
    opacity: 1;
}

@media (max-width: 600px) {
    .pub-image-slide {
        width: 110px;
        height: 110px;
    }
    .pub-image-slider {
        gap: 8px;
    }
    .pub-image-slider-wrapper {
        padding: 10px 12px;
    }
}

/* ============================================================
   متن لینکی «جدیدترین ...»
   ============================================================ */

.pub-latest-link-wrapper {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-start;
}

.pub-latest-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff !important;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.pub-latest-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.pub-latest-link i {
    font-size: 14px;
}

.pub-latest-link .pub-latest-arrow {
    font-size: 11px;
    margin-inline-start: 4px;
    transition: transform 0.2s;
}

.pub-latest-link:hover .pub-latest-arrow {
    transform: translateX(-4px);
}

/* ============================================================
   ردیف بالا: «جدیدترین» (چپ) + اسلایدر (کنارش)
   ============================================================ */

.pub-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* لینک متنی سمت چپ */
.pub-latest-text {
    flex-shrink: 0;
}

.pub-latest-link-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary) !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--primary-soft);
    transition: all 0.2s;
    white-space: nowrap;
}

.pub-latest-link-text:hover {
    background: var(--primary);
    color: #fff !important;
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.pub-latest-link-text i {
    font-size: 13px;
}

.pub-latest-link-text:hover i:last-child {
    transform: translateX(-4px);
}

.pub-latest-link-text i:last-child {
    transition: transform 0.2s;
}

/* اسلایدر فشرده */
.pub-image-slider-compact {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.pub-image-slider-compact .pub-image-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

.pub-image-slider-compact .pub-image-slider::-webkit-scrollbar {
    height: 4px;
}
.pub-image-slider-compact .pub-image-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.pub-image-slider-compact .pub-image-slider::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.pub-image-slide-small {
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pub-image-slide-small:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.pub-image-slide-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .pub-top-row {
        flex-direction: column;
        align-items: stretch;
    }
    .pub-latest-text {
        text-align: center;
    }
    .pub-latest-link-text {
        justify-content: center;
        width: 100%;
    }
    .pub-image-slide-small {
        width: 70px;
        height: 70px;
    }
}

/* ============================================================
   حذف فیلتر grayscale از همه عکس‌ها
   ============================================================ */

.pub-result-thumb-sm,
.pub-image-card img,
.pub-image-slide-small img,
.pub-video-thumb img,
.pub-image-slide img {
    filter: none !important;
    -webkit-filter: none !important;
}
/* ============================================================
   اسلایدر تصاویر - درشت‌تر و تعداد کمتر
   ============================================================ */

.pub-image-slider-wrapper {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pub-image-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pub-image-slider-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-image-slider-title i {
    color: var(--primary);
}

.pub-image-slider-more {
    font-size: 12.5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}
.pub-image-slider-more:hover {
    color: var(--primary-dark);
    gap: 8px;
}

.pub-image-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

.pub-image-slider::-webkit-scrollbar {
    height: 6px;
}
.pub-image-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.pub-image-slider::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.pub-image-slide {
    flex: 0 0 auto;
    width: 160px;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #f3f4f6;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pub-image-slide:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.pub-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.pub-image-slide:hover img {
    transform: scale(1.08);
}

.pub-image-slide-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    max-height: 50%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0;
    transition: opacity 0.2s;
}

.pub-image-slide:hover .pub-image-slide-title {
    opacity: 1;
}

@media (max-width: 600px) {
    .pub-image-slide {
        width: 130px;
        height: 130px;
    }
    .pub-image-slider {
        gap: 8px;
    }
    .pub-image-slider-wrapper {
        padding: 10px 12px;
    }
}

/* ============================================================
   «جدیدترین ...» - لینک متنی سمت چپ
   ============================================================ */

.pub-latest-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 14px;
    direction: rtl; /* اما محتوا چپ‌چین */
}

.pub-latest-link-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary) !important;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--primary-soft);
    transition: all 0.2s;
    white-space: nowrap;
}

.pub-latest-link-text:hover {
    background: var(--primary);
    color: #fff !important;
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.pub-latest-link-text i {
    font-size: 12px;
    transition: transform 0.2s;
}

.pub-latest-link-text:hover i:last-child {
    transform: translateX(-4px);
}

/* ============================================================
   حذف فیلتر grayscale
   ============================================================ */

.pub-result-thumb-sm,
.pub-image-card img,
.pub-image-slide img,
.pub-image-slide-small img,
.pub-video-thumb img {
    filter: none !important;
    -webkit-filter: none !important;
}

/* ============================================================
   بج نوع ویدئو
   ============================================================ */

.pub-video-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(79, 70, 229, 0.9);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pub-video-thumb.no-thumb {
    background: linear-gradient(135deg, #1f2937, #374151);
}
/* ============================================================
   هدر جدید: زبان (چپ) | لوگو+جستجو (وسط) | دکمه‌ها (راست)
   ============================================================ */

.pub-header-fixed {
    direction: rtl;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pub-header-fixed .pub-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
}

/* چپ: زبان */
.pub-header-fixed .pub-lang-switch {
    order: 1;
    flex-shrink: 0;
    position: relative;
}

/* وسط: لوگو + جستجو */
.pub-header-fixed .pub-center-group {
    order: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
}

.pub-header-fixed .pub-center-group .pub-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.pub-header-fixed .pub-center-group .pub-logo img {
    height: 44px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    border-radius: 8px;
}

.pub-header-fixed .pub-center-group .pub-search-header {
    flex: 1;
    position: relative;
    direction: inherit;
    min-width: 0;
}

/* راست: دکمه‌ها */
.pub-header-fixed .pub-right-group {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* دکمه‌های هدر */
.pub-header-fixed .pub-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pub-header-fixed .pub-btn-post {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.pub-header-fixed .pub-btn-post:hover {
    background: var(--primary-dark);
}

/* input جستجو */
.pub-header-fixed .pub-search-header input {
    width: 100%;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    transition: all 0.2s;
}
.pub-header-fixed .pub-search-header input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.pub-header-fixed .pub-search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.pub-header-fixed .pub-search-btn:hover {
    background: var(--primary-dark);
}

/* RTL: دکمه جستجو چپ | LTR: دکمه جستجو راست */
[dir="rtl"] .pub-header-fixed .pub-search-header input {
    padding: 10px 18px 10px 46px;
    text-align: right;
}
[dir="rtl"] .pub-header-fixed .pub-search-header .pub-search-btn {
    left: 5px;
    right: auto;
}
[dir="ltr"] .pub-header-fixed .pub-search-header input {
    padding: 10px 46px 10px 18px;
    text-align: left;
}
[dir="ltr"] .pub-header-fixed .pub-search-header .pub-search-btn {
    right: 5px;
    left: auto;
}

/* ریسپانسیو */
@media (max-width: 900px) {
    .pub-header-fixed .pub-header-inner {
        height: 60px;
        gap: 8px;
        padding: 0 12px;
    }
    .pub-header-fixed .pub-center-group .pub-logo img {
        height: 34px;
        max-width: 100px;
    }
    .pub-header-fixed .pub-btn-login span,
    .pub-header-fixed .pub-btn-post span { display: none; }
    .pub-header-fixed .pub-btn-login,
    .pub-header-fixed .pub-btn-post { padding: 8px 10px; }
    .pub-header-fixed .pub-lang-btn .lang-name { display: none; }
    .pub-header-fixed .pub-search-header input {
        font-size: 12.5px;
        padding-left: 40px;
        padding-right: 40px;
    }
}