/* ============================================================
   ابزارک‌های مشترک همه صفحات — دکمه‌های شناور تماس/واتساپ و بازگشت به بالا
   (این فایل مستقل از style.css است تا در صفحات فرم هم قابل استفاده باشد)
   ============================================================ */

.fab-stack{
  position:fixed; inset-block-end:22px; inset-inline-start:22px; z-index:990;
  display:flex; flex-direction:column; gap:12px;
}
.fab{
  width:54px; height:54px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  box-shadow:0 12px 28px -8px rgba(0,0,0,.45); text-decoration:none;
  transition:.25s transform, .25s box-shadow; position:relative;
}
.fab:hover{ transform:translateY(-3px) scale(1.06); }
.fab svg{ width:26px; height:26px; }

.fab-call{ background:linear-gradient(145deg,#155c41,#0b3d2e); color:#e6c866; }
.fab-call::after{
  content:''; position:absolute; inset:-5px; border-radius:50%;
  border:2px solid rgba(21,92,65,.55); animation:fabPulse 2.2s ease-out infinite;
}
.fab-chat{ background:linear-gradient(145deg,#2ab24f,#128c3e); color:#fff; border:none; cursor:pointer; padding:0; font-family:inherit; }

@keyframes fabPulse{
  0%{ transform:scale(.85); opacity:.9; }
  70%{ transform:scale(1.25); opacity:0; }
  100%{ transform:scale(1.25); opacity:0; }
}

/* برچسب کنار دکمه در دسکتاپ */
.fab .fab-tip{
  position:absolute; inset-inline-start:calc(100% + 12px); top:50%; transform:translateY(-50%);
  background:#0b1310; color:#f7f2e7; font-size:12.5px; font-weight:700; white-space:nowrap;
  padding:7px 14px; border-radius:9px; opacity:0; pointer-events:none; transition:.22s opacity;
  font-family:'Vazirmatn', Tahoma, sans-serif;
}
.fab:hover .fab-tip{ opacity:1; }
@media(max-width:760px){ .fab .fab-tip{ display:none; } }

/* بازگشت به بالا */
.to-top{
  position:fixed; inset-block-end:22px; inset-inline-end:22px; z-index:990;
  width:46px; height:46px; border-radius:50%; border:1.5px solid rgba(230,200,102,.5);
  background:rgba(11,19,16,.88); color:#e6c866; font-size:19px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transform:translateY(12px);
  transition:.3s opacity, .3s transform, .3s visibility; backdrop-filter:blur(6px);
}
.to-top.show{ opacity:1; visibility:visible; transform:none; }
.to-top:hover{ background:#0b3d2e; }

@media (prefers-reduced-motion: reduce){
  .fab-call::after{ animation:none; }
  .fab, .to-top{ transition:none; }
}

/* ---------- کلاس‌های نمایش واکنش‌گرا (توسط ویرایشگر بصری پنل استفاده می‌شود) ---------- */
@media(max-width:760px){
  .kg-hide-mobile{ display:none !important; }
}
@media(min-width:761px){
  .kg-hide-desktop{ display:none !important; }
}

/* ============================================================
   سیستم کارت و افکت‌های ویرایشگر بصری — قابل استفاده در همه صفحات
   ============================================================ */

/* ردیف چندستونه — در موبایل خودکار تک‌ستونه می‌شود */
.kg-row{ display:grid; gap:20px; }
@media(max-width:760px){
  .kg-row{ grid-template-columns:1fr !important; }
}

/* کارت پایه */
.kg-card{
  background:#fff; border:1.5px solid #e4dcc4; border-radius:18px; padding:26px 22px;
  transition:.28s transform, .28s box-shadow, .28s border-color;
}

/* کارت شیشه‌ای (گلس‌مورفیسم) */
.kg-card-glass{
  background:rgba(255,255,255,.55); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.65); border-radius:18px; padding:26px 22px;
  box-shadow:0 18px 40px -18px rgba(0,0,0,.25);
  transition:.28s transform, .28s box-shadow;
}

/* کارت تیره برند */
.kg-card-dark{
  background:linear-gradient(150deg, #0b3d2e 0%, #0f1d17 90%);
  color:#f7f2e7; border:1px solid rgba(230,200,102,.3); border-radius:18px; padding:26px 22px;
  transition:.28s transform, .28s box-shadow;
}
.kg-card-dark h1, .kg-card-dark h2, .kg-card-dark h3, .kg-card-dark h4{ color:#e6c866; }

/* کارت طلایی */
.kg-card-gold{
  background:linear-gradient(135deg, #e6c866, #c9a227); color:#1b1508;
  border-radius:18px; padding:26px 22px; border:none;
  transition:.28s transform, .28s box-shadow;
}
.kg-card-gold h1, .kg-card-gold h2, .kg-card-gold h3, .kg-card-gold h4{ color:#1b1508; }

/* افکت‌های هاور — روی هر عنصری قابل اعمال از تب استایل ویرایشگر */
.kg-lift:hover{ transform:translateY(-7px); box-shadow:0 24px 48px -16px rgba(11,61,46,.35); }
.kg-glow:hover{ box-shadow:0 0 36px -4px rgba(201,162,39,.6); }
.kg-zoom:hover{ transform:scale(1.035); }
.kg-lift, .kg-glow, .kg-zoom{ transition:.28s transform, .28s box-shadow; }

/* ============================================================
   انیمیشن ورود به سایت — السلام علیک یا اباعبدالله الحسین
   (یک‌بار در هر نشست؛ با کلیک رد می‌شود؛ بدون JS هم خودکار محو می‌شود)
   ============================================================ */
#kg-intro{
  position:fixed; inset:0; z-index:99999; cursor:pointer;
  display:flex; align-items:center; justify-content:center; text-align:center;
  background:radial-gradient(ellipse at 50% 30%, #155c41 0%, #0b3d2e 40%, #0f1d17 75%, #0b1310 100%);
  animation:kgIntroAutoHide 4.2s ease forwards;
}
#kg-intro::before{
  content:''; position:absolute; inset:0; opacity:.1; pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><g fill='none' stroke='%23c9a227' stroke-width='1'><path d='M60 0 L120 60 L60 120 L0 60 Z'/><path d='M60 0 L60 120 M0 60 L120 60'/></g></svg>");
  background-size:120px 120px;
}
#kg-intro::after{
  content:''; position:absolute; width:560px; height:560px; border-radius:50%;
  background:radial-gradient(circle, rgba(230,200,102,.22) 0%, rgba(230,200,102,.06) 45%, transparent 70%);
  animation:kgIntroGlow 2.6s ease-in-out infinite alternate; pointer-events:none;
}
.kg-intro-inner{ position:relative; padding:20px; max-width:92vw; }

.kg-intro-text{
  font-family:'Amiri', serif; font-weight:700;
  font-size:clamp(27px, 6.2vw, 58px); line-height:1.9; color:#e6c866;
  background:linear-gradient(100deg, #b8912f 0%, #f3dc8f 30%, #e6c866 50%, #f3dc8f 70%, #b8912f 100%);
  background-size:220% auto; -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 22px rgba(230,200,102,.4));
  opacity:0;
  animation:kgIntroFadeUp 1.1s cubic-bezier(.16,1,.3,1) .55s forwards,
            kgIntroShimmer 3s linear 1s infinite;
}
.kg-intro-line{
  width:0; height:2px; margin:22px auto 18px;
  background:linear-gradient(90deg, transparent, #c9a227, transparent);
  animation:kgIntroLine .8s ease 1.3s forwards;
}
.kg-intro-sub{
  font-family:'Vazirmatn', Tahoma, sans-serif; font-size:clamp(13px, 2.2vw, 16.5px);
  color:#cfc7ac; font-weight:600; letter-spacing:.3px;
  opacity:0; animation:kgIntroFadeUp .9s ease 1.7s forwards;
}

@keyframes kgIntroFadeUp{
  from{ opacity:0; transform:translateY(26px); }
  to{ opacity:1; transform:none; }
}
@keyframes kgIntroLine{ to{ width:min(240px, 60vw); } }
@keyframes kgIntroShimmer{ to{ background-position:-220% center; } }
@keyframes kgIntroGlow{
  from{ opacity:.55; transform:scale(1); }
  to{ opacity:1; transform:scale(1.18); }
}
/* محو خودکار حتی بدون جاوااسکریپت */
@keyframes kgIntroAutoHide{
  0%, 81%{ opacity:1; visibility:visible; }
  100%{ opacity:0; visibility:hidden; }
}
/* پایان زودتر توسط جاوااسکریپت (تایمر یا کلیک کاربر) */
#kg-intro.kg-intro-done{
  animation:none; opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .75s ease, visibility .75s ease;
}
/* رد کامل: قبلاً در همین نشست دیده شده یا داخل ویرایشگر است */
#kg-intro.kg-intro-skip{ display:none !important; animation:none; }

@media (prefers-reduced-motion: reduce){
  #kg-intro{ display:none !important; }
}

/* ---------- بازبینی و تایید نهایی قبل از ثبت (مشترک فرم‌ها) ---------- */
.confirm-overlay{
  position:fixed; inset:0; z-index:1000; display:none;
  align-items:center; justify-content:center; padding:16px;
  background:rgba(8,14,11,.72); backdrop-filter:blur(4px);
}
.confirm-overlay.open{ display:flex; }
.confirm-modal{
  background:#f7f2e7; color:#1b211d; width:100%; max-width:560px;
  max-height:86vh; overflow:auto; border-radius:18px; padding:26px 24px;
  border:1px solid rgba(201,162,39,.5);
  box-shadow:0 30px 60px -20px rgba(0,0,0,.6);
  animation:cmPop .25s ease both;
}
@keyframes cmPop{ from{opacity:0; transform:translateY(18px) scale(.97);} to{opacity:1; transform:none;} }
.confirm-modal h3{ margin:0 0 6px; color:#0b3d2e; font-size:20px; font-weight:900; }
.confirm-modal .cm-sub{ font-size:13.5px; color:#6b6459; margin:0 0 16px; }
.confirm-table{ width:100%; border-collapse:collapse; font-size:14.5px; }
.confirm-table td{ padding:9px 12px; border-bottom:1px solid #e8dfc2; vertical-align:top; }
.confirm-table td:first-child{ color:#6b6459; font-weight:600; white-space:nowrap; width:42%; }
.confirm-table td:last-child{ font-weight:700; }
.confirm-table tr:last-child td{ border-bottom:none; }
.confirm-actions{ display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.confirm-actions button{
  flex:1; min-width:150px; padding:13px; border-radius:12px;
  font-family:inherit; font-weight:800; font-size:15.5px; cursor:pointer;
  transition:transform .15s, box-shadow .2s;
}
.confirm-actions button:hover{ transform:translateY(-1px); }
.cm-confirm{ border:none; background:linear-gradient(135deg,#155c41,#0b3d2e); color:#f7f2e7; box-shadow:0 10px 22px -10px rgba(11,61,46,.7); }
.cm-confirm:disabled{ opacity:.6; cursor:wait; transform:none; }
.cm-edit{ border:1.5px solid #d9cfae; background:#fffdf6; color:#1b211d; }

/* لینک پیگیری در پیام موفقیت */
.success-panel .track-page-link{
  display:inline-block; margin-top:10px; padding:11px 26px; border-radius:12px;
  background:#fffdf6; border:1.5px solid #c9a227; color:#0b3d2e !important;
  font-weight:800; font-size:14.5px; text-decoration:none;
}
.success-panel .track-page-link:hover{ background:#fdf6e0; }

/* ---------- جعبه اطمینان سامانه سماح ---------- */
.samah-notice{
  display:flex; gap:14px; align-items:flex-start;
  background:linear-gradient(135deg, #fdf8e7, #f7f2e7);
  border:1.5px solid #c9a227; border-inline-start:5px solid #c9a227;
  border-radius:14px; padding:16px 18px; margin:0 0 22px;
  color:#1b211d; box-shadow:0 14px 30px -18px rgba(201,162,39,.55);
}
.samah-notice .sn-icon{ font-size:26px; line-height:1; flex:none; margin-top:2px; }
.samah-notice .sn-title{ font-weight:900; color:#0b3d2e; font-size:15.5px; margin:0 0 4px; }
.samah-notice p{ margin:0; font-size:13.8px; line-height:1.9; color:#3d382e; }
.samah-notice b{ color:#0b3d2e; }
.samah-notice .samah-link{
  display:inline-block; margin-top:10px; padding:9px 20px; border-radius:10px;
  background:#0b3d2e; color:#f7f2e7 !important; font-weight:800; font-size:13.5px;
  text-decoration:none; letter-spacing:.2px; transition:.2s all;
  box-shadow:0 10px 20px -10px rgba(11,61,46,.7);
}
.samah-notice .samah-link:hover{ background:#155c41; transform:translateY(-1px); }
@keyframes snPulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(201,162,39,.45);} 50%{ box-shadow:0 0 0 7px rgba(201,162,39,0);} }
.samah-notice .sn-icon{ animation:snPulse 2.2s ease-in-out infinite; border-radius:50%; }

/* ---------- صفحات داخلی حرفه‌ای: درباره / خدمات / تماس ---------- */
.about-split{ display:grid; grid-template-columns:1.1fr 1fr; gap:38px; align-items:center; }
.about-split img{ width:100%; border-radius:18px; box-shadow:0 30px 60px -20px rgba(0,0,0,.5); display:block; }
@media(max-width:840px){ .about-split{ grid-template-columns:1fr; } }

.steps-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:20px; }
.step-card{
  background:var(--ivory,#f7f2e7); border:1.5px solid var(--line,#d9cfae);
  border-radius:16px; padding:28px 20px; text-align:center;
  transition:.25s transform, .25s box-shadow;
}
.step-card:hover{ transform:translateY(-4px); box-shadow:0 20px 40px -18px rgba(0,0,0,.4); }
.step-card .s-num{
  width:46px; height:46px; border-radius:50%; margin:0 auto 14px;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#155c41,#0b3d2e); color:#e6c866;
  font-weight:900; font-size:19px; box-shadow:0 10px 20px -8px rgba(11,61,46,.6);
}
.step-card h4{ margin:0 0 8px; font-size:15.5px; color:var(--green-deep,#0b3d2e); }
.step-card p{ margin:0; font-size:13.5px; color:var(--muted,#6b6459); line-height:1.9; }

/* فرم پیام آنلاین صفحه تماس */
.contact-form-card{
  background:var(--ivory,#f7f2e7); border-radius:18px; padding:32px 30px;
  max-width:720px; margin:0 auto; border-top:5px solid var(--gold,#c9a227);
  box-shadow:var(--shadow-lg, 0 30px 60px -20px rgba(0,0,0,.45));
}
.contact-form-card label{ display:block; font-weight:700; font-size:14px; color:var(--green-deep,#0b3d2e); margin:16px 0 7px; }
.contact-form-card input, .contact-form-card textarea{
  width:100%; padding:12px 15px; border-radius:12px; border:1.5px solid #d9cfae;
  background:#fffdf6; color:#1b211d; font-family:inherit; font-size:15px; outline:none;
  transition:border-color .2s, box-shadow .2s; box-sizing:border-box;
}
.contact-form-card input:focus, .contact-form-card textarea:focus{
  border-color:var(--gold,#c9a227); box-shadow:0 0 0 4px rgba(201,162,39,.15);
}
.contact-form-card textarea{ min-height:130px; resize:vertical; }
.contact-form-card .cf-send{
  width:100%; margin-top:20px; padding:14px; border:none; border-radius:13px; cursor:pointer;
  background:linear-gradient(135deg,#155c41,#0b3d2e); color:#f7f2e7;
  font-family:inherit; font-weight:800; font-size:16px;
  box-shadow:0 12px 26px -10px rgba(11,61,46,.7); transition:transform .15s;
}
.contact-form-card .cf-send:hover{ transform:translateY(-2px); }
.contact-form-card .cf-send:disabled{ opacity:.6; cursor:wait; transform:none; }
.cf-status{ margin-top:14px; font-size:14.5px; min-height:22px; text-align:center; }
.cf-status.ok{ color:#1c6b34; font-weight:700; }
.cf-status.err{ color:#8a1f28; font-weight:700; }

/* ---------- اصلاحات ریسپانسیو موبایل (سراسری) ---------- */
html, body{ overflow-x:hidden; } /* هیچ اسکرول افقی ناخواسته‌ای در موبایل */
iframe, video, svg, embed{ max-width:100%; }
input, select, textarea, button{ max-width:100%; }

@media(max-width:760px){
  /* جدول‌های محتوایی به‌جای بیرون‌زدن، داخل خودشان اسکرول می‌شوند */
  main table, section table, .container table{
    display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; white-space:nowrap;
  }
  /* فاصله‌های بزرگ دسکتاپ در موبایل جمع‌تر */
  .hero{ padding:72px 16px 130px; }
  .stat-strip{ padding:0 16px; }
  section{ scroll-margin-top:70px; }
  /* دکمه‌های کنار هم، تمام‌عرض و زیر هم */
  .cta-row{ flex-direction:column; align-items:stretch; }
  .cta-row > a, .cta-row > button{ width:100%; text-align:center; justify-content:center; box-sizing:border-box; }
  /* هیچ کلمه‌ای از کادر بیرون نزند */
  h1, h2, h3, p, li, a{ overflow-wrap:break-word; }
  /* کارت فرم تماس تا لبه‌ها نچسبد */
  .contact-form-card{ padding:24px 18px; }
  /* گریدهای دوستونه‌ی درون‌خطی محتوا در موبایل تک‌ستونه شوند */
  .about-split{ gap:24px; }
}

@media(max-width:420px){
  .hero h1{ font-size:27px; }
  .stat-card{ padding:24px 14px; }
}
