/* ==========================================================================
   استایل سایت — هویت بصری صفحه‌ی «به‌زودی»
   شب کوهستان، خطوط تراز متحرک، سبز فیروزه‌ای، طلایی برای تأکید.
   بدون هیچ فریم‌ورک CSS. فهرست بخش‌ها:
     ۱. توکن‌ها          ۶. کارت‌های مسیر       ۱۱. گالری و نظرها
     ۲. پایه              ۷. صفحه‌بندی و دکمه    ۱۲. رنگ سطح سختی
     ۳. پس‌زمینه          ۸. سربرگ صفحه‌ی مسیر   ۱۳. فوتر
     ۴. هدر               ۹. پنل‌ها و نقشه        ۱۴. انیمیشن‌ها
     ۵. بخش معرفی و آمار  ۱۰. نمودار ارتفاع       ۱۵. موبایل
   ========================================================================== */

/* --- ۱. توکن‌های رنگ -------------------------------------------------------
   دقیقاً همان مقادیر صفحه‌ی «به‌زودی». برای تغییر ظاهر کل سایت فقط همین‌جا. */
:root {
    --bg:          #060b12;   /* آسمان شب */
    --ink:         #eaf3f7;   /* متن اصلی */
    --muted:       #8ba1b0;   /* متن کم‌رنگ‌تر */
    --dim:         #5d7385;   /* برچسب‌ها */
    --accent:      #2dd4a7;   /* سبز فیروزه‌ای — رنگ اصلی برند */
    --accent-2:    #38bdf8;   /* آبی */
    --gold:        #f5c45e;   /* طلایی */
    --line:        rgba(141, 177, 196, .14);
    --card:        rgba(12, 26, 38, .55);
    --card-strong: rgba(12, 26, 38, .78);

    --radius: 18px;
    --page-max-width: 1200px;
    --font-latin: Montserrat, Vazirmatn, system-ui, sans-serif;
}

/* --- ۲. پایه --------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    font-weight: 300;
    line-height: 1.9;
    background: var(--bg);
    color: var(--ink);
    min-height: 100dvh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img { max-width: 100%; }
strong, b { font-weight: 700; }

.container {
    width: 100%;
    max-width: var(--page-max-width);
    margin-inline: auto;
    padding-inline: 16px;
}

.page-content { flex: 1; padding-bottom: 40px; }

/* --- ۳. پس‌زمینه‌ی ثابت ---------------------------------------------------
   position:fixed یعنی موقع اسکرول ثابت می‌ماند و محتوا رویش حرکت می‌کند. */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.sky {
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 80% at 78% 8%,   rgba(56, 189, 248, .13) 0%, transparent 55%),
        radial-gradient(90% 70%  at 18% 0%,   rgba(45, 212, 167, .11) 0%, transparent 60%),
        radial-gradient(140% 110% at 50% 100%, #0d1c2a 0%, var(--bg) 62%);
}

/* دانه‌ی ریز روی آسمان — حس «فیلم» و عمق */
.grain {
    position: absolute; inset: 0; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: screen;
}

/* خطوط تراز که خیلی آرام جابه‌جا می‌شوند */
.topo { position: absolute; inset: -8% -10%; opacity: .13; animation: drift 46s ease-in-out infinite alternate; }

.site-header, main, .site-footer { position: relative; z-index: 1; }

/* --- ۴. هدر --------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(6, 11, 18, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding-block: 12px;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }

.brand-mark {
    width: 54px; height: 54px; flex: 0 0 auto;
    filter: drop-shadow(0 6px 22px rgba(45, 212, 167, .32));
    transition: transform .3s ease;
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }

.brand-names { display: flex; flex-direction: column; line-height: 1.25; }

/* نام انگلیسی: درشت، با فاصله‌ی حروف، گرادیان سفید به آبی کم‌رنگ */
.brand-en {
    direction: ltr; text-align: right;
    font-family: var(--font-latin);
    font-weight: 800;
    font-size: clamp(1.05rem, 2.6vw, 1.45rem);
    letter-spacing: .12em;
    background: linear-gradient(180deg, #ffffff 0%, #b9d6e4 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* نام فارسی: ریز، زیرش */
.brand-fa { font-size: .74rem; font-weight: 400; color: var(--accent); opacity: .85; margin-top: 3px; }

.main-nav { display: flex; gap: 6px; }
.main-nav a {
    color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
    padding: 7px 16px; border-radius: 999px; border: 1px solid transparent;
    transition: color .2s, border-color .2s, background .2s;
}
.main-nav a:hover { color: var(--accent); border-color: rgba(45, 212, 167, .3); background: rgba(45, 212, 167, .07); }

/* --- ۵. بخش معرفی (فقط صفحه‌ی اصلی) --------------------------------------
   کوه‌ها پایین این بخش هستند و محتوا بالای آن‌ها. */
.hero {
    position: relative;
    margin-inline: calc(50% - 50vw);          /* تمام‌عرض، حتی داخل container */
    /* فاصله‌ی پایین باید از قله‌ها بلندتر باشد تا کارت‌های آمار روی کوه نیفتند */
    padding: clamp(40px, 7vw, 76px) 16px clamp(250px, 32vw, 430px);   /* = ارتفاع کوه‌ها */
    text-align: center;
    overflow: hidden;
}

.hero-mountains {
    position: absolute; left: 0; right: 0; bottom: 0;
    width: 100%; height: clamp(250px, 32vw, 430px);
    z-index: 0;
}

/* محو شدن پایین کوه‌ها به رنگ پس‌زمینه تا مرز تیزی نماند */
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
    background: linear-gradient(180deg, transparent, var(--bg));
    z-index: 0;
}

.hero-content {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center;
    gap: clamp(18px, 3vh, 30px);
}

.hero-mark { width: clamp(78px, 11vw, 104px); height: auto; filter: drop-shadow(0 6px 26px rgba(45, 212, 167, .3)); }

.hero-title { display: flex; flex-direction: column; align-items: center; gap: .35rem; line-height: 1.15; }

.hero-title-en {
    direction: ltr;
    font-family: var(--font-latin);
    font-weight: 800;
    font-size: clamp(2.1rem, 7.4vw, 4.4rem);
    letter-spacing: .06em;
    background: linear-gradient(180deg, #ffffff 0%, #b9d6e4 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-title-fa {
    font-size: clamp(.95rem, 2.8vw, 1.25rem);
    font-weight: 500;
    color: var(--accent);
    letter-spacing: .01em;
}

.lead {
    max-width: 36rem;
    font-size: clamp(1rem, 3vw, 1.15rem);
    line-height: 2.05; color: var(--muted);
}
.lead strong { color: var(--ink); font-weight: 500; }

.rule { display: block; width: min(460px, 80vw); height: 26px; }

/* کارت‌های آمار — هم در صفحه‌ی اصلی و هم در صفحه‌ی مسیر */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: clamp(10px, 2vw, 16px);
    width: min(760px, 100%);
}

.stat {
    padding: clamp(14px, 2.6vw, 20px) clamp(8px, 2vw, 14px);
    border: 1px solid var(--line); border-radius: 16px;
    background: var(--card);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    text-align: center;
}
.stat b {
    display: block;
    font-size: clamp(1.3rem, 4.2vw, 1.75rem);
    font-weight: 700; line-height: 1.35; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.stat b i { font-style: normal; color: var(--accent); font-weight: 500; font-size: .6em; }
.stat b.stat-text { font-size: clamp(1rem, 3vw, 1.15rem); line-height: 1.9; }
.stat span { display: block; margin-top: .3rem; font-size: .82rem; color: var(--dim); }

.section-heading {
    display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
    gap: 6px 16px; margin: 8px 0 20px;
}
.section-heading h2 { font-size: clamp(1.3rem, 3.6vw, 1.7rem); font-weight: 900; }
.section-heading p { color: var(--dim); font-size: .9rem; }

/* --- ۶. کارت‌های مسیر ----------------------------------------------------
   auto-fill + minmax: هر کارت حداقل ۲۵۰ پیکسل؛ مرورگر خودش تعداد ستون را تعیین می‌کند. */
.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.track-card {
    display: flex; flex-direction: column; height: 100%;
    color: inherit; text-decoration: none;
    background: var(--card);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.track-card:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 212, 167, .42);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .4), 0 0 0 1px rgba(45, 212, 167, .12);
}

.track-photo {
    position: relative; height: 180px; flex: 0 0 auto; overflow: hidden;
    background: linear-gradient(160deg, rgba(56, 189, 248, .08), rgba(45, 212, 167, .05));
}

/* عکس دقیقاً روی نشان کوه قرار می‌گیرد و کل کادر را می‌پوشاند */
.track-photo img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .5s ease;
}
.track-card:hover .track-photo img { transform: scale(1.05); }

/* وقتی عکس نیست: نیم‌رخ کوه کم‌رنگ */
.track-photo-placeholder { position: absolute; inset: 0; }
.track-photo-placeholder::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 60px; height: 38px;
    background: var(--accent); opacity: .18;
    clip-path: polygon(0 100%, 32% 34%, 50% 60%, 68% 12%, 100% 100%);
}

/* برچسب دسته روی عکس */
.track-category {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    font-size: .74rem; font-weight: 500; color: var(--accent);
    padding: 3px 11px; border-radius: 999px;
    background: rgba(6, 11, 18, .72);
    border: 1px solid rgba(45, 212, 167, .3);
    backdrop-filter: blur(6px);
}

.track-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.track-name  { font-size: 1.02rem; font-weight: 700; line-height: 1.7; color: var(--ink); }
.track-place { font-size: .86rem; color: var(--muted); }

/* متن‌های خیلی بلند (مثلاً مسیری که نام همه‌ی استان‌ها را نوشته) حداکثر ۲ خط؛ بقیه «…» */
.track-name, .track-place {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden;
}

.track-facts { display: flex; gap: 18px; margin-top: auto; padding-top: 6px; }
.track-facts dt { font-size: .72rem; color: var(--dim); }
.track-facts dd { font-size: .98rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.track-facts dd small { font-size: .72rem; color: var(--muted); font-weight: 300; }

.track-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px; border-top: 1px solid var(--line);
    font-size: .8rem; color: var(--dim);
}
.track-more { color: var(--accent); opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; }
.track-card:hover .track-more { opacity: 1; transform: none; }

/* --- ۷. صفحه‌بندی و دکمه‌ها ---------------------------------------------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 34px; flex-wrap: wrap; }
.pager-link {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
    color: var(--muted); text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums;
    transition: border-color .2s, color .2s, background .2s;
}
.pager-link:hover { color: var(--accent); border-color: rgba(45, 212, 167, .4); }
.pager-link.is-current { color: #03261d; background: var(--accent); border-color: var(--accent); }
.pager-gap { color: var(--dim); padding: 0 4px; }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 20px; border-radius: 12px;
    font: inherit; font-size: .92rem; font-weight: 500;
    color: var(--ink); text-decoration: none; cursor: pointer;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    transition: border-color .2s, background .2s, transform .2s;
}
.button:hover { border-color: rgba(45, 212, 167, .4); background: rgba(45, 212, 167, .07); transform: translateY(-1px); }

.button-primary {
    width: 100%; padding-block: 12px;
    color: #03261d; font-weight: 700;
    background: linear-gradient(135deg, #2dd4a7, #38bdf8);
    border: 0;
}
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.alert {
    background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .35);
    color: #fecaca; border-radius: var(--radius); padding: 16px 20px; margin-block: 20px;
}
.empty-state { color: var(--muted); padding: 40px 0; text-align: center; }

/* --- ۸. سربرگ صفحه‌ی مسیر ------------------------------------------------ */
.breadcrumb { display: flex; gap: 8px; align-items: center; padding-top: 24px; font-size: .86rem; color: var(--dim); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.track-header { padding: 18px 0 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .34rem 1rem .34rem .8rem;
    border: 1px solid rgba(45, 212, 167, .32); border-radius: 999px;
    background: rgba(45, 212, 167, .07);
    color: var(--accent); font-size: .84rem; font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: beat 2.2s ease-out infinite; }

.track-title {
    font-size: clamp(1.7rem, 5.2vw, 2.8rem);
    font-weight: 900; line-height: 1.35;
    background: linear-gradient(180deg, #ffffff 0%, #b9d6e4 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.track-location { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 1.02rem; }
.track-location svg { color: var(--accent); flex: 0 0 auto; }

.track-byline { display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--dim); font-size: .86rem; }
.track-byline span:not(:last-child)::after { content: "·"; margin-inline: 10px; color: var(--line); }
.track-byline strong { color: var(--ink); font-weight: 500; }
.rating { color: var(--gold); }

.stats-track { width: 100%; margin-bottom: 22px; }
.stats-track .stat { text-align: right; padding-inline: 18px; }

/* --- ۹. پنل‌ها و نقشه ---------------------------------------------------- */
.panel {
    background: var(--card);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(16px, 2.6vw, 24px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    margin-bottom: 20px;
}
.panel h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel h2 small { font-size: .78rem; font-weight: 500; color: var(--accent); background: rgba(45, 212, 167, .1); padding: 0 9px; border-radius: 999px; }
.panel-note { color: var(--dim); font-size: .86rem; margin-top: 10px; }
.prose { color: #c9d9e2; line-height: 2.15; font-size: .98rem; }

.map-panel { padding: 0; overflow: hidden; }

.track-map {
    height: clamp(340px, 58vh, 560px);
    background: #0a141f;
}
.track-map-failed::after {
    content: "بارگذاری مسیر روی نقشه ممکن نشد.";
    position: absolute; inset: 0; display: grid; place-items: center;
    color: var(--muted); font-family: Vazirmatn, sans-serif; direction: rtl;
}

/* هماهنگ کردن ظاهر Leaflet با تم تیره‌ی سایت */
.leaflet-container { font-family: Vazirmatn, sans-serif; }
.leaflet-control-layers, .leaflet-bar a {
    background: rgba(6, 11, 18, .86) !important; color: var(--ink) !important;
    border-color: var(--line) !important;
}
.leaflet-control-layers { border-radius: 12px !important; direction: rtl; }
.leaflet-control-attribution { background: rgba(6, 11, 18, .72) !important; color: var(--dim) !important; direction: rtl; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-tooltip { font-family: Vazirmatn, sans-serif; direction: rtl; }

.map-unavailable {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 56px 20px; text-align: center; color: var(--muted);
}
.map-unavailable svg { color: var(--accent); opacity: .3; }

/* --- ۱۰. نمودار ارتفاع --------------------------------------------------- */
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; }
.profile-range { display: flex; gap: 18px; flex-wrap: wrap; font-size: .84rem; color: var(--dim); }
.profile-range b { color: var(--ink); font-weight: 500; }

.profile-chart { display: block; width: 100%; height: 190px; margin-top: 6px; }
.profile-axis { display: flex; justify-content: space-between; font-size: .76rem; color: var(--dim); margin-top: 6px; }

/* --- ستون‌های صفحه‌ی مسیر --------------------------------------------------
   در دسکتاپ: متن اصلی + ستون کناری ۳۴۰ پیکسلی. در موبایل: یکی زیر دیگری. */
.detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.detail-side { position: sticky; top: 96px; }

.download-panel .file-name {
    font-size: .8rem; color: var(--muted); margin-bottom: 14px;
    padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03);
    border: 1px dashed var(--line); word-break: break-all;
}

.fact-list { display: grid; gap: 2px; }
.fact-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.fact-list > div:last-child { border-bottom: 0; }
.fact-list dt { color: var(--dim); font-size: .86rem; }
.fact-list dd { font-weight: 500; text-align: left; font-size: .92rem; }
.fact-list .fact-wide { flex-direction: column; }
.fact-list .fact-wide dd { text-align: right; font-weight: 400; color: #c9d9e2; }

/* --- ۱۱. گالری و نظرها --------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }

.comment-list { list-style: none; display: grid; gap: 12px; }
.comment { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-head strong { font-weight: 500; font-size: .92rem; }
.comment-head time { margin-inline-start: auto; font-size: .78rem; color: var(--dim); }
.comment-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: .85rem; color: #03261d;
    background: linear-gradient(135deg, #2dd4a7, #38bdf8);
}
.stars { color: var(--gold); letter-spacing: 1px; font-size: .82rem; }
.stars-empty { color: rgba(245, 196, 94, .22); }
.comment-text { margin-top: 8px; color: #c9d9e2; font-size: .92rem; line-height: 2; }

/* --- ۱۲. رنگ سطح سختی و خطر (کلاس‌ها از TrackLabels.cs می‌آیند) -------------- */
.tone.level-1 { color: #4ade80; }
.tone.level-2 { color: #38bdf8; }
.tone.level-3 { color: #facc15; }
.tone.level-4 { color: #f87171; }
.tone.level-5 { color: #c084fc; }

/* --- ۱۳. فوتر ------------------------------------------------------------ */
.site-footer { margin-top: 30px; }
.footer-ridge { display: block; width: 100%; height: 80px; }
.footer-inner {
    background: #070f17;
    display: flex; flex-direction: column; align-items: center; gap: .85rem;
    padding: 6px 16px 34px;
}
.domain {
    direction: ltr; display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-latin); font-size: .95rem; font-weight: 500;
    color: var(--ink); text-decoration: none;
    padding: .5rem .95rem; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .028);
    transition: border-color .25s, background .25s, transform .25s;
}
.domain:hover { border-color: rgba(45, 212, 167, .4); background: rgba(45, 212, 167, .07); transform: translateY(-1px); }
.copy { font-size: .76rem; color: #4a5f70; }


/* ==========================================================================
   فاز ۲: جستجو، صفحه‌ی اصلی، پروفایل
   ========================================================================== */

/* --- عنوان صفحه‌های داخلی ------------------------------------------------- */
.page-header { padding: 14px 0 22px; }
.page-title {
    font-size: clamp(1.6rem, 4.8vw, 2.4rem); font-weight: 900; line-height: 1.4;
    background: linear-gradient(180deg, #ffffff 0%, #b9d6e4 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-subtitle { color: var(--dim); font-size: .92rem; margin-top: 4px; }

/* --- فیلدهای فرم (input و select) با تم تیره ------------------------------ */
input[type="search"], input[type="number"], input[type="text"], select {
    width: 100%; height: 46px; padding: 0 14px;
    font: inherit; font-size: .95rem; color: var(--ink);
    background: rgba(6, 11, 18, .55);
    border: 1px solid var(--line); border-radius: 12px;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { border-color: rgba(45, 212, 167, .55); box-shadow: 0 0 0 3px rgba(45, 212, 167, .14); }
input::placeholder { color: var(--dim); }
select option { background: #0c1a26; color: var(--ink); }

/* --- فرم جستجوی پیشرفته --------------------------------------------------- */
.search-panel { display: grid; gap: 14px; }
.search-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .8rem; color: var(--dim); }
.field-wide { grid-column: 1 / -1; }
.range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button-inline { width: auto; padding-inline: 28px; }
.empty-state.panel p:first-child { color: var(--ink); font-weight: 500; }

/* --- جستجوی بخش معرفی صفحه‌ی اصلی ---------------------------------------- */
.hero-search {
    display: flex; gap: 8px; width: min(600px, 100%);
    padding: 6px; border-radius: 16px;
    background: rgba(12, 26, 38, .7); border: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.hero-search input { border: 0; background: transparent; height: 48px; }
.hero-search input:focus { box-shadow: none; }
.hero-advanced-link { font-size: .85rem; color: var(--muted); text-decoration: none; margin-top: -8px; }
.hero-advanced-link:hover { color: var(--accent); }

/* --- بخش‌های صفحه‌ی اصلی -------------------------------------------------- */
.home-section { margin-top: 46px; }
.section-link { color: var(--accent); text-decoration: none; font-size: .9rem; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* کاشی‌های نوع فعالیت، با نوار کوچکی که سهم هر فعالیت را نشان می‌دهد */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.category-tile {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 16px 18px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--line);
    color: var(--ink); text-decoration: none;
    transition: transform .2s, border-color .2s;
}
.category-tile:hover { transform: translateY(-2px); border-color: rgba(45, 212, 167, .42); }
.category-name { font-weight: 700; font-size: .95rem; }
.category-count { font-size: .8rem; color: var(--dim); }
.category-bar {
    position: absolute; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--accent), var(--accent-2));
    border-radius: 3px 0 0 3px;
}

/* دکمه‌های استان */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    color: var(--ink); text-decoration: none; font-size: .9rem;
    transition: border-color .2s, background .2s;
}
.chip b { font-size: .76rem; font-weight: 500; color: var(--accent); }
.chip:hover { border-color: rgba(45, 212, 167, .42); background: rgba(45, 212, 167, .07); }

/* فعال‌ترین کاربران */
.contributor-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.contributor {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--line);
    color: var(--ink); text-decoration: none; transition: border-color .2s;
}
.contributor:hover { border-color: rgba(45, 212, 167, .42); }
.contributor-name { font-weight: 500; flex: 1; }
.contributor-count { font-size: .8rem; color: var(--accent); }

/* --- پروفایل کاربر ---------------------------------------------------------- */
.profile-header { display: flex; gap: 22px; align-items: center; margin-top: 18px; margin-bottom: 30px; }
.profile-avatar {
    width: 104px; height: 104px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #2dd4a7, #38bdf8);
    font-size: 2.6rem; font-weight: 900; color: #03261d;
    box-shadow: 0 0 0 4px rgba(45, 212, 167, .18);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.profile-name { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 900; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.profile-facts dt { font-size: .76rem; color: var(--dim); }
.profile-facts dd { font-weight: 500; }

/* --- لینک‌های داخل متن صفحه‌ی مسیر --------------------------------------- */
.location-link, .owner-link { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(45, 212, 167, .45); }
.location-link:hover, .owner-link:hover { color: var(--accent); }
.breadcrumb { flex-wrap: wrap; }

/* آیکن جستجو در منو */
.nav-search { display: inline-flex !important; align-items: center; padding: 7px 10px !important; }

/* --- ۱۴. انیمیشن‌ها (همان صفحه‌ی «به‌زودی») ------------------------------ */
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(2.5%, -1.5%, 0) scale(1.06); } }

.star { fill: #dff2ff; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }

/* خط مسیر GPS که کم‌کم کشیده می‌شود */
.route {
    fill: none; stroke: url(#routeGrad); stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 1400; stroke-dashoffset: 1400;
    filter: url(#routeGlow);
    animation: draw 7s cubic-bezier(.65, .05, .36, 1) .6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.wpt { opacity: 0; animation: pop .6s ease forwards; }
@keyframes pop { to { opacity: 1; } }

.pulse { transform-origin: center; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { r: 4; opacity: .85; } 70% { r: 15; opacity: 0; } 100% { r: 15; opacity: 0; } }

@keyframes beat {
    0%   { box-shadow: 0 0 0 0 rgba(45, 212, 167, .55); }
    70%  { box-shadow: 0 0 0 9px rgba(45, 212, 167, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 212, 167, 0); }
}

/* ظاهر شدن نرم از پایین، با تأخیرهای پله‌ای */
.rise { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.22, .75, .3, 1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .28s; } .d4 { animation-delay: .4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* کاربرانی که در تنظیمات سیستم «حرکت کمتر» را انتخاب کرده‌اند */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .rise { opacity: 1; transform: none; }
    .route { stroke-dashoffset: 0; }
    .wpt { opacity: 1; }
}

/* --- ۱۵. موبایل و تبلت --------------------------------------------------- */
@media (max-width: 900px) {
    .detail-columns { grid-template-columns: 1fr; }
    .detail-side { position: static; }
}

@media (max-width: 560px) {
    .brand-mark { width: 40px; height: 40px; }
    .brand { gap: 10px; }
    .brand-en { font-size: .98rem; letter-spacing: .05em; white-space: nowrap; }
    .brand-fa { font-size: .66rem; }
    .brand-fa-extra { display: none; }
    .main-nav a { padding: 6px 9px; font-size: .86rem; }
    .main-nav a[href^="/#"] { display: none; }   /* در موبایل فقط «مسیرها» و جستجو */
    .profile-header { flex-direction: column; text-align: center; }
    .profile-info { align-items: center; }
    .hero-search { flex-direction: column; }
    .track-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .track-more { opacity: 1; transform: none; }
}
