/* ==========================================================================
   home.css — صفحه‌ی خانه (پروژه‌ها و ابزارهای سریع)
   ========================================================================== */
.home { background: radial-gradient(120% 60% at 100% 0%, rgba(124, 92, 255, 0.16), transparent 60%), radial-gradient(90% 50% at 0% 10%, rgba(34, 211, 238, 0.08), transparent 60%), var(--bg); }
.home-scroll { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.home-wrap { max-width: 1180px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 16px calc(30px + var(--safe-b)); }
.home-head { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand b { display: block; font-size: 21px; font-weight: 900; line-height: 1.2; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font-size: 11.5px; color: var(--tx2); }
.logo-mark.sm { width: 42px; height: 42px; border-radius: 14px; }
.logo-mark.sm svg { width: 24px; height: 24px; }

.hero { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.hero-new {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border-radius: 24px; text-align: right; overflow: hidden;
  background: linear-gradient(135deg, #2a1d6b 0%, #3b1f7a 40%, #0e4f63 100%); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px -24px rgba(124, 92, 255, 0.85); transition: transform 0.18s var(--ease);
}
.hero-new::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 180deg, transparent, rgba(255, 255, 255, 0.12), transparent 30%); animation: heroSpin 9s linear infinite; pointer-events: none; }
.hero-new:active { transform: scale(0.98); }
.hn-ic { position: relative; width: 58px; height: 58px; border-radius: 18px; background: #fff; color: #3b1f7a; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
.hn-ic .ic { stroke-width: 2.6; }
.hn-t { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.hn-t b { font-size: 18px; font-weight: 900; }
.hn-t small { font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.hero-new > .ic { position: relative; color: rgba(255, 255, 255, 0.7); }
@keyframes heroSpin { to { transform: rotate(360deg); } }
.hero-ratios { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; }
.hero-ratios::-webkit-scrollbar { display: none; }
.hero-ratios .dim { font-size: 12px; flex: 0 0 auto; }
.chip.ghost { background: transparent; border-style: dashed; }

.home-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.home-sec b { font-size: 16px; font-weight: 900; }
.home-sec small { font-size: 12px; color: var(--tx3); }
.quick { display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px 6px; }
.qcard {
  flex: 0 0 auto; width: 128px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 12px; border-radius: 20px; text-align: right;
  background: linear-gradient(160deg, color-mix(in srgb, var(--qc) 26%, transparent), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s var(--ease);
}
.qcard { background: rgba(255, 255, 255, 0.035); }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .qcard { background: linear-gradient(160deg, color-mix(in srgb, var(--qc) 24%, transparent), rgba(255, 255, 255, 0.02)); }
}
.qcard:active { transform: scale(0.96); }
.qcard i { width: 40px; height: 40px; border-radius: 13px; background: var(--qc); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; box-shadow: 0 8px 18px -8px var(--qc); }
.qcard b { font-size: 13px; }
.qcard small { font-size: 11px; color: var(--tx2); }

.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pc-th { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--bg3); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; transition: transform 0.15s var(--ease); }
.pc-th:active { transform: scale(0.97); }
.pc-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pc-ph { color: var(--tx3); }
.pc-dur { position: absolute; bottom: 8px; left: 8px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 7px; background: rgba(0, 0, 0, 0.65); }
.pc-meta { display: flex; align-items: center; gap: 4px; padding: 0 2px; }
.pc-meta b { display: block; font-size: 13px; }
.pc-meta small { display: block; font-size: 11px; color: var(--tx3); }
.proj-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 36px 16px; border: 1.5px dashed var(--line2); border-radius: 24px; color: var(--tx2); }
.proj-empty b { color: var(--tx); font-size: 14.5px; }
.proj-empty span { font-size: 12.5px; }
.pe-art { width: 64px; height: 64px; border-radius: 20px; background: var(--bg4); display: flex; align-items: center; justify-content: center; color: var(--tx3); margin-bottom: 4px; }
.home-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 34px; font-size: 11.5px; color: var(--tx3); }

@media (min-width: 640px) {
  .proj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .home-wrap { padding: 20px 32px 40px; }
  .hero { flex-direction: row; align-items: stretch; }
  .hero-new { flex: 1 1 auto; padding: 26px; }
  .hero-ratios { flex-direction: column; align-items: stretch; justify-content: center; width: 220px; flex: 0 0 auto; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 24px; padding: 14px; }
  .hero-ratios .chip { justify-content: flex-start; }
  .quick { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
  .qcard { width: calc((100% - 40px) / 5); }
  .proj-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
}

/* ویدیوی خودکار */
.hero-auto {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 20px; text-align: right; overflow: hidden;
  background: linear-gradient(120deg, rgba(236, 72, 153, 0.22), rgba(245, 158, 11, 0.16) 55%, rgba(34, 211, 238, 0.16)); border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.18s var(--ease);
}
.hero-auto:active { transform: scale(0.98); }
.ha-ic { width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #ec4899, #f59e0b); box-shadow: 0 8px 20px -6px rgba(236, 72, 153, 0.8); }
.hero-auto .hn-t b { font-size: 15.5px; }
.hero-auto .hn-t small { font-size: 11.5px; }
.hero-auto > .ic { color: rgba(255, 255, 255, 0.6); }
