/**
 * 首页机器卡片区块样式
 * 冻结自参考站 en/index.html 的 #machines section
 * 作用域前缀：.ki-home-machines
 */

.ki-home-machines {
  padding: var(--space-12, 80px) 0;
  background: var(--surface-alt, #f8f9fa);
}

.ki-home-machines .container {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-4, 16px);
}

.ki-home-machines .section-head {
  text-align: center;
  margin-bottom: var(--space-8, 48px);
}

.ki-home-machines .section-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--brand-blue, #036edc);
  margin-bottom: var(--space-3, 12px);
}

.ki-home-machines .section-heading {
  font-family: var(--font-display, 'Commissioner', sans-serif);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 600;
  color: var(--text, #1a1a1a);
  margin: 0 0 var(--space-3, 12px);
  line-height: 1.25;
}

.ki-home-machines .section-desc {
  font-size: 15px;
  color: var(--text-secondary, #666);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.ki-home-machines .mc-scroll-shell {
  position: relative;
  padding: 0 48px;
}

.ki-home-machines .mc-scroll-viewport {
  overflow: hidden;
}

.ki-home-machines .mc-scroll-wrap {
  display: flex;
  gap: var(--space-5, 20px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-2, 8px) 0 var(--space-4, 16px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ki-home-machines .mc-scroll-wrap::-webkit-scrollbar {
  display: none;
}

/* 左右箭头按钮 */
.ki-home-machines .mc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e5e5);
  color: var(--text, #1a1a1a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ki-home-machines .mc-arrow:hover {
  background: var(--brand, #e53935);
  border-color: var(--brand, #e53935);
  color: #fff;
}

.ki-home-machines .mc-arrow-prev {
  left: 0;
}

.ki-home-machines .mc-arrow-next {
  right: 0;
}

/* 到达边界时隐藏箭头 */
.ki-home-machines .mc-scroll-shell.at-start .mc-arrow-prev {
  opacity: 0.3;
  pointer-events: none;
}

.ki-home-machines .mc-scroll-shell.at-end .mc-arrow-next {
  opacity: 0.3;
  pointer-events: none;
}

.ki-home-machines .mc-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--surface, #fff);
  border-radius: var(--radius-xl, 16px);
  border: 1px solid var(--border, #e5e5e5);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  text-decoration: none;
  color: var(--text, #1a1a1a);
  display: flex;
  flex-direction: column;
}

.ki-home-machines .mc-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg, 0 20px 40px rgba(0,0,0,0.1));
  border-color: var(--brand, #e53935);
}

.ki-home-machines .mc-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  padding: var(--space-4, 16px);
}

.ki-home-machines .mc-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ki-home-machines .mc-card-body {
  padding: var(--space-5, 20px);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ki-home-machines .card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand-blue, #036edc);
  background: var(--brand-blue-subtle, rgba(3, 110, 220, 0.08));
  border: 1px solid var(--brand-blue-border, rgba(3, 110, 220, 0.3));
  margin-bottom: var(--space-2, 8px);
}

.ki-home-machines .mc-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 var(--space-2, 8px);
  line-height: 1.3;
  min-height: 46px;
  color: var(--text, #1a1a1a);
}

.ki-home-machines .mc-card:hover .mc-card-title {
  color: var(--brand, #e53935);
}

.ki-home-machines .mc-speed {
  font-size: 13px;
  color: var(--text-tertiary, #999);
  margin-bottom: var(--space-2, 8px);
}

.ki-home-machines .mc-speed span {
  color: var(--text-secondary, #666);
  font-style: italic;
}

.ki-home-machines .mc-desc {
  font-size: 14px;
  color: var(--text-secondary, #666);
  line-height: 1.6;
  margin: 0;
}

/* Tablet & Mobile */
@media (max-width: 768px) {
  .ki-home-machines .mc-card {
    flex: 0 0 280px;
  }

  .ki-home-machines .mc-scroll-shell {
    padding: 0 40px;
  }

  .ki-home-machines .mc-arrow {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .ki-home-machines .mc-scroll-shell {
    padding: 0 32px;
  }
}

/* CTA 按钮区 */
.ki-home-machines .cta-row {
  text-align: center;
  margin-top: var(--space-8, 48px);
}

.ki-home-machines .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 2px solid var(--brand, #e53935);
  border-radius: var(--radius, 8px);
  color: var(--brand, #e53935);
  background: transparent;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.ki-home-machines .btn-outline:hover {
  background: var(--brand, #e53935);
  color: #fff;
}
