/* Hero Section */
.hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: space-between; padding: 0 6%; position: relative; overflow: hidden; gap: 40px; }
.hero-glow-bg { position: absolute; width: 800px; height: 800px; background: radial-gradient(circle, rgba(117, 77, 218, 0.15) 0%, transparent 60%); top: 50%; left: 30%; transform: translate(-50%, -50%); z-index: -1; border-radius: 50%; }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; opacity: 0.6; pointer-events: none; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(255,255,255,0.4), #ffffff); z-index: -2; pointer-events: none; }
.hero-content { flex: 1; max-width: 650px; z-index: 2; text-align: left; }
.main-title { font-size: 75px; font-weight: 900; line-height: 1.15; margin-bottom: 25px; background: linear-gradient(to right, #111111 20%, #754dda 50%, #111111 80%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -1px; animation: textShine 5s linear infinite; }
.sub-title { font-size: 18px; font-weight: 300; color: #666666; max-width: 600px; margin-bottom: 50px; line-height: 1.8; letter-spacing: 1px; }
.cta-btn { padding: 18px 45px; font-size: 15px; font-weight: 600; color: #ffffff; background: linear-gradient(135deg, #754dda, #5a39a8); border: none; border-radius: 40px; cursor: pointer; box-shadow: 0 10px 30px rgba(117, 77, 218, 0.2); transition: 0.3s; }
.cta-btn:hover { box-shadow: 0 15px 35px rgba(117, 77, 218, 0.4); transform: translateY(-2px); }

/* RWD 視窗組件 */
.hero-visual { flex: 1; display: flex; justify-content: flex-end; z-index: 2; width: 100%; animation: fadeInUp 1s forwards 0.5s; opacity: 0; }
.rwd-wrapper { width: 100%; max-width: 700px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.rwd-indicator { display: flex; gap: 30px; font-size: 14px; font-weight: 600; letter-spacing: 1px; color: #555; background: rgba(0,0,0,0.03); padding: 10px 30px; border-radius: 30px; }
.device-icon { display: flex; align-items: center; gap: 8px; transition: all 0.4s ease; cursor: pointer; }
.device-icon.active { color: #754dda; transform: scale(1.05); }
.rwd-scale-wrapper { width: 700px; flex-shrink: 0; display: flex; justify-content: center; transform-origin: center top; will-change: transform, margin-bottom, width; }
.rwd-window { position: relative; width: 700px; height: 420px; background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.1); }
.rwd-topbar { height: 32px; background: rgba(245, 245, 245, 0.9); border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; align-items: center; padding: 0 15px; gap: 8px; }
.rwd-dot { width: 12px; height: 12px; border-radius: 50%; background: #ddd; }
.rwd-dot:nth-child(1) { background: #ff5f56; }
.rwd-dot:nth-child(2) { background: #ffbd2e; }
.rwd-dot:nth-child(3) { background: #27c93f; }
.rwd-content { padding: 25px; height: calc(100% - 32px); overflow: hidden; display: flex; flex-direction: column; gap: 20px; pointer-events: none; }
.rwd-resizer { position: absolute; right: 0; top: 0; bottom: 0; width: 28px; cursor: ew-resize; background: rgba(0, 0, 0, 0.02); border-left: 1px solid rgba(0, 0, 0, 0.05); display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.3s; }
.rwd-resizer:hover, .rwd-resizer:active { background: rgba(117, 77, 218, 0.1); }
.rwd-resizer::after { content: ''; width: 4px; height: 40px; background: #754dda; border-radius: 2px; }
.rwd-hint { font-size: 12px; color: #888; letter-spacing: 2px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.mock-nav { display: flex; justify-content: space-between; align-items: center; }
.mock-logo { width: 80px; height: 14px; background: rgba(117, 77, 218, 0.8); border-radius: 4px; }
.mock-menu { width: 120px; height: 12px; background: rgba(0,0,0,0.1); border-radius: 4px; }
.mock-hero { width: 100%; height: 140px; border-radius: 8px; background: linear-gradient(135deg, rgba(117, 77, 218, 0.15), rgba(0, 0, 0, 0.02)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px solid rgba(117, 77, 218, 0.2); }
.mock-text-1 { width: 60%; height: 18px; background: rgba(0,0,0,0.4); border-radius: 4px; }
.mock-text-2 { width: 40%; height: 12px; background: rgba(0,0,0,0.2); border-radius: 4px; }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; }
.mock-card { height: 90px; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.05); border-radius: 6px; }

/* 標題裝飾組件 (修復層級與間距，避免重疊) */
.section-title-wrapper { position: relative; display: inline-block; margin-bottom: 60px; padding-top: 10px; padding-bottom: 15px; }
.section-title-wrapper.center { display: flex; flex-direction: column; align-items: center; margin-bottom: 80px; }
.section-title-en { font-size: 14px; font-weight: 700; color: #754dda; text-transform: uppercase; letter-spacing: 4px; margin-bottom: 8px; display: block; position: relative; z-index: 2; }
.section-title { font-size: 42px; font-weight: 800; background: linear-gradient(135deg, #111, #666); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; position: relative; z-index: 2; line-height: 1.2; }
.title-watermark { position: absolute; top: -35px; left: -15px; font-size: 80px; font-weight: 900; color: rgba(0,0,0,0.03); white-space: nowrap; z-index: 1; pointer-events: none; user-select: none; line-height: 1; }
.center .title-watermark { left: 50%; transform: translateX(-50%); top: -45px; font-size: 100px; }
.title-decoration { position: absolute; bottom: 0; left: 0; width: 60px; height: 3px; background: #754dda; z-index: 2; }
.center .title-decoration { left: 50%; transform: translateX(-50%); }

/* About Section (復原 570:359 比例與雙向捲動) */
.about-section { padding: 140px 6%; background: #ffffff; position: relative; overflow: hidden; border-bottom: 1px solid rgba(0,0,0,0.03); }
.about-container { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 80px; position: relative; z-index: 2; }
.about-visual { flex: 1.4; height: 650px; position: relative; padding: 20px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(117, 77, 218, 0.15); border-radius: 30px; box-shadow: 0 40px 80px rgba(117, 77, 218, 0.08); backdrop-filter: blur(20px); }
.visual-gallery { display: flex; gap: 24px; height: 100%; overflow: hidden; border-radius: 16px; -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent); mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent); }
.visual-col { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.col-up { animation: scrollUp 30s linear infinite; }
.col-down { animation: scrollDown 30s linear infinite; }
.v-slide { width: 100%; aspect-ratio: 570 / 359; background-size: cover; background-position: center; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); flex-shrink: 0; border: 1px solid rgba(0,0,0,0.04); }
.visual-badge { position: absolute; bottom: -20px; right: -20px; background: linear-gradient(135deg, #754dda, #5a39a8); color: #fff; border-radius: 50%; width: 120px; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 15px 35px rgba(117, 77, 218, 0.4); font-weight: 800; font-size: 14px; z-index: 10; border: 4px solid #fff; animation: floatBadge 4s ease-in-out infinite; }
.visual-badge span { font-size: 28px; margin-bottom: 2px; display: block; }
.about-content { flex: 1; display: flex; flex-direction: column; gap: 35px; }
.about-desc { font-size: 17px; line-height: 2; color: #555; text-align: justify; letter-spacing: 1px; }
.about-guarantees { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.guarantee-card { background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 20px; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; font-weight: 700; color: #111; box-shadow: 0 10px 30px rgba(0,0,0,0.02); transition: 0.3s; }
.guarantee-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(117, 77, 218, 0.1); border-color: rgba(117, 77, 218, 0.3); }
.guarantee-card i { font-size: 32px; background: linear-gradient(135deg, #754dda, #aaaaaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 5px; }

/* Portfolio Section (復原無腳架、大間距、自訂導航箭頭定位) */
.portfolio-section { padding: 80px 0 120px; background: #fafafa; position: relative; }
#product .workframe{
    max-width: 98%;
}
.workframe { position: relative; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 4%; }
.productUl { margin-top: 40px; margin-bottom: 60px; }
.portfolio-item { padding: 0 20px; outline: none; }
.portfolio-content-wrapper { display: flex; flex-direction: column; gap: 20px; transition: transform 0.4s ease; }
.portfolio-item:hover .portfolio-content-wrapper { transform: translateY(-10px); }
.monitor-wrapper { position: relative; width: 100%; background: #fff; box-shadow: 0 20px 40px rgba(0,0,0,0.06); border-radius: 8px; overflow: hidden; border: 1px solid #eaeaea; }
.monitor-screen { position: relative; width: 100%; padding-top: 65%; background: #f0f0f0; overflow: hidden; }
.photo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: top center; transition: transform 2s ease-out; }
.portfolio-item:hover .photo { transform: scale(1.05); }

.pdetail { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 10px; }
.ptitle { display: flex; flex-direction: column; gap: 8px; }
.p-category { font-size: 13px; color: #754dda; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.p-title-text { font-size: 20px; font-weight: 700; color: #222; transition: 0.3s; }
.p-title-text a:hover { color: #754dda; }
.pgo { display: flex; align-items: center; justify-content: center; }
.custom-arrow { display: flex; justify-content: center; align-items: center; width: 45px; height: 45px; border-radius: 50%; background: #754dda; color: #fff; font-size: 16px; transition: 0.3s; box-shadow: 0 4px 15px rgba(117, 77, 218, 0.3); }
.custom-arrow:hover { background: #5a39a8; transform: translateX(5px); }

/* 自訂 Slick 導航按鈕絕對定位於兩側 */
.custom-slick-nav { position: absolute; top: 40%; left: 0; width: 100%; display: flex; justify-content: space-between; padding: 0 10px; transform: translateY(-50%); pointer-events: none; z-index: 10; }
.slick-prev-custom, .slick-next-custom { width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 1px solid #ddd; color: #333; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; pointer-events: auto; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.slick-prev-custom:hover, .slick-next-custom:hover { background: #754dda; color: #fff; border-color: #754dda; }
.portfolio-more-wrapper { display: flex; justify-content: center; margin-top: 20px; }
.btn-more { display: inline-flex; align-items: center; gap: 10px; padding: 16px 45px; font-size: 15px; font-weight: 600; color: #ffffff; background: #111111; border-radius: 40px; cursor: pointer; transition: 0.3s; }
.btn-more:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(17,17,17,0.3); background: #333; }

/* Customer Area (復原圓角 9em 膠囊跑馬燈，解決大黑圖問題) */
.customer-section { position: relative; padding: 120px 0 160px; background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=80&w=1920&auto=format&fit=crop'); background-size: cover; background-position: center; background-attachment: fixed; }
.customer-section::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(17,17,17,0.9), rgba(117,77,218,0.6)); z-index: 1; }
.customer-header { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; max-width: 1400px; margin: 0 auto; padding: 0 6%; }
.customer-title { font-size: 48px; font-weight: 900; color: #fff; letter-spacing: 2px; margin-bottom: 5px; }
.customer-subtitle { font-size: 16px; color: rgba(255,255,255,0.7); letter-spacing: 3px; }
.customer-btn { display: flex; justify-content: center; align-items: center; width: 65px; height: 65px; border-radius: 50%; background: #754dda; color: #fff; font-size: 22px; transition: 0.3s; box-shadow: 0 10px 25px rgba(117, 77, 218, 0.5); }
.customer-btn:hover { transform: scale(1.1) translateX(5px); background: #5a39a8; }

.customer-marquee-wrapper { max-width: 1400px; margin: -100px auto 80px; padding: 0 6%; position: relative; z-index: 10; }
.customer-marquee-inner { background: #ffffff; border-radius: 20px; padding: 45px 0; box-shadow: 0 25px 60px rgba(0,0,0,0.15); overflow: hidden; border: 1px solid rgba(0,0,0,0.05); }
.customer-marquee { width: 100%; overflow: hidden; display: flex; position: relative; }
.customer-marquee::before, .customer-marquee::after { content: ''; position: absolute; top: 0; width: 15%; height: 100%; z-index: 2; pointer-events: none; }
.customer-marquee::before { left: 0; background: linear-gradient(to right, #ffffff, transparent); }
.customer-marquee::after { right: 0; background: linear-gradient(to left, #ffffff, transparent); }
.marquee-content { display: flex; animation: marquee 35s linear infinite; gap: 30px; }
/* 修正溢出與圖片尺寸 */
.marquee-item { flex-shrink: 0; width: 190px; height: 90px; background-color: #fff; border-radius: 9em; display: flex; justify-content: center; align-items: center; padding: 15px 35px; box-shadow: 0 0 0.5em rgb(0 0 0 / 15%); border: 1px solid #fdfdfd; overflow: hidden; transition: 0.3s; }
.marquee-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(117,77,218,0.2); border-color: #754dda; }
.marquee-item img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.6; transition: 0.3s; display: block; }
.marquee-item:hover img { filter: grayscale(0); opacity: 1; }

/* Articles Section (復原卡片內部結構與排版) */
.articles-section { padding: 60px 6% 120px; background: #ffffff; position: relative; }
.articles-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.article-cta-card { background: #f8f9fa; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 40px; border-radius: 12px; position: relative; overflow: hidden; }
.article-cta-card .cta-text { font-size: 22px; font-weight: 700; color: #333; line-height: 1.6; letter-spacing: 1px; z-index: 2; }
.article-cta-card .cta-line { position: absolute; bottom: 0; left: 0; width: 100%; height: 6px; background: #754dda; }
.article-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.06); transition: 0.3s; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(117,77,218,0.12); }
.article-img-link { display: block; width: 100%; padding-top: 55%; position: relative; background: #f0f0f0; overflow: hidden; }
.article-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; transition: 0.6s; }
.article-card:hover .article-img { transform: scale(1.08); }
.article-content { padding: 25px; display: flex; flex-direction: column; flex: 1; }
.article-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.article-date { font-size: 13px; color: #888; font-weight: 600; letter-spacing: 1px; font-family: monospace; }
.article-arrow { display: flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e0e0e0; color: #666; font-size: 12px; transition: 0.3s; }
.article-card:hover .article-arrow { background: #754dda; color: #fff; border-color: #754dda; transform: translateX(3px); }
.article-title { font-size: 17px; font-weight: 700; color: #222; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.3s; }
.article-card:hover .article-title { color: #754dda; }
.article-desc { font-size: 14px; color: #777; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: auto; }

/* Animations */
@keyframes scrollUp { 0% { transform: translateY(0); } 100% { transform: translateY(calc(-50% - 12px)); } }
@keyframes scrollDown { 0% { transform: translateY(calc(-50% - 12px)); } 100% { transform: translateY(0); } }
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-50% - 12px)); } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes floatBadge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes textShine { to { background-position: 200% center; } }
@keyframes pulseGlow { 0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.3; } 100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; } }

/* Index Specific Mobile Overrides */
@media (max-width: 1150px) {
  .hero-section { flex-direction: column; padding-top: 140px; text-align: center; }
  .hero-content { margin-bottom: 40px; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .about-container { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
  .main-title { font-size: 42px; }
  .section-title { font-size: 32px; }
  
  /* 確保關於我們視覺區在手機版轉橫向捲動 */
  .about-visual { width: 100%; height: 320px; overflow-x: auto; overflow-y: hidden; padding: 10px; border-radius: 20px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .about-visual::-webkit-scrollbar { display: none; }
  .visual-gallery { flex-direction: row; height: 100%; animation: none; width: max-content; -webkit-mask-image: none; mask-image: none; }
  .visual-col { flex-direction: row; gap: 15px; flex: none; }
  .col-up, .col-down { animation: scrollLeft 40s linear infinite; }
  .v-slide { width: 280px; height: 100%; flex-shrink: 0; aspect-ratio: unset; scroll-snap-align: start; }
  .visual-badge { display: none; }
  
  .articles-grid { grid-template-columns: 1fr; }
  .customer-header { flex-direction: column; align-items: flex-start; gap: 15px; }
  .customer-title { font-size: 32px; }
  .marquee-item { width: 150px; height: 75px; padding: 10px 20px; }
}