/* =========================================================
   AICOAST · 全站 UI 优化层（桌面 / Pad / 手机）
   在各页内联样式之后加载，仅做覆盖与增强，不改内容结构
   ========================================================= */

/* ---------- 全局细节（全端） ---------- */
img { max-width: 100%; height: auto; }
::selection { background: rgba(212,175,55,.28); color: #F4F6FB; }
html { scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212,175,55,.26); border-radius: 8px; border: 2px solid #050810; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,.45); }

/* ---------- 桌面大屏（≥1600px）：更从容的版心 ---------- */
@media (min-width: 1600px) {
  .container { max-width: 1360px; }
}

/* ---------- Pad 平板（641–968px）：多列网格保持两列，避免拉成长条 ---------- */
@media (min-width: 641px) and (max-width: 968px) {
  section { padding: 84px 0; }
  .section-head { margin-bottom: 50px; }

  /* 首页 */
  .advantage-grid, .story-grid, .insight-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .pillars-grid { gap: 16px; }

  /* AI 学习中心 / 训练营 */
  .module-grid, .lecture-grid, .case-grid, .highlight-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* 上岸硅基 · 五档卡 */
  .sw-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .sw-card, .sw-card.team { grid-column: auto !important; }

  /* 行业洞察 / 校友社区 / 立即咨询 / 产品页 */
  .article-grid, .activity-grid, .channel-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .story-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* 页脚保持双列但更紧凑 */
  .footer-grid { gap: 24px; }
}

/* ---------- 手机（≤640px）：触控与密度优化 ---------- */
@media (max-width: 640px) {

  /* CTA 按钮全宽，触控更友好 */
  .cta-actions { flex-direction: column !important; align-items: stretch !important; }
  .cta-actions .btn { width: 100%; justify-content: center; }

  /* 支柱卡手机端单列 */
  .pillars-grid { grid-template-columns: 1fr !important; }

  /* 合作伙伴墙两列 */
  .partners-wall { grid-template-columns: repeat(2, 1fr) !important; }

  /* 卡片内边距收紧，提升一屏信息量 */
  .cap-card, .story-card, .activity-card, .channel-card,
  .article-card, .role-card, .prog-card { padding: 26px 22px !important; }
  .faq-item { padding: 22px 20px !important; }
  .flow-card, .limit-block { padding: 28px 20px !important; }
  .qr-card { padding: 32px 22px !important; }

  /* 标签 / 芯片更紧凑 */
  .sw-chip, .deliver-chip { font-size: 12px; padding: 7px 13px; }

  /* 大数字价格与统计缩放 */
  .hero-price { flex-wrap: wrap; gap: 8px 12px; }
  .stat-row .num { font-size: 30px; }

  /* 面包屑换行友好 */
  .crumb { line-height: 2; }

  /* 白皮书条目纵向排布时按钮全宽 */
  .report-btn { width: 100%; text-align: center; }
}

/* =========================================================
   2026-08-05 · 全站视觉升级：真实摄影图像层
   手法：照片统一压暗 + 深色渐变罩层，
   使任意来源照片融入 #050810 / #D4AF37 设计系统。
   仅对显式标记 data-hero 的 page-hero 启用，不影响生成器页面。

   2026-08-06 · 动效升级 v2：全站栏目页 hero 统一「动效地球」——
   地球夜景通透化处理（轻罩层/去杂色）+ 可见漂移
   + hero-fx.js 轨道卫星与加密金色尘埃粒子（金色呼吸光晕已移除）。
   ========================================================= */

.page-hero[data-hero] { position: relative; overflow: hidden; isolation: isolate; }
.page-hero[data-hero]::before {
  content: ''; position: absolute; inset: -6%; z-index: -2;
  background-image: url('img/hero-main.jpg');
  background-size: cover; background-position: center 15%;
  opacity: .82; filter: saturate(1.18) brightness(1.08);
  animation: phDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}
.page-hero[data-hero]::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,8,16,.66) 0%, rgba(5,8,16,.40) 42%, rgba(5,8,16,.94) 100%);
}
/* 金色尘埃粒子 + 轨道卫星画布（hero-fx.js 注入） */
.fx-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.page-hero[data-hero] .fx-particles { z-index: -1; }
.hero-bg .fx-particles { z-index: 2; }

/* <picture> 不产生布局盒，img 仍按容器填充（WebP 优雅降级） */
.hero-bg picture, .insight-cover picture, .class-photo picture { display: contents; }

@keyframes phDrift {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.16) translate(-1.5%, -2.5%); }
}

/* 全站微动效：eyebrow 金点呼吸 */
.eyebrow::before { animation: dotPulse 2.6s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(212,175,55,.6); }
  50%      { box-shadow: 0 0 14px rgba(212,175,55,1); }
}

@media (max-width: 640px) {
  /* 手机端照片再压暗一档，保证标题可读性 */
  .page-hero[data-hero]::before { opacity: .5; }

  /* 首页 hero 背景图手机端压暗 + 关闭漂移动画省电 */
  .hero-bg img { opacity: .55 !important; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg img,
  .page-hero[data-hero]::before,
  .eyebrow::before { animation: none !important; }
}

/* =========================================================
   2026-08-06 · 课堂实景图库（真实授课照片，深色罩层说明条）
   ========================================================= */
.class-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.class-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.class-photo { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft, rgba(255,255,255,.08)); aspect-ratio: 4/3; margin: 0; cursor: pointer; transition: transform .3s, border-color .3s; }
.class-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.class-photo:hover { transform: translateY(-4px); border-color: rgba(212,175,55,.35); }
.class-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(5,8,16,.88) 100%); pointer-events: none; }
.class-photo figcaption strong { display: block; font-size: 14px; color: #F4F6FB; font-weight: 500; }
/* 单张宽幅展示（校友页等） */
.class-photo.wide { aspect-ratio: 21/9; }

@media (max-width: 968px) {
  .class-gallery, .class-gallery.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .class-gallery, .class-gallery.cols-3 { grid-template-columns: 1fr; gap: 14px; }
  .class-photo.wide { aspect-ratio: 4/3; }
}

/* =========================================================
   2026-08-07 · 课堂实景 Lightbox（点击图片放大查看）
   ========================================================= */
.ac-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5,8,16,.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.ac-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.ac-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  transform: scale(.92);
  transition: transform .35s ease;
}
.ac-lightbox.active img {
  transform: scale(1);
}
.ac-lightbox .ac-lb-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #B4BFD4;
  text-align: center;
  background: rgba(11,20,38,.7);
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(212,175,55,.15);
}
.ac-lightbox .ac-lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(11,20,38,.7);
  border: 1px solid rgba(212,175,55,.2);
  color: #F4F6FB;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .25s;
}
.ac-lightbox .ac-lb-close:hover {
  background: rgba(212,175,55,.15);
  border-color: var(--gold, #D4AF37);
  color: var(--gold, #D4AF37);
}
@media (max-width: 640px) {
  .ac-lightbox img { max-width: 94vw; max-height: 78vh; border-radius: 8px; }
  .ac-lightbox .ac-lb-close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 20px; }
}
