/* ========================================
   YOYAGE Product Advantages Page Styles
   Purpose: advantages detail cards (four images
            guarding the module center), dual-path
            lead-out cards (standard / custom)
   Loaded only on /product-advantages/index.html
   ======================================== */

/* Anchor target: clear the sticky header when jumped to */
#advantages {
  scroll-margin-top: calc(120px + var(--expo-bar-h));
}

/* ---------- 1. Advantages Detail Cards ---------- */
.adv-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.adv-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.adv-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Media column: number + title + divider + image, all at image width */
/* Bottom-row cards flip the order: image on top, divider, title + number below */
.adv-media {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.adv-number {
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1;
  margin-bottom: 8px;
}

.adv-title {
  font-size: var(--fs-h3);
  color: var(--color-title);
  line-height: 1.3;
}

.adv-divider {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
  margin: 14px 0;
}

.adv-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.adv-card:hover .adv-img {
  transform: translateY(-4px);
}

/* Body column: description + data tags, vertically centered */
.adv-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.adv-desc {
  font-size: var(--fs-body);
  line-height: 1.7;
}

.adv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Four-corner placement: media column always faces the module center */
/* Left-column cards: media on the right side */
.adv-card--tl,
.adv-card--bl {
  flex-direction: row-reverse;
}

/* Top-row cards: media aligned to the bottom corner */
.adv-card--tl .adv-media,
.adv-card--tr .adv-media {
  justify-content: flex-end;
}

/* Bottom-row cards: number below the title, keep the same 8px gap */
.adv-card--bl .adv-number,
.adv-card--br .adv-number {
  margin-top: 8px;
  margin-bottom: 0;
}

/* Verification cross-links */
.adv-verify {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 40px;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.adv-verify-link {
  font-weight: 600;
  color: var(--color-brand);
}

.adv-verify-link:hover {
  text-decoration: underline;
}

/* ---------- 2. Choose Your Path (Dual-path Cards) ---------- */
.paths-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.path-card:hover {
  box-shadow: var(--shadow-lg);
}

.path-card--standard {
  border-color: var(--color-brand);
}

.path-card--custom {
  background: linear-gradient(120deg, var(--color-brand-dark) 0%, var(--color-brand) 100%);
  border-color: transparent;
}

.path-card--custom:hover {
  border-color: transparent;
}

.path-title {
  font-size: var(--fs-h3);
  margin-bottom: 12px;
}

.path-card--custom .path-title {
  color: var(--color-white);
}

.path-desc {
  line-height: 1.7;
  margin-bottom: 20px;
}

.path-card--custom .path-desc {
  color: rgba(255, 255, 255, 0.85);
}

.path-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.path-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: var(--fs-tag);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-brand);
  background-color: transparent;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-tag);
}

.path-card--custom .path-chip {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Grouped chip sections (one row per category, no label) */
.path-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.path-group-label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.path-group .path-chips {
  margin-bottom: 0;
}

/* Section label inside the custom path card: prominent, no description */
.path-card--custom .path-group-label {
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-white);
  margin-bottom: 10px;
}

.path-btn {
  margin-top: auto;
}

.path-card--custom .path-btn {
  color: var(--color-brand);
  background-color: var(--color-white);
  border: 2px solid var(--color-white);
}

.path-card--custom .path-btn:hover {
  color: var(--color-white);
  background-color: transparent;
}

/* OR badge straddling the two path cards */
.paths-or {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-brand);
  background-color: var(--color-bg);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

/* ---------- 3. Responsive ---------- */
/* Tablet: single-column zigzag cards */
@media (max-width: 1023px) {
  .adv-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  /* Cards stack vertically: media block on top, body below */
  .adv-card,
  .adv-card--tl,
  .adv-card--bl {
    flex-direction: column;
  }

  .adv-card {
    padding: 24px;
  }

  .adv-media {
    flex: 0 0 auto;
    width: 160px;
  }

  .adv-card--tl .adv-media,
  .adv-card--tr .adv-media {
    justify-content: flex-start;
  }

  .adv-img {
    width: 160px;
    height: 160px;
  }

  /* Normalize stacked order on mobile: number → title → divider → image for every card */
  .adv-card--bl .adv-number,
  .adv-card--br .adv-number {
    order: 1;
    margin-top: 0;
    margin-bottom: 8px;
  }

  .adv-card--bl .adv-title,
  .adv-card--br .adv-title {
    order: 2;
  }

  .adv-card--bl .adv-divider,
  .adv-card--br .adv-divider {
    order: 3;
  }

  .adv-card--bl .adv-img,
  .adv-card--br .adv-img {
    order: 4;
  }

  .adv-body {
    gap: 12px;
  }

  .path-card {
    padding: 24px;
  }

  .path-groups {
    gap: 10px;
  }

  .paths-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* OR badge becomes a centered divider between the stacked cards */
  .paths-or {
    position: static;
    transform: none;
    justify-self: center;
  }
}
