/* ============================================================
   service-card.css —— 图片卡片轮播（全站统一固定组件）

   结构约定（所有页面一致）：
     .services-grid-wrapper
       > button.scroll-arrow--left / --right
       > .services-grid
         > article.service
           > .service-img
             > img
             > span.service-tag            左上角标
             > .service-overlay            底部信息面板
               > p.service-eyebrow         眉题（小字标签）
               > h3                        标题
               > p.service-desc            描述（悬停展开）
               > ul.service-points         要点（默认不显示）
       > .scroll-dots

   交互（参考 BCG 官网卡片）：
     · 默认态：图片 + 左上浅色角标 + 底部浅灰半透明圆角面板（眉题+标题）
     · 悬停/聚焦：面板提亮并向上展开，显示描述文字，图片轻微放大
     · 触屏设备（无 hover）：描述默认展开

   使用页面：ai-agents / financing-ai / enterprise-deployment / consulting
   维护说明：全站该组件仅此一份定义，修改请直接改本文件。
   ============================================================ */

/* ---------- 轮播容器 ---------- */
.services-grid-wrapper {
  position: relative;
}
.services-grid {
  display: flex;
  gap: var(--space-5, 20px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  /* 隐藏原生滚动条，下方圆点负责分页导航。 */
  scrollbar-width: none;
}
.services-grid::-webkit-scrollbar { display: none; }

/* 两侧渐隐，提示可滑动；颜色跟随所在 section 背景（白底 / 灰底） */
.services-grid-wrapper::before,
.services-grid-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 60px;
  width: 60px;
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.services-grid-wrapper::before { left: 0; background: linear-gradient(90deg, #ffffff 0%, transparent 100%); }
.services-grid-wrapper::after { right: 0; background: linear-gradient(-90deg, #ffffff 0%, transparent 100%); }
.section--gray .services-grid-wrapper::before { background: linear-gradient(90deg, var(--surface, #f0f7f4) 0%, transparent 100%); }
.section--gray .services-grid-wrapper::after { background: linear-gradient(-90deg, var(--surface, #f0f7f4) 0%, transparent 100%); }

/* ---------- 左右箭头 ---------- */
.scroll-arrow {
  position: absolute;
  top: calc((100% - 60px) / 2);
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #1B5E20;
  color: #1B5E20;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  padding: 0;
}
.scroll-arrow:hover { background: #1B5E20; color: #ffffff; transform: translateY(-50%) scale(1.1); }
.scroll-arrow:active { transform: translateY(-50%) scale(0.95); }
.scroll-arrow--left { left: -22px; }
.scroll-arrow--right { right: -22px; }
.scroll-arrow svg { width: 20px; height: 20px; }

/* ---------- 圆点指示器 ---------- */
.scroll-dots { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding: 0; }
.scroll-dot {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.scroll-dot::before, .scroll-dot::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; transition: background-color 0.2s ease, border-color 0.2s ease; pointer-events: none; }
.scroll-dot::before { width: 8px; height: 8px; background: #789882; }
.scroll-dot::after { width: 24px; height: 24px; border: 1px solid transparent; }
.scroll-dot:hover::before, .scroll-dot.active::before { background: #1B5E20; }
.scroll-dot.active::after { border-color: #1B5E20; }
.scroll-dot:focus-visible { outline: 2px solid #1B5E20; outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .scroll-dot::before, .scroll-dot::after { transition: none; } }

/* ============================================================
   卡片本体 —— BCG 风格：浅色玻璃拟态面板
   ============================================================ */
.service {
  position: relative;
  min-width: 320px;
  max-width: 360px;
  flex: 0 0 320px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg, 18px);
  overflow: hidden;
  border: 1px solid var(--border, #d4e8e0);
  transition: border-color var(--motion-base, 220ms) var(--ease-standard, ease),
              box-shadow var(--motion-base, 220ms) var(--ease-standard, ease);
}
.service:hover,
.service:focus-within {
  border-color: #1B5E20;
  box-shadow: 0 12px 40px rgba(27,94,32,0.14);
}
.service-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface, #f0f7f4);
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-standard, ease);
}
.service:hover .service-img img,
.service:focus-within .service-img img { transform: scale(1.05); }

/* 左上角标：浅色玻璃拟态角标（与首页 impact-chip 一致） */
.service-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #14231a;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill, 980px);
  letter-spacing: 0.06em;
  box-shadow: 0 4px 14px rgba(20, 40, 20, 0.10);
}

/* 底部信息面板：默认浅灰半透明圆角面板（眉题+标题） */
.service-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  border-radius: 12px;
  padding: 16px 20px 18px;
  color: #14231a;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.service:hover .service-overlay,
.service:focus-within .service-overlay {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(20, 40, 20, 0.14);
}
.service-overlay .service-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3c4a3e;
  margin: 0 0 6px;
}
.service-overlay h3 {
  font-family: var(--font-display, "Noto Serif SC", Georgia, serif);
  font-size: var(--text-lg, 21px);
  line-height: 1.35;
  font-weight: 600;
  color: #14231a;
  margin: 0;
}

/* 描述：默认收起，悬停/聚焦时展开 */
.service-overlay .service-desc {
  font-size: var(--text-sm, 14px);
  line-height: 1.6;
  color: #40513f;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-standard, ease),
              opacity 0.3s ease,
              margin-top 0.3s ease;
}
.service:hover .service-overlay .service-desc,
.service:focus-within .service-overlay .service-desc {
  max-height: 240px;
  opacity: 1;
  margin-top: 10px;
}

/* 要点列表 / 图标：当前设计不显示 */
.service-overlay .service-points { display: none; }
.service-icon { display: none; }

/* ---------- 触屏设备：无 hover，描述默认展开 ---------- */
@media (hover: none) {
  .service-overlay { background: rgba(255, 255, 255, 0.85); }
  .service-overlay .service-desc { max-height: none; opacity: 1; margin-top: 10px; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 833px) {
  .scroll-dots { gap: 0; }
  .services-grid {
    min-width: 0;
    padding-left: 18px;
    padding-right: 18px;
  }
  /* 手机端轮播出血到屏幕边缘：.container 已提供边距，wrapper 不再重复 */
  .services-grid-wrapper { padding: 0; }
  .services-grid-wrapper::before,
  .services-grid-wrapper::after { width: 32px; }
  /* 超窄屏下卡片宽度不超出轮播区 */
  .service { min-width: 0; flex-basis: min(320px, 100%); max-width: 320px; }
  .scroll-arrow--left { left: 8px; }
  .scroll-arrow--right { right: 8px; }
}
