/*
Theme Name: Kianpanahi Trade
Theme URI: https://kianpanahi.ir
Author: Kianpanahi
Description: قالب اختصاصی سایت آموزش و تحلیل ترید کیان‌پناهی
Version: 1.0
Text Domain: kianpanahi-trade
*/

@font-face{
  font-family:'Vazirmatn';
  src:url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Vazirmatn';
  src:url('assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Vazirmatn';
  src:url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight:700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Vazirmatn';
  src:url('assets/fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight:900; font-style:normal; font-display:swap;
}

:root{
  --accent: #111111;
  --accent-dark: #000000;
  --accent-rgb: 17,17,17;
  --btn-text: #ffffff;
  --btn-icon-bg: rgba(255,255,255,.22);
  --btn-sub: rgba(255,255,255,.65);
  --ink: #141414;
  --ink-light: #5a5a58;
  --muted: #8a8a86;
  --bg: #ffffff;
  --bg-soft: #f1f1ef;
  --bg-card: #ffffff;
  --border: #e2e1dc;
  --border-strong: #cfcec6;
  --radius: 8px;
  --max-width: 1180px;
  --yt-red: #FF0000;
  --tel-blue: #229ED9;
  --vip-gold: #C9971F;
  --edu-green: #16A34A;
  --candle-up: #16A34A;
  --candle-down: #DC2626;
}

body[data-theme="dark"]{
  --accent: #ffffff;
  --accent-dark: #e6e6e6;
  --accent-rgb: 255,255,255;
  --btn-text: #0b0b0b;
  --btn-icon-bg: rgba(0,0,0,.18);
  --btn-sub: rgba(0,0,0,.55);
  --ink: #f2f2f0;
  --ink-light: #c8c7c3;
  --muted: #8f8e8a;
  --bg: #0b0b0b;
  --bg-soft: #161615;
  --bg-card: #141413;
  --border: #2b2b29;
  --border-strong: #3c3c39;
}

body{ transition: background-color .2s ease, color .2s ease; }
.card, .site-header{ transition: background-color .2s ease, border-color .2s ease; }

/* ===== Brand-color exception: everything else stays black & white,
   only the YouTube and Telegram icons keep their real brand colors ===== */
.ti-brand-youtube{ color:var(--yt-red) !important; }
.ti-brand-telegram{ color:var(--tel-blue) !important; }
.ti-crown{ color:var(--vip-gold) !important; }
.ti-school{ color:var(--edu-green) !important; }

.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  width:100%;
  z-index:70;
  background: var(--bg-card);
  box-shadow: 0 1px 0 var(--border), 0 12px 24px -20px rgba(0,0,0,.35);
  transition: background-color .2s ease, border-color .2s ease;
}
.site-header::after{
  content:'';
  position:absolute; left:0; right:0; bottom:-1px; height:2px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity:.55;
}

/* وقتی کاربر لاگین وردپرسه، نوار مدیریت بالای صفحه (fixed) رو داره؛
   هدر رو به همون اندازه پایین‌تر می‌بریم که روش نیفته */
/* اطمینان از اینکه نوار مدیریت وردپرس (wpadminbar) همیشه در بالای صفحه ثابت (fixed) بمونه
   و موقع اسکرول محو نشه؛ وگرنه چون هدر سایت به اندازه‌ی ارتفاعش (top:46px موبایل) پایین‌تره،
   بعد از محو شدن نوار مدیریت یه فضای خالی هم‌اندازه‌ش بالای هدر می‌مونه */
#wpadminbar{ position:fixed !important; top:0 !important; }

body.admin-bar .site-header{ top:32px; }
@media screen and (max-width: 782px){
  body.admin-bar .site-header{ top:46px; }
}

.brand-mark{
  display:flex; align-items:center; gap:11px;
  font-weight:500; font-size:17px;
}
.brand-mark__icon{ position:relative; display:flex; }
.brand-mark__glow{
  position:absolute; inset:-8px;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.28) 0%, transparent 70%);
  border-radius:50%;
  animation: brandGlow 3.2s ease-in-out infinite;
}
@keyframes brandGlow{
  0%, 100%{ opacity:.55; transform:scale(.92); }
  50%{ opacity:1; transform:scale(1.06); }
}
.brand-mark__spark{ animation: sparkPulse 3.2s ease-in-out infinite; transform-origin: 36px 6.5px; }
@keyframes sparkPulse{
  0%, 100%{ opacity:.7; transform:scale(1); }
  50%{ opacity:1; transform:scale(1.25); }
}
.brand-mark__text{ display:flex; flex-direction:column; gap:1px; }
.brand-mark__title{ font-weight:700; font-size:16px; line-height:1.2; }
.brand-mark__sub{ font-size:11px; color:var(--muted); font-weight:400; }

.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:50%;
  border:1px solid var(--border);
  background: var(--bg-soft);
  cursor:pointer;
  color: var(--ink);
}
.theme-toggle i{ font-size:16px; }

*{ box-sizing:border-box; }

html{ overflow-x:hidden; max-width:100%; }
body{ overflow-x:hidden; max-width:100%; }

body{
  margin:0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(26,26,26,0.035) 1px, transparent 1px),
    linear-gradient(rgba(26,26,26,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--ink);
  direction: rtl;
  line-height:1.8;
  font-size:16px;
}
body[data-theme="dark"]{
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
}

img{ max-width:100%; height:auto; display:block; }

a{ color:inherit; text-decoration:none; }

.container{ max-width:var(--max-width); margin:0 auto; padding:0 20px; }

h1,h2,h3,h4{ font-weight:500; margin:0 0 12px; line-height:1.4; }
h1{ font-size:28px; }
h2{ font-size:22px; }
h3{ font-size:18px; }

p{ margin:0 0 14px; color:var(--ink-light); }

.btn{
  display:inline-block;
  background: var(--accent);
  color: var(--btn-text);
  border:none;
  border-radius: var(--radius);
  padding:10px 22px;
  font-size:14px;
  font-weight:500;
  font-family: inherit;
  cursor:pointer;
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s ease, opacity .15s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(var(--accent-rgb),.5); }
.btn:active{ transform: scale(.98) translateY(0); }
.btn-outline{
  background: transparent;
  color: var(--ink);
  border:1px solid var(--border);
}
.btn-outline:hover{ border-color: var(--accent); box-shadow:none; }

.card{
  position:relative;
  overflow:hidden;
  background: var(--bg-card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:18px;
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s cubic-bezier(.16,1,.3,1), border-color .28s ease;
}
.card::before{
  content:'';
  position:absolute; top:0; left:50%; width:0; height:2.5px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width .4s cubic-bezier(.16,1,.3,1), left .4s cubic-bezier(.16,1,.3,1);
  z-index:1;
}
.card:hover::before{ width:100%; left:0; }
.card::after{
  content:'';
  position:absolute;
  top:-40%; left:-20%; right:-20%; height:100%;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb),.4) 0%, transparent 70%);
  opacity:0;
  transition: opacity .5s ease;
  pointer-events:none;
}
.card:hover::after{ opacity:1; }
.card:hover{
  transform: translateY(-5px);
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.18);
  border-color: var(--accent);
}
.card i{ transition: transform .28s cubic-bezier(.16,1,.3,1), color .22s ease; }
.card:hover i{ transform: scale(1.12) translateY(-2px); color: var(--accent-dark); }
body[data-theme="dark"] .card:hover i{ color: var(--accent); }
.card:hover div{ color: var(--accent-dark); transition: color .22s ease; }
body[data-theme="dark"] .card:hover div{ color: var(--accent); }

.section{ padding:48px 0; }
.section-title{ font-size:13px; color:var(--ink-light); margin-bottom:16px; }
.section-title--strong{
  font-size:19px;
  font-weight:600;
  color:var(--ink);
  position:relative;
  padding-inline-start:14px;
  margin-bottom:22px;
}
.section-title--strong::before{
  content:'';
  position:absolute;
  right:0;
  top:2px;
  bottom:2px;
  width:4px;
  border-radius:4px;
  background:var(--accent);
}

.grid{ display:grid; gap:16px; }
.grid-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-5{ grid-template-columns: repeat(5, minmax(0,1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }

/* ===== Quick-link cards (education / VIP / telegram / youtube) ===== */
.quick-link{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-align:center;
  padding:30px 16px;
  line-height:1;
  background: rgba(var(--accent-rgb), .05);
  border:1px solid var(--border);
  border-radius:14px;
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s cubic-bezier(.16,1,.3,1), border-color .28s ease, background .28s ease;
}
.quick-link__icon{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  transition: transform .28s cubic-bezier(.16,1,.3,1);
}
.quick-link__icon i{ font-size:24px; line-height:1; color:var(--accent); transition: color .22s ease; }
.quick-link__label{ font-size:13.5px; font-weight:500; line-height:1; color:var(--ink); }
.quick-link:hover{
  transform: translateY(-5px);
  background: rgba(var(--accent-rgb), .09);
  border-color: rgba(var(--accent-rgb), .5);
  box-shadow: 0 16px 30px -16px rgba(var(--accent-rgb), .25);
}
.quick-link:hover .quick-link__icon{ transform: scale(1.08); }
.quick-link:hover .quick-link__icon i{ color: var(--btn-text); }

/* dropdown nav */
.main-nav ul{ position:relative; }
.main-nav li{ position:relative; }
.main-nav > ul > li > a{
  position:relative;
  padding-bottom:2px;
}
.main-nav > ul > li > a::after{
  content:'';
  position:absolute;
  right:0; bottom:-3px;
  width:0; height:2px;
  background: var(--accent);
  transition: width .25s cubic-bezier(.16,1,.3,1);
}
.main-nav > ul > li:hover > a::after{ width:100%; }

/* invisible bridge so the dropdown doesn't close when the cursor moves down to it */
.main-nav li > .sub-menu::before{
  content:'';
  position:absolute;
  top:-10px; right:0; left:0;
  height:10px;
}
.main-nav .sub-menu{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform: translateY(6px) scale(.97);
  transform-origin: top center;
  transition: opacity .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1), visibility .3s;
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  margin:0;
  padding:6px;
  background: var(--bg-card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  min-width:170px;
  list-style:none;
  box-shadow:0 16px 32px -10px rgba(0,0,0,.16);
  z-index:20;
}
.main-nav li:hover > .sub-menu,
.main-nav li.is-hover-open > .sub-menu{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform: translateY(0) scale(1);
}
.main-nav .sub-menu li{ padding:0; }
.main-nav .sub-menu a{
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 10px;
  font-size:13px;
  border-radius:6px;
  transition: background .18s ease, padding-right .18s ease, color .18s ease;
}
.main-nav .sub-menu a::before{
  content:'';
  width:0;
  height:5px;
  border-radius:50%;
  background: var(--accent);
  transition: width .18s ease;
  flex:none;
}
.main-nav .sub-menu a:hover{
  background: var(--bg-soft);
  color: var(--accent-dark);
  padding-right:14px;
}
.main-nav .sub-menu a:hover::before{ width:5px; }
body[data-theme="dark"] .main-nav .sub-menu a:hover{ color: var(--accent); }

/* nested (2nd-level) submenu flies out sideways instead of stacking below */
.main-nav .sub-menu .sub-menu{
  top:-6px;
  right:calc(100% + 8px);
  left:auto;
}
.main-nav .sub-menu .sub-menu::before{
  content:'';
  position:absolute;
  top:0; bottom:0; right:-8px; width:8px;
}

/* دکمه فلش toggle زیرمنو: پیش‌فرض همیشه مخفیه، فقط تو موبایل (پایین‌تر) نمایش داده می‌شه */
.nav-submenu-toggle{ display:none; }

.footer-link{ color:var(--muted); font-size:12px; }

/* ===== Mobile hamburger menu ===== */
.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:50%;
  border:1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  cursor:pointer;
  flex:none;
}
.nav-toggle i{ font-size:18px; }
.nav-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:transparent;
  z-index:60;
}
.nav-overlay.is-visible{ display:block; }

@media (max-width: 860px){
  .nav-toggle{ display:inline-flex; }
  .nav-cta-btn{ display:none; }

  .main-nav{
    position:fixed;
    top:0;
    right:0;
    height:100%;
    width:min(78vw, 300px);
    background: var(--bg-card);
    border-inline-start:1px solid var(--border);
    box-shadow:-14px 0 34px -16px rgba(0,0,0,.35);
    padding:72px 20px 24px;
    overflow-y:auto;
    z-index:61;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.16,1,.3,1);
  }
  .main-nav.is-open{ transform: translateX(0); }

  .main-nav > ul{
    display:flex !important;
    flex-direction:column !important;
    gap:4px !important;
    width:100%;
  }
  .main-nav > ul > li{ width:100%; }
  .main-nav > ul > li > a{
    display:block;
    padding:12px 6px;
    font-size:15px;
    border-bottom:1px solid var(--border);
  }
  .main-nav > ul > li > a::after{ display:none; }

  /* آیتم‌هایی که زیرمنو دارن: لینک سرفصل + دکمه فلش کنار هم، توی یه ردیف */
  .main-nav li:has(> .sub-menu){
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    border-bottom:1px solid var(--border);
  }
  .main-nav li:has(> .sub-menu) > a{
    flex:1 1 auto;
    border-bottom:none;
  }
  .main-nav li:has(> .sub-menu) > .sub-menu{
    flex-basis:100%;
    width:100%;
    border-bottom:none;
  }

  /* دکمه فلش toggle زیرمنو */
  .nav-submenu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    background:none;
    border:none;
    cursor:pointer;
    padding:10px 10px;
    color:var(--muted);
    line-height:1;
  }
  .nav-submenu-toggle:hover{ color:var(--accent); }
  .nav-submenu-toggle i{ transition: transform .2s; }
  .main-nav li.nav-submenu-open > .nav-submenu-toggle i{
    transform: rotate(-90deg);
  }

  /* submenus become inline/expanded, not floating dropdowns, on mobile */
  .main-nav .sub-menu{
    position:static;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:none;
    display:none;
    box-shadow:none;
    border:none;
    background:var(--bg-soft);
    border-radius:6px;
    margin:4px 0 8px;
    min-width:0;
  }
  .main-nav li.nav-submenu-open > .sub-menu{ display:block; }
  .main-nav li:hover > .sub-menu{
    /* disable hover-open on touch/mobile widths */
    display: none;
  }
  .main-nav li.nav-submenu-open:hover > .sub-menu{ display:block; }

  body.nav-is-open{ overflow:hidden; }
}

/* ===== Channels banner (below header) ===== */
.channels-bar{
  position:relative;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom:1px solid var(--border);
  overflow:hidden;
}
.channels-bar::before{
  content:'';
  position:absolute;
  top:0; right:-10%; width:55%; height:220%;
  background: linear-gradient(100deg, transparent 40%, rgba(var(--accent-rgb),.07) 55%, transparent 70%);
  transform: rotate(-6deg);
  pointer-events:none;
}
.channels-bar__inner{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
  padding:16px 20px;
}
.channels-bar__label-group{
  display:flex; flex-direction:column; gap:6px;
}
.channels-bar__label{
  display:flex; align-items:center; gap:8px;
  font-size:13px; font-weight:500;
  color:var(--ink-light);
  white-space:nowrap;
}
.channels-bar__label--sub{
  font-size:12px;
  color:var(--muted);
  margin-right:16px;
}
.channels-bar__dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--accent);
  box-shadow:0 0 0 0 rgba(var(--accent-rgb),.5);
  animation: channelsDotPulse 1.8s ease-out infinite;
}
.channels-bar__dot--sm{
  width:5px; height:5px;
}
@keyframes channelsDotPulse{
  0%{ box-shadow:0 0 0 0 rgba(var(--accent-rgb),.5); }
  70%{ box-shadow:0 0 0 8px rgba(var(--accent-rgb),0); }
  100%{ box-shadow:0 0 0 0 rgba(var(--accent-rgb),0); }
}
.channels-bar__links{
  display:flex; align-items:stretch; gap:10px; flex-wrap:wrap;
}

.channel-pill{
  position:relative;
  display:flex; align-items:center; gap:10px;
  border-radius:11px;
  padding:9px 16px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, border-color .25s ease, background .25s ease;
  overflow:hidden;
}
.channel-pill__icon{
  position:relative;
  display:flex; align-items:center; justify-content:center;
  width:30px; height:30px;
  flex:none;
}
.channel-pill__icon i{ font-size:16px; }
.channel-pill__text{ display:flex; flex-direction:column; gap:0; line-height:1.25; }
.channel-pill__title{ font-size:13.5px; font-weight:500; }
.channel-pill__sub{ font-size:11px; color:var(--muted); }

.channel-pill__badge{
  position:absolute; top:-6px; inset-inline-end:-8px;
  min-width:17px; height:17px; padding:0 4px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px;
  background:#ef4444; color:#fff;
  font-size:10px; font-weight:700; line-height:1;
  box-shadow:0 0 0 2px var(--card, #fff);
  animation: kpForumBadgePop .35s ease-out, kpForumBadgePulse 2.2s ease-in-out 1s infinite;
}
@keyframes kpForumBadgePop{
  0%{ transform:scale(0); }
  70%{ transform:scale(1.15); }
  100%{ transform:scale(1); }
}
@keyframes kpForumBadgePulse{
  0%, 100%{ box-shadow:0 0 0 2px var(--card, #fff), 0 0 0 0 rgba(239,68,68,.55); }
  50%{ box-shadow:0 0 0 2px var(--card, #fff), 0 0 0 5px rgba(239,68,68,0); }
}

.channel-pill--primary{
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color:var(--btn-text);
  box-shadow:0 8px 18px -8px rgba(var(--accent-rgb),.55);
}
.channel-pill--primary .channel-pill__icon{ color:var(--btn-text); }
.channel-pill--primary .channel-pill__sub{ color:var(--btn-sub); }
.channel-pill--primary .channel-pill__glow{
  position:absolute; inset:-40%;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, transparent 65%);
  opacity:0;
  transition: opacity .3s ease;
}
.channel-pill--primary:hover .channel-pill__glow{ opacity:1; }
.channel-pill--primary:hover{ transform: translateY(-3px); box-shadow:0 14px 26px -8px rgba(var(--accent-rgb),.7); }

.channel-pill--secondary{
  background: var(--bg-card);
  border:1px solid var(--border);
  color: var(--ink);
}
.channel-pill--secondary .channel-pill__icon{ color: var(--accent-dark); }
body[data-theme="dark"] .channel-pill--secondary .channel-pill__icon{ color: var(--accent); }
.channel-pill--secondary:hover{ transform: translateY(-3px); border-color: var(--accent); box-shadow:0 12px 22px -10px rgba(0,0,0,.18); }

.channel-pill--minor{
  background: transparent;
  border:1px solid var(--border);
  color: var(--ink-light);
  padding:8px 13px;
}
.channel-pill--minor .channel-pill__icon{ width:22px; height:22px; color:var(--muted); }
.channel-pill--minor .channel-pill__icon i{ font-size:14px; }
.channel-pill--minor .channel-pill__title{ font-size:12.5px; }
.channel-pill--minor:hover{ border-color: var(--accent); color: var(--accent-dark); background: rgba(var(--accent-rgb),.06); }
body[data-theme="dark"] .channel-pill--minor:hover{ color: var(--accent); }

.channel-pill--forum{
  background: rgba(59,130,246,.1);
  border: 1.5px solid rgba(59,130,246,.35);
  color: #3b82f6;
}
.channel-pill--forum .channel-pill__icon{ color: #3b82f6; }
.channel-pill--forum:hover{ transform: translateY(-3px); background: rgba(59,130,246,.18); border-color: #3b82f6; box-shadow: 0 12px 22px -10px rgba(59,130,246,.35); }

@media (max-width: 860px){
  .channels-bar__inner{ justify-content:center; text-align:center; }
  .channels-bar__links{ justify-content:center; width:100%; }
  .channels-bar__label-group{ align-items:center; }
  .channels-bar__label--sub{ margin-right:0; }
}

@media (max-width: 640px){
  .channel-pill--secondary .channel-pill__sub, .channel-pill--primary .channel-pill__sub, .channel-pill--forum .channel-pill__sub{ display:none; }
}

@media (max-width: 780px) and (min-width: 641px){
  .grid-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 780px){
  .grid-4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-5{ display:flex; flex-wrap:wrap; justify-content:center; gap:16px; }
  .grid-5 .quick-link{ flex:0 0 calc(50% - 8px); }
  h1{ font-size:22px; }
  h2{ font-size:19px; }
  .section{ padding:32px 0; }
}

@media (max-width: 640px){
  .grid-3{ grid-template-columns: 1fr; }
}

/* ===== Scroll reveal ===== */
.reveal{
  opacity:0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible{ opacity:1; transform:translateY(0); }
.reveal-delay-1{ transition-delay:.08s; }
.reveal-delay-2{ transition-delay:.16s; }
.reveal-delay-3{ transition-delay:.24s; }

/* ===== Hero section ===== */
.hero{ overflow:hidden; position:relative; padding:32px 0 28px; }
.hero__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:36px;
  text-align:start;
}
.hero__content{ flex:1 1 380px; min-width:0; }
.hero__content h1{ margin-bottom:14px; }
.hero__content p{ font-size:15px; max-width:480px; }
.hero__visual{
  flex:1 1 320px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  min-width:0;
}
.hero-chart{
  width:100%;
  max-width:440px;
  height:auto;
}
.hero-chart__grid line{ stroke:var(--border); stroke-width:1; opacity:.6; }
.hero-chart__candle{
  animation: heroCandleRise .9s cubic-bezier(.16,1,.3,1) both;
  transform-box: fill-box;
  transform-origin: bottom center;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
  cursor:pointer;
}
.hero-chart__candle:nth-of-type(1){ animation-delay:.05s; }
.hero-chart__candle:nth-of-type(2){ animation-delay:.15s; }
.hero-chart__candle:nth-of-type(3){ animation-delay:.25s; }
.hero-chart__candle:nth-of-type(4){ animation-delay:.35s; }
.hero-chart__candle:nth-of-type(5){ animation-delay:.45s; }
.hero-chart__candle:nth-of-type(6){ animation-delay:.55s; }
@keyframes heroCandleRise{
  from{ opacity:0; transform: scaleY(.4) translateY(14px); }
  to{ opacity:1; transform: scaleY(1) translateY(0); }
}

/* gentle continuous bob once the rise-in finishes, so the chart stays alive */
.hero-chart__candle--float1{ animation-name: heroCandleRise, heroFloatA; animation-duration:.9s, 3.4s; animation-delay:.05s, 1s; animation-iteration-count:1, infinite; animation-timing-function: cubic-bezier(.16,1,.3,1), ease-in-out; }
.hero-chart__candle--float2{ animation-name: heroCandleRise, heroFloatB; animation-duration:.9s, 3.8s; animation-delay:.15s, 1.1s; animation-iteration-count:1, infinite; animation-timing-function: cubic-bezier(.16,1,.3,1), ease-in-out; }
.hero-chart__candle--float3{ animation-name: heroCandleRise, heroFloatA; animation-duration:.9s, 3.1s; animation-delay:.25s, .9s; animation-iteration-count:1, infinite; animation-timing-function: cubic-bezier(.16,1,.3,1), ease-in-out; }
@keyframes heroFloatA{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}
@keyframes heroFloatB{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

/* hover: the candle under the cursor rises and brightens, others stay put */
.hero-chart__candle:hover{
  animation-play-state: paused;
  transform: translateY(-10px) scaleY(1.06) !important;
}
.hero-chart__candle:hover rect{ filter: brightness(1.18); }
.hero-chart__line{
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: heroLineDraw 1.6s cubic-bezier(.16,1,.3,1) .3s forwards;
}
@keyframes heroLineDraw{ to{ stroke-dashoffset:0; } }

@media (max-width: 860px){
  .hero__inner{ flex-direction:column; justify-content:flex-start; text-align:center; gap:24px; }
  .hero__content p{ margin-left:auto; margin-right:auto; }
  .hero__content, .hero__visual{ flex:none; width:100%; }
  .hero__visual{ order:-1; max-width:420px; margin:0 auto; }
}

/* ===== Telegram featured posts ===== */
.telegram-posts{
  column-width:300px;
  column-gap:16px;
}
.telegram-posts__item{
  display:inline-block;
  width:100%;
  vertical-align:top;
  break-inside:avoid;
  -webkit-column-break-inside:avoid;
  margin:0 0 16px;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:12px;
  overflow-y:auto;
  overflow-x:hidden;
  max-height:420px;
  padding:2px;
}
.telegram-posts__item iframe{
  width:100% !important;
  max-width:100% !important;
}

@media (prefers-reduced-motion: reduce){
  .brand-mark__glow, .brand-mark__spark, .card::after, .card, .btn, .main-nav .sub-menu, .channels-bar__dot, .channel-pill, .channel-pill__glow,
  .reveal, .hero-chart__candle, .hero-chart__line{
    animation: none !important;
    transition: none !important;
  }
  .reveal{ opacity:1 !important; transform:none !important; }
  .hero-chart__candle{ opacity:1 !important; transform:none !important; }
  .hero-chart__line{ stroke-dashoffset:0 !important; }
}

/* ===== Single post / page content styling ===== */
.post-hero{ text-align:right; margin-bottom:22px; }
.post-badge{
  display:inline-block;
  font-size:11px;
  font-weight:500;
  padding:4px 12px;
  border:1px solid;
  border-radius:999px;
  margin-bottom:12px;
}
.post-title{ font-size:26px; margin-bottom:10px; }

/* ===== برچسب «آکادمی کیان‌پناهی» ===== */
.academy-badge{
  display:inline-flex; align-items:center; gap:5px;
  font-size:11px; font-weight:600;
  padding:4px 11px;
  border-radius:999px;
  background: linear-gradient(135deg, #c9922c, #EF9F27);
  color:#171613;
  vertical-align:middle;
  white-space:nowrap;
}
.academy-badge i{ font-size:13px; }

.new-badge{
  display:inline-flex; align-items:center;
  font-size:11px; font-weight:700;
  padding:4px 12px;
  border-radius:999px;
  background:#e0263f;
  color:#fff;
  vertical-align:middle;
  white-space:nowrap;
}

/* بسته‌بندی مشترک برچسب‌ها — تا «جدید» و «آکادمی» هیچ‌وقت روی هم نیفتن */
.post-badges{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  margin-bottom:8px;
}
.post-badges--ribbon{
  position:absolute;
  top:10px; right:10px;
  z-index:2;
  flex-direction:column;
  align-items:flex-end;
  margin-bottom:0;
}
.post-badges--ribbon .academy-badge,
.post-badges--ribbon .new-badge{
  box-shadow:0 3px 10px -3px rgba(0,0,0,.45);
}

.post-badges-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.post-badges-row .post-badge{ margin-bottom:0; }
.post-meta{
  font-size:12.5px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.post-meta i{ font-size:14px; }
.post-meta__dot{ margin:0 2px; }

.post-cover{
  border-radius:14px;
  overflow:hidden;
  margin-bottom:24px;
  border:1px solid var(--border);
}
.post-cover img{ width:100%; display:block; }

/* ===== Post video frame: aspect ratio is set dynamically by JS to match the
   actual video (landscape or portrait) — 16/9 below is just the fallback
   shown before metadata loads. max-height keeps very tall portrait videos
   from taking over the whole viewport. ===== */
.post-video-frame{
  position:relative;
  aspect-ratio:16/9;
  max-height:80vh;
  margin:0 auto 24px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#000;
}
.post-video-frame--portrait{
  max-width:min(100%, calc(80vh * 9 / 16));
}
.post-video-frame video{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:#000;
}
.post-video-frame__fullscreen{
  position:absolute;
  bottom:12px;
  left:12px;
  width:38px;
  height:38px;
  border-radius:50%;
  border:none;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.55);
  color:#fff;
  cursor:pointer;
  font-size:17px;
  transition: background .2s ease, transform .2s ease;
}
.post-video-frame__fullscreen:hover{ background:rgba(0,0,0,.8); transform:scale(1.07); }
.post-video-frame__processing-badge{
  position:absolute;
  top:12px;
  right:12px;
  left:12px;
  background:rgba(0,0,0,.65);
  color:#fff;
  font-size:12px;
  padding:6px 12px;
  border-radius:8px;
  text-align:center;
}

/* ===== "Watch on YouTube" button — shown after the post content ends ===== */
.post-youtube-cta{ text-align:center; margin:20px 0 8px; }
.btn-youtube{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--bg-card);
  color:var(--ink);
  border:1.5px solid var(--yt-red);
  padding:11px 24px;
  border-radius:999px;
  font-weight:600;
  font-size:14px;
  transition: background .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.btn-youtube i{ font-size:18px; }
.btn-youtube:hover{ background:var(--yt-red); transform:translateY(-2px); box-shadow:0 12px 22px -12px rgba(255,0,0,.55); }
.btn-youtube:hover i.ti-brand-youtube{ color:#fff !important; }
.btn-youtube:hover{ color:#fff; }

.post-card{
  background: var(--bg-card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:32px;
  box-shadow: 0 18px 34px -28px rgba(0,0,0,.25);
}

.entry-content{ font-size:16px; line-height:2; color:var(--ink); }
.entry-content p{ margin:0 0 18px; color:var(--ink); }
.entry-content h2{ font-size:20px; margin:32px 0 14px; padding-top:18px; border-top:1px solid var(--border); }
.entry-content h2:first-child{ margin-top:0; padding-top:0; border-top:none; }
.entry-content h3{ font-size:17px; margin:26px 0 12px; }
.entry-content img{ border-radius:10px; margin:18px 0; }
.entry-content ul, .entry-content ol{ margin:0 0 18px; padding-inline-start:22px; color:var(--ink); }
.entry-content li{ margin-bottom:8px; }
.entry-content blockquote{
  margin:20px 0;
  padding:14px 18px;
  border-inline-start:3px solid var(--accent);
  background: var(--bg-soft);
  border-radius:8px;
  color:var(--ink-light);
}
.entry-content a{ color:var(--accent); text-decoration:underline; text-underline-offset:3px; }

.post-cta{
  margin-top:28px;
  padding:20px 24px;
  border-radius:14px;
  background: var(--bg-soft);
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
}
.post-cta p{ font-size:13px; color:var(--muted); }

/* ===== Archive grid cards ===== */
.archive-card{
  display:block;
  border-color: var(--border-strong);
  box-shadow: 0 2px 10px -6px rgba(0,0,0,.12);
}
.archive-card h3{ border-top:1px solid var(--border); padding-top:10px; }
.archive-card__cover{
  position:relative;
  border-radius:10px;
  overflow:hidden;
  margin-bottom:4px;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
}
.archive-card__cover img{ width:100%; height:100%; display:block; object-fit:cover; }

/* ===== Announcements feed (کانال اطلاع‌رسانی، شبیه تلگرام) ===== */
.kp-feed-page{ max-width:640px; }
.kp-feed{
  display:flex;
  flex-direction:column;
  gap:18px;
  margin-top:28px;
  padding:20px;
  border-radius:16px;
  background:
    radial-gradient(circle at 12% 18%, rgba(34,158,217,.05), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(34,158,217,.05), transparent 40%),
    var(--bg-soft);
}
.kp-bubble{
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-top-right-radius: 4px;
  padding: 14px 16px 12px;
  box-shadow: 0 2px 10px -6px rgba(0,0,0,.15);
  max-width: 92%;
  align-self: flex-start;
}
.kp-bubble__head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.kp-bubble__avatar{
  width:28px; height:28px;
  border-radius:50%;
  background: var(--tel-blue);
  color:#fff;
  font-size:13px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-shrink:0;
}
.kp-bubble__avatar img{ width:100%; height:100%; object-fit:cover; }
.kp-bubble__name{ font-size:13px; font-weight:700; color:var(--tel-blue); }
.kp-bubble__image{
  border-radius:10px;
  overflow:hidden;
  margin-bottom:10px;
}
.kp-bubble__image img{ width:100%; display:block; }
.kp-bubble__text{
  font-size:15px;
  line-height:1.9;
  color:var(--ink);
}
.kp-bubble__text p{ margin:0 0 8px; }
.kp-bubble__text p:last-child{ margin-bottom:0; }
.kp-bubble__time{
  display:block;
  text-align:left;
  font-size:11px;
  color:var(--muted);
  margin-top:8px;
}
@media (max-width:640px){
  .kp-bubble{ max-width:100%; }
}
.kp-bubble__text a{ color:var(--tel-blue); text-decoration:underline; word-break:break-word; }
.kp-divider{
  height:1px;
  background:var(--border);
  margin:0 6px;
}

.kp-feed-wrap{ position:relative; }
.kp-feed-wrap.is-scrollable .kp-feed{
  max-height:640px;
  overflow-y:auto;
  padding-bottom:26px;
  scrollbar-width:thin;
  scrollbar-color:var(--tel-blue) transparent;
}
.kp-feed-wrap.is-scrollable .kp-feed::-webkit-scrollbar{ width:6px; }
.kp-feed-wrap.is-scrollable .kp-feed::-webkit-scrollbar-thumb{ background:var(--tel-blue); border-radius:6px; }
.kp-feed-wrap.is-scrollable .kp-feed::-webkit-scrollbar-track{ background:transparent; }
.kp-feed-fade{
  position:absolute;
  right:0; left:0; bottom:0;
  height:34px;
  border-radius:0 0 16px 16px;
  background:linear-gradient(to top, var(--bg-soft), transparent);
  pointer-events:none;
}

/* ===== قاب آمار سایت (فوتر) ===== */
.kp-site-stats{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px 18px;
  background:var(--bg-soft);
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px 18px;
  margin-bottom:16px;
  font-size:12.5px;
}
.kp-site-stats__title{
  font-weight:700;
  color:var(--ink);
  font-size:12.5px;
  padding-left:4px;
  border-left:1px solid var(--border);
  margin-left:2px;
}
.kp-site-stats__item{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
  color:var(--muted);
}
.kp-site-stats__item i{ font-size:14px; color:var(--tel-blue); }
.kp-site-stats__item b{ color:var(--ink); font-weight:700; }
@media (max-width:480px){
  .kp-site-stats{ gap:8px 12px; font-size:12px; }
  .kp-site-stats__title{ width:100%; border-left:none; padding-left:0; border-bottom:1px solid var(--border); padding-bottom:6px; margin-bottom:2px; }
}


/* ===== VIP plan cards ===== */
.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }

.vip-plan-card{
  position:relative;
  text-align:center;
  padding:26px 20px;
}
.vip-plan-card__discount{
  position:absolute;
  top:14px;
  left:14px;
  background: var(--vip-gold);
  color:#2b1400;
  font-size:10.5px;
  font-weight:600;
  padding:5px 11px;
  border-radius:999px;
  white-space:nowrap;
}
.vip-plan-card__prices{ margin:12px 0 4px; }
.vip-plan-card__price{
  font-size:22px;
  font-weight:600;
  color:var(--ink);
}
.vip-plan-card__price span{ font-size:13px; font-weight:400; color:var(--muted); }
.vip-plan-card__price-usd{ font-size:13px; color:var(--muted); margin-top:2px; }

@media (max-width: 780px){
  .grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; }
  .vip-plan-card{ padding:18px 12px; }
}

/* ===== Interactive hero chart style tabs ===== */
.hero-chart-tabs{
  display:flex;
  gap:10px;
  margin-bottom:18px;
  width:100%;
  max-width:440px;
}
.hero-chart-tab{
  flex:1;
  padding:12px 10px;
  font-size:13.5px;
  font-family:inherit;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--bg-card);
  color:var(--ink-light);
  cursor:pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.hero-chart-tab:hover{ transform: translateY(-2px); }
.hero-chart-tab.is-active{
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-text);
  font-weight:500;
}
.hero-chart-caption{
  text-align:center;
  font-size:12.5px;
  color:var(--muted);
  margin:10px 0 0;
}

@keyframes kianpanahi-candle-float{
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.hero-chart__candle-group{
  animation: kianpanahi-candle-float 3.6s ease-in-out infinite;
}

/* ===== Archive hamburger filter menu ===== */
.archive-filter{
  position:relative;
  display:flex;
  justify-content:center;
  margin-bottom:28px;
}
.archive-filter__toggle{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 18px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--ink);
  font-family:inherit;
  font-size:13.5px;
  cursor:pointer;
}
.archive-filter__burger{
  display:flex;
  flex-direction:column;
  gap:3px;
  width:16px;
}
.archive-filter__burger span{
  display:block;
  height:2px;
  border-radius:2px;
  background:var(--ink);
}
.archive-filter__panel{
  position:absolute;
  top:calc(100% + 8px);
  right:50%;
  transform:translateX(50%) translateY(-6px);
  min-width:220px;
  max-width:90vw;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:8px;
  box-shadow:0 18px 34px -20px rgba(0,0,0,.28);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:30;
}
.archive-filter__panel.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateX(50%) translateY(0);
}
.archive-filter__item{
  display:block;
  padding:9px 12px;
  border-radius:8px;
  font-size:13.5px;
  color:var(--ink-light);
}
.archive-filter__item:hover{ background:var(--bg-soft); color:var(--ink); }
.archive-filter__item.is-active{
  background:var(--bg-soft);
  color:var(--ink);
  font-weight:500;
}

@media (max-width: 640px){
  .archive-filter__panel{ min-width:180px; }
}

/* ===== Fullscreen lightbox for images/videos inside post content ===== */
.kianpanahi-expandable{ position:relative; display:block; }
.kianpanahi-expand-btn{
  position:absolute;
  bottom:10px;
  left:10px;
  width:34px;
  height:34px;
  border-radius:50%;
  border:none;
  background:rgba(0,0,0,.55);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:15px;
  opacity:0;
  transition:opacity .18s ease;
}
.kianpanahi-expandable:hover .kianpanahi-expand-btn{ opacity:1; }
@media (hover: none){
  .kianpanahi-expand-btn{ opacity:1; }
}

.kianpanahi-lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.9);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease;
  padding:24px;
}
.kianpanahi-lightbox.is-open{ opacity:1; visibility:visible; }
.kianpanahi-lightbox__inner{ max-width:min(92vw, 1100px); max-height:88vh; }
.kianpanahi-lightbox__inner img,
.kianpanahi-lightbox__inner video{
  max-width:100%;
  max-height:88vh;
  border-radius:8px;
  display:block;
  margin:0 auto;
}
.kianpanahi-lightbox__close{
  position:absolute;
  top:18px;
  left:18px;
  width:40px;
  height:40px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

/* ===== Archive pagination ===== */
.archive-pagination{ display:flex; justify-content:center; margin-top:36px; }
.archive-pagination ul.page-numbers{
  display:flex; align-items:center; gap:6px;
  list-style:none; margin:0; padding:0;
}
.archive-pagination .page-numbers a,
.archive-pagination .page-numbers span{
  display:flex; align-items:center; justify-content:center;
  min-width:38px; height:38px; padding:0 10px;
  border:1px solid var(--border-strong);
  border-radius:8px;
  font-size:13px;
  color:var(--ink);
  text-decoration:none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.archive-pagination .page-numbers a:hover{ border-color:var(--accent); }
.archive-pagination .page-numbers .current{
  background: var(--accent);
  color: var(--btn-text);
  border-color: var(--accent);
}
.archive-pagination .page-numbers .dots{ border:none; }

/* ===== Contact page — channel cards ===== */
.contact-card{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:inherit;
}
.contact-card__icon{
  flex:0 0 auto;
  width:48px; height:48px;
  border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background: var(--bg-soft);
  border:1px solid var(--border);
}
.contact-card__icon svg{ width:22px; height:22px; }
.contact-card__body{ flex:1 1 auto; min-width:0; }
.contact-card__title{ font-size:14.5px; font-weight:600; color:var(--ink); margin-bottom:2px; }
.contact-card__desc{ font-size:12.5px; color:var(--muted); line-height:1.6; }
.contact-card__arrow{
  flex:0 0 auto;
  color:var(--muted);
  font-size:18px;
  transition: transform .25s ease, color .25s ease;
}
.contact-card:hover .contact-card__arrow{ transform: translateX(-4px); color:var(--accent-dark); }
body[data-theme="dark"] .contact-card:hover .contact-card__arrow{ color:var(--accent); }

@media (max-width: 720px){
  .contact-grid{ grid-template-columns: 1fr !important; }
}

/* ===== Stats bar (hero → trust numbers) ===== */
.stats-bar{
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  background: var(--bg-card);
}
.stats-bar__grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  padding:28px 20px;
}
.stat-item{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  padding:6px 8px;
  text-align:center;
}
.stat-item + .stat-item::before{
  content:'';
  position:absolute;
  right:100%;
  top:50%;
  transform:translateY(-50%);
  width:1px;
  height:32px;
  background:var(--border);
}
.stat-item__value{
  font-family:'Space Grotesk','Vazirmatn',sans-serif;
  font-size:clamp(18px,2.4vw,26px);
  font-weight:700;
  color:var(--ink);
  line-height:1.1;
  display:flex;
  align-items:baseline;
  gap:1px;
}
.stat-item__plus{ color:var(--vip-gold); font-size:.75em; }
.stat-item__label{
  font-size:11.5px;
  color:var(--muted);
  line-height:1.4;
}

@media (max-width:860px){
  .stats-bar__grid{
    grid-template-columns: repeat(2, 1fr);
    gap:20px 0;
    padding:24px 16px;
  }
  .stat-item + .stat-item::before{ display:none; }
  .stat-item{
    transition: opacity .35s ease, transform .35s ease;
  }
  .stats-bar__grid.is-carousel .stat-item{
    display:none;
    opacity:0;
  }
  .stats-bar__grid.is-carousel .stat-item.is-current{
    display:flex;
    opacity:1;
    animation: kpStatFadeIn .4s ease both;
  }
}
@keyframes kpStatFadeIn{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}
@media (max-width:480px){
  .stats-bar__grid{ grid-template-columns: repeat(2, 1fr); }
}

/* ===== Contact page stat cards (طرح جدا و رنگی، مخصوص صفحه‌ی تماس با ما) ===== */
.kp-contact-stats-section{ padding-top:8px; padding-bottom:8px; }
.kp-contact-stats{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
}
.kp-stat-card{
  --stat-color: var(--accent);
  position:relative;
  flex:1 1 150px;
  max-width:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:8px;
  padding:22px 14px 18px;
  border-radius:16px;
  border:1px solid var(--border);
  background: var(--bg-card);
  overflow:hidden;
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .25s ease, box-shadow .25s ease;
}
.kp-stat-card::before{
  content:'';
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background: var(--stat-color);
  opacity:.85;
}
.kp-stat-card:hover{
  transform: translateY(-4px);
  border-color: var(--stat-color);
  box-shadow: 0 12px 24px -16px var(--stat-color);
}
.kp-stat-card__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:12px;
  background: color-mix(in srgb, var(--stat-color) 14%, transparent);
  color: var(--stat-color);
  font-size:20px;
}
.kp-stat-card__icon svg{ display:block; }
.kp-stat-card__value{
  font-family:'Space Grotesk','Vazirmatn',sans-serif;
  font-size:24px;
  font-weight:700;
  color:var(--ink);
  display:flex;
  align-items:baseline;
  gap:1px;
  margin-top:2px;
}
.kp-stat-card__plus{ color: var(--stat-color); font-size:.7em; }
.kp-stat-card__label{ font-size:12.5px; color:var(--muted); }

@media (max-width:600px){
  .kp-stat-card{ flex:1 1 calc(50% - 14px); max-width:none; }
}


/* ================================================================
   دکمه‌ی شناور دستیار هوش مصنوعی — global
   ================================================================ */

.kp-ai-float-btn {
	position: fixed;
	bottom: 28px;
	left: 28px;
	z-index: 9900;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px 11px 14px;
	background: rgba(59, 130, 246, 0.08);
	border: 1.5px solid rgba(59, 130, 246, 0.25);
	border-radius: 50px;
	box-shadow:
		0 4px 20px -4px rgba(59, 130, 246, 0.18),
		0 2px 8px -2px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	color: rgba(59, 130, 246, 0.85);
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	transition: background .22s, border-color .22s, box-shadow .22s, transform .22s, opacity .22s;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.kp-ai-float-btn:hover {
	background: rgba(59, 130, 246, 0.13);
	border-color: rgba(59, 130, 246, 0.45);
	box-shadow:
		0 8px 28px -6px rgba(59, 130, 246, 0.28),
		0 2px 8px -2px rgba(0, 0, 0, 0.1);
	transform: translateY(-3px);
	color: rgba(59, 130, 246, 1);
}

.kp-ai-float-btn:active {
	transform: translateY(-1px);
}

.kp-ai-float-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.kp-ai-float-btn__text {
	letter-spacing: .02em;
	white-space: nowrap;
}

.kp-ai-float-btn__badge {
	font-size: 10px;
	font-weight: 900;
	background: rgba(59, 130, 246, 0.15);
	color: rgba(59, 130, 246, 0.9);
	border: 1px solid rgba(59, 130, 246, 0.25);
	border-radius: 20px;
	padding: 2px 8px;
	letter-spacing: .03em;
	white-space: nowrap;
}

/* پالس آروم دور دکمه */
@keyframes kp-ai-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.25), 0 4px 20px -4px rgba(59,130,246,.18); }
	70%  { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0),  0 4px 20px -4px rgba(59,130,246,.18); }
	100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0),    0 4px 20px -4px rgba(59,130,246,.18); }
}
.kp-ai-float-btn {
	animation: kp-ai-pulse 2.8s ease-in-out infinite;
}
.kp-ai-float-btn:hover {
	animation: none;
}

/* موبایل */
@media (max-width: 640px) {
	.kp-ai-float-btn {
		bottom: 20px;
		left: 16px;
		padding: 12px;
		border-radius: 50%;
		gap: 0;
	}
	.kp-ai-float-btn__text,
	.kp-ai-float-btn__badge { display: none; }
}

/* Tooltip موبایل دکمه AI */
.kp-ai-tooltip {
	position: fixed;
	bottom: 90px;
	left: 16px;
	z-index: 9901;
	background: rgba(30, 64, 175, 0.92);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
	padding: 10px 16px;
	border-radius: 14px;
	box-shadow: 0 8px 24px -6px rgba(59,130,246,.4);
	pointer-events: none;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
/* دم tooltip */
.kp-ai-tooltip::after {
	content: '';
	position: absolute;
	bottom: -7px;
	left: 18px;
	width: 0;
	height: 0;
	border-left: 7px solid transparent;
	border-right: 7px solid transparent;
	border-top: 7px solid rgba(30, 64, 175, 0.92);
}
.kp-ai-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}


/* ================================================================
   Toast پیام کوتاه — global (برای دکمه AI در همه صفحات)
   ================================================================ */

.kp-toast-wrap {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9950;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
}
.kp-toast {
	background: #1e293b;
	color: #f8fafc;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
	font-size: 13px;
	font-weight: 700;
	padding: 10px 16px;
	border-radius: 10px;
	box-shadow: 0 8px 24px -8px rgba(0,0,0,.35);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .25s, transform .25s;
	pointer-events: none;
	max-width: 320px;
}
.kp-toast.is-show { opacity: 1; transform: translateY(0); }
