/*
 * /how-it-works — values lifted from lib/screens/how_it_works/widgets/*.
 * These widgets use plain `Text` (Roboto) and their own palette
 * (kHiwOrange / kHiwCream / kHiwCreamAlt / kHiwBorder), not AppColors.
 * Shared pieces (header, footer, .btn, .icon) come from site.css.
 */

.hiw {
  --hiw-orange: #ff7a00;
  --hiw-cream: #fff6f0;
  --hiw-cream-alt: #fff7f0;
  --hiw-border: #f2e4d9;
  --black87: rgba(0, 0, 0, 0.87);
  --black54: rgba(0, 0, 0, 0.54);
  --black45: rgba(0, 0, 0, 0.45);

  background: #fff;
  color: var(--text-default);
  font-family: var(--font-body);
}

.hiw-heading {
  color: var(--text-default);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.hiw-intro {
  margin-top: 14px;
  color: var(--black87);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.hiw-band {
  width: 100%;
  padding: 70px 60px;
}

.hiw-band__inner {
  margin: 0 auto;
}

.hiw-band--cream {
  background: var(--hiw-cream);
}

.hiw-band--cream-alt {
  background: var(--hiw-cream-alt);
}

.hiw-band--white {
  background: #fff;
}

/* Image frames. `.is-missing` is the placeholder for an image that isn't in
   assets/images yet. */
.hiw-image {
  display: block;
  width: 30vw;
  height: 300px;
  border-radius: 12px;
  object-fit: cover;
}

.hiw-image.is-missing {
  background: #f2f2f2;
}

/* ---------------------------------------------------------------------------
 * Hero — HeroSectionHowItWorks
 * ------------------------------------------------------------------------ */

.hiw-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 15vw;
  background: var(--hiw-cream);
}

.hiw-hero__text {
  width: 30vw;
}

.hiw-hero__title {
  color: var(--text-default);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.hiw-hero__intro {
  margin-top: 18px;
  color: var(--black87);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * The 4 Steps at a Glance — StepsGridSection
 * ------------------------------------------------------------------------ */

.hiw-glance {
  padding: 60px;
}

.hiw-glance__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
}

.hiw-glance__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 360px;
  height: 300px;
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.hiw-glance__icon {
  color: var(--hiw-orange);
}

.hiw-glance__title {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
}

.hiw-glance__desc {
  margin-top: 10px;
  color: var(--black54);
  font-size: 14px;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
 * Each Step, in Detail — DetailedStepsSection
 * ------------------------------------------------------------------------ */

.hiw-timeline {
  margin-top: 44px;
}

.hiw-timeline__step {
  display: flex;
  gap: 26px;
}

.hiw-timeline__rail {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
}

/* Connector line down to the next step. */
.hiw-timeline__step:not(:last-child) .hiw-timeline__rail::after {
  content: '';
  flex: 1;
  width: 2px;
  background: rgba(255, 122, 0, 0.25);
}

.hiw-timeline__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--hiw-orange);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.hiw-timeline__card {
  flex: 1;
  min-width: 0;
  margin-bottom: 44px;
  padding: 28px 30px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.hiw-timeline__step:last-child .hiw-timeline__card {
  margin-bottom: 0;
}

.hiw-timeline__title {
  margin-bottom: 16px;
  color: var(--text-default);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.hiw-timeline__para {
  color: var(--black87);
  font-size: 15px;
  line-height: 1.55;
}

.hiw-timeline__para + .hiw-timeline__para {
  margin-top: 12px;
}

/* ---------------------------------------------------------------------------
 * Why Choose Cook Hire? — WhyChooseCookHire
 * ------------------------------------------------------------------------ */

.hiw-why {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 15vw;
}

.hiw-why__text {
  width: 30vw;
}

.hiw-why__title {
  color: var(--text-default);
  font-size: 28px;
  font-weight: 700;
}

.hiw-why__list {
  margin-top: 25px;
}

.hiw-why__point {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.3;
}

.hiw-why__point .icon {
  color: var(--hiw-orange);
}

/* ---------------------------------------------------------------------------
 * The Cook Hire Booking Process — BookingProcessSection
 * (4 columns ≥ 900px of content, 2 ≥ 520px, else 1 — like its LayoutBuilder)
 * ------------------------------------------------------------------------ */

.hiw-process {
  padding: 70px 40px;
}

.hiw-process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.hiw-process__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 236px;
  padding: 28px 22px;
  border: 1px solid var(--hiw-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.hiw-process__badge {
  position: relative;
  width: 74px;
  height: 64px;
}

.hiw-process__icon {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--hiw-cream-alt);
  color: var(--hiw-orange);
}

.hiw-process__number {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hiw-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hiw-process__title {
  margin-top: 18px;
  font-size: 17px;
  font-weight: 700;
}

.hiw-process__desc {
  margin-top: 10px;
  color: var(--black87);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 979.98px) {
  .hiw-process__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------------------------------------------------------------------
 * Personal Chef Questions, Answered — HowItWorksFaqSection
 * ------------------------------------------------------------------------ */

.hiw-faq__group {
  margin-top: 36px;
}

.hiw-intro + .hiw-faq__group {
  margin-top: 40px;
}

.hiw-faq__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--hiw-orange);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.hiw-faq__label::before {
  content: '';
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--hiw-orange);
}

.hiw-faq {
  margin-bottom: 10px;
  border: 1px solid var(--hiw-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.035);
  transition: background-color 0.18s ease-out, border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}

.hiw-faq[open] {
  border-color: rgba(255, 122, 0, 0.45);
  background: var(--hiw-cream);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07), 0 0 0 0.4px rgba(255, 122, 0, 0.45);
}

.hiw-faq__question {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 22px;
  cursor: pointer;
  list-style: none;
}

.hiw-faq__question::-webkit-details-marker {
  display: none;
}

.hiw-faq__question h4 {
  flex: 1;
  margin: 0;
  color: var(--text-default);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.hiw-faq__chevron {
  color: var(--black45);
  transition: transform 0.2s ease;
}

.hiw-faq[open] .hiw-faq__chevron {
  color: var(--hiw-orange);
  transform: rotate(180deg);
}

.hiw-faq__answer {
  padding: 0 22px 20px;
  color: var(--black87);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------------
 * Final CTA — FinalCTASection
 * ------------------------------------------------------------------------ */

.hiw-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 60px;
  background: var(--hiw-cream);
  text-align: center;
}

.hiw-cta__title {
  color: var(--text-default);
  font-size: 26px;
  font-weight: 700;
}

.hiw-cta__text {
  max-width: 600px;
  margin-top: 16px;
  color: var(--black87);
  font-size: 15px;
  line-height: 1.4;
}

.hiw-cta__btn {
  margin-top: 30px;
}

/* ---------------------------------------------------------------------------
 * Mobile — the *_mobile.dart widgets (below 600px)
 * ------------------------------------------------------------------------ */

@media (max-width: 599.98px) {
  .hiw-heading {
    font-size: 22px;
  }

  .hiw-intro {
    margin-top: 10px;
    font-size: 14px;
  }

  .hiw-band {
    padding: 40px 20px;
  }

  .hiw-image {
    width: 100%;
    height: 220px;
    border-radius: 14px;
  }

  /* Hero: image first, centred text */
  .hiw-hero {
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
  }

  .hiw-hero__image {
    order: -1;
    margin-bottom: 28px;
  }

  .hiw-hero__text {
    width: auto;
  }

  .hiw-hero__title {
    color: #000;
    font-size: 23px;
    line-height: 1.25;
  }

  .hiw-hero__intro {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.55;
  }

  /* Steps at a glance: stacked full-width cards */
  .hiw-glance {
    padding: 40px 20px;
  }

  .hiw-glance__grid {
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
  }

  .hiw-glance__card {
    width: 100%;
    height: auto;
    padding: 24px 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  }

  .hiw-glance__icon {
    width: 40px;
    height: 40px;
  }

  .hiw-glance__title {
    margin-top: 18px;
    font-size: 16px;
  }

  .hiw-glance__desc {
    font-size: 13px;
    line-height: 1.45;
  }

  /* Detailed steps */
  .hiw-timeline {
    margin-top: 28px;
  }

  .hiw-timeline__step {
    gap: 14px;
  }

  .hiw-timeline__number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .hiw-timeline__card {
    margin-bottom: 30px;
    padding: 20px 18px;
  }

  .hiw-timeline__title {
    margin-bottom: 12px;
    font-size: 17px;
  }

  .hiw-timeline__para {
    font-size: 13.5px;
  }

  /* Why choose: image on top */
  .hiw-why {
    flex-direction: column;
    padding: 40px 20px;
  }

  .hiw-why__text {
    width: 100%;
    margin-top: 28px;
  }

  .hiw-why__title {
    font-size: 22px;
    line-height: 1.3;
    text-align: center;
  }

  .hiw-why__list {
    margin-top: 24px;
  }

  .hiw-why__point {
    align-items: flex-start;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.45;
  }

  /* Booking process: horizontal cards */
  .hiw-process {
    padding: 40px 20px;
  }

  .hiw-process__grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .hiw-process__card {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    min-height: 0;
    padding: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    text-align: left;
  }

  .hiw-process__badge {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    width: 44px;
    height: auto;
  }

  .hiw-process__number {
    position: static;
    order: -1;
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .hiw-process__icon {
    position: static;
    width: auto;
    height: auto;
    margin-top: 10px;
    background: none;
  }

  .hiw-process__title {
    margin-top: 0;
    font-size: 15px;
  }

  .hiw-process__desc {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
  }

  /* FAQ */
  .hiw-faq__group {
    margin-top: 26px;
  }

  .hiw-intro + .hiw-faq__group {
    margin-top: 26px;
  }

  .hiw-faq__label {
    margin-bottom: 12px;
    font-size: 11.5px;
  }

  .hiw-faq__question {
    padding: 8px 16px;
  }

  .hiw-faq__question h4 {
    font-size: 14.5px;
  }

  .hiw-faq__answer {
    padding: 0 16px 16px;
    font-size: 13.5px;
  }

  /* Final CTA */
  .hiw-cta {
    padding: 50px 20px;
  }

  .hiw-cta__title {
    font-size: 22px;
    line-height: 1.3;
  }

  .hiw-cta__text {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.45;
  }

  .hiw-cta__btn {
    margin-top: 26px;
  }
}
