/* صفحه اصلی — CSS خالص تا نیازی به build مجدد تیلویند نباشد */

/* ---------- انیمیشن ورود با اسکرول ---------- */
.yx-js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
.yx-js [data-reveal="left"]  { transform: translateX(-36px); }
.yx-js [data-reveal="right"] { transform: translateX(36px); }
.yx-js [data-reveal="zoom"]  { transform: scale(.94); }
.yx-js [data-reveal].is-in { opacity: 1; transform: none; }
/* هیرو بالای صفحه است؛ بدون انتظار برای JS با انیمیشن CSS ظاهر می‌شود */
.yx-js .yx-hero [data-reveal] { opacity: 1; transform: none; transition: none; animation: yx-up .9s cubic-bezier(.2,.7,.2,1) var(--d, 0s) both; }
@keyframes yx-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@keyframes yx-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes yx-blob  { 0%,100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0deg); }
                      50%     { border-radius: 58% 42% 38% 62% / 55% 38% 62% 45%; transform: rotate(8deg); } }
@keyframes yx-pulse { 0% { box-shadow: 0 0 0 0 rgba(27,111,99,.45); } 100% { box-shadow: 0 0 0 14px rgba(27,111,99,0); } }
@keyframes yx-shine { from { transform: translateX(120%) skewX(-20deg); } to { transform: translateX(-220%) skewX(-20deg); } }
@keyframes yx-grad  { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- دکمه‌ها ---------- */
.yx-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 30px; border-radius: 14px;
  font-weight: 800; font-size: 1rem; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.yx-btn--primary { background: #1B6F63; color: #fff; box-shadow: 0 10px 24px -8px rgba(27,111,99,.6); }
.yx-btn--primary:hover { background: #14564C; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(27,111,99,.7); }
.yx-btn--primary::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: yx-shine 3.2s ease-in-out infinite;
}
.yx-btn--ghost { background: rgba(251,250,246,.8); color: #1E2A28; border: 1px solid #DAD5C7; }
.yx-btn--ghost:hover { border-color: #1B6F63; color: #1B6F63; transform: translateY(-2px); }
.yx-btn:focus-visible { outline: 3px solid #B08D57; outline-offset: 3px; }
.yx-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.yx-phone {
  display: inline-flex; align-items: center; gap: 10px; direction: ltr;
  color: #1E2A28; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.yx-phone__icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #DCEFEA; color: #1B6F63; animation: yx-pulse 2s infinite;
}
.yx-phone__icon svg { width: 18px; height: 18px; }
.yx-phone small { display: block; direction: rtl; font-size: .72rem; font-weight: 500; color: #5B655F; }
.yx-phone:hover { color: #1B6F63; }

/* ---------- برچسب و تیتر بخش‌ها ---------- */
.yx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  background: rgba(27,111,99,.08); border: 1px solid rgba(27,111,99,.18);
  color: #1B6F63; font-size: .82rem; font-weight: 700;
}
.yx-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1B6F63; animation: yx-pulse 2s infinite; }
.yx-grad-text {
  background: linear-gradient(90deg, #1B6F63, #2E9384, #B08D57, #1B6F63);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: yx-grad 8s ease-in-out infinite;
}

/* ---------- Hero ---------- */
.yx-hero {
  width: 100%; padding: 56px 0 72px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.yx-hero__text { text-align: right; }
.yx-hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; line-height: 1.35; color: #1E2A28; margin-bottom: 22px; }
.yx-hero__lead { font-size: 1.12rem; line-height: 2; color: #3D453F; margin-bottom: 32px; max-width: 560px; }
.yx-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 30px; }
.yx-hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #5B655F; font-size: .9rem; }
.yx-hero__trust span { display: inline-flex; align-items: center; gap: 6px; }
.yx-hero__trust span::before { content: "✓"; color: #1B6F63; font-weight: 800; }

.yx-hero__media { position: relative; }
.yx-hero__blob {
  position: absolute; inset: -6% -8% -10% -6%; z-index: 0;
  background: linear-gradient(135deg, rgba(27,111,99,.28), rgba(176,141,87,.28));
  animation: yx-blob 14s ease-in-out infinite; filter: blur(2px);
}
.yx-hero__img {
  position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover;
  border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(30,42,40,.45);
  border: 6px solid #FBFAF6;
}
.yx-float {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(251,250,246,.92); backdrop-filter: blur(8px);
  border: 1px solid #DAD5C7; box-shadow: 0 14px 30px -12px rgba(30,42,40,.35);
  font-size: .85rem; font-weight: 700; color: #1E2A28; white-space: nowrap;
  animation: yx-float 6s ease-in-out infinite;
}
.yx-float__dot { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.yx-float small { display: block; font-weight: 500; color: #5B655F; font-size: .72rem; }
.yx-float--a { top: 8%; right: -26px; }
.yx-float--b { bottom: 12%; left: -30px; animation-delay: -2s; }
.yx-float--c { bottom: -18px; right: 18%; animation-delay: -4s; }

/* ---------- مراحل ---------- */
.yx-section { width: 100%; padding: 72px 0; text-align: center; }
.yx-section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; color: #1E2A28; line-height: 1.5; margin-bottom: 14px; }
.yx-section__lead { max-width: 720px; margin: 0 auto 48px; color: #3D453F; font-size: 1.05rem; line-height: 2; }

.yx-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.yx-step {
  position: relative; text-align: right; overflow: hidden;
  background: #FBFAF6; border: 1px solid #DAD5C7; border-radius: 22px;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.yx-step:hover { transform: translateY(-8px); box-shadow: 0 24px 40px -18px rgba(30,42,40,.35); border-color: rgba(27,111,99,.5); }
.yx-step__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.yx-step__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.yx-step:hover .yx-step__media img { transform: scale(1.08); }
.yx-step__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(30,42,40,.55), transparent 55%); }
.yx-step__num {
  position: absolute; bottom: 12px; right: 14px; z-index: 1;
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #1B6F63; color: #fff; font-weight: 800; box-shadow: 0 8px 18px -6px rgba(0,0,0,.4);
}
.yx-step__body { padding: 20px 20px 24px; }
.yx-step h3 { font-size: 1.05rem; font-weight: 800; color: #1E2A28; margin-bottom: 10px; line-height: 1.7; }
.yx-step p { font-size: .9rem; line-height: 1.95; color: #3D453F; }

/* ---------- امکانات ---------- */
.yx-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: right; }
.yx-feature {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px; border-radius: 18px;
  background: #FBFAF6; border: 1px solid #DAD5C7;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.yx-feature:hover { transform: translateY(-4px); border-color: #1B6F63; background: #fff; box-shadow: 0 16px 30px -18px rgba(27,111,99,.6); }
.yx-feature__icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1B6F63, #2E9384); color: #fff;
  transition: transform .4s ease;
}
.yx-feature:hover .yx-feature__icon { transform: rotate(-8deg) scale(1.08); }
.yx-feature__icon svg { width: 20px; height: 20px; }
.yx-feature__text { flex: 1; font-size: .95rem; font-weight: 600; color: #1E2A28; line-height: 1.8; }
.yx-new { flex-shrink: 0; background: #EDE3CF; color: #8A6A2F; font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }

/* ---------- یکپارچه‌سازی ---------- */
.yx-integrations { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.yx-integration {
  width: 210px; padding: 26px 18px; border-radius: 22px;
  background: #FBFAF6; border: 1px solid #DAD5C7;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.yx-integration:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 20px 34px -18px rgba(30,42,40,.4); }
.yx-integration img { width: 60px; height: 60px; object-fit: contain; }
.yx-integration span { font-weight: 800; color: #1E2A28; font-size: .95rem; }

/* ---------- نمونه مقالات ---------- */
.yx-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: right; }
.yx-post {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: #FBFAF6; border: 1px solid #DAD5C7; border-radius: 22px;
  transition: transform .35s ease, box-shadow .35s ease;
}
.yx-post:hover { transform: translateY(-8px); box-shadow: 0 26px 44px -20px rgba(30,42,40,.4); }
.yx-post__media { aspect-ratio: 16 / 10; overflow: hidden; background: #DCEFEA; }
.yx-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.yx-post:hover .yx-post__media img { transform: scale(1.07); }
.yx-post__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.yx-post__tag { align-self: flex-start; background: #DCEFEA; color: #14564C; font-size: .75rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; margin-bottom: 12px; }
.yx-post h3 { font-size: 1.08rem; font-weight: 800; color: #1E2A28; line-height: 1.8; margin-bottom: 10px; }
.yx-post p { font-size: .9rem; line-height: 1.95; color: #3D453F; flex: 1; margin-bottom: 16px; }
.yx-post__more { color: #1B6F63; font-weight: 800; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.yx-post__more i { font-style: normal; transition: transform .3s ease; }
.yx-post:hover .yx-post__more i { transform: translateX(-6px); }

/* ---------- بنر دعوت به اقدام ---------- */
.yx-cta {
  position: relative; width: 100%; overflow: hidden; margin: 40px 0 72px;
  border-radius: 32px; padding: 64px 48px; text-align: right; color: #F5F1E8;
  background-size: cover; background-position: center;
}
.yx-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(20,86,76,.95) 0%, rgba(30,42,40,.86) 55%, rgba(30,42,40,.55) 100%); }
.yx-cta > * { position: relative; }
.yx-cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.6; margin-bottom: 12px; color: #fff; }
.yx-cta p { max-width: 560px; line-height: 2; color: #DCE6E2; margin-bottom: 28px; }
.yx-cta__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.yx-cta .yx-btn--primary { background: #B08D57; box-shadow: 0 10px 24px -8px rgba(176,141,87,.7); }
.yx-cta .yx-btn--primary:hover { background: #9A7A49; }
.yx-cta .yx-phone { color: #fff; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); }
.yx-cta .yx-phone small { color: #C8D6D1; }
.yx-cta .yx-phone__icon { background: #fff; }
.yx-cta .yx-phone:hover { background: rgba(255,255,255,.18); }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1023px) {
  .yx-hero { grid-template-columns: 1fr; gap: 48px; padding-top: 32px; }
  .yx-hero__text { text-align: center; }
  .yx-hero__lead { margin-inline: auto; }
  .yx-hero__ctas, .yx-hero__trust { justify-content: center; }
  .yx-hero__media { max-width: 560px; margin-inline: auto; width: 100%; }
  .yx-steps { grid-template-columns: repeat(2, 1fr); }
  .yx-features, .yx-posts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .yx-hero { overflow-x: clip; }
  .yx-hero__blob { inset: -4% 0 -6% 0; }
  .yx-hero h1 { font-size: 1.85rem; }
  .yx-float { font-size: .78rem; padding: 9px 12px; }
  .yx-float--a { right: 8px; top: 6%; }
  .yx-float--b { left: 8px; bottom: 8%; }
  .yx-float--c { display: none; }
  .yx-steps, .yx-features, .yx-posts { grid-template-columns: 1fr; }
  .yx-section { padding: 52px 0; }
  .yx-integration { width: calc(50% - 10px); }
  .yx-cta { padding: 44px 22px; text-align: center; border-radius: 24px; }
  .yx-cta p { margin-inline: auto; }
  .yx-cta__actions { justify-content: center; }
  .yx-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .yx-js [data-reveal], .yx-js .yx-hero [data-reveal] { opacity: 1; transform: none; transition: none; animation: none; }
  .yx-float, .yx-hero__blob, .yx-grad-text, .yx-btn--primary::after, .yx-phone__icon, .yx-eyebrow::before { animation: none; }
}
