/* =============================================
   AGILE-BEST SHARED DESIGN SYSTEM
   Brand: #8367ab (purple) | #bcd53f (lime) | #2a2a2a (header)
   Fonts: Montserrat (headings) | Noto Sans TC (body)
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Noto+Sans+TC:wght@400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:     #8367ab;
  --purple-d:   #6a51a0;
  --purple-l:   #a48cc7;
  --purple-bg:  #f3eff9;
  --lime:       #bcd53f;
  --lime-d:     #a5bc35;
  --lime-bg:    #f5fad8;
  --header-bg:  #2a2a2a;
  --text:       #595757;
  --text-dark:  #1a1a1a;
  --text-light: #888;
  --border:     #e5e5e5;
  --bg-light:   #f8f8f8;
  --white:      #ffffff;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 6px 24px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.13);
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --font-h:     'Montserrat', 'Noto Sans TC', sans-serif;
  --font-b:     'Noto Sans TC', 'Segoe UI', sans-serif;
  --nav-h:      70px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-b); color: var(--text); background: var(--white); line-height: 1.75; padding-top: var(--nav-h); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── CONTAINER ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--purple); color: var(--white);
  padding: .75rem 1.75rem; border-radius: 50px;
  font-family: var(--font-h); font-size: .88rem; font-weight: 700;
  border: 2px solid var(--purple); cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--purple-d); border-color: var(--purple-d); transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; color: var(--white);
  padding: .73rem 1.6rem; border-radius: 50px;
  font-family: var(--font-h); font-size: .88rem; font-weight: 600;
  border: 2px solid rgba(255,255,255,.5);
  transition: border-color .2s, background .2s;
}
.btn-outline:hover { border-color: var(--lime); background: rgba(188,213,63,.12); color: var(--lime); }
.btn-outline-dark {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; color: var(--purple);
  padding: .73rem 1.6rem; border-radius: 50px;
  font-family: var(--font-h); font-size: .88rem; font-weight: 600;
  border: 2px solid var(--purple);
  transition: all .2s;
}
.btn-outline-dark:hover { background: var(--purple); color: var(--white); }

/* ── SECTION COMMONS ── */
.section { padding: 5rem 0; }
.section.bg-light { background: var(--bg-light); }
.section.bg-purple-light { background: var(--purple-bg); }
.section.bg-dark {
  background: linear-gradient(135deg, #1e1030 0%, #2a1a5a 50%, #1e1030 100%);
  color: var(--white);
}
.section-tag {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple); margin-bottom: .6rem;
}
.section-tag.light { color: rgba(188,213,63,.9); }
.section-title {
  font-family: var(--font-h); font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800; color: var(--text-dark); line-height: 1.25; margin-bottom: .5rem;
}
.section-title.light { color: var(--white); }
.section-title span { color: var(--purple); }
.section-title span.lime { color: var(--lime); }
.title-line {
  width: 48px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--purple), var(--lime));
  margin: .75rem 0 1.25rem;
}
.title-line.center { margin: .75rem auto 1.25rem; }
.section-sub { font-size: 1rem; color: var(--text); max-width: 600px; }
.section-sub.center { text-align: center; margin: 0 auto; }
.text-center { text-align: center; }

/* ── BREADCRUMB ── */
.breadcrumb-bar { background: #eeeeee; padding: .7rem 0; border-bottom: 1px solid #e0e0e0; }
.breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: var(--text-light); flex-wrap: wrap;
}
.breadcrumb a { color: var(--purple); transition: color .2s; }
.breadcrumb a:hover { color: var(--purple-d); text-decoration: underline; }
.breadcrumb .sep { color: #bbb; }
.breadcrumb .crumb-current { color: var(--text); font-weight: 500; }

/* ── PAGE BANNER (inner pages) ── */
.page-banner-wrap {
  background: linear-gradient(135deg, #1e1030 0%, var(--purple-d) 50%, #2a1a5a 100%);
  padding: 3.5rem 0 3rem; position: relative; overflow: hidden;
}
.page-banner-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at 80% 50%, rgba(188,213,63,.12) 0%, transparent 60%);
}
.page-banner-inner { position: relative; z-index: 1; }
.page-banner-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; padding: .25rem .9rem;
  font-size: .72rem; font-weight: 700; color: var(--lime);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem;
}
.page-banner-h1 {
  font-family: var(--font-h); font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800; color: var(--white); line-height: 1.2; margin-bottom: .5rem;
}
.page-banner-h1 span { color: var(--lime); }
.page-banner-sub { font-size: .95rem; color: rgba(255,255,255,.7); max-width: 520px; }

/* ── STATS BAR ── */
.stats-bar { background: var(--purple); padding: 2rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat-num {
  font-family: var(--font-h); font-size: 2rem; font-weight: 800;
  color: var(--lime); line-height: 1;
}
.stat-label { font-size: .82rem; color: rgba(255,255,255,.75); margin-top: .3rem; }

/* ── CARDS ── */
.card {
  background: var(--white); border-radius: var(--radius-md);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--purple), var(--lime));
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--purple-bg);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.card-icon svg { width: 26px; height: 26px; color: var(--purple); }
.card-icon.lime { background: var(--lime-bg); }
.card-icon.lime svg { color: var(--lime-d); }
.card h3 { font-family: var(--font-h); font-size: .97rem; font-weight: 700; color: var(--text-dark); margin-bottom: .5rem; }
.card p { font-size: .87rem; color: var(--text); line-height: 1.7; }
.card-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 700; color: var(--purple);
  margin-top: 1rem; transition: gap .2s;
}
.card-link:hover { gap: .6rem; }

/* ── CTA BAND ── */
.cta-band {
  background: linear-gradient(135deg, #1e1030 0%, var(--purple-d) 50%, #2a1a5a 100%);
  padding: 5rem 0; text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(188,213,63,.15) 0%, transparent 60%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { font-family: var(--font-h); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: var(--white); margin-bottom: .75rem; }
.cta-band h2 span { color: var(--lime); }
.cta-band p { color: rgba(255,255,255,.75); font-size: 1rem; margin-bottom: 2rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── BACK TO TOP ── */
#ab-top-btn {
  position: fixed; right: 1.25rem; bottom: 1.5rem; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--purple); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(131,103,171,.4);
  border: none; cursor: pointer; opacity: 0;
  transition: opacity .3s, background .2s, transform .2s;
}
#ab-top-btn:hover { background: var(--lime); color: var(--text-dark); transform: translateY(-2px); }
#ab-top-btn svg { width: 18px; height: 18px; }

/* ── HEADER / NAV ── */
#ab-header {
  background: var(--header-bg);
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  transition: box-shadow .3s;
}
#ab-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.25); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 1.5rem;
  padding: 0 1.5rem; max-width: 1280px; margin: 0 auto;
}
.ab-logo { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.ab-logo-img {
  height: 42px; width: auto; display: block;
}
.ab-logo-icon {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  width: 34px; height: 34px;
}
.ab-logo-icon span { border-radius: 4px; background: var(--purple); }
.ab-logo-icon span:nth-child(2) { background: var(--lime); }
.ab-logo-icon span:nth-child(3) { background: var(--purple-l); opacity:.7; }
.ab-logo-text { font-family: var(--font-h); font-size: 1.05rem; font-weight: 800; color: var(--white); letter-spacing: .05em; }
.ab-logo-text em { color: var(--lime); font-style: normal; }

.ab-nav { display: flex; align-items: stretch; }
.ab-nav-item { position: relative; display: flex; align-items: center; }
.ab-nav-link {
  display: flex; align-items: center; gap: .25rem;
  padding: 0 .9rem; height: var(--nav-h);
  font-size: .88rem; font-weight: 500; color: rgba(255,255,255,.85);
  transition: color .2s; white-space: nowrap; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.ab-nav-link:hover { color: var(--lime); }
.ab-nav-link.active { color: var(--lime); border-bottom-color: var(--lime); }
.chevron {
  width: 0; height: 0; margin-left: .2rem;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor; display: inline-block;
}
.ab-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); min-width: 180px;
  padding: .4rem 0; z-index: 999; overflow: hidden;
}
.ab-nav-item:hover .ab-dropdown { display: block; }
.ab-dropdown a {
  display: block; padding: .55rem 1.1rem;
  font-size: .86rem; color: var(--text);
  transition: color .2s, background .2s; white-space: nowrap;
}
.ab-dropdown a:hover,
.ab-dropdown a.dd-active { color: var(--purple); background: var(--purple-bg); }

/* Mega dropdown — 產品服務 */
.ab-dropdown.mega { min-width: 260px; padding: 0; }
.dd-cloud-list { padding: .4rem 0; }
.dd-timing {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--header-bg);
}
.dd-timing a {
  color: rgba(255,255,255,.85) !important;
  padding: .75rem 1.1rem;
  font-size: .84rem; font-weight: 500;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.dd-timing a:hover { background: rgba(255,255,255,.08) !important; color: var(--lime) !important; }
.dd-timing a svg { width: 13px; height: 13px; opacity: .5; flex-shrink: 0; }

.ab-nav-right { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.ab-lang {
  display: flex; align-items: center; gap: .3rem;
  padding: .3rem .75rem; border-radius: 50px;
  border: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.75);
  font-size: .8rem; cursor: pointer; background: none;
  transition: border-color .2s, color .2s; font-family: var(--font-b);
}
.ab-lang:hover { border-color: var(--lime); color: var(--lime); }
.ab-social { color: rgba(255,255,255,.65); transition: color .2s; }
.ab-social svg { width: 18px; height: 18px; display: block; }
.ab-social:hover { color: var(--lime); }
.ab-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.ab-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px; transition: all .3s;
}

/* Mobile nav */
#ab-mob-nav {
  display: none; background: #1e1e1e;
  padding: 1rem 1.5rem 2rem; overflow-y: auto;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  z-index: 999; max-height: calc(100vh - var(--nav-h));
}
#ab-mob-nav.open { display: block; }
#ab-mob-nav a {
  display: block; padding: .65rem 0;
  font-size: .95rem; color: rgba(255,255,255,.8);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color .2s;
}
#ab-mob-nav a:hover,
#ab-mob-nav a.active { color: var(--lime); }
.mob-sub { padding-left: 1rem !important; font-size: .85rem !important; color: rgba(255,255,255,.55) !important; }
.mob-lang-row { display: flex; gap: 1rem; padding-top: 1rem; }
.mob-lang-row a { border: none !important; font-size: .85rem !important; color: rgba(255,255,255,.6) !important; padding: .3rem 0 !important; }
.mob-lang-row a.active { color: var(--lime) !important; }

/* ── FOOTER ── */
#ab-footer { background: var(--header-bg); color: rgba(255,255,255,.6); padding: 3rem 0 1.5rem; }
.footer-wrap { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1.5rem;
}
.footer-brand .fb-name { font-family: var(--font-h); font-size: 1rem; font-weight: 800; color: var(--white); margin-bottom: .2rem; }
.footer-brand .fb-en { font-size: .72rem; color: rgba(255,255,255,.35); margin-bottom: .85rem; letter-spacing: .04em; }
.footer-brand p { font-size: .82rem; line-height: 1.75; }
.footer-col h5 {
  font-family: var(--font-h); font-size: .85rem; font-weight: 700;
  color: var(--white); margin-bottom: .9rem;
  padding-left: .7rem; position: relative;
}
.footer-col h5::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(var(--purple), var(--lime));
}
.footer-col a {
  display: block; font-size: .82rem; color: rgba(255,255,255,.5);
  padding: .3rem 0; transition: color .2s; padding-left: .7rem;
}
.footer-col a:hover { color: var(--lime); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; font-size: .78rem;
}
.footer-bottom a { color: rgba(255,255,255,.4); transition: color .2s; }
.footer-bottom a:hover { color: var(--lime); }
.footer-social { display: flex; gap: .6rem; }
.fsocial {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); transition: all .2s;
}
.fsocial:hover { border-color: var(--lime); color: var(--lime); }
.fsocial svg { width: 14px; height: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .ab-nav, .ab-nav-right .ab-lang { display: none; }
  .ab-hamburger { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
