/* ==========================================================================
   Luxee Helps — Homepage v3 ("app window")
   Boxed shell on a soft dotted stage: sidebar (search, product nav, help
   card) + content (greeting, products, case studies, promo, support).
   ========================================================================== */

/* ---- Stage & shell ------------------------------------------------------ */
.home-stage {
  padding: 40px 24px 16px;
  background-image: radial-gradient(rgba(99, 85, 224, 0.10) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
[data-theme="dark"] .home-stage {
  background-image: radial-gradient(rgba(157, 147, 255, 0.10) 1px, transparent 1.2px);
}

.help-shell {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  box-shadow: 0 30px 60px -40px rgba(40, 35, 110, 0.35);
}

/* ---- Sidebar ------------------------------------------------------------ */
.help-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  border-right: 1px solid var(--color-border);
  border-radius: 28px 0 0 28px;
  background:
    radial-gradient(260px 200px at 0% 0%, rgba(165, 156, 243, 0.22), transparent 70%),
    radial-gradient(220px 180px at 100% 30%, rgba(120, 180, 255, 0.14), transparent 70%),
    var(--color-surface-2);
}

.side-title {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--color-text-bold);
}
.side-sub { margin: 4px 0 14px; font-size: 0.85rem; color: var(--color-text-muted); }

.side-search { width: 100%; max-width: none; }
.side-search .search-input {
  height: 46px;
  padding: 0 40px 0 16px;
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.side-search .search-icon { left: auto; right: 14px; width: 18px; height: 18px; color: var(--color-text-muted); }
/* Results open wider than the sidebar so titles stay readable */
.side-search .search-results { width: min(520px, calc(100vw - 48px)); z-index: 60; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav-label {
  margin: 0 0 8px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.side-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-main);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.side-nav-item:hover { background: var(--color-surface); color: var(--color-text-bold); }
.side-nav-item.is-active {
  background: var(--color-surface);
  color: var(--color-text-bold);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.side-nav-thumb {
  flex: none;
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(40, 35, 110, 0.08);
}
.side-nav-thumb-fallback { display: grid; place-items: center; box-shadow: none; }
.side-nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav-count { font-size: 0.75rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

.side-help-card {
  margin-top: auto;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #6f63ea 0%, #5546d6 100%);
  color: #fff;
}
.side-help-card strong { display: block; font-size: 1rem; }
.side-help-card p { margin: 6px 0 16px; font-size: 0.85rem; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.side-help-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: #fff;
  color: #4f41c9;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.side-help-btn:hover { background: #f1efff; color: #4f41c9; }

/* ---- Content ------------------------------------------------------------ */
.help-content { min-width: 0; padding: 40px 44px 48px; }

.content-hero {
  padding: 32px;
  border-radius: 22px;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(165, 156, 243, 0.26), transparent 70%),
    radial-gradient(380px 220px at 100% 100%, rgba(120, 180, 255, 0.20), transparent 70%),
    var(--color-surface-2);
}
.home-eyebrow {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-gold-dark);
  font-size: 0.76rem;
  font-weight: 600;
}
.home-title {
  margin: 16px 0 8px;
  padding: 0;
  border: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text-bold);
  text-wrap: balance;
}
.home-lead { margin: 0; max-width: 520px; font-size: 1rem; line-height: 1.6; color: var(--color-text-main); }

.home-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.home-popular a {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.home-popular a:hover { border-color: var(--color-gold-light); color: var(--color-gold-dark); }

.content-section { margin-top: 48px; }
.content-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}
.content-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--color-text-bold);
}
.content-head-meta { font-size: 0.85rem; color: var(--color-text-muted); }
.home-link { font-size: 0.85rem; font-weight: 600; color: var(--color-gold-dark); text-decoration: none; white-space: nowrap; }
.home-link:hover { text-decoration: underline; }

/* Tints shared by sidebar icons, product icons, support icons */
.tint-violet { background: #efedfd; color: #6355e0; }
.tint-blue   { background: #e8f1fe; color: #3f7cf4; }
.tint-teal   { background: #e3f6f1; color: #16a37b; }
.tint-amber  { background: #fdf3e3; color: #c98415; }
.tint-rose   { background: #fdeef1; color: #d6486a; }
[data-theme="dark"] .side-nav-thumb-fallback,
[data-theme="dark"] .product-icon { background: var(--color-surface-3); }

/* ---- Product cards: box thumbnail left, text right ---------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.product-card {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.product-card:hover { border-color: var(--color-gold-light); box-shadow: var(--shadow-md); }
.product-thumb {
  flex: none;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--color-surface-2);
  transition: transform var(--transition-normal);
}
.product-card:hover img.product-thumb { transform: scale(1.03); }
.product-thumb-fallback { display: grid; place-items: center; }
.product-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.product-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; padding: 4px 4px 2px 0; }
.product-name { font-size: 1rem; font-weight: 600; color: var(--color-text-bold); }
.product-desc { flex: 1; font-size: 0.86rem; line-height: 1.5; color: var(--color-text-main); }
.product-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.product-count {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  font-size: 0.74rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.product-link { font-size: 0.82rem; font-weight: 600; color: var(--color-gold-dark); white-space: nowrap; }
.product-card:hover .product-link span { display: inline-block; transform: translateX(3px); transition: transform var(--transition-fast); }

/* ---- Start here: one first tutorial per product ------------------------ */
.start-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.start-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.start-item:hover { border-color: var(--color-gold-light); box-shadow: var(--shadow-md); }
.start-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--color-surface-2);
}
.start-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.start-title { font-size: 0.93rem; font-weight: 600; color: var(--color-text-bold); }
.start-product { font-size: 0.8rem; color: var(--color-text-muted); }
.start-arrow { color: var(--color-text-muted); }
.start-item:hover .start-arrow { color: var(--color-gold); }

/* ---- Case studies ------------------------------------------------------- */
.home-article-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.home-article-list li + li { border-top: 1px solid var(--color-border); }
.home-article-list li a {
  display: block;
  position: relative;
  padding: 14px 40px 14px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-bold);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}
.home-article-list li a::after {
  content: "\2192";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}
.home-article-list li a:hover { background: var(--color-surface-2); }
.home-article-list li a:hover::after { color: var(--color-gold); }

/* ---- Promo carousel inside the content column --------------------------- */
.content-section .promo-carousel-container { margin: 0; }

/* ---- Support ------------------------------------------------------------ */
.support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.support-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px;
  border-radius: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.support-card:hover { border-color: var(--color-gold-light); box-shadow: var(--shadow-md); }
.support-card .product-icon { width: 38px; height: 38px; margin-bottom: 10px; }
.support-title { font-size: 0.95rem; font-weight: 600; color: var(--color-text-bold); }
.support-desc { font-size: 0.82rem; color: var(--color-text-muted); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-stage { padding: 16px 12px 8px; }
  .help-shell { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
  .help-side {
    gap: 18px;
    padding: 22px 16px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 22px 22px 0 0;
  }
  /* Product nav becomes a horizontal chip row */
  .side-nav { flex-direction: row; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav-label { display: none; }
  .side-nav-item { flex: none; padding: 6px 12px 6px 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-pill); }
  .side-nav-item.is-active { box-shadow: none; border-color: var(--color-gold-light); }
  .side-nav-thumb { width: 28px; height: 28px; border-radius: 8px; }
  .side-nav-count { display: none; }
  .side-help-card { display: none; }
  .help-content { padding: 20px 16px 28px; }
  .content-hero { padding: 22px; border-radius: 18px; }
  .content-section { margin-top: 36px; }
}
@media (max-width: 560px) {
  .start-list { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .product-thumb { width: 92px; height: 92px; }
  .content-head { flex-direction: column; gap: 4px; }
}
