/* =====================================================================
   Webides.ir — سیستم طراحی
   موتیف: «مهرِ تایید» بازار محلی — فیروزه‌ای کاشی‌کاری + زعفرانی گرم
   ===================================================================== */

@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
    /* هویت رنگی: فیروزه‌ای کاشی‌کاری (اصلی) + زعفرانی (تاکید گرم) */
    --ink: #0e2a2b;          /* متن تیره اصلی */
    --teal-900: #0a3d3f;     /* سرمه‌ای-فیروزه‌ای تیره: هدر/فوتر/هیرو */
    --teal-800: #0f4c4e;
    --teal-600: #147b7d;     /* فیروزه‌ای اصلی: دکمه/لینک */
    --teal-500: #1a969a;     /* فیروزه‌ای روشن‌تر: هاور */
    --saffron: #e8a33d;      /* زعفرانی: تاکید گرم، بج ویژه، مهر تایید */
    --saffron-dark: #c9832a;
    --clay: #d9704f;         /* اخطار/رد ملایم‌تر، گرم */
    --paper: #f3f6f5;        /* پس‌زمینه صفحه (خنک، نه کرم) */
    --card: #ffffff;
    --muted: #5f7877;
    --border: #dfe8e7;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(10,61,63,.08);
    --shadow-md: 0 10px 30px rgba(10,61,63,.12);
    --ease: cubic-bezier(.22,.68,0,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: var(--paper);
    margin: 0;
    color: var(--ink);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { margin-top: 0; font-weight: 800; }
::selection { background: var(--saffron); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ===== سیگنیچر: مهر تایید (Stamp) ===== */
.stamp {
    display: inline-flex; align-items: center; justify-content: center;
    width: 58px; height: 58px; border-radius: 50%;
    border: 2px dashed var(--saffron);
    color: var(--saffron);
    font-weight: 800; font-size: 11px; text-align: center; line-height: 1.3;
    transform: rotate(-12deg);
    background: rgba(232,163,61,.08);
    flex-shrink: 0;
}
.badge-featured {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--saffron); color: var(--teal-900);
    font-size: 11px; font-weight: 800; padding: 3px 10px 3px 8px;
    border-radius: 20px; margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(232,163,61,.4);
}
.badge-featured::before { content: '★'; font-size: 10px; }

/* ===== Announcement bar ===== */
.announcement-bar {
    background: var(--saffron);
    background-size: 300% 300%;
    color: var(--teal-900);
    font-size: 13px;
    text-align: center;
    padding: 9px 25px;
    letter-spacing: .3px;
    position: relative;
    overflow: hidden;
    animation: gradientMove 8s ease infinite;
}
/* نور متحرک */
.announcement-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,.35),
        transparent
    );
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}
/* حرکت گرادیان */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
/* حرکت نور */
@keyframes shine {
    0% {
        left: -120%;
    }
    100% {
        left: 160%;
    }
}

/* ===== Header ===== */
.site-header { background: var(--teal-900); color: #fff; position: relative; z-index: 20; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px;
    gap: 14px;
}
.logo {
    font-size: 22px; font-weight: 900; color: #fff; order: 3;
    display: flex; align-items: center; gap: 8px; letter-spacing: -.3px;
}
.logo::before {
    content: '';
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--saffron);
    box-shadow: 0 0 0 4px rgba(232,163,61,.25);
}
.header-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 30px;
    padding: 7px 14px;
    order: 2;
    transition: background .2s var(--ease);
}
.header-search:focus-within { background: rgba(255,255,255,.14); }
.header-search input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    width: 150px;
}
.header-search input:focus { outline: none; }
.header-search input::placeholder { color: #a9c4c2; }
.header-search button { background: none; border: none; color: #fff; cursor: pointer; display: flex; }

.main-nav { display: flex; align-items: center; gap: 2px; order: 1; flex-wrap: wrap; }
.main-nav a {
    color: #cfe6e4;
    padding: 9px 13px;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 20px;
    transition: .18s var(--ease);
}
.main-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }

.header-auth { display: flex; align-items: center; gap: 12px; order: 0; }
.btn-submit-ad {
    background: var(--saffron);
    color: var(--teal-900) !important;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(232,163,61,.35);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn-submit-ad:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(232,163,61,.45); }
.header-auth .auth-link {
    color: #cfe6e4;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.header-auth .auth-link:hover { color: #fff; }

/* ===== Hero ===== */
.hero {
    background:
        radial-gradient(ellipse at 15% 20%, rgba(232,163,61,.14), transparent 45%),
        linear-gradient(160deg, var(--teal-900) 0%, var(--teal-800) 55%, var(--teal-600) 130%);
    color: #fff;
    padding: 64px 16px 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    /* بافت هندسی ظریف الهام‌گرفته از کاشی‌کاری، انتزاعی و کم‌رنگ */
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%),
        linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%);
    background-size: 46px 46px;
    background-position: 0 0, 23px 23px;
    opacity: .5;
    pointer-events: none;
}
.hero .stamp {
    position: absolute; top: 26px; left: 5%;
    width: 84px; height: 84px; font-size: 13px;
    display: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero .eyebrow {
    display: inline-block; color: var(--saffron); font-size: 13px; font-weight: 700;
    letter-spacing: 1.5px; margin-bottom: 14px;
    animation: fadeUp .6s var(--ease) both;
}
.hero h1 {
    font-size: clamp(26px, 4vw, 38px); margin-bottom: 10px; font-weight: 900;
    letter-spacing: -.5px; line-height: 1.35;
    animation: fadeUp .6s .05s var(--ease) both;
}
.hero p.subtitle {
    color: #cfe6e4; margin-bottom: 34px; font-size: 15.5px;
    animation: fadeUp .6s .1s var(--ease) both;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.hero-search {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(6,30,31,.35);
    animation: fadeUp .6s .15s var(--ease) both;
}
.hero-search input, .hero-search select {
    border: none;
    padding: 16px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    background: #fff;
}
.hero-search input { flex: 1; }
.hero-search select { border-right: 1px dashed var(--border); color: var(--muted); position: relative; }
.hero-search button {
    background: var(--teal-600);
    color: #fff;
    border: none;
    padding: 0 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .18s var(--ease);
}
.hero-search button:hover { background: var(--teal-500); }

.hero-categories { max-width: 940px; margin: 46px auto 0; animation: fadeUp .6s .2s var(--ease) both; }
.hero-categories .label {
    color: #a9c4c2; font-size: 12.5px; margin-bottom: 20px;
    text-transform: none; letter-spacing: .3px;
}
.hero-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 20px;
}
.hero-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    color: #eafaf9;
    font-size: 12.5px;
    font-weight: 500;
}
.hero-cat-item .icon-circle {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    display: flex; align-items: center; justify-content: center;
    transition: .22s var(--ease);
}
.hero-cat-item svg { width: 24px; height: 24px; color: #fff; transition: transform .22s var(--ease); }
.hero-cat-item:hover .icon-circle { background: var(--saffron); border-color: var(--saffron); transform: translateY(-4px); }
.hero-cat-item:hover svg { transform: scale(1.1); }

/* لبه دندانه‌ای (پرفوریشن بلیط) به‌جای موج ساده */
.wave-divider { position: relative; margin-top: -34px; height: 34px; z-index: 1; }
.wave-divider svg { display: block; width: 100%; height: 100%; }

/* ===== Section titles ===== */
.section-title { text-align: center; margin: 6px 0 34px; }
.section-title .eyebrow {
    display: block; color: var(--saffron-dark); font-size: 12.5px; font-weight: 700;
    letter-spacing: 1.5px; margin-bottom: 8px;
}
.section-title h2 { font-size: 24px; position: relative; display: inline-block; padding-bottom: 12px; }
.section-title h2::after {
    content: '';
    position: absolute; bottom: 0; right: 50%; transform: translateX(50%);
    width: 40px; height: 4px; background: var(--saffron); border-radius: 3px;
}
.subsection-title {
    font-size: 17px; font-weight: 800; margin: 28px 0 18px;
    display: flex; align-items: center; gap: 10px;
}
.subsection-title::before { content: ''; width: 4px; height: 18px; background: var(--teal-600); border-radius: 3px; }

.main-content { padding: 24px 16px 60px; min-height: 40vh; }

.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert-success { background: #dcf3ec; color: #0d5e46; }
.alert-danger { background: #fbe4de; color: #8a3319; }
.alert-info { background: #dcf0f3; color: #0d5763; }

/* ===== Category cards (non-hero pages) ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
.category-card {
    background: var(--card);
    padding: 22px 10px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
    font-size: 13.5px;
    transition: .22s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}
.category-card svg { width: 26px; height: 26px; color: var(--teal-600); }
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border); }

/* ===== Ad cards (موتیف بلیط: دندانه‌های پرفوریشن) ===== */
.ads-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.ad-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
    opacity: 0; transform: translateY(16px);
    animation: fadeUp .5s var(--ease) forwards;
}
.ad-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.ad-card .img-wrap { position: relative; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.ad-card img { width: 100%; height: 168px; object-fit: cover; background: #eef3f2; display: block; transition: transform .4s var(--ease); }
.ad-card:hover img { transform: scale(1.05); }
.ad-time-badge {
    position: absolute; top: 10px; right: 10px;
    background: rgba(10,61,63,.85); color: #fff;
    font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 500;
}
/* دندانه پرفوریشن بین عکس و بدنه کارت، مثل ته بلیط */
.ad-card .perforation {
    position: relative; height: 0; overflow: visible;
}
.ad-card .perforation::before {
    content: '';
    position: absolute; top: -1px; right: 0; left: 0; height: 1px;
    background-image: linear-gradient(to left, var(--border) 50%, transparent 0%);
    background-size: 10px 1px;
}
.ad-card .ad-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.ad-card .ad-cat {
    font-size: 11px; color: var(--teal-600); margin-bottom: 5px; font-weight: 700;
    letter-spacing: .3px;
}
.ad-card h3 { font-size: 15px; margin: 0 0 8px; line-height: 1.5; font-weight: 700; }
.ad-card .price { color: var(--saffron-dark); font-weight: 800; margin-top: auto; font-size: 14.5px; }
.ad-card .meta { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 4px; }

/* ===== Forms ===== */
.form-box {
    background: var(--card);
    padding: 26px;
    border-radius: var(--radius);
    max-width: 560px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}
.form-box.wide { max-width: 800px; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
    color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(26,150,154,.14);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.btn {
    display: inline-block;
    background: var(--teal-600);
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--teal-500); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,123,125,.3); }
.btn-cyan { background: var(--saffron); color: var(--teal-900); }
.btn-cyan:hover { background: var(--saffron-dark); box-shadow: 0 6px 16px rgba(232,163,61,.35); }
.btn-danger { background: var(--clay); }
.btn-danger:hover { background: #c05e3f; }
.btn-secondary { background: #9db3b1; }
.btn-secondary:hover { background: #8aa19f; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 20px; }

/* ===== Post-ad page (submit-ad) ===== */
.postad-wrap { max-width: 1100px; margin: 0 auto; }
.breadcrumb-bar {
    background: var(--card); border-radius: var(--radius); padding: 15px 18px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; font-size: 13px; color: var(--muted);
    box-shadow: var(--shadow-sm);
}
.breadcrumb-bar a { color: var(--muted); }
.breadcrumb-bar a:hover { color: var(--teal-600); }

.postad-grid {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 800px) { .postad-grid { grid-template-columns: 1fr; } }

.postad-box {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.postad-box h3 {
    font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 7px; font-weight: 800;
}
.postad-box h3 svg { width: 16px; height: 16px; color: var(--teal-600); }
.postad-hint { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.8; }

.photo-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-upload-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    aspect-ratio: 1/1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; color: var(--muted); font-size: 12px; cursor: pointer;
    position: relative; overflow: hidden; background: #fafcfc;
    transition: .18s var(--ease);
}
.photo-upload-box:hover { border-color: var(--teal-500); color: var(--teal-600); background: #f1f8f8; }
.photo-upload-box svg { width: 22px; height: 22px; }
.photo-upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-upload-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.existing-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.existing-photos .thumb { position: relative; width: 90px; }
.existing-photos img { width: 90px; height: 72px; object-fit: cover; border-radius: 6px; }
.existing-photos a.remove { display: block; text-align: center; font-size: 11px; color: var(--clay); margin-top: 3px; }

.map-box { border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--border); height: 220px; }
.map-search-input { position: relative; margin-bottom: 12px; }
.map-search-input input { width: 100%; padding: 11px 36px 11px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; }
.map-search-input svg { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

.checkbox-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); }
.checkbox-line a { color: var(--teal-600); font-weight: 600; }

.postad-submit-row { text-align: left; margin-top: 8px; }
.postad-submit-row .btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; }

/* ===== Admin (آرام و کاربردی) ===== */
table.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius-sm); overflow: hidden; }
table.admin-table th, table.admin-table td {
    padding: 11px 13px; border-bottom: 1px solid var(--border); text-align: right; font-size: 13px;
}
table.admin-table th { background: #eef4f3; font-weight: 700; }
table.admin-table tr:hover td { background: #fafcfc; }

.admin-layout { display: flex; gap: 20px; }
.admin-sidebar { width: 210px; background: var(--card); border-radius: var(--radius); padding: 16px; height: fit-content; box-shadow: var(--shadow-sm); }
.admin-sidebar a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 13.5px; font-weight: 500; transition: .15s; }
.admin-sidebar a:hover { background: #eef4f3; }
.admin-sidebar a.active-admin-link { background: var(--teal-600); color: #fff; }
.admin-content { flex: 1; min-width: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-box { background: var(--card); padding: 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow-sm); border-top: 3px solid var(--saffron); }
.stat-box .num { font-size: 28px; font-weight: 900; color: var(--teal-800); }

.status-pending { color: var(--saffron-dark); font-weight: 700; }
.status-approved { color: var(--teal-600); font-weight: 700; }
.status-rejected { color: var(--clay); font-weight: 700; }
.status-expired { color: var(--muted); font-weight: 700; }
.status-confirmed { color: var(--teal-600); font-weight: 700; }

.ad-detail-images img { max-width: 100%; border-radius: var(--radius); margin-bottom: 10px; }
.card-info-box {
    background: #fdf4e4;
    border: 1.5px dashed var(--saffron);
    padding: 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--teal-900);
    color: #bcdbd8;
    padding: 54px 0 20px;
    font-size: 13px;
    position: relative;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; font-weight: 800; }
.footer-news-item { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.footer-news-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }
.footer-news-item .t { font-size: 12.5px; line-height: 1.6; }
.footer-news-item .date { font-size: 11px; color: #7fa19d; }
.footer-contact-box { background: rgba(255,255,255,.06); border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 10px; font-size: 12.5px; }
.footer-stat-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.footer-stat-row b { color: var(--saffron); font-size: 14px; }
.footer-bottom { text-align: center; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; }

.pagination { margin-top: 20px; text-align: center; }
.pagination a, .pagination span {
    display: inline-block; padding: 7px 14px; margin: 0 3px; background: var(--card);
    border-radius: 20px; font-size: 13px; transition: .15s;
}
.pagination a:hover { background: #eef4f3; }
.pagination .current { background: var(--teal-600); color: #fff; }

/* ===== Banner slots ===== */
.banner-slot { margin: 30px 0; }
.banner-slot .banner-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; color: var(--muted); font-weight: 700;
    letter-spacing: .5px; margin-bottom: 10px;
}
.banner-slot .banner-label::before, .banner-slot .banner-label::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.banner-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
/* وقتی فقط یک بنر هست، تمام عرض و با ارتفاع متناسب نمایش داده می‌شود */
.banner-track.single { grid-template-columns: 1fr; }
.banner-item {
    display: block; position: relative;
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.banner-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.banner-track.single .banner-item img { width: 100%; height: clamp(120px, 22vw, 220px); object-fit: cover; display: block; }
.banner-track:not(.single) .banner-item img { width: 100%; height: 160px; object-fit: cover; display: block; }
.banner-item .banner-sponsored-tag {
    position: absolute; top: 10px; left: 10px;
    background: rgba(10,42,43,.75); color: #fff; font-size: 10.5px; font-weight: 700;
    padding: 3px 10px; border-radius: 20px; letter-spacing: .3px;
}
.banner-slot.home-top { margin-top: -50px; position: relative; z-index: 2; }
.banner-slot.home-top .banner-label { display: none; }
.banner-slot.home-top .banner-item { box-shadow: var(--shadow-md); border: none; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== محتوای غنی صفحه درباره ما (خروجی ادیتور Quill) ===== */
.about-rich-content h2, .about-rich-content h3 { color: var(--ink); margin: 20px 0 10px; }
.about-rich-content p { margin: 0 0 14px; }
.about-rich-content ul, .about-rich-content ol { margin: 0 0 14px; padding-right: 22px; }
.about-rich-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }
.about-rich-content a { color: var(--teal-600); text-decoration: underline; }

/* ===== نوار پایین ناوبری (اپ‌مانند، فقط موبایل) ===== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; right: 0; left: 0; z-index: 50;
    background: #fff;
    box-shadow: 0 -2px 14px rgba(10,42,43,.1);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-between;
    align-items: flex-end;
}
.bn-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--muted); font-size: 10.5px; padding: 5px 2px; border-radius: 10px;
    transition: color .15s;
}
.bn-item svg { width: 21px; height: 21px; }
.bn-item.active { color: var(--teal-600); font-weight: 700; }
.bn-add { margin-top: -22px; }
.bn-add-circle {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--saffron); color: var(--teal-900);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(232,163,61,.5);
    margin-bottom: 2px; border: 3px solid #fff;
}
.bn-add-circle svg { width: 22px; height: 22px; }
.bn-add span:last-child { color: var(--ink); font-weight: 700; }

@media (max-width: 760px) {
    .bottom-nav { display: flex; }
    body { padding-bottom: 64px; }
    .site-footer { padding-bottom: 78px; }

    /* چیدمان لیستی افقی برای کارت آگهی در موبایل (شبیه فید اپ) */
    .ads-list { grid-template-columns: 1fr; gap: 12px; }
    .ad-card { flex-direction: row; align-items: stretch; }
    .ad-card .img-wrap { width: 118px; flex-shrink: 0; border-radius: var(--radius) 0 0 var(--radius); }
    .ad-card img { height: 100%; min-height: 108px; }
    .ad-card .perforation { display: none; }
    .ad-card .ad-body { padding: 10px 12px; }
    .ad-card h3 { font-size: 13.5px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .ad-card .price { font-size: 13px; }
    .ad-card .meta { font-size: 11px; margin-top: 5px; }

    .hero { padding: 44px 16px 90px; }
    .hero h1 { font-size: 22px; }
}

/* ===== Ad detail page ===== */
.ad-detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; max-width: 1100px; margin: 0 auto; align-items: start; }
@media (max-width: 850px) { .ad-detail-grid { grid-template-columns: 1fr; } .ad-side-col { order: 2; } .ad-main-col { order: 1; } }

.ad-owner-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ad-owner-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--paper);
    display: flex; align-items: center; justify-content: center; color: var(--teal-600); flex-shrink: 0;
}
.ad-info-row {
    display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink);
    padding: 10px 0; border-top: 1px dashed var(--border);
}
.ad-info-row svg { color: var(--teal-600); flex-shrink: 0; }
.phone-row { flex-wrap: wrap; }
#showPhoneBtn { border-radius: 20px; }

.ad-meta-row { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.ad-meta-row:last-child { border-bottom: none; }
.ad-meta-row b { color: var(--ink); font-weight: 700; }

.related-ad-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.related-ad-item:last-child { border-bottom: none; }
.related-ad-item img { width: 56px; height: 46px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--paper); }
.related-ad-item span { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.related-ad-item small { color: var(--muted); font-size: 11px; }

.ad-gallery-main { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.ad-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ad-gallery-thumbs img { width: 70px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .7; transition: .15s; border: 2px solid transparent; }
.ad-gallery-thumbs img:hover { opacity: 1; border-color: var(--teal-500); }

.ad-action-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ad-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--paper); border: 1px solid var(--border); color: var(--ink);
    padding: 8px 14px; border-radius: 20px; font-size: 12.5px; font-family: inherit; cursor: pointer;
    transition: .15s;
}
.ad-action-btn:hover { background: #eaf2f1; }
.ad-action-btn.active { background: var(--saffron); border-color: var(--saffron); color: var(--teal-900); font-weight: 700; }

.ad-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.ad-title-row h2 { font-size: 21px; margin: 0; flex: 1; min-width: 200px; }
.ad-vote-box { display: flex; gap: 6px; }
.vote-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--paper); border: 1px solid var(--border); color: var(--muted);
    padding: 6px 11px; border-radius: 20px; font-size: 12px; font-family: inherit; cursor: pointer; transition: .15s;
}
.vote-btn:hover { border-color: var(--teal-500); color: var(--teal-600); }
.vote-btn.active { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }

.ad-price-big { font-size: 22px; font-weight: 900; color: var(--saffron-dark); margin: 14px 0 0; }

.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(10,42,43,.55);
    align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-box { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 420px; width: 100%; box-shadow: var(--shadow-md); }
.modal-box h3 { margin-bottom: 16px; }
