/* ==========================================================================
   sparkles.css — Sparkles Gamified Chores Platform case study page
   Loads on top of kikku.css; only overrides and adds what Sparkles needs.
   ========================================================================== */

/* --------------------------------------------------------------------------
   PAGE BACKGROUND
   -------------------------------------------------------------------------- */
body {
  background-color: #EBEBEB;
}

/* --------------------------------------------------------------------------
   NEXT PROJECT — override the shared .cs-next-project card for this page
   to match the Figma spec: padding+gap inside the card instead of the
   mockup image bleeding edge-to-edge, and an uncropped icon.
   -------------------------------------------------------------------------- */
.cs-next-project__card {
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  gap: 20px;
}

.cs-next-project__image {
  background: transparent;
  align-self: stretch;
  border-radius: var(--radius-xl);
}

.cs-next-project__icon {
  width: 64px;
  height: 64px;
  border-radius: 0;
  overflow: visible;
}

.cs-next-project__icon-img {
  object-fit: contain;
}

@media (max-width: 900px) {
  .cs-next-project__card {
    padding: 16px;
    gap: 16px;
  }

  .cs-next-project__image {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   HIGHLIGHTS — two rows of phone screens on a white card background
   -------------------------------------------------------------------------- */
.spk-highlights-wrap {
  background: #FFFFFF;
  border-radius: 32px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: 0 4px 48px rgba(97, 69, 222, 0.08);
}

.spk-highlights-row {
  width: 100%;
  height: auto;
  display: block;
}

/* Solutions: two images side by side at equal width */
.spk-split-card--two-imgs {
  grid-template-columns: 1fr 1fr;
}

/* --------------------------------------------------------------------------
   SPLIT CARD IMAGES — use contain so SVG illustrations aren't cropped
   -------------------------------------------------------------------------- */
.spk-split-img {
  object-fit: contain;
  object-position: center;
  padding: 24px;
  background: #FFFFFF;
  min-height: 260px;
}

/* --------------------------------------------------------------------------
   RESEARCH SUMMARY — "Brainstorming" / "Monitoring" subsections
   -------------------------------------------------------------------------- */
.spk-research-block {
  margin-bottom: 48px;
}

.spk-research-block:last-child {
  margin-bottom: 0;
}

.spk-research-label {
  font-family: 'Urbanist', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #5c5c5c;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

.spk-research-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* --------------------------------------------------------------------------
   FROM GUIDE — wireframe grid + full user flow
   -------------------------------------------------------------------------- */
.spk-guide-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.spk-guide-small {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.spk-flow-img {
  border-radius: 16px;
}

/* --------------------------------------------------------------------------
   SOLUTIONS — lightbulb frame left, text frame right
   -------------------------------------------------------------------------- */
.spk-solutions-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: stretch;
}

.spk-solutions-frame {
  border-radius: 24px;
  overflow: hidden;
}

.spk-solutions-frame--bulb {
  background: #D0E8F5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  min-height: 280px;
}

.spk-solutions-bulb-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.spk-solutions-frame--text {
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.spk-solutions-text {
  font-family: 'Urbanist', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #3D3D3D;
  line-height: 1.75;
  margin: 0;
}

/* --------------------------------------------------------------------------
   KEY FEATURES — Sparkles feature blocks
   -------------------------------------------------------------------------- */

/* Family Leaderboard — fourth key feature frame */
.spk-kf-leaderboard {
  width: 353px;
  height: 231.63px;
  background: #FFFFFF;
  border-radius: 9.88276px;
  flex: none;
  order: 3;
  flex-grow: 0;
  max-width: 100%;
  object-fit: contain;
}
.spk-kf-block {
  padding: 56px 0;
}

.spk-kf-tag {
  display: inline-block;
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #C2185B;
  background: #FCE4EC;
  border-radius: 100px;
  padding: 4px 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.spk-kf-title {
  font-family: 'Urbanist', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #1C1C1C;
  margin: 0 0 20px;
  line-height: 1.25;
}

.spk-kf-desc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 620px;
  margin-bottom: 36px;
}

.spk-kf-screens {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  margin: 48px 0;
}

.spk-kf-screens--mt {
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   REFLECTIONS — two-column split: image left, text right
   -------------------------------------------------------------------------- */
.spk-reflections-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.spk-reflections-split__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.spk-reflections-split__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spk-reflections-split__text p {
  font-size: 24px;
  line-height: 1.75;
  color: #3D3D3D;
  margin: 0;
}

/* Mobile-only Spotlighting Issues layout — hidden on desktop */
.spk-spotlight-m {
  display: none;
}

/* --------------------------------------------------------------------------
   RESPONSIVE — Tablet (≤ 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .spk-guide-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .spk-kf-title {
    font-size: 24px;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE — Mobile (≤ 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

  /* ── Page title area ── */
  .cs-page-title {
    font-size: 18px;
    margin: 0 0 8px;
  }

  .cs-page-subtitle {
    font-size: 12px;
  }

  /* ── Section spacing: 24px between sections ── */
  .cs-section {
    padding: 24px 0 0;
  }

  /* ── Section title → first content: 16px ── */
  .cs-section__header {
    margin-bottom: 16px;
  }

  /* ── Section title size ── */
  .cs-section__title {
    font-size: 20px;
  }

  /* ── Hero image bottom gap ── */
  .cs-hero-image-wrap {
    margin-bottom: 24px;
  }

  /* ── Highlights card ── */
  .spk-highlights-wrap {
    padding: 16px 12px;
    gap: 16px;
    border-radius: 16px;
  }

  /* ── Solutions: side by side on mobile matching design reference ── */
  /* ── Solutions: hide label, stack bulb then text ── */
  #solutions .cs-problem-label {
    display: none;
  }

  .spk-solutions-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .spk-solutions-frame--bulb {
    padding: 32px 24px;
    min-height: unset;
  }

  .spk-solutions-bulb-img {
    max-width: 180px;
  }

  .spk-solutions-frame--text {
    background: transparent;
    border: none;
    padding: 0 8px;
    gap: 12px;
  }

  .spk-solutions-text {
    font-size: 14px;
    line-height: 1.65;
  }

  /* ── Key feature screen images ── */
  .spk-kf-screens {
    margin: 24px 0;
    border-radius: 12px;
  }

  /* ── Research / Custom Illustrations sub-blocks ── */
  .spk-research-block {
    margin-bottom: 24px;
  }

  .spk-research-label {
    font-size: 14px;
    margin: 0 0 12px;
  }

  /* ── Style guide grid ── */
  .spk-guide-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  /* ── Research summary intro text ── */
  .cs-intro-text {
    font-size: 12px;
    margin-bottom: 16px;
  }

  /* ── Overview label / value ── */
  .cs-overview__label {
    font-size: 12px;
  }

  .cs-overview__value {
    font-size: 12px;
  }

  .cs-overview {
    gap: 12px;
  }

  .cs-overview__item {
    gap: 4px;
  }

  /* ── Challenges sub-label ── */
  .cs-problem-label {
    font-size: 12px;
    margin-bottom: 12px;
  }

  /* ── Challenges mobile layout: hide desktop image + label, show mobile block ── */
  .spk-challenges-desktop,
  #challenges .cs-problem-label {
    display: none;
  }

  .spk-spotlight-m {
    display: block;
  }

  .spk-spotlight-m__img {
    display: block;
    width: 75%;
    height: auto;
    margin: 0 auto;
  }

  .spk-spotlight-m__label {
    font-family: 'Urbanist', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #5C5C5C;
    margin: 16px 0 12px;
  }

  .spk-spotlight-m__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .spk-spotlight-m__item {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .spk-spotlight-m__num {
    font-family: 'Emilys Candy', cursive;
    font-size: 45px;
    font-weight: 700;
    color: #7D52F4;
    flex-shrink: 0;
    line-height: 1;
  }

  .spk-spotlight-m__text {
    font-family: 'Urbanist', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    line-height: 1.5;
    margin: 0;
  }

  /* ── Reflections: stack + smaller text ── */
  .spk-reflections-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .spk-reflections-split__text {
    gap: 16px;
  }

  .spk-reflections-split__text p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* ── Page subtitle ── */
  .cs-page-subtitle {
    font-size: 12px;
  }

  /* ── Next Project section ── */
  .cs-next-project {
    padding: 24px 16px 40px;
  }

  .cs-next-project__label {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .cs-next-project__star {
    width: 18px;
    height: 18px;
  }

  /* Card — exact Figma values */
  .cs-next-project__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    gap: 10.81px;
    width: 100%;
    max-width: 355px;
    height: 567.53px;
    background: #FFFFFF;
    border-radius: 17.2986px;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    margin: 0 auto;
    overflow: hidden;
  }

  .cs-next-project__image {
    width: 100%;
    flex: 1;
    min-height: 0;
    align-self: stretch;
  }

  .cs-next-project__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .cs-next-project__text {
    flex: none;
    padding: 0 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .cs-next-project__title-row {
    gap: 8px;
  }

  .cs-next-project__icon {
    width: 28px;
    height: 28px;
  }

  .cs-next-project__title {
    font-size: 16px;
  }

  .cs-next-project__category {
    font-size: 12px;
    margin-top: 6px;
  }

  .cs-next-project__description {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 8px;
  }

  .cs-next-project__btn {
    margin-top: 10.81px;
    align-self: stretch;
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
  }
}
