/* ===================================================================
   MohsenTajikWeb — Base / Foundation styles
   پالت رسمی سبز بطری — پایه‌ی طراحی (طراحی کامل صفحات در مرحله بعد)
=================================================================== */

/* ── Fonts ──────────────────────────────────────────────────────── */
@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansX-Regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansX-Bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansXV';
  src: url('../fonts/IRANSansXV.woff2') format('woff2-variations'),
       url('../fonts/IRANSansXV.woff') format('woff-variations');
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: 'BTitr';
  src: url('../fonts/BTitrBold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ── Brand palette ──────────────────────────────────────────────── */
:root {
  --mt-green: #1b4332;        /* primary — سبز بطری */
  --mt-green-dark: #16201b;   /* dark surface — قوانین/فوتر */
  --mt-green-deep: #0f1813;   /* deepest */
  --mt-green-tint: #eef2ef;   /* light green fill */
  --mt-green-border: #d4e0d8;
  --mt-bone: #f4f2ec;         /* page background — استخوانی گرم */
  --mt-white: #ffffff;
  --mt-text: #16201b;
  --mt-muted: #7d7a70;
  --mt-muted-light: #9a968a;
  --mt-border: #e6e3da;
  --mt-brass: #b08d3c;        /* accent — استفاده‌ی بسیار محدود */
  --mt-ease: 0.2s ease;
}

/* ── Base ───────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'IRANSansXV', 'IRANSansX', 'Tahoma', sans-serif;
  color: var(--mt-text);
  background: var(--mt-bone);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.8;
}

a {
  color: var(--mt-green);
  text-decoration: none;
  transition: color var(--mt-ease);
}

a:hover {
  color: var(--mt-green-dark);
}

main {
  flex: 1 0 auto;
}

/* ── Header ─────────────────────────────────────────────────────── */
.mt-header {
  background: var(--mt-white);
  border-bottom: 1px solid var(--mt-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mt-header-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mt-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--mt-text);
  flex-shrink: 0;
}

.mt-brand-mark {
  width: 30px;
  height: 30px;
  background: var(--mt-green);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mt-nav {
  display: flex;
  gap: 1.4rem;
}

.mt-nav a {
  color: var(--mt-muted);
  font-size: 0.9rem;
}

.mt-nav a:hover {
  color: var(--mt-green);
}

.mt-header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.mt-header-phone {
  font-size: 0.85rem;
  color: var(--mt-muted);
  white-space: nowrap;
}

.mt-header-phone:hover {
  color: var(--mt-green);
}

/* ── دکمه‌ی منوی موبایل + کشوی کناری ────────────────────────────── */
.mt-nav-toggle {
  display: none;              /* فقط زیر ۹۹۲ پیکسل ظاهر می‌شود */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid var(--mt-border);
  border-radius: 6px;
  color: var(--mt-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.mt-nav-toggle:hover {
  border-color: var(--mt-green);
  color: var(--mt-green);
}

.mt-mobile-nav {
  width: 82vw;
  max-width: 320px;
  background: var(--mt-white);
}

.mt-mobile-nav .offcanvas-header {
  border-bottom: 1px solid var(--mt-border);
}

.mt-mobile-nav-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--mt-text);
}

.mt-mobile-nav .offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0 1.25rem;
}

.mt-mobile-links {
  display: flex;
  flex-direction: column;
}

.mt-mobile-links a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.25rem;
  color: var(--mt-text);
  font-size: 0.95rem;
  border-inline-start: 3px solid transparent;
}

.mt-mobile-links a i {
  color: var(--mt-muted-light);
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
}

.mt-mobile-links a:hover,
.mt-mobile-links a:focus-visible {
  background: var(--mt-green-tint);
  color: var(--mt-green);
  border-inline-start-color: var(--mt-green);
}

.mt-mobile-links a:hover i,
.mt-mobile-links a:focus-visible i {
  color: var(--mt-green);
}

.mt-mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 1.25rem 1.25rem 0;
  border-top: 1px solid var(--mt-border);
}

.mt-mobile-cta .btn-mt {
  text-align: center;
}

.mt-mobile-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--mt-muted);
}

.mt-mobile-phone:hover {
  color: var(--mt-green);
}

@media (max-width: 991px) {
  .mt-nav { display: none; }
  .mt-nav-toggle { display: inline-flex; }
}

@media (max-width: 575px) {
  .mt-header-phone { display: none; }
  /* در عرض کم، دکمه‌ی رزرو نباید جای دکمه‌ی منو را تنگ کند. */
  .mt-header-actions { gap: 0.5rem; }
  .mt-header-actions .btn-mt { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
}

/* ── پرتره‌ی وکیل (مشترک: هیروی صفحه‌ی اصلی و صفحه‌ی درباره ما) ──────
   عکس کات‌اوت است، پس قاب خودش زمینه می‌سازد: سبز عمیق با هاله‌ی نور پشت
   سر، یک قاب برنجی جابه‌جا پشت آن، و سایه‌ی پایین که لبه‌ی برش عکس را
   می‌پوشاند. روکش‌های اختیاری (پلاک نام / نشان دسترسی) در home.css می‌مانند. */
.mt-portrait {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
}

.mt-portrait::before {
  content: '';
  position: absolute; z-index: 0;
  inset-block: 22px -22px; inset-inline: -18px 18px;
  border: 1px solid var(--mt-brass);
  border-radius: 16px;
  opacity: 0.5;
}

.mt-portrait-frame {
  position: relative; z-index: 1; margin: 0; overflow: hidden;
  border: 1px solid rgba(22, 32, 27, 0.35); border-radius: 16px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.15), transparent 58%),
    linear-gradient(165deg, #24513d 0%, var(--mt-green) 45%, var(--mt-green-deep) 100%);
  box-shadow: 0 22px 45px -20px rgba(22, 32, 27, 0.45);
}

.mt-portrait-frame img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;        /* هیچ بخشی از عکس بریده نمی‌شود */
  object-position: 50% 100%;  /* سوژه روی لبه‌ی پایین قاب می‌ایستد */
  filter: drop-shadow(0 10px 22px rgba(15, 24, 19, 0.5));
}

.mt-portrait-frame::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 34%;
  background: linear-gradient(to top, rgba(15, 24, 19, 0.9), transparent);
}

@media (max-width: 991px) {
  .mt-portrait { max-width: 320px; }
}

@media (max-width: 575px) {
  .mt-portrait { max-width: 285px; }
  .mt-portrait::before { inset-block: 16px -16px; inset-inline: -12px 12px; }
}

/* ── Footer ─────────────────────────────────────────────────────── */
.mt-footer {
  background: var(--mt-green-dark);
  flex-shrink: 0;
  margin-top: auto;
}

.mt-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 2rem;
  padding: 2.25rem 1.75rem 1.75rem 1.75rem;
}

.mt-footer-brand .mt-footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.mt-footer-brand p {
  color: #7a887f;
  font-size: 0.82rem;
  line-height: 1.9;
  margin: 0;
  max-width: 300px;
}

.mt-footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mt-footer-social a {
  width: 32px;
  height: 32px;
  border: 1px solid #2a3a31;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a887f;
}

.mt-footer-social a:hover {
  border-color: #9cc3b0;
  color: #9cc3b0;
}

.mt-footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.mt-footer-col a {
  display: block;
  color: #7a887f;
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

.mt-footer-col a:hover {
  color: #9cc3b0;
}

.mt-footer-contact div {
  color: #7a887f;
  font-size: 0.82rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mt-footer-contact i {
  color: var(--mt-brass);
}

.mt-footer-bottom {
  background: var(--mt-green-deep);
  padding: 0.85rem 0;
  color: #5c6b62;
  font-size: 0.75rem;
}

/* خط سئوی پایین فوتر — خوانا ولی بی‌سروصدا؛ روی موبایل به سطر بعد می‌رود. */
.mt-footer-seo strong {
  color: #7d8f84;
  font-weight: 600;
}

.mt-footer-seo .sep {
  padding: 0 0.35rem;
}

@media (max-width: 575px) {
  .mt-footer-seo {
    display: block;
    margin-top: 0.35rem;
  }

  .mt-footer-seo .sep {
    display: none;
  }
}

@media (max-width: 767px) {
  .mt-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-mt {
  background: var(--mt-green);
  color: #fff;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--mt-ease);
}

.btn-mt:hover {
  background: var(--mt-green-dark);
  color: #fff;
}

/* ── جلوگیری از زوم سافاری روی فیلدها ────────────────────────────
   iOS وقتی فیلدی با فونت کوچک‌تر از ۱۶ پیکسل فوکوس شود کل صفحه را
   بزرگ می‌کند و بعد از تایپ هم به حالت اول برنمی‌گردد. راه‌حلش
   user-scalable=no نیست (زوم دستی کاربر را هم می‌بندد و دسترس‌پذیری را
   خراب می‌کند) بلکه بردن خودِ فیلدها روی ۱۶ پیکسل است.

   فایل‌های CSS هر صفحه بعد از این فایل بارگذاری می‌شوند و همگی فونت
   کوچک‌تری روی فیلدهایشان گذاشته‌اند، پس این کف اندازه فقط با
   !important اعمال می‌شود. چک‌باکس و رادیو متن ندارند و کادر کد تأیید
   عمداً درشت‌تر است؛ هر سه کنار گذاشته شده‌اند.

   شرط دوم برای تبلت‌هایی است که عرضشان از ۹۹۱ بیشتر است ولی همین
   رفتار را دارند. */
@media (max-width: 991px), (hover: none) and (pointer: coarse) {
  input:not([type='checkbox']):not([type='radio']):not(.otp-input),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── یادآور حالت تعمیر (فقط برای ادمین لاگین‌کرده) ─────────────── */
.mt-maint-flag {
  position: fixed;
  inset-inline-start: 1rem;
  bottom: 1rem;
  z-index: 200;              /* بالاتر از هدر چسبان (z-index: 100) */
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: #b3261e;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.7;
  box-shadow: 0 6px 24px rgba(22, 32, 27, 0.25);
}

.mt-maint-flag a {
  color: #fff;
  text-decoration: underline;
  white-space: nowrap;
}

.mt-maint-flag a:hover {
  color: #ffdedb;
}

@media (max-width: 560px) {
  .mt-maint-flag {
    inset-inline: 0.75rem;
    bottom: 0.75rem;
    border-radius: 12px;
    font-size: 0.78rem;
    padding: 0.55rem 0.85rem;
  }
}

/* ===================================================================
   صفحه‌بندی مشترک (_Pagination.cshtml) — فهرست‌های عمومی
=================================================================== */
.mt-pagination {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.mt-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mt-page,
.mt-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.7rem;
  justify-content: center;
  border: 1px solid var(--mt-border);
  border-radius: 8px;
  background: var(--mt-white);
  color: var(--mt-text);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color var(--mt-ease), background var(--mt-ease), color var(--mt-ease);
}

.mt-page:hover,
.mt-page-nav:hover {
  border-color: var(--mt-green);
  color: var(--mt-green);
}

.mt-page.current {
  background: var(--mt-green);
  border-color: var(--mt-green);
  color: #fff;
  font-weight: 500;
}

.mt-page-nav.disabled {
  color: var(--mt-muted-light);
  background: transparent;
  border-color: var(--mt-border);
  cursor: default;
}

.mt-page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 2.25rem;
  color: var(--mt-muted-light);
}

.mt-pagination-summary {
  font-size: 0.8rem;
  color: var(--mt-muted);
}

@media (max-width: 560px) {
  /* در موبایل فقط صفحه‌ی جاری و دکمه‌های قبلی/بعدی می‌مانند. */
  .mt-pages .mt-page:not(.current),
  .mt-page-gap {
    display: none;
  }

  .mt-page-nav {
    padding: 0 0.9rem;
  }
}

/* ===================================================================
   تله‌ی ضد اسپم (honeypot) — مشترک بین فرم‌های تماس، رزرو و ثبت نظر
=================================================================== */
/* از دید کاربر پنهان است ولی ربات آن را پر می‌کند و پیامش دور ریخته می‌شود.
   اینجا در site.css تعریف شده چون هر سه فرم استایل‌شیت متفاوتی دارند؛
   قبلاً فقط در otp.css بود و صفحه‌ی تماس آن فایل را بار نمی‌کرد، پس
   ورودی برای کاربر واقعی دیده می‌شد.
   نکته: با left:-9999px صفحه در چیدمان راست‌به‌چپ ~۱۰۰۰۰ پیکسل اسکرول افقی
   پیدا می‌کرد؛ الگوی visually-hidden همان پنهان‌سازی را بدون اشغال فضا انجام می‌دهد. */
.honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
