/**
 * page-hero.css
 * Styles for the front-page: hero carousel, plan cards, how-it-works,
 * why-different, story, and cities sections.
 * Depends on design-system.css for token variables.
 */

/* ── 1. Hero Carousel ─────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
}

.hero-slides {
  position: relative;
  min-height: 420px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.50) 100%
  );
}

/* Scroll-down CTA */
.hero-scroll-cta {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.3s;
  animation: hero-bounce 2s ease infinite;
}

.hero-scroll-cta:hover {
  background: rgba(0, 0, 0, 0.5);
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── 2. Plans section ─────────────────────────────────────────── */
.plans {
  background: var(--canvas);
  padding: 20px 0 40px;
}

.plans .container {
  padding: 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 24px;
}

.section-title--light {
  color: var(--text-light);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.plans .plan-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0px 3px 5px rgb(0 0 0 / 24%);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  padding: 0;
  margin-bottom: 0;
  min-width: auto;
}

/* Dark variant (adult menu) — matches production .dark-menu */
.plans .plan-card--dark {
  background: #1C1D1D;
}

.plans .plan-card--dark .plan-card-features li {
  color: #fff;
}

.plans .plan-card--dark .plan-card-price {
  color: #fff;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.plan-card-img {
  padding: 0;
  min-height: 200px;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: flex-end;
  position: relative;
  background-size: cover;
  background-position: center;
}

.plan-card-img h3 {
  color: #fff;
  font-size: 25px;
  font-weight: 500;
  margin: 0;
  padding: 16px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  text-align: center;
  width: 100%;
}

.plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #24AB24;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.plan-card-body {
  padding: 0 8px 9px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.plan-card-features {
  list-style: none;
  padding: 15px 7px 8px;
  margin: 0;
  min-height: 115px;
}

.plan-card-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #242424;
  padding: 2px 0;
}

.plan-card-features svg {
  width: 15px;
  height: 11px;
  flex-shrink: 0;
}

.plan-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
  text-align: center;
  margin: 0;
  padding-top: 5px;
}

.plan-card-cta {
  margin-top: auto;
  display: block;
  width: 100%;
  min-height: 47px;
  line-height: 47px;
  height: auto;
  padding: 0;
  border-radius: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ── 3. How it works ──────────────────────────────────────────── */
.how-it-works {
  background: url('/wp-content/uploads/2021/07/foodie-img-1.jpg') center/cover no-repeat;
  position: relative;
  padding: 30px 0 20px;
}

.how-it-works::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.how-it-works .container {
  position: relative;
  z-index: 1;
}

.how-it-works .section-title {
  color: #fff;
  text-align: left;
  font-size: 24px;
  margin: 0;
}

.how-it-works .section-separator {
  display: block;
  width: 73px;
  height: 5px;
  background: var(--orange);
  margin: 7px 0 30px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.step {
  position: relative;
  background: rgba(36, 36, 36, 0.8);
  border-radius: 16px;
  padding: 33px 10px;
}

.step::before {
  display: none;
}

.step-icon {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  background: none;
  border: 4px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}

.step-icon svg {
  max-width: 52px;
  max-height: 52px;
}

.step h3 {
  font-size: 25px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  padding-top: 16px;
}

.step p {
  font-size: 14px;
  color: #fff;
  line-height: 24px;
  margin: 0;
  padding: 6px 10px 0;
}

/* ── 4. Why Different ─────────────────────────────────────────── */
.why-different {
  background: #fff;
  padding: 80px 0 30px;
}

.why-different-inner {
  background: url('/wp-content/themes/foodie/img/sr_9.jpg') center/contain no-repeat;
  padding: 32px 0 39px;
}

.why-different .section-title {
  text-align: left;
  font-size: 24px;
  color: #000;
  margin: 0;
}

.why-different .section-separator {
  display: block;
  width: 73px;
  height: 5px;
  background: var(--orange);
  margin: 7px 0 30px;
}

.why-detail-card {
  border: 1px solid #D6D6D6;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0px 1px 5px rgb(0 0 0 / 24%);
  margin-bottom: 8px;
}

.why-detail-card h4 {
  font-size: 24px;
  font-weight: 700;
  color: #242424;
  margin: 0 0 10px;
}

.why-detail-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.why-detail-card li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: #242424;
  padding: 3px 0;
  line-height: 1.5;
}

.why-detail-card li svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.why-cards-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 0;
  align-items: start;
}

.why-col-left {
  grid-column: 1;
}

.why-col-right {
  grid-column: 3;
}

.why-col-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 65px;
}

.why-col-bottom .why-detail-card {
  max-width: 440px;
  width: 100%;
}

/* Diet badges */
.diet-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.diet-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}

.why-cta-row {
  text-align: center;
  margin: 24px 0 16px;
}

.why-disclaimer {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: #666;
  margin: 0;
}

/* ── 5. Story ─────────────────────────────────────────────────── */
.story {
  background: url('/wp-content/uploads/2021/07/foodie-img-2-1920x1080-2.jpg') center/cover no-repeat fixed;
  position: relative;
  padding: 80px 0;
}

.story::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.story .container {
  position: relative;
  z-index: 1;
}

.story-separator {
  width: 60px;
  height: 3px;
  background: var(--orange);
  margin: -24px auto 40px;
  border-radius: 2px;
}

.story-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.story-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-light-2);
  margin: 0 0 20px;
}

.story-text p:last-child {
  margin-bottom: 0;
}

/* ── 6. Cities Grid ───────────────────────────────────────────── */
.cities {
  background: var(--canvas);
  padding: 80px 0;
}

.cities-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 16px;
}

.cities-separator {
  display: block;
  width: 73px;
  height: 5px;
  background: var(--orange);
  border-radius: 2px;
  margin-bottom: 40px;
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.city-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.city-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.city-card-inner {
  position: relative;
  background-size: cover;
  background-position: center;
  padding-top: 65%;
  display: flex;
  align-items: flex-end;
}

.city-card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    transparent 100%
  );
  border-radius: 12px;
}

.city-card-inner h3 {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
  z-index: 1;
}

/* ── Responsive ────────────────────────────────────────────────── */

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

  .cities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .why-col-right {
    grid-column: 2;
  }

  .why-col-bottom {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  /* Hero */
  .hero-slides {
    min-height: 360px;
  }

  /* Plans */
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Why Different */
  .why-cards-grid {
    grid-template-columns: 1fr;
  }

  .why-col-right {
    grid-column: 1;
  }

  .why-col-bottom {
    grid-column: 1;
  }

  .why-col-bottom .why-detail-card {
    max-width: 100%;
  }

  .diet-badges {
    justify-content: center;
  }

  /* Cities */
  .cities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cities-title {
    font-size: 24px;
  }

  /* Story: disable fixed attachment on mobile (iOS) */
  .story {
    background-attachment: scroll;
  }

  /* Section titles */
  .section-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero-slides {
    min-height: 280px;
  }

  .cities-grid {
    grid-template-columns: 1fr;
  }
}
