/* ==========================================================================
   MANSHUR 8 SLIDES & LEFT PANEL MICRO-ANIMATIONS
   High performance: transform & opacity only, zero blur, pure Peyda font
   ========================================================================== */

/* ==========================================================================
   LEFT PANEL MICRO-ANIMATIONS (ONLY transform & opacity)
   ========================================================================== */

/* ── Panel 1 Animation: Typing Prompt ── */
.anim-prompt-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--m-paper);
  border: 1px solid var(--m-border-subtle);
  border-radius: var(--m-radius-sm);
  padding: 10px 14px;
}

.anim-prompt-icon {
  color: var(--m-accent);
  font-size: 1.1rem;
}

.anim-prompt-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--m-ink);
  white-space: nowrap;
  overflow: hidden;
  border-left: 2px solid var(--m-accent);
  animation: typingPrompt 4s steps(35, end) infinite, blinkCursor 0.8s infinite;
  will-change: transform, opacity;
}

@keyframes typingPrompt {
  0% { width: 0; }
  60%, 85% { width: 100%; }
  95%, 100% { width: 0; }
}

@keyframes blinkCursor {
  50% { border-color: transparent; }
}

/* ── Panel 2 Animation: Snapping Boxes ── */
.anim-grid-snap {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.snap-box {
  width: 32px;
  height: 32px;
  border-radius: var(--m-radius-sm);
  background: var(--m-paper);
  border: 1px solid var(--m-accent-border);
  box-shadow: var(--shadow-subtle);
  animation: snapJitter 3s ease-in-out infinite;
  will-change: transform;
}

.snap-box:nth-child(1) {
  animation-delay: 0s;
}

.snap-box:nth-child(2) {
  animation-delay: 0.4s;
  background: var(--m-accent-light);
  border-color: var(--m-accent);
}

.snap-box:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes snapJitter {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(-4deg);
  }
  50% {
    transform: translateY(6px) rotate(5deg);
  }
  75% {
    transform: translateY(0) rotate(0deg);
  }
}

/* ── Panel 3 Animation: Moving Split Divider ── */
.anim-split-track {
  height: 48px;
  background: var(--m-paper);
  border-radius: var(--m-radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
}

.split-tag-before {
  color: var(--m-muted);
}

.split-tag-after {
  color: var(--m-accent);
}

.anim-split-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--m-accent);
  left: 50%;
  animation: moveSplitLine 3s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes moveSplitLine {
  from {
    transform: translateX(-40px);
  }
  to {
    transform: translateX(40px);
  }
}

/* ── Panel 4 Animation: Sequential Palette Swatches ── */
.anim-swatches-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 0;
}

.swatch-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  animation: pulseSwatch 3s ease-in-out infinite;
  will-change: transform, opacity;
}

.swatch-1 {
  background: var(--brand-orange-500); /* #CF5735 اکسنت اصلی */
  animation-delay: 0s;
}

.swatch-2 {
  background: var(--brand-burgundy-700); /* #5E2219 اکسنت تیره */
  animation-delay: 1s;
}

.swatch-3 {
  background: var(--brand-terracotta-400); /* #DF734B رنگ برند فرعی */
  animation-delay: 2s;
}

@keyframes pulseSwatch {
  0%, 100% {
    transform: scale(1);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.22);
    opacity: 1;
  }
}

/* ── Panel 5 Animation: Big Bold Counting Metric ── */
.anim-counter-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}

.anim-counter-val {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--m-accent);
  line-height: 1;
  animation: scaleMetric 2.5s ease-in-out infinite;
  will-change: transform;
}

.anim-counter-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--m-ink);
}

@keyframes scaleMetric {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

/* ── Panel 6 Animation: Moving Mouse Pointer ── */
.anim-cursor-track {
  height: 48px;
  background: var(--m-paper);
  border-radius: var(--m-radius-sm);
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.anim-target-box {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px dashed var(--m-accent);
  background: var(--m-accent-light);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--m-accent);
}

.anim-mouse-pointer {
  position: absolute;
  right: 20px;
  font-size: 1.2rem;
  color: var(--m-ink);
  animation: movePointer 3s ease-in-out infinite;
  will-change: transform;
}

@keyframes movePointer {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-90px, 4px);
  }
}

/* ── Panel 7 Animation: Office Table Minimal Badge (No heavy animation) ── */
.anim-pricing-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--m-ink);
}

.anim-pricing-pill {
  padding: 3px 10px;
  border-radius: var(--m-radius-pill);
  background: var(--m-accent-light);
  border: 1px solid var(--m-accent-border);
  color: var(--m-accent);
  font-size: 0.74rem;
}

/* ── Panel 8 Animation: Simple Finish Transition ── */
.anim-finish-wrap {
  text-align: center;
  padding: 6px 0;
}

.anim-finish-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--m-radius-pill);
  background: var(--m-accent);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  animation: finishFade 2.5s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes finishFade {
  from {
    transform: scale(0.96);
    opacity: 0.85;
  }
  to {
    transform: scale(1.04);
    opacity: 1;
  }
}

/* ==========================================================================
   RIGHT COLUMN: 8 SLIDE CARDS DETAILED CONTENT
   ========================================================================== */

/* ── SLIDE 1: شروع (Building Elements One by One) ── */
.slide1-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.s1-element {
  opacity: 0;
  transform: translateY(12px);
  animation: buildUpElem 0.6s ease forwards;
  will-change: transform, opacity;
}

.s1-title {
  font-size: clamp(1.8rem, 2.5vw, 2.35rem);
  font-weight: 800;
  color: var(--m-ink);
  line-height: 1.35;
  animation-delay: 0.2s;
}

.s1-title span {
  color: var(--m-accent);
}

.s1-sub {
  font-size: 1.05rem;
  color: var(--m-muted);
  line-height: 1.6;
  margin-bottom: 8px;
  animation-delay: 0.4s;
}

.s1-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: auto;
  animation-delay: 0.6s;
}

.s1-feature-card {
  padding: 22px 26px;
  border-radius: var(--m-radius-sm);
  background: var(--m-paper);
  border: 1px solid var(--m-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s1-feature-card h4 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--m-ink);
}

.s1-feature-card p {
  font-size: 0.92rem;
  color: var(--m-muted);
  line-height: 1.65;
}

@keyframes buildUpElem {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── SLIDE 2: مشکل (Cluttered, Crooked & Misaligned) ── */
.slide2-body {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.s2-clutter-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(239, 68, 68, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 68, 68, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.s2-misaligned-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #991b1b;
  transform: rotate(-2.5deg) translateX(12px);
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
}

.s2-crooked-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  position: relative;
}

.s2-crooked-card-1 {
  flex: 1;
  background: #fef2f2;
  border: 1px dashed #ef4444;
  border-radius: 4px;
  padding: 12px;
  transform: rotate(3deg) translateY(8px);
}

.s2-crooked-card-2 {
  flex: 1;
  background: #fff7ed;
  border: 1px dashed #f97316;
  border-radius: 4px;
  padding: 12px;
  transform: rotate(-2.5deg) translateY(-6px);
}

.s2-warning-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--m-radius-pill);
}

/* ── SLIDE 3: قبل / بعد (Split Comparison) ── */
.slide3-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.s3-compare-col {
  padding: 24px 28px;
  border-radius: var(--m-radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.s3-col-before {
  background: #f5f5f4;
  border: 1px dashed #d6d3d1;
  color: #57534e;
}

.s3-col-after {
  background: #fffdf9;
  border: 1px solid var(--m-accent);
  box-shadow: var(--shadow-subtle);
}

.s3-col-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--m-radius-pill);
  align-self: flex-start;
  margin-bottom: 12px;
}

.s3-badge-before {
  background: #e7e5e4;
  color: #78716c;
}

.s3-badge-after {
  background: var(--m-accent-light);
  color: var(--m-accent);
  border: 1px solid var(--m-accent-border);
}

.s3-col-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.s3-col-desc {
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ── SLIDE 4: تم (Three Palettes Showcase) ── */
.slide4-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 0 6px;
}

.s4-heading-wrap {
  margin-bottom: 12px;
}

.s4-heading-title {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: var(--m-ink);
  margin-bottom: 6px;
}

.s4-heading-desc {
  font-size: 1.02rem;
  color: var(--m-muted);
  line-height: 1.5;
}

.s4-themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: auto;
}

.s4-theme-card {
  border-radius: var(--m-radius-sm);
  padding: 22px 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease;
}

.s4-theme-card:hover {
  transform: translateY(-2px);
}

.s4-theme-light {
  background: var(--brand-cream-50);
  border: 1px solid var(--brand-beige-200);
  color: var(--brand-charcoal-900);
}

.s4-theme-dark {
  background: var(--brand-charcoal-900);
  border: 1px solid #4A403A;
  color: var(--brand-cream-50);
}

.s4-theme-navy {
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
}

.s4-card-swatches {
  display: flex;
  gap: 6px;
}

.s4-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.s4-card-title {
  font-size: 1.08rem;
  font-weight: 700;
}

.s4-card-text {
  font-size: 0.88rem;
  opacity: 0.85;
  line-height: 1.6;
}

/* ── SLIDE 5: داده (Bar Chart with scaleY Growth) ── */
.slide5-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}

.s5-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 175px;
  padding: 14px 24px 0;
  border-bottom: 2px solid var(--m-border-subtle);
  position: relative;
}

.s5-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.s5-bar-pillar {
  width: 52px;
  background: linear-gradient(180deg, var(--brand-orange-500) 0%, var(--brand-rust-600) 100%);
  border-radius: 4px 4px 0 0;
  transform-origin: bottom center;
  animation: growBar 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}

.s5-bar-1 { height: 45%; animation-delay: 0.1s; }
.s5-bar-2 { height: 70%; animation-delay: 0.3s; }
.s5-bar-3 { height: 95%; animation-delay: 0.5s; background: linear-gradient(180deg, var(--brand-clay-300) 0%, var(--brand-orange-500) 100%); }
.s5-bar-4 { height: 60%; animation-delay: 0.7s; }

@keyframes growBar {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.s5-bar-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--m-muted);
}

.s5-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.s5-metric-box {
  background: var(--m-paper);
  border: 1px solid var(--m-border-subtle);
  border-radius: var(--m-radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.s5-metric-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--m-accent);
}

.s5-metric-lbl {
  font-size: 0.95rem;
  color: var(--m-muted);
  font-weight: 600;
}

/* ── SLIDE 6: قابل ویرایش (Selection Handles on Title, Image & Chart) ── */
.slide6-body {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.s6-editable-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--m-accent-light);
  border: 1px solid var(--m-accent-border);
  padding: 6px 14px;
  border-radius: var(--m-radius-pill);
}

.s6-banner-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--m-accent);
}

.s6-handles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.s6-handle-element {
  position: relative;
  border: 1.5px solid var(--m-accent);
  background: var(--m-paper);
  border-radius: 4px;
  padding: 10px;
}

/* 8 Resize Handles on Active Selection */
.s6-handle-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #ffffff;
  border: 1.5px solid var(--m-accent);
  border-radius: 1px;
}

.s6-tl { top: -4px; left: -4px; }
.s6-tr { top: -4px; right: -4px; }
.s6-bl { bottom: -4px; left: -4px; }
.s6-br { bottom: -4px; right: -4px; }
.s6-tc { top: -4px; left: 50%; transform: translateX(-50%); }
.s6-bc { bottom: -4px; left: 50%; transform: translateX(-50%); }
.s6-ml { top: 50%; left: -4px; transform: translateY(-50%); }
.s6-mr { top: 50%; right: -4px; transform: translateY(-50%); }

.s6-elem-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--m-ink);
  margin-bottom: 2px;
}

.s6-elem-hint {
  font-size: 0.7rem;
  color: var(--m-muted);
}

/* ── SLIDE 7: قیمت (Office Presentation Pricing Table) ── */
.slide7-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.s7-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.s7-table th,
.s7-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--m-border-subtle);
}

.s7-table th {
  background: var(--m-paper);
  font-weight: 800;
  color: var(--m-ink);
  font-size: 0.8rem;
}

.s7-table th.s7-highlight {
  background: var(--m-accent-light);
  color: var(--m-accent);
  border-bottom: 2px solid var(--m-accent);
}

.s7-table td.s7-highlight {
  background: rgba(255, 247, 237, 0.4);
  font-weight: 700;
  color: var(--m-ink);
}

.s7-check {
  color: var(--m-accent);
  font-weight: 800;
}

/* ── SLIDE 8: پایان (Closing Presentation Slide) ── */
.slide8-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 10px 0;
}

.s8-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--m-dark-text);
}

.s8-title span {
  color: var(--m-dark-accent);
}

.s8-desc {
  font-size: 1.12rem;
  color: var(--m-dark-muted);
  max-width: 580px;
  line-height: 1.7;
}

.s8-cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 520px;
  margin-top: 10px;
}

.s8-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--m-dark-border);
  padding: 12px 20px;
  border-radius: var(--m-radius-pill);
  font-size: 0.94rem;
  color: #fff;
}

.s8-input::placeholder {
  color: #78716c;
}

.s8-start-btn {
  padding: 12px 26px;
  border-radius: var(--m-radius-pill);
  background: var(--m-dark-accent);
  color: var(--m-dark);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.s8-start-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.s8-badges-list {
  display: flex;
  gap: 24px;
  color: var(--m-dark-muted);
  font-size: 0.88rem;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Mobile Fine-Tuning for 16:9 Slide Cards ── */
@media (max-width: 800px) {
  .slide-card-header {
    margin-bottom: 4px;
  }
  .slide-card-title {
    font-size: 1.05rem;
    margin-bottom: 2px;
  }
  .slide-card-subtitle {
    font-size: 0.68rem;
    margin-bottom: 6px;
  }
  .slide-card-footer {
    padding-top: 4px;
    font-size: 0.62rem;
  }

  /* Slide 1 mobile */
  .s1-title {
    font-size: 1.05rem !important;
    margin-bottom: 2px !important;
  }
  .s1-sub {
    font-size: 0.68rem !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
  }
  .s1-cards-row {
    gap: 6px !important;
    margin-top: 2px !important;
  }
  .s1-feature-card {
    padding: 4px 6px !important;
  }
  .s1-feature-card h4 {
    font-size: 0.72rem !important;
    margin-bottom: 2px !important;
  }
  .s1-feature-card p {
    font-size: 0.6rem !important;
    line-height: 1.25 !important;
  }

  /* Slide 2 mobile */
  .s2-mess-stage {
    min-height: 85px;
  }
  .s2-mess-item {
    padding: 3px 6px;
    font-size: 0.64rem;
  }

  /* Slide 3 mobile */
  .s3-columns-compare {
    gap: 6px;
  }
  .s3-col-card {
    padding: 8px 6px;
  }
  .s3-col-title {
    font-size: 0.76rem;
  }
  .s3-col-desc {
    font-size: 0.64rem;
    line-height: 1.3;
  }

  /* Slide 4 mobile */
  .s4-themes-grid {
    gap: 6px;
  }
  .s4-theme-card {
    padding: 6px 6px;
    gap: 3px;
  }
  .s4-card-title {
    font-size: 0.72rem;
  }
  .s4-card-text {
    font-size: 0.62rem;
    line-height: 1.25;
  }

  /* Slide 5 mobile */
  .s5-chart-container {
    height: 80px;
    padding: 6px 8px 0;
  }
  .s5-bar-group {
    width: 28px;
  }
  .s5-bar-value {
    font-size: 0.64rem;
  }
  .s5-bar-label {
    font-size: 0.62rem;
  }

  /* Slide 6 mobile */
  .s6-handles-wrapper {
    min-height: 80px;
  }
  .s6-badge-pptx {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  /* Slide 7 mobile */
  .s7-table th,
  .s7-table td {
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  /* Slide 8 mobile */
  .slide8-body {
    gap: 4px;
  }
  .s8-title {
    font-size: 1.15rem;
    line-height: 1.25;
  }
  .s8-desc {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .s8-cta-row {
    margin-top: 2px;
    gap: 4px;
  }
  .s8-input {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .s8-start-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
  }
  .s8-badges-list {
    display: none;
  }
}
