/* ============================================================
 * OutSystems CN 子站点 - 统一样式表
 * Created: 2026-05-01 (P4-b 抽离)
 * Primary  : #10B981  (算数科技品牌主色，与 AI 章节一致)
 * Secondary: #059669  (深绿)
 * Accent   : #ea1d2c  (OutSystems 品牌红，仅用于 .outsystems-gradient)
 * ============================================================ */

/* ---------- 基础 ---------- */
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  background-attachment: fixed;
}

/* ---------- 容器宽度统一 ---------- */
.os-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .os-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .os-container { padding-left: 2rem; padding-right: 2rem; }
}

/* ---------- 卡片体系 ---------- */
.user-card,
.section-card {
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.8) 0%, rgba(30, 30, 30, 0.6) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}
.user-card:hover,
.section-card:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
}

.resource-card {
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.6) 0%, rgba(30, 30, 30, 0.4) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
}
.resource-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.2);
  transform: translateY(-4px);
}

.card-glow {
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2), 0 0 20px rgba(16, 185, 129, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-glow:hover {
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4), 0 0 40px rgba(16, 185, 129, 0.3);
  transform: translateY(-8px) scale(1.02);
}

.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

/* ---------- 标题渐变（统一绿色） ---------- */
.section-title {
  background: linear-gradient(135deg, #10B981 0%, #059669 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- OutSystems 品牌渐变（红色，仅 hero/品牌区） ---------- */
.outsystems-gradient {
  background: linear-gradient(135deg, #ea1d2c 0%, #ff4757 50%, #ff6b7a 100%);
}

/* ---------- 浮动动画（合并 floating / float-animation） ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}
.floating,
.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* ---------- 图标 ---------- */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.tech-gradient {
  background: linear-gradient(135deg, #10B981, #059669);
}

/* ---------- resources.html 专用 ---------- */
.nav-active {
  color: #10B981;
  font-weight: bold;
}
.resource-category {
  border-left: 4px solid #10B981;
}
.ability-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.resource-link {
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}
.resource-link:hover {
  color: #10B981;
  padding-left: 0.5rem;
}
.resource-link i {
  margin-right: 0.5rem;
}
.expandable {
  cursor: pointer;
}
.expandable::after {
  content: '\f078';
  font-family: 'FontAwesome';
  float: right;
  transition: transform 0.2s ease;
}
.expanded::after {
  transform: rotate(180deg);
}
.hidden-content { display: none; }
.visible-content { display: block; }

/* ---------- 二级导航（OutSystems 子站点 7 页互通） ---------- */
.os-subnav {
  margin-top: 55px; /* 让位 fixed 一级导航高度 */
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  position: sticky;
  top: 55px;
  z-index: 40;
}
.os-subnav-inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.5rem 0;
  scrollbar-width: thin;
}
.os-subnav-inner::-webkit-scrollbar { height: 4px; }
.os-subnav-inner::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.4); border-radius: 4px; }
.os-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.os-subnav-link:hover {
  color: #6ee7b7;
  background: rgba(255, 255, 255, 0.06);
}
.os-subnav-link.is-active {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.4);
}
.os-subnav-link i { font-size: 0.85rem; opacity: 0.85; }
.os-subnav-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0.4rem;
  flex-shrink: 0;
}
.os-subnav-back {
  color: rgba(255, 255, 255, 0.6);
}
.os-subnav-back:hover { color: #10B981; }

/* 一级导航中 "OutSystems 学习中心" 入口高亮（在 OS 子站点内显示为已激活） */
.os-primary-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(234, 29, 44, 0.12), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10B981 !important;
  font-weight: 600;
  transition: all 0.2s ease;
}
.os-primary-link:hover {
  background: linear-gradient(135deg, rgba(234, 29, 44, 0.2), rgba(16, 185, 129, 0.2));
  border-color: rgba(16, 185, 129, 0.55);
}
.os-primary-link i { font-size: 0.85rem; }

/* ---------- 响应式字号防塌陷（移动端） ---------- */
@media (max-width: 768px) {
  .section-title {
    font-size: 19px !important;
    line-height: 1.4;
  }
  h1 { font-size: 24px; line-height: 1.35; }
  h2 { font-size: 20px; line-height: 1.4; }
  h3 { font-size: 16px; line-height: 1.45; }
}
