/* ================= 基礎 ================= */
:root {
  --navy: #05070a;
  --panel: #0d1219;
  --border: rgba(255, 255, 255, .09);
  --text: #f4f6f8;
  --dim: #9aa5b1;
  --orange: #e6844b;
  --blue1: #3b82f6;
  --blue2: #2563eb;
  --font-body: 'Figtree', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-head: Helvetica, Verdana, Arial, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  color: var(--text);
  line-height: 1.7;
  background: var(--navy);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 15px;
}

::selection { background: var(--blue1); color: #fff; }

/* ================= 導覽列 ================= */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo img { width: 96px; }

.logo-text {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: #7db4ff;
  letter-spacing: 2px;
}

.main-nav > ul { display: flex; align-items: center; }

.main-nav > ul > li { position: relative; }

.main-nav > ul > li > a {
  display: block;
  padding: 28px 13px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: color .25s ease;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: #7db4ff; }

.has-sub > a::after {
  content: '▾';
  font-size: 9px;
  margin-left: 5px;
  color: var(--dim);
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .25s ease;
}

.has-sub:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu a {
  display: block;
  padding: 12px 18px;
  font-size: 15.5px;
  color: var(--dim);
  transition: all .2s ease;
}

.sub-menu a:hover { color: #7db4ff; background: rgba(255, 255, 255, .03); }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-pill {
  font-size: 15px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 18px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all .3s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= 主視覺（盒式影片） ================= */
.hero {
  background: var(--navy);
  padding: 12px 0 30px;
}

.hero-box {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 15px;
}

.hero-video {
  width: 100%;
  height: min(78vh, 880px);
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

.hero-overlay {
  position: absolute;
  inset: 0 15px;
  background: rgba(4, 8, 18, .25);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.hero-content h1 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  margin-bottom: 46px;
}

.btn-start {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue1) 0%, var(--blue2) 100%);
  border-radius: 30px;
  padding: 15px 52px;
  box-shadow: 0 6px 24px rgba(37, 99, 235, .45);
  transition: all .25s ease;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, .6);
}

/* ================= 歡迎 ================= */
.welcome {
  background: var(--navy);
  padding: 70px 0 90px;
  text-align: center;
}

.welcome-title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(36px, 4.5vw, 52px);
  color: var(--orange);
  margin-bottom: 46px;
}

.welcome-img {
  width: 100%;
  height: min(78vh, 880px);
  object-fit: cover;
  margin: 0 auto 46px;
  border-radius: 20px;
  display: block;
}

.welcome-text {
  max-width: 1080px;
  margin: 0 auto;
}

.welcome-text p {
  font-size: 16.5px;
  color: var(--dim);
  line-height: 1.9;
  margin-bottom: 22px;
}

/* ================= 新聞頁 ================= */
.page-banner {
  position: relative;
  max-width: 1480px;
  margin: 12px auto 0;
  padding: 0 15px;
}

.page-banner .banner-bg {
  height: 380px;
  background: url('pisi-ai-finance-banner-bg-v2.png') no-repeat center center / cover;
}

.page-banner h1 {
  position: absolute;
  inset: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 54px);
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}

.news-section { padding: 50px 0 90px; }

.news-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-tabs button {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 9px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: all .25s ease;
}

.filter-tabs button:hover { border-color: #7db4ff; color: #7db4ff; }

.filter-tabs button.active {
  background: linear-gradient(135deg, var(--blue1) 0%, var(--blue2) 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.news-item {
  display: flex;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color .25s ease, transform .25s ease;
}

.news-item:hover {
  border-color: rgba(125, 180, 255, .45);
  transform: translateY(-2px);
}

.news-thumb {
  flex: 0 0 250px;
  height: 155px;
  object-fit: cover;
  border-radius: 6px;
}

.news-body h2 {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 10px;
  transition: color .25s ease;
}

.news-item:hover .news-body h2 { color: #7db4ff; }

.news-body .summary {
  font-size: 15.5px;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-body .meta {
  font-size: 14px;
  color: #6b7684;
  margin-top: 12px;
}

.news-note {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 0 15px;
  font-size: 12.5px;
  color: #6b7684;
}

.news-note a { color: #7db4ff; }

/* ================= 頁尾 ================= */
.site-footer {
  background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
  color: #fff;
  padding: 50px 0 20px;
  width: 100%;
  border-top: 1px solid rgba(36, 200, 255, .14);
}

.site-footer * {
  color: #fff;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-logo-section {
  flex: 1;
  min-width: 250px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.company-address {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, .05);
  border-radius: 8px;
  border-left: 3px solid #3498db;
}

.address-title {
  font-size: 18px;
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.address-title::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #e74c3c;
  border-radius: 50%;
  margin-right: 8px;
}

.address-content {
  font-size: 16px;
  line-height: 1.7;
  color: #bdc3c7;
}

.footer-content-section {
  flex: 2;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.about-box {
  background: rgba(255, 255, 255, .05);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.about-title {
  font-size: 20px;
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(52, 152, 219, .5);
  display: flex;
  align-items: center;
}

.about-title::before {
  content: '\25B8';
  color: #3498db;
  margin-right: 10px;
  font-size: 22px;
}

.about-content {
  font-size: 16px;
  line-height: 1.7;
  color: #bdc3c7;
}

.contact-box {
  background: rgba(255, 255, 255, .05);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.contact-title {
  font-size: 20px;
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(46, 204, 113, .5);
  display: flex;
  align-items: center;
}

.contact-title::before {
  content: '\2709';
  color: #2ecc71;
  margin-right: 10px;
  font-size: 22px;
}

.email-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, .03);
  border-radius: 6px;
}

.email-address {
  font-size: 17px;
  color: #ecf0f1;
  font-weight: 500;
}

.email-address a {
  color: #62d8ff;
  text-decoration: none;
  transition: .2s linear;
}

.email-address a:hover {
  text-decoration: underline;
}

.email-address[onclick] {
  color: #62d8ff;
  cursor: pointer;
}

.email-address[onclick]:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
  color: #95a5a6;
  font-size: 16px;
  font-weight: bold;
}

/* ================= 子頁面通用 ================= */
.page-content {
  padding: 80px 0 100px;
  min-height: 60vh;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 500;
  color: #fff;
  margin-bottom: 14px;
  text-align: center;
}

.page-subtitle {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 400;
  color: var(--dim);
  text-align: center;
  margin-bottom: 50px;
}

.content-section {
  max-width: 860px;
  margin: 0 auto;
}

.content-section p {
  font-size: 17px;
  color: var(--dim);
  line-height: 1.9;
  margin-bottom: 20px;
}

/* 人物頁 */
.person-layout {
  text-align: center;
}

.person-img {
  display: block;
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 36px;
  border: 3px solid rgba(36, 200, 255, .5);
  box-shadow: 0 0 30px rgba(36, 200, 255, .2);
}

.person-nickname {
  font-size: 20px;
  color: #7a7a7a;
  text-align: center;
  margin-bottom: 30px;
}

.person-bio {
  text-align: center;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 20px;
}

.person-bio p {
  text-align: center;
}

.person-split {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.person-photo {
  width: 360px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
}

.person-split .numbered-paras {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .person-split {
    flex-direction: column;
    align-items: center;
  }
}

.numbered-paras p {
  text-align: left;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 16px;
}

.photo-gallery {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.photo-row {
  display: flex;
  gap: 20px;
}

.photo-item {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  transition: transform .3s ease;
}

.photo-item img:hover {
  transform: scale(1.03);
}

.person-layout p {
  text-align: left;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.tag {
  font-size: 14px;
  padding: 6px 16px;
  background: rgba(36, 200, 255, .1);
  border: 1px solid rgba(36, 200, 255, .25);
  border-radius: 20px;
  color: #7db4ff;
}

/* 理念頁 */
.spirit-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.spirit-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.spirit-card p {
  margin-bottom: 0;
}

.spirit-card.highlight {
  background: linear-gradient(135deg, rgba(36, 200, 255, .08), rgba(36, 200, 255, .02));
  border-color: rgba(36, 200, 255, .3);
}

.spirit-card.highlight p {
  color: var(--orange);
  font-size: 19px;
  text-align: center;
}

/* 技術交流 */
.tech-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tech-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 24px;
  font-size: 17px;
  color: var(--text);
  cursor: pointer;
  transition: all .25s ease;
}

.tech-item:hover {
  background: rgba(36, 200, 255, .06);
  border-color: rgba(36, 200, 255, .3);
}

/* 功能卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 30px 0 40px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.feature-card h4 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 15px;
  margin-bottom: 0;
}

/* 亮點區塊 */
.highlight-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.highlight-item {
  background: linear-gradient(135deg, rgba(36, 200, 255, .1), rgba(36, 200, 255, .03));
  border: 1px solid rgba(36, 200, 255, .2);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #7db4ff;
}

/* 註冊證書 */
.cert-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  max-width: 600px;
  margin: 0 auto;
}

.cert-card h3 {
  font-family: var(--font-head);
  font-size: 22px;
  color: #fff;
  text-align: center;
  margin-bottom: 24px;
}

.cert-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.cert-table td {
  padding: 12px 8px;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
}

.cert-label {
  font-weight: 600;
  color: var(--text) !important;
  width: 140px;
}

.status-badge {
  display: inline-block;
  font-size: 14px;
  padding: 4px 14px;
  background: rgba(46, 204, 113, .15);
  border: 1px solid rgba(46, 204, 113, .3);
  border-radius: 20px;
  color: #2ecc71 !important;
}

.cert-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cert-btn {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue1), var(--blue2));
  border-radius: 26px;
  padding: 12px 28px;
  transition: all .25s ease;
}

.cert-btn:hover {
  opacity: .85;
  transform: translateY(-2px);
}

.content-section h3 {
  font-family: var(--font-head);
  font-size: 24px;
  color: #fff;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(36, 200, 255, .15);
}

/* ================= 響應式 ================= */
@media (max-width: 1100px) {
  .main-nav > ul > li > a { padding: 28px 8px; font-size: 13.5px; }
}

@media (max-width: 920px) {
  .nav-toggle { display: flex; }
  .lang-pill { display: none; }

  .main-nav {
    position: fixed;
    top: 76px;
    right: -100%;
    width: min(320px, 85vw);
    height: calc(100vh - 76px);
    background: var(--panel);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    transition: right .35s ease;
  }

  .main-nav.open { right: 0; }

  .main-nav > ul { flex-direction: column; align-items: stretch; }

  .main-nav > ul > li > a { padding: 15px 22px; border-bottom: 1px solid var(--border); }

  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .03);
    display: none;
  }

  .has-sub.expanded .sub-menu { display: block; }

  .hero-video { height: 60vh; }

  .news-item { flex-direction: column; }
  .news-thumb { flex: none; width: 100%; height: 200px; }

  .footer-container { flex-direction: column; gap: 32px; }
  .footer-logo-section { flex: none; }
  .footer-content-section { flex-direction: column; gap: 32px; }
  .contact-box { flex: none; }
}
