/* ==================== assets/css/frontend.css ==================== */
/* استایل صفحات عمومی - آبی، حرفه‌ای، ریسپانسیو */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4285f4;
    --primary-soft: #e8f0fe;
    --text: #202124;
    --text-2: #5f6368;
    --text-3: #80868b;
    --border: #e8eaed;
    --bg: #f8f9fa;
    --card: #ffffff;
    --danger: #d93025;
    --warn: #f9ab00;
    --success: #188038;
    --shadow-sm: 0 1px 3px rgba(60,64,67,.1);
    --shadow-md: 0 4px 12px rgba(60,64,67,.15);
    --shadow-lg: 0 12px 40px rgba(60,64,67,.2);
}
html, body.public-body { background: #f8f9fa; }
body.public-body {
    font-family: 'Vazirmatn', 'Yekan', Tahoma, sans-serif;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}
body.public-body[dir="ltr"] {
    font-family: 'Google Sans', 'Segoe UI', Roboto, Tahoma, sans-serif;
}
body.public-body a { text-decoration: none; color: inherit; }
body.public-body main,
body.public-body .pub-container { flex: 1 0 auto; }

.pub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

/* ============================================================
   هدر
============================================================ */
.pub-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.pub-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ✅ لوگو - اجباری دیده می‌شه */
.pub-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}
.pub-logo img {
    height: 44px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block !important;
    border-radius: 8px;
}
.pub-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
@media (max-width: 900px) {
    .pub-logo .logo-text { display: none; }
    .pub-logo img { height: 38px; max-width: 110px; }
}

/* سرچ وسط */
.pub-search {
    flex: 1;
    max-width: 560px;
    position: relative;
    margin: 0 auto;
}
.pub-search input {
    width: 100%;
    padding: 11px 48px 11px 18px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 24px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    transition: .2s;
}
body.public-body[dir="ltr"] .pub-search input {
    padding: 11px 18px 11px 48px;
}
.pub-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,115,232,.12);
}
.pub-search .pub-search-btn {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}
.pub-search .pub-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

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

/* زبان */
.pub-lang-switch {
    display: flex;
    gap: 2px;
    background: var(--bg);
    border-radius: 20px;
    padding: 3px;
}
.pub-lang-switch a {
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
    transition: .15s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.pub-lang-switch a.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* دکمه‌ها */
.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: .15s;
    white-space: nowrap;
}
.pub-btn-post:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,.35);
}
.pub-btn-login {
    background: transparent;
    border: 1.5px solid var(--border);
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: .15s;
    white-space: nowrap;
}
.pub-btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* دکمه کاربر */
.pub-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    background: var(--bg);
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-family: inherit;
    transition: .15s;
}
.pub-user-btn:hover {
    background: var(--primary-soft);
}
.pub-user-btn .pub-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.pub-user-btn .pub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pub-user-btn .pub-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 700px) {
    .pub-user-btn .pub-user-name { display: none; }
    .pub-user-btn { padding: 4px; }
}

/* منوی کاربر */
.pub-user-menu {
    position: absolute;
    top: calc(100% + 14px);
    inset-inline-end: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    min-width: 270px;
    padding: 8px 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.pub-user-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pub-user-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    inset-inline-end: 26px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,.04);
}
.pub-user-menu-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.pub-user-menu-header .pub-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.pub-user-menu-header .pub-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pub-user-menu-header .info { flex: 1; min-width: 0; }
.pub-user-menu-header .name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pub-user-menu-header .mobile {
    font-size: 12px;
    color: var(--text-2);
    direction: ltr;
    text-align: right;
}
.pub-user-menu-balance {
    padding: 10px 16px;
    background: var(--primary-soft);
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-2);
}
.pub-user-menu-balance strong {
    color: var(--primary-dark);
    font-weight: 700;
}
.pub-user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text);
    transition: .15s;
    font-size: 13.5px;
}
.pub-user-menu-item:hover {
    background: var(--bg);
    color: var(--primary);
}
.pub-user-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--text-2);
    font-size: 15px;
}
.pub-user-menu-item:hover i { color: var(--primary); }
.pub-user-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* Navbar */
.pub-navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.pub-navbar::-webkit-scrollbar { display: none; }
.pub-navbar-inner {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    max-width: 1200px;
    margin: 0 auto;
    white-space: nowrap;
}
.pub-nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--bg);
    transition: .15s;
    flex-shrink: 0;
}
.pub-nav-chip:hover,
.pub-nav-chip.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.pub-nav-chip i { font-size: 13px; }

/* Categories Bar */
.pub-catbar {
    background: linear-gradient(180deg, #fafbfc, #fff);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.pub-catbar::-webkit-scrollbar { display: none; }
.pub-catbar-inner {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
    white-space: nowrap;
}
.pub-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: .15s;
    flex-shrink: 0;
}
.pub-cat-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}
.pub-cat-chip i {
    color: var(--primary);
    font-size: 14px;
}

/* ============================================================
   استوری
============================================================ */
.pub-stories {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.pub-stories-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}
.pub-stories-inner::-webkit-scrollbar { display: none; }
.pub-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
    scroll-snap-align: start;
}
.pub-story-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    transition: .2s;
    position: relative;
}
.pub-story-item:hover .pub-story-circle { transform: scale(1.06); }
.pub-story-circle img,
.pub-story-circle .story-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}
.pub-story-circle .vip-star {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: gold;
    color: #333;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    font-weight: 700;
}
.pub-story-title {
    font-size: 11px;
    color: var(--text-2);
    max-width: 70px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pub-story-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pub-story-modal.open { display: flex; }
.pub-story-modal-content {
    max-width: 420px;
    width: 100%;
    height: 80vh;
    max-height: 780px;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}
.pub-story-progress {
    position: absolute;
    top: 10px;
    inset-inline: 10px;
    display: flex;
    gap: 4px;
    z-index: 10;
}
.pub-story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,.3);
    border-radius: 2px;
    overflow: hidden;
}
.pub-story-progress-bar .fill {
    height: 100%;
    background: #fff;
    width: 0%;
    border-radius: 2px;
}
.pub-story-progress-bar.active .fill {
    animation: pubStoryProgress 5s linear forwards;
}
@keyframes pubStoryProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}
.pub-story-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}
.pub-story-close {
    position: absolute;
    top: 18px;
    inset-inline-end: 20px;
    font-size: 28px;
    color: #fff;
    background: rgba(0,0,0,.4);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    border: none;
}
.pub-story-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 26px;
    background: rgba(0,0,0,.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    border: none;
    opacity: .8;
    transition: .2s;
}
.pub-story-nav:hover { opacity: 1; }
.pub-story-nav.prev { inset-inline-start: 10px; }
.pub-story-nav.next { inset-inline-end: 10px; }
.pub-story-caption {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    padding: 50px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: #fff;
    text-align: center;
    font-size: 14px;
}
.pub-story-caption a { color: #fff; font-weight: 600; }

/* ============================================================
   بخش‌ها و کارت آگهی افقی
============================================================ */
.pub-section { padding: 22px 0; }
.pub-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.pub-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.pub-section-title i { color: var(--primary); font-size: 18px; }
.pub-section-title.vip i { color: #f0a500; }
.pub-section-more {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pub-section-more:hover { text-decoration: underline; }

.pub-ads-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 900px) {
    .pub-ads-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .pub-ads-list { grid-template-columns: 1fr; gap: 8px; }
}

.pub-ad-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all .2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.pub-ad-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(26,115,232,.15);
    transform: translateY(-2px);
}
.pub-ad-card.vip {
    background: linear-gradient(135deg, #fffdf5, #fff);
    border-color: #ffd700;
}
.pub-ad-card.vip:hover {
    box-shadow: 0 4px 16px rgba(255,215,0,.25);
}
.pub-ad-card .pub-ad-thumb {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    position: relative;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
}
.pub-ad-card .pub-ad-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pub-ad-card .pub-ad-thumb .no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
    font-size: 28px;
}
.pub-ad-card .pub-ad-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pub-ad-card .pub-ad-name {
    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: 2px;
}
.pub-ad-card .pub-ad-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-2);
    flex-wrap: wrap;
}
.pub-ad-card .pub-ad-loc {
    display: flex;
    align-items: center;
    gap: 3px;
}
.pub-ad-card .pub-ad-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 12.5px;
}
.pub-ad-card .vip-badge {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    background: linear-gradient(135deg, #ffd700, #f0a500);
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255,215,0,.4);
}
@media (max-width: 480px) {
    .pub-ad-card .pub-ad-thumb {
        width: 68px;
        height: 68px;
        min-width: 68px;
    }
    .pub-ad-card .pub-ad-name { font-size: 12.5px; }
    .pub-ad-card .pub-ad-price { font-size: 11.5px; }
}

/* ============================================================
   صفحه آگهی تکی
============================================================ */
.pub-breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-2);
}
.pub-breadcrumb a { color: var(--primary); }
.pub-breadcrumb a:hover { text-decoration: underline; }
.pub-breadcrumb span { margin: 0 8px; opacity: .5; }

.pub-ad-detail {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.pub-ad-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 12px;
}
.pub-ad-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-2);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.pub-ad-detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pub-ad-detail-meta i { color: var(--primary); }

.pub-gallery { margin-bottom: 20px; }
.pub-gallery-main {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--bg);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}
.pub-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pub-gallery-main .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: .2s;
}
.pub-gallery-main .gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}
.pub-gallery-main .gallery-nav.prev { inset-inline-start: 12px; }
.pub-gallery-main .gallery-nav.next { inset-inline-end: 12px; }

.pub-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.pub-gallery-thumbs::-webkit-scrollbar { height: 4px; }
.pub-gallery-thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: .2s;
}
.pub-gallery-thumbs img:hover { transform: scale(1.04); }
.pub-gallery-thumbs img.active { border-color: var(--primary); }

.pub-ad-desc {
    font-size: 14.5px;
    line-height: 2;
    color: var(--text);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 20px 0;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    border-inline-start: 4px solid var(--primary);
}
.pub-ad-price-big {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin: 20px 0;
    padding: 16px;
    background: var(--primary-soft);
    border-radius: 14px;
    text-align: center;
}
.pub-ad-call {
    background: var(--bg);
    padding: 16px;
    border-radius: 14px;
    text-align: center;
    margin-top: 20px;
}
.pub-ad-call .pub-call-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: .2s;
    width: 100%;
    max-width: 300px;
    justify-content: center;
}
.pub-ad-call .pub-call-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,115,232,.3);
}
.pub-ad-call .pub-call-number {
    display: none;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    direction: ltr;
    margin-top: 8px;
    font-family: monospace;
    letter-spacing: 1px;
}
.pub-ad-call .pub-call-number a { color: var(--primary); }
.pub-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}
.pub-ad-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.pub-action-btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .15s;
}
.pub-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}
.pub-action-btn.active {
    background: var(--warn);
    border-color: var(--warn);
    color: #fff;
}
.pub-action-btn.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #fce8e6;
}
.pub-ad-media {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
}
.pub-ad-media video,
.pub-ad-media audio {
    width: 100%;
    border-radius: 10px;
    margin-top: 8px;
}
.pub-ad-media a.pub-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 10px;
    color: var(--primary);
    font-weight: 500;
    border: 1px solid var(--border);
    transition: .15s;
}
.pub-ad-media a.pub-pdf-link:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

/* ============================================================
   صفحه داخلی عمومی
============================================================ */
.pub-page-header {
    padding: 20px 0;
    margin-bottom: 4px;
}
.pub-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.pub-page-title i { color: var(--primary); }
.pub-page-subtitle {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 4px;
}
.pub-empty {
    background: #fff;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-2);
}
.pub-empty i {
    font-size: 60px;
    opacity: .25;
    display: block;
    margin-bottom: 16px;
}
.pub-empty h3 {
    font-size: 17px;
    color: var(--text);
    margin-bottom: 8px;
}
.pub-static {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    line-height: 2;
    font-size: 14.5px;
    color: var(--text);
}
.pub-static h1,
.pub-static h2 {
    color: var(--text);
    margin: 24px 0 12px;
    font-size: 20px;
}
.pub-static h1:first-child,
.pub-static h2:first-child {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.pub-static p { margin-bottom: 12px; }

/* ============================================================
   فوتر - چسبیده به پایین، بدون فضای خالی
============================================================ */
.pub-footer {
    background: #1a1a2e;
    color: #fff;
    margin-top: auto;
    padding: 40px 0 20px;
    font-size: 13px;
    flex-shrink: 0;
}
.pub-footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.pub-footer h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-footer h4 i { color: var(--primary-light); }
.pub-footer p {
    line-height: 1.9;
    color: #b8b8c8;
    font-size: 12.5px;
}
.pub-footer ul {
    list-style: none;
    padding: 0;
}
.pub-footer li { margin-bottom: 10px; }
.pub-footer li a {
    color: #b8b8c8;
    transition: .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pub-footer li a i { color: var(--primary-light); font-size: 12px; }
.pub-footer li a:hover {
    color: #fff;
    padding-inline-start: 4px;
}
.pub-footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #2a2a44;
    font-size: 12px;
    color: #888;
}
.pub-footer-bottom a { color: #aaa; margin: 0 6px; }
.pub-footer-bottom a:hover { color: var(--primary-light); }
@media (max-width: 768px) {
    .pub-footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ============================================================
   Bottom Nav - حرفه‌ای و مدرن (موبایل)
============================================================ */
.pub-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    z-index: 998;
    box-shadow: 0 -2px 16px rgba(0,0,0,.08);
}
.pub-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-2);
    transition: .2s;
    padding: 6px 8px;
    flex: 1;
    position: relative;
    border-radius: 12px;
    max-width: 90px;
}
.pub-bottom-nav a i {
    font-size: 20px;
    transition: .2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.pub-bottom-nav a.active {
    color: var(--primary);
    font-weight: 600;
}
.pub-bottom-nav a.active i {
    background: var(--primary-soft);
    transform: scale(1.05);
}
.pub-bottom-nav a:not(.active):active i {
    background: var(--bg);
}
.pub-bottom-nav a .badge-nav {
    position: absolute;
    top: 2px;
    inset-inline-end: 20%;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}
/* دکمه وسطی پست آگهی */
.pub-bottom-nav a.nav-center {
    position: relative;
    top: -14px;
}
.pub-bottom-nav a.nav-center i {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff !important;
    font-size: 22px;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(26,115,232,.4);
    border: 4px solid #fff;
}
.pub-bottom-nav a.nav-center.active i,
.pub-bottom-nav a.nav-center:active i {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: scale(1.05);
}
.pub-bottom-nav a.nav-center span { display: none; }

@media (max-width: 900px) {
    .pub-bottom-nav { display: flex; }
    body.public-body { padding-bottom: 78px; }
}

/* Scroll Top */
.pub-scroll-top {
    position: fixed;
    bottom: 90px;
    inset-inline-end: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(26,115,232,.35);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .3s;
}
.pub-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pub-scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}
@media (max-width: 900px) {
    .pub-scroll-top { bottom: 90px; inset-inline-end: 12px; }
}

/* پیام سراسری */
.pub-admin-msg {
    background: #fff3cd;
    padding: 12px 16px;
    text-align: center;
    font-size: 13.5px;
    color: #7a5a00;
    border-bottom: 2px solid #ffc107;
}
.pub-admin-msg i {
    color: #ffc107;
    margin-inline-end: 8px;
}

/* رسپانسیو */
@media (max-width: 900px) {
    .pub-header-inner { height: 60px; gap: 10px; padding: 0 12px; }
    .pub-search { max-width: 100%; }
    .pub-search input { padding: 10px 40px 10px 14px; font-size: 13px; }
    .pub-lang-switch { display: none; }
    .pub-btn-post { padding: 7px 12px; font-size: 12px; }
    .pub-btn-post span { display: none; }
    .pub-btn-login span { display: none; }
    .pub-navbar-inner, .pub-catbar-inner { padding: 8px 12px; }
    .pub-nav-chip, .pub-cat-chip { padding: 7px 12px; font-size: 12px; }
    .pub-section-header { margin-bottom: 14px; }
    .pub-section-title { font-size: 15.5px; }
    .pub-ad-detail { padding: 18px; }
    .pub-ad-detail-title { font-size: 18px; }
    .pub-story-circle { width: 58px; height: 58px; }
    .pub-story-title { max-width: 60px; font-size: 10.5px; }
}
@media (max-width: 480px) {
    .pub-container { padding: 0 12px; }
    .pub-ad-detail { padding: 14px; border-radius: 14px; }
    .pub-ad-detail-title { font-size: 16px; }
    .pub-ad-desc { font-size: 13.5px; padding: 12px; }
    .pub-ad-price-big { font-size: 20px; padding: 12px; }
}