/* ==========================================================================
   SmartAI Landing Page — custom.css  (Astroid 3.5.3 / astroid_three / Joomla 6)
   所有内容样式均以 .sa 为作用域，不会污染 Astroid / Bootstrap 5 的全局样式。
   颜色取自原始页面 style.css。
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --sa-primary:   #493E81;   /* 主色：页眉、按钮、标题、页脚 */
  --sa-primary-1: #423874;   /* 深一级主色：用例图片边框 */
  --sa-primary-2: #EDECF2;   /* 浅色：图标底色、定价标题 */
  --sa-secondary: #10165C;   /* 卡片标题 */
  --sa-accent:    #9FA2BE;   /* 正文灰紫 */
  --sa-danger:    #CB3448;
  --sa-tab:       #774AA4;   /* 用例标签激活色 */
  --sa-counter:   #5B518E;   /* 计数卡片底色 */
  --sa-teal:      #2C5E67;   /* 按钮悬停色（原稿） */
  --sa-teal-1:    #138086;
  --sa-teal-2:    #42999E;
  --sa-teal-dark: #062628;
  --sa-price-bg:  #E7F2F3;
  --sa-shadow:    0 0 25px rgba(0,0,0,.06);
  --sa-radius:    .6rem;
  --sa-radius-sm: .3rem;
}

/* ---- Astroid 变量（已核实的变量名）——Colors 选项卡未生效时的兜底 ---- */
:root .astroid-framework {
  --bs-body-bg: #ffffff;
  --bs-body-color: #9FA2BE;
  --bs-link-color: #493E81;
  --as-header-bg: #493E81;
  --as-header-text-color: #ffffff;
  --as-main-menu-link-color: #ffffff;
  --as-dropdown-bg-color: #ffffff;
  --as-mobile-backgroundcolor: #2E2557;
  --as-mobile-menu-link-color: #ffffff;
}

html { scroll-behavior: smooth; }
body { overflow-x: clip; font-family: Inter, sans-serif; }
.astroid-framework ::selection { background: var(--sa-primary); color: #E8E4FB; }

/* ---- Astroid 页眉微调 ---- */
.astroid-header-section { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.astroid-header .nav-link,
.astroid-header .astroid-nav > li > a { font-weight: 700; text-transform: capitalize; }
.astroid-header .dropdown-menu a:hover,
.astroid-header .nav-submenu a:hover { background: var(--sa-accent); color: #fff; }

/* ---- 基础 ---- */
.sa { font-family: Inter, sans-serif; }
.sa p { color: var(--sa-accent); line-height: 1.5; margin-bottom: 1rem; }
.sa-anchor { scroll-margin-top: 90px; }

/* 全宽色带：突破 Astroid 容器宽度（也可在 Layout Builder 里把 Section 设为全宽） */
.sa-band { position: relative; width: 100vw; left: 50%; margin-left: -50vw; }
.sa-band-primary { background: var(--sa-primary); }
.sa-pad    { padding: 4rem 0; }
.sa-pad-xl { padding: 4rem 0; }
@media (min-width: 1200px) { .sa-pad-xl { padding: 6rem 0; } }

/* ---- 标题 ---- */
.sa-h1, .sa-title { color: var(--sa-primary); font-weight: 700; }
.sa-h1 { font-size: 1.875rem; text-transform: capitalize; margin-bottom: 1rem; line-height: 1.2; }
@media (min-width: 1500px) { .sa-h1 { font-size: 57px; line-height: 70px; } }
.sa-title { font-size: 1.875rem; text-transform: uppercase; margin-bottom: 1.25rem; line-height: 1.25; }
@media (min-width: 768px)  { .sa-title { font-size: 2.25rem; } }
@media (min-width: 1200px) { .sa-title { font-size: 44px; line-height: 56px; } }
.sa-subtitle { color: var(--sa-primary); font-weight: 700; text-transform: uppercase; font-size: 1.5rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .sa-subtitle { font-size: 1.875rem; } }
.sa-head { text-align: center; margin-bottom: 3rem; }
.sa-head p { font-size: 1.125rem; }

.sa-title-light { color: var(--sa-primary-2); }          /* 紫色背景上的标题：与 Features 同尺寸，仅换色 */
.sa-head-tight { margin-bottom: 1.5rem; }

/* ---- 按钮 ---- */
.sa-btn {
  display: inline-flex; align-items: center; padding: .5rem 1.5rem;
  background: var(--sa-primary); color: #fff !important; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--sa-radius-sm);
  text-decoration: none; transition: background .3s, color .3s;
}
.sa-btn:hover { background: var(--sa-teal); color: #fff !important; }
.sa-btn-outline { border-color: #fff; text-transform: capitalize; padding: .25rem 1.5rem; }
.sa-btn-white { background: #fff; color: var(--sa-primary) !important; }
.sa-btn-white:hover { background: var(--sa-teal); color: #fff !important; }
.sa-play { background: none; border: 0; color: var(--sa-primary); font-weight: 700; padding: 0 1rem; display: inline-flex; align-items: center; }
.sa-play i { font-size: 2.25rem; margin-right: .5rem; }

/* ---- 卡片 ---- */
.sa-card { background: #fff; border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); width: 100%; }
.sa-card-body { padding: 1.5rem; }
.sa-icon-chip { display: inline-flex; padding: .5rem .75rem; background: var(--sa-primary-2); border-radius: var(--sa-radius-sm); margin-bottom: 1rem; }
.sa-icon-chip i { color: var(--sa-primary); font-size: 1.25rem; }
.sa-card h5 { color: var(--sa-secondary); font-weight: 600; font-size: 1.25rem; margin-bottom: .5rem; }
.sa-card ul { list-style: none; padding: 0; margin: 0; }
.sa-card li { color: var(--sa-accent); font-size: 15px; }
.sa-card li i { color: var(--sa-primary); }

/* ---- Hero ---- */
.sa-hero { padding-top: 5rem; }
@media (min-width: 1200px) { .sa-hero { padding-top: 7rem; } }
.sa-hero-img { max-width: 100%; border-radius: var(--sa-radius) var(--sa-radius) 0 0; box-shadow: var(--sa-shadow); }

/* ---- Platform 卡片错位 ---- */
@media (min-width: 576px) { .sa-stagger { margin-top: 2rem; } }

/* ---- Strategy ---- */
.sa-media { border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); max-width: 100%; width: 100%; }
.sa-strategy-row { margin-bottom: 2rem; }

/* ---- Counter ---- */
.sa-counter-card { background: var(--sa-counter); border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); text-align: center; padding: 2rem 1.5rem; height: 100%; }
.sa-counter-card svg { display: block; margin: 0 auto 1rem; }
.sa-counter-card h2 { color: #fff; font-weight: 700; font-size: 3rem; margin-bottom: .5rem; }
.sa-counter-card h6 { color: #fff; font-weight: 700; font-size: 1.25rem; margin: 0; }

/* ---- Features ---- */
.sa-feature { background: #fff; border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); height: 100%; transition: transform .3s, box-shadow .3s; }
.sa-feature:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.sa-feature-body { padding: 1.5rem; }
@media (min-width: 992px) { .sa-feature-body { padding: 2rem; } }
.sa-feature-icon {
  width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(270deg, #001216 0%, #2C5E67 100%);
}
.sa-feature-icon i { color: #fff; font-size: 30px; }
.sa-feature h5 { color: var(--sa-secondary); font-weight: 700; font-size: 1.125rem; text-align: center; margin-bottom: 1rem; }
.sa-feature p { font-size: .875rem; margin-bottom: .5rem; }

/* ---- Pricing ---- */
.sa-pricing-title { color: var(--sa-primary-2); font-weight: 700; text-transform: uppercase; text-align: center; font-size: 1.875rem; margin-bottom: 1.5rem; }
@media (min-width: 768px)  { .sa-pricing-title { font-size: 2.25rem; } }
@media (min-width: 1200px) { .sa-pricing-title { font-size: 44px; } }
.sa-price-card {
  background: var(--sa-price-bg); border: 1px solid rgba(161,204,207,.5);
  border-radius: 6px; padding: 30px 0 40px; text-align: center; height: 100%;
}
.sa-price-card h2 { color: var(--sa-primary); font-weight: 700; font-size: 1.5rem; margin-bottom: 30px; transition: color .4s; }
.sa-price-card:hover h2 { color: var(--sa-teal-2); }
.sa-price-tag {
  position: relative; z-index: 0; font-size: 50px; font-weight: 700; color: var(--sa-price-bg);
  padding: 20px 0; border-radius: 0 72px 72px 0; margin: 0;
  background-image: linear-gradient(180deg, #138086 0%, #062628 100%);
}
.sa-price-tag::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: var(--sa-teal-2); border-radius: 0 72px 72px 0; transition: opacity .5s linear;
}
.sa-price-card:hover .sa-price-tag::before { opacity: 1; }
.sa-price-card ul { list-style: none; margin: 0 0 1rem; padding: 1.5rem 1.5rem; text-align: left; }
.sa-price-card li { display: flex; align-items: center; color: #6C6C6C; font-size: 17px; margin-bottom: 1.25rem; }
.sa-price-card li i { margin-right: .5rem; color: var(--sa-teal-1); width: 1.1em; }
.sa-price-card li i.sa-no { color: var(--sa-danger); }
.sa-price-card li p { margin: 0; color: #6C6C6C; }

/* 价格卡片：后缀 + Monthly/Annual 开关 */
.sa-price-tag small { font-size: 18px; font-weight: 600; margin-left: .25rem; opacity: .85; }
.sa-billing { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.sa-billing-label { color: #fff; font-weight: 500; font-size: 1.0625rem; opacity: .8; transition: opacity .3s; }
.sa-billing-label.is-active { opacity: 1; font-weight: 600; }
.sa-switch {
  position: relative; width: 72px; height: 36px; padding: 0; border: 0; border-radius: 36px; cursor: pointer;
  background: rgba(255,255,255,.28); transition: background .3s;
}
.sa-switch:hover { background: rgba(255,255,255,.36); }
.sa-switch:focus-visible { outline: 3px solid var(--sa-teal-2); outline-offset: 3px; }
.sa-switch-knob {
  position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .3s;
}
.sa-switch[aria-checked="true"] .sa-switch-knob { transform: translateX(36px); }
.sa-save-badge { color: #3FD6A0; font-size: 1.0625rem; font-weight: 600; }

/* ---- Use case ---- */
.sa-usecase { background-size: cover; background-position: bottom; background-repeat: no-repeat; }
.sa-tab-list { padding: 1.5rem 2.5rem; display: flex; flex-direction: column; }
.sa-tab-btn {
  position: relative; text-align: left; background: none; border: 0; color: #6c757d;
  font-weight: 600; font-size: 1.125rem; padding: .25rem .75rem; margin-bottom: .5rem;
  display: flex; justify-content: space-between; align-items: center; transition: color .5s;
}
.sa-tab-btn:hover, .sa-tab-btn.active { color: var(--sa-tab); }
.sa-tab-btn::before { content: ""; position: absolute; left: -1rem; top: 0; bottom: 0; width: .25rem; border-radius: 0 .4rem .4rem 0; background: transparent; transition: background .5s; }
.sa-tab-btn:hover::before, .sa-tab-btn.active::before { background: var(--sa-tab); }
.sa-tab-panel { display: none; }
.sa-tab-panel.active { display: block; }
.sa-tab-panel img { max-width: 100%; height: 100%; object-fit: cover; display: block; border: 20px solid var(--sa-primary-1); border-radius: 6px; }

/* ---- Footer ---- */
.sa-footer { background: var(--sa-primary); }
.sa-footer-cta { text-align: center; padding: 4rem 0 2.5rem; border-bottom: 1px solid rgba(162,153,172,.06); max-width: 58%; margin: 0 auto; }
@media (max-width: 1199px) { .sa-footer-cta { max-width: 92%; } }
.sa-footer-cta h2 { color: #fff; font-weight: 700; text-transform: uppercase; font-size: 1.875rem; margin-bottom: 1rem; }
@media (min-width: 1200px) { .sa-footer-cta h2 { font-size: 44px; } }
.sa-footer-cta p { color: var(--sa-primary-2); }
.sa-footer h2.sa-fh { color: var(--sa-primary-2); font-size: 1.25rem; font-weight: 600; text-transform: uppercase; margin-bottom: 1.5rem; }
.sa-footer ul { list-style: none; margin: 0; padding: 0; }
.sa-footer li { margin-bottom: .5rem; text-transform: capitalize; }
.sa-footer a { color: var(--sa-primary-2); text-decoration: none; }
.sa-footer a:hover { color: #fff; }
.sa-footer .sa-fdesc { color: #fff; font-size: 1.125rem; }
.sa-footer .sa-copy, .sa-footer .sa-copy a { color: #fff; font-size: .875rem; }
.sa-footer .sa-copy a { font-weight: 600; }

/* ---- 回到顶部 ---- */
#saScrollBtn {
  position: fixed; right: 30px; bottom: 30px; z-index: 99; display: none; cursor: pointer;
  padding: 12px 16px; font-size: 20px; font-weight: 700; border: 0; border-radius: 8px;
  background: var(--sa-teal-1); color: #fff; transition: background .3s;
}
#saScrollBtn:hover { background: var(--sa-teal-2); }

/* ---- Top Bar（Top A + Color Mode）---- */
.sa-topbar span, .sa-topbar a { color: #fff; font-size: .875rem; text-decoration: none; }
.sa-topbar a:hover { color: var(--sa-primary-2); text-decoration: underline; }
.sa-topbar-sec { font-size: .875rem; }

/* ---- Footer Bar（版权）---- */
.sa-footerbar-sec { font-size: .875rem; border-top: 1px solid rgba(255,255,255,.12); }

/* ---- 深色模式（Color Mode 切换到 dark 时）---- */
[data-bs-theme="dark"] .sa p { color: #B9BBD3; }
[data-bs-theme="dark"] .sa-h1, [data-bs-theme="dark"] .sa-title,
[data-bs-theme="dark"] .sa-subtitle { color: #EDECF2; }
[data-bs-theme="dark"] .sa-card, [data-bs-theme="dark"] .sa-feature { background: #1D1A33; box-shadow: 0 0 25px rgba(0,0,0,.35); }
[data-bs-theme="dark"] .sa-card h5, [data-bs-theme="dark"] .sa-feature h5 { color: #EDECF2; }
[data-bs-theme="dark"] .sa-card li, [data-bs-theme="dark"] .sa-icon-chip i { color: #C9C3F2; }
[data-bs-theme="dark"] .sa-icon-chip { background: #2E2A52; }
[data-bs-theme="dark"] .sa-tab-btn { color: #B9BBD3; }
[data-bs-theme="dark"] .sa-tab-btn:hover, [data-bs-theme="dark"] .sa-tab-btn.active { color: #C9A8F0; }
[data-bs-theme="dark"] .sa-btn:not(.sa-btn-white) { background: #5B518E; }
[data-bs-theme="dark"] .sa-btn:not(.sa-btn-white):hover { background: var(--sa-teal); }
