/* =====================================================================
   فوتر صدرا — کامپوننت مستقل
   برای انتقال به CMS: این پوشه (footer.html + footer.css + footer.js) کافی است.
   وابستگی‌های اختیاری (اگر نباشند فوتر باز هم کار می‌کند):
     - js/sketches.js  ⇐ پانورامای مدادی نمادها (بدون آن پانوراما پنهان می‌شود)
     - js/contact.js   ⇐ اطلاعات تماس مشترک (بدون آن از مقادیر داخل footer.js)
     - js/header.js    ⇐ پاپ‌آپ فرم مشاوره (بدون آن دکمه به صفحه‌ی تماس می‌رود)
   فونت: Vazirmatn (اگر سایت مقصد آن را ندارد، مسیر فونت‌ها را در @font-face پایین تنظیم کنید)
   ===================================================================== */
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("../fonts/vazirmatn-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("../fonts/vazirmatn-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("../fonts/vazirmatn-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
.ft, .ft * { box-sizing: border-box; }
.ft { --paper: #ffffff; font-family: "Vazirmatn", Tahoma, sans-serif; direction: rtl; text-align: right; line-height: 1.6; }
.ft [hidden] { display: none !important; }
/* دکمه‌ی سه‌بعدی روشن (مستقل از استایل سایت) */
.ft .btn3d {
  position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  height: 54px; padding: 0 30px; margin: 0;
  border: 0; border-radius: 14px; cursor: pointer;
  font: 700 15.5px/1 "Vazirmatn", Tahoma, sans-serif; white-space: nowrap;
  transform: translateY(0); transition: transform .15s ease, box-shadow .15s ease;
}
.ft .btn3d:hover { transform: translateY(-2px); }
.ft .btn3d:active { transform: translateY(5px); }
.ft .btn3d:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
/* ================= فوتر — مشکی با پانورامای مدادی سفید ================= */
.ft {
  --ft-bg: #0d0d0d; --ft-ink: #f4f3f0; --ft-mute: #9c9a95; --ft-line: rgba(255, 255, 255, .12);
  position: relative; background: var(--ft-bg); color: var(--ft-ink);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: clip;
}
/* لبه‌ی بالایی فوتر: موج دست‌کشیده که از زمینه‌ی سفید جدا می‌شود */
.ft::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 26px;
  background: var(--paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 26' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V8C1100 14 1000 4 900 10S700 18 600 9 400 3 300 12 100 16 0 8Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 26' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V8C1100 14 1000 4 900 10S700 18 600 9 400 3 300 12 100 16 0 8Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
}
.ft__sky { position: relative; max-width: 1400px; margin: 0 auto; padding: 56px 24px 0; }
.ft__sky svg { display: block; width: 100%; height: auto; overflow: visible; }
.ft__sky path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ft__sky .l-m { stroke: var(--ft-ink); stroke-width: 2.4; opacity: .92; }
.ft__sky .l-d { stroke: var(--ft-ink); stroke-width: 1.5; opacity: .7; }
.ft__sky .l-h { stroke: var(--ft-ink); stroke-width: 1; opacity: .38; }
.ft__sky .l-x { stroke: var(--ft-ink); stroke-width: 1.4; opacity: .45; }
.ft__ground { height: 1px; margin: 0 24px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5) 12%, rgba(255,255,255,.5) 88%, transparent); }

.ft__inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 max(32px, env(safe-area-inset-right, 0px)) 0 max(32px, env(safe-area-inset-left, 0px));
}
.ft__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 54px 0 50px; border-bottom: 1px solid var(--ft-line);
  flex-wrap: wrap;
}
.ft__cta-txt { flex: 1 1 auto; min-width: 0; }   /* متن جمع شود تا دکمه از صفحه بیرون نزند */
.ft__cta-title { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.4; text-wrap: balance; }
.ft__cta-sub { margin: 0; max-width: 56ch; font-size: 15px; line-height: 2; color: var(--ft-mute); }
.ft .btn3d--light {
  flex: none; color: #0d0d0d;
  background: linear-gradient(180deg, #ffffff 0%, #ecebe8 60%, #d9d7d3 100%);
  box-shadow: inset 0 1px 0 #fff, 0 6px 0 #8f8d89, 0 16px 26px -8px rgba(0,0,0,.7);
}
.ft .btn3d--light:hover { box-shadow: inset 0 1px 0 #fff, 0 8px 0 #8f8d89, 0 22px 30px -10px rgba(0,0,0,.7); }
.ft .btn3d--light:active { box-shadow: inset 0 1px 0 #fff, 0 1px 0 #8f8d89, 0 6px 12px -4px rgba(0,0,0,.6); }
.ft .btn3d--light:focus-visible { outline-color: #fff; }

.ft__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 40px; padding: 56px 0 48px;
}
/* مقصدها دوستونه */
.ft__links.ft__links--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.ft__logo { display: inline-block; line-height: 0; }
.ft__logo img { height: 56px; width: auto; filter: invert(1) brightness(1.15); }
.ft__about { margin: 18px 0 22px; font-size: 14px; line-height: 2.05; color: var(--ft-mute); text-align: justify; text-align-last: right; max-width: 40ch; }
.ft__social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.ft__social a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); color: var(--ft-ink);
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.ft__social a:hover, .ft__social a:focus-visible { background: var(--ft-ink); color: #0d0d0d; border-color: var(--ft-ink); transform: translateY(-3px); outline: none; }
.ft__social svg { width: 20px; height: 20px; }
.ft__h { position: relative; margin: 6px 0 20px; padding-bottom: 12px; font-size: 15.5px; font-weight: 700; color: var(--ft-ink); }
.ft__h::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 2px; background: var(--ft-ink); border-radius: 2px; }
.ft__links, .ft__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ft__links a {
  position: relative; display: inline-flex; align-items: center; height: 32px; max-width: 100%;
  font-size: 14px; color: var(--ft-mute); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .25s ease, padding .25s ease;
}
.ft__links a::before { content: ""; width: 0; height: 1.5px; background: var(--ft-ink); margin-left: 0; transition: width .25s ease, margin .25s ease; }
.ft__links a:hover, .ft__links a:focus-visible { color: var(--ft-ink); outline: none; }
.ft__links a:hover::before, .ft__links a:focus-visible::before { width: 12px; margin-left: 8px; }
.ft__contact { gap: 4px; }   /* فاصله‌ی ردیف‌ها هم‌اندازه‌ی ستون‌های دیگر فوتر */
.ft__contact a, .ft__ci {
  display: flex; align-items: center; gap: 10px; height: 32px; min-width: 0;
  font-size: 12px; color: var(--ft-mute); text-decoration: none; transition: color .25s ease;
}
.ft__contact a:hover, .ft__contact a:focus-visible { color: var(--ft-ink); outline: none; }
.ft__contact svg { flex: none; width: 17px; height: 17px; color: var(--ft-ink); opacity: .8; }
.ft__contact a > span, .ft__ci > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ft__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0 26px; border-top: 1px solid var(--ft-line);
}
.ft__copy { margin: 0; font-size: 13px; color: var(--ft-mute); }
.ft__top {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 16px;
  border: 0; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ft-ink);
  font: 500 13.5px/1 "Vazirmatn", Tahoma, sans-serif;
}
.ft__top svg { width: 34px; height: 34px; padding: 7px; box-sizing: border-box; border-radius: 50%; background: var(--ft-ink); color: #0d0d0d; transition: transform .3s ease; }
.ft__top:hover svg { transform: translateY(-3px); }
.ft__top:focus-visible { outline: 2px solid var(--ft-ink); outline-offset: 3px; }

@media (max-width: 1100px) {
  .ft__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.3fr); }
  .ft__brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  /* موبایل: فوتر کوتاه و دوستونه */
  .ft__sky { padding: 30px 0 0; overflow: hidden; }
  .ft__sky svg { width: 190%; margin-right: -45%; }
  .ft__inner { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .ft__cta { flex-direction: column; align-items: stretch; gap: 16px; text-align: right; padding: 26px 0; }
  .ft__cta-title { margin: 0; font-size: 20px; }
  .ft__cta-sub { display: none; }
  .ft__cta .btn3d { width: 100%; height: 48px; }
  .ft__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; padding: 24px 0 20px; }
  .ft__brand { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .ft__logo img { height: 40px; }
  .ft__about { display: none; }
  .ft__social { gap: 6px; flex-wrap: nowrap; }
  .ft__social a { width: 36px; height: 36px; }
  .ft__social svg { width: 17px; height: 17px; }
  .ft__grid > nav.ft__col:first-of-type { grid-column: 1 / -1; }
  .ft__h { margin: 0 0 10px; padding-bottom: 8px; font-size: 14.5px; }
  .ft__links { gap: 0; }
  .ft__links a { height: 28px; font-size: 13px; }
  .ft__contact { gap: 0; }
  .ft__contact a, .ft__ci { height: 28px; gap: 8px; }
  .ft__contact svg { width: 15px; height: 15px; }
  .ft__bottom { padding: 14px 0 18px; }
  .ft__copy { font-size: 11.5px; }
  .ft__top span { display: none; }
  .ft__top { padding: 0; height: 36px; }
}
