/* ========================================
   YOYAGE Home Page Styles
   Purpose: hero, strength, products, advantages,
            process, about, news & faq sections
   Loaded only on index.html
   ======================================== */

/* ---------- 1. Hero Section ---------- */
.section-hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  object-position: center bottom;
}

.hero-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-hero);
  pointer-events: none;
}

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

.hero-content {
  max-width: 720px;
  padding-top: 120px;
  padding-bottom: 120px;
  color: var(--color-white);
}

.hero-title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title-line {
  display: block;
  color: var(--color-white);
}

.hero-title-line--accent {
  color: var(--color-brand);
}

.hero-subtitle {
  font-size: var(--fs-body);
  line-height: 1.7;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
}

.hero-tags {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px;
  justify-content: start;
  margin-bottom: 32px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background-color: rgba(0, 100, 124, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-tag);
  font-size: var(--fs-tag);
  font-weight: 600;
  color: var(--color-white);
  white-space: nowrap;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- 2. Company Strength Cards ---------- */
.section-strength {
  padding-top: 0;
  padding-bottom: calc(var(--section-gap) / 2);
}

/* Strength 与 Product Range 之间的细分隔线（不顶格，随 container 宽度） */
.section-divider {
  border: 0;
  height: 1px;
  margin: 0;
  background-color: var(--color-border);
}

.strength-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.strength-card {
  padding: 24px;
  text-align: center;
}

.strength-card:hover {
  box-shadow: var(--shadow-md);
}

.strength-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  color: var(--color-brand);
}

.strength-card-icon svg {
  width: 32px;
  height: 32px;
}

.strength-card-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-title);
  margin-bottom: 6px;
  line-height: 1.2;
}

.strength-card-desc {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.5;
}

/* ---------- Section Header Utility Link ---------- */
.section-header-link,
.news-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-brand);
}

.section-header-link {
  margin-top: 16px;
}

.section-header-link .link-arrow,
.news-resource-link .link-arrow {
  transition: transform var(--transition-fast);
}

.section-header-link:hover,
.news-resource-link:hover {
  color: var(--color-brand-dark);
}

.section-header-link:hover .link-arrow,
.news-resource-link:hover .link-arrow {
  transform: translateX(4px);
}

/* ---------- 3. Products Section ---------- */
.section-products .product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

.section-products .product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  box-shadow: var(--shadow-sm);
}

.section-products .product-card:hover {
  box-shadow: var(--shadow-lg);
}

.section-products .product-card-media {
  flex: 0 0 45%;
  max-width: 280px;
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.section-products .product-card-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.section-products .product-card-body {
  flex: 1 1 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.section-products .product-card-title {
  font-size: var(--fs-h3);
  color: var(--color-title);
  margin-bottom: 14px;
}

.section-products .product-card-title a,
.accessories-title a {
  color: inherit;
}

/* Stretched link：产品卡整卡可点，锚文本仍为标题 */
.section-products .product-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.section-products .product-card-title a:hover,
.section-products .product-card:hover .product-card-title a {
  color: var(--color-brand);
}

.accessories-title a:hover {
  color: var(--color-brand-dark);
}

.section-products .product-spec-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.section-products .product-spec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.section-products .product-spec:first-child {
  padding-top: 0;
}

.section-products .product-spec:last-child {
  border-bottom: none;
}

.section-products .product-spec-label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text-muted);
}

.section-products .product-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- 4. Accessories Entry Card ---------- */
.accessories-card {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* 配件卡 intro 列局部热区（卡内有多类链接，不做整卡覆盖） */
.accessories-intro {
  position: relative;
}

.accessories-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.accessories-col {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.accessories-col + .accessories-col {
  border-left: none;
  position: relative;
}

.accessories-col + .accessories-col::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 1px;
  background-color: var(--color-border);
}

.accessories-title {
  font-size: var(--fs-h3);
  color: var(--color-brand);
  margin-bottom: 10px;
}

.accessories-desc {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.accessories-gallery {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.accessories-gallery img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex-shrink: 0;
}

.accessory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.accessory-label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
}

.accessories-actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.accessories-actions .btn {
  width: 100%;
}

/* ---------- 5. Valve Gearbox Design Advantages ---------- */
.advantages-card {
  display: grid;
  grid-template-columns: 4fr 3fr;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.advantages-left {
  position: relative;
  background-color: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
  padding: 32px;
}

.advantages-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.advantages-tab {
  padding: 8px 16px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-tag);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.advantages-tab:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.advantages-tab.is-active {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-white);
}

.advantages-gallery {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.advantages-image {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

.advantages-image.is-active {
  display: block;
}

.advantages-right {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.advantage-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.advantage-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
}

.advantage-detail-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

.advantage-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advantage-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.advantage-number {
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1;
}

.advantage-title {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--color-title);
  line-height: 1.3;
}

.advantage-desc {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------- 6. Order & Service Process ---------- */
.process-card {
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.process-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.process-step {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 140px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-align: left;
  background: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.process-step-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-process);
  z-index: 1;
  transition: background var(--transition-fast);
}

.process-step-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--color-white);
}

.process-step-icon {
  display: inline-flex;
  color: var(--color-white);
  transition: color 0.15s ease;
}

.process-step-icon svg {
  width: 28px;
  height: 28px;
}

.process-step-number {
  font-size: var(--fs-tag);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.process-step-title {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.3;
}

.process-step.is-active {
  border: 2px solid var(--color-brand);
  box-shadow: 0 0 0 1px var(--color-brand);
}

.process-step.is-active .process-step-icon {
  color: var(--color-brand);
}

.process-connector {
  width: 40px;
  height: 4px;
  background-color: var(--color-border);
  transition: background-color 0.15s ease;
}

.process-connector.is-active {
  background-color: var(--color-brand);
}

.process-details {
  margin-bottom: 24px;
}

.process-detail-panel {
  display: none;
  animation: processFadeIn 0.3s ease;
}

.process-detail-panel.is-active {
  display: block;
}

@keyframes processFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.process-detail-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  background-color: var(--color-bg-alt);
}

.process-detail-card + .process-detail-card {
  margin-top: 12px;
}

.process-detail-number {
  flex-shrink: 0;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1;
  min-width: 48px;
}

.process-detail-title {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--color-title);
  margin-bottom: 6px;
}

.process-detail-desc {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.process-actions {
  gap: 16px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 7. About Section ---------- */
.section-about {
  padding: 64px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: start;
}

.about-content {
  padding-top: 24px;
}

.about-content .section-subtitle {
  margin-bottom: 16px;
}

.about-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr auto;
  gap: 16px;
}

.about-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 180px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

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

.about-card--tall {
  grid-row: span 2;
  grid-column: 1;
  min-height: 380px;
}

.about-card--wide {
  grid-column: span 2;
  min-height: 180px;
}

.about-card--medium {
  min-height: 180px;
}

.about-card--bottom {
  grid-column: span 3;
  min-height: 140px;
}

.about-card-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-card);
  z-index: 1;
}

.about-card--bottom .about-card-overlay {
  background: var(--overlay-wide);
}

.about-card-body {
  position: relative;
  z-index: 2;
  padding: 20px;
  color: var(--color-white);
}

.about-card-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--color-white);
}

.about-card-icon svg {
  width: 100%;
  height: 100%;
}

.about-card-title {
  font-size: var(--fs-h3);
  color: var(--color-white);
  margin-bottom: 8px;
}

.about-card-desc {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* ---------- 8. News & FAQ Section ---------- */
/* Header uses the shared .section-header class;
   .news-faq-header only carries breakpoint overrides below. */

.news-faq-grid {
  display: grid;
  grid-template-columns: 58% 1px 1fr;
  gap: 48px;
  align-items: stretch;
}

.news-faq-divider {
  width: 1px;
  background-color: var(--color-border);
}

.news-section-header,
.faq-section-header {
  margin-bottom: 28px;
}

.news-section-subtitle,
.faq-section-subtitle {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.news-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  padding: 12px;
}

.news-card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-button);
  background-color: var(--color-bg-alt);
}

.news-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-card-body {
  padding-right: 6px;
}

.news-card-category {
  display: inline-block;
  font-size: var(--fs-tag);
  font-weight: 600;
  line-height: 1.4;
  padding: 4px 10px;
  color: var(--color-white);
  background-color: var(--color-brand);
  border-radius: var(--radius-tag);
  margin-bottom: 10px;
}

.news-card-title {
  font-size: var(--fs-h3);
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--color-title);
}

.news-card-desc {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* News & Resources 标题下方文本入口：横向排列，窄屏自动换行 */
.news-resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 14px;
}

/* ---------- 9. Responsive ---------- */
@media (max-width: 991px) {
  .hero-content {
    max-width: 100%;
  }

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

  .section-products .product-grid {
    grid-template-columns: 1fr;
  }

  .section-products .product-card-media {
    flex: 0 0 40%;
    max-width: 240px;
  }

  .accessories-card {
    grid-template-columns: 1fr;
  }

  .accessories-col + .accessories-col {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .accessories-actions {
    justify-content: flex-start;
  }

  .advantages-card {
    grid-template-columns: 1fr;
  }

  .advantage-detail-img {
    width: 64px;
    height: 64px;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .process-connector {
    display: none;
  }

  .process-detail-number {
    min-width: 40px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-content {
    padding-top: 0;
  }

  .news-faq-header {
    margin-bottom: 36px;
  }

  .news-faq-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .news-faq-divider {
    width: 100%;
    height: 1px;
  }

  .news-section-header,
  .faq-section-header {
    margin-bottom: 24px;
  }

  .news-card {
    grid-template-columns: 180px 1fr;
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .section-hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .hero-tags {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .hero-tag {
    white-space: normal;
  }

  .hero-buttons {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .hero-buttons .btn {
    padding: 12px 18px;
    font-size: var(--fs-small);
  }

  .hero-subtitle {
    display: none;
  }

  .hero-background img {
    object-position: calc(50% - 200px) bottom;
  }

  .hero-background::after {
    background: rgba(10, 20, 40, 0.4);
  }

  .hero-tag:nth-child(3),
  .hero-tag:nth-child(4) {
    display: none;
  }

  .strength-cards {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0;
    gap: 10px;
  }

  .strength-card {
    padding: 12px 10px;
  }

  .strength-card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
  }

  .strength-card-icon svg {
    width: 22px;
    height: 22px;
  }

  .strength-card-number {
    font-size: 20px;
  }

  .strength-card-desc {
    font-size: 12px;
  }

  .section-products .product-card {
    flex-direction: column;
  }

  .section-products .product-card-media {
    flex: none;
    max-width: none;
    width: 100%;
    padding: 20px;
  }

  .section-products .product-card-body {
    padding: 20px;
  }

  .accessories-col {
    padding: 20px;
  }

  .accessories-gallery img {
    width: 64px;
    height: 64px;
  }

  .advantages-left,
  .advantages-right {
    padding: 20px;
  }

  .advantages-tabs {
    gap: 8px;
  }

  .advantages-tab {
    padding: 6px 12px;
    font-size: var(--fs-tag);
  }

  .advantage-item {
    gap: 12px;
    padding: 12px;
  }

  .process-card {
    padding: 16px;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .process-step {
    min-height: 100px;
    padding: 12px;
  }

  .process-step-icon svg {
    width: 22px;
    height: 22px;
  }

  .process-step-number {
    font-size: 11px;
  }

  .process-step-title {
    font-size: 13px;
  }

  .process-detail-card {
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .process-actions {
    max-width: 100%;
  }

  .about-cards {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .about-card--tall {
    grid-row: span 1;
    grid-column: span 2;
    min-height: 200px;
  }

  .about-card--tall .about-card-bg {
    object-position: 50% calc(50% + 25px);
  }

  .about-card--wide {
    grid-column: span 2;
    min-height: 160px;
  }

  .about-card--medium {
    min-height: 160px;
  }

  .about-card--bottom {
    grid-column: span 2;
    min-height: 120px;
  }

  .about-card-body {
    padding: 16px;
  }

  .about-card-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }

  .about-card-title {
    font-size: var(--fs-body);
    margin-bottom: 4px;
  }

  .about-card-desc {
    font-size: 12px;
  }

  .section-about {
    padding: 40px 0;
  }

  .about-actions {
    grid-template-columns: 1fr;
  }

  .news-faq-header {
    margin-bottom: 24px;
  }

  .news-faq-grid {
    gap: 24px;
  }

  .news-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-card-media {
    aspect-ratio: 16 / 9;
  }

  .news-card-body {
    padding: 0 4px 4px;
  }

  .news-card-title {
    font-size: var(--fs-body);
  }

  .news-card-desc {
    font-size: 12px;
  }
}
