* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Nunito','Noto Sans TC',sans-serif; }
body { background-color: #FAFAFA; color: #231815; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img {max-width: 100%;height: auto;display: block;}
.main-title { font-size: 4.8rem; font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; color: #231815; position: relative; z-index: 2; }
.section-title { font-size: 2.8rem; font-weight: 900; text-align: center; margin-bottom: 1rem; color: #231815; position: relative; display: inline-block; z-index: 1; letter-spacing: 0.05em; }
.section-title::after { content: ''; position: absolute; bottom: 8px; left: -5%; width: 110%; height: 12px; background-color: #FFF000; z-index: -1; transform: rotate(-1deg); border-radius: 10px; opacity: 0.8; }
.sub-title { font-size: 1.25rem; font-weight: 500; color: #666; line-height: 1.8; }
.btn-arrow { display: inline-flex; align-items: center; justify-content: space-between; background: #fff; padding: 8px 8px 8px 30px; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); cursor: pointer; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275); color: #231815; font-weight: 900; border: 1px solid rgba(0,0,0,0.03); gap: 20px; font-size: 1.05rem; letter-spacing: 0.05em; position: relative; z-index: 10; }
.btn-arrow:hover { box-shadow: 0 15px 35px rgba(228,0,127,0.15); transform: translateY(-5px); border-color: #E4007F; color: #E4007F; }
.btn-arrow .arrow-circle { width: 45px; height: 45px; border-radius: 50%; background: #FAFAFA; display: flex; align-items: center; justify-content: center; transition: all 0.4s; color: #E4007F; font-size: 1.2rem; }
.btn-arrow:hover .arrow-circle { background: #E4007F; color: #fff; transform: translateX(3px) rotate(-45deg); }
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out,transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.color-c { color: #00AEEF; }
.color-m { color: #E4007F; }
.color-y { color: #e6d800; }

/* 替換與升級的全新 Header CSS (修正選單跑版問題) */
#header {position: fixed;top: 0;left: 0;width: 100%;padding: 5px 5%;display: flex;justify-content: space-between;align-items: center;background: rgba(255,255,255,0.95);backdrop-filter: blur(20px);z-index: 1000;transition: all 0.3s ease;border-bottom: 1px solid rgba(0,0,0,0.05);}
#header .logo { z-index: 1002; position: relative; }
#header .logo img {max-height: 80px;width: auto;display: block;}
/* 嚴格限制只有第一層 ul 套用 flex排版，避免子選單也變成橫的 */
#header .nav-links > ul { display: flex; gap: 35px; list-style: none; margin: 0; padding: 0; align-items: center; }
#header .nav-links > ul > li { position: relative; padding: 10px 0; }
#header .nav-links a { text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform 0.3s; position: relative; }
#header .nav-links > ul > li > a:hover { transform: translateY(-3px); }
#header .nav-links > ul > li > a::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background-color: #00AEEF; transition: width 0.3s ease; border-radius: 4px; }
#header .nav-links > ul > li > a:hover::after { width: 100%; }
#header .nav-links .en { font-size: 0.75rem; color: #00AEEF; font-family: 'Nunito',sans-serif; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 3px; }
#header .nav-links .cn { font-size: 1.1rem; color: #231815; font-weight: 900; transition: color 0.3s; letter-spacing: 0.05em; }
#header .nav-links > ul > li:hover .cn { color: #E4007F; }
/* 子選單加上 display:block 與 nowrap，確保文字與層級正確 */
#header .subnav { display: block; white-space: nowrap; opacity: 0; visibility: hidden; position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(15px); background: #fff; box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-radius: 15px; padding: 25px; min-width: 220px; transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275); z-index: 100; list-style: none; pointer-events: none; border: 1px solid rgba(0,0,0,0.04); border-top: 4px solid #00AEEF; }
#header .subnav:empty { display: none; }
#header .nav-links > ul > li:hover .subnav { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#header .subnav > li { position: relative; margin-bottom: 18px; text-align: left; cursor: pointer; }
#header .subnav > li.last { margin-bottom: 0; }
#header .subnav p { font-weight: 900; color: #231815; margin-bottom: 0; border-bottom: 2px dotted #eee; padding-bottom: 6px; font-size: 1.05rem; letter-spacing: 0.05em; transition: color 0.3s; display: flex; justify-content: space-between; align-items: center; }
#header .subnav > li:has(.subOption) p::after { content: '▸'; font-size: 0.8rem; color: #ccc; transition: all 0.3s; }
#header .subnav > li:hover p { color: #E4007F; border-bottom-color: #E4007F; }
#header .subnav > li:hover p::after { color: #E4007F; transform: translateX(3px); }
/* 第三層選項樣式 */
#header .subOption { display: block; white-space: nowrap; opacity: 0; visibility: hidden; position: absolute; top: -15px; left: calc(100% + 25px); transform: translateX(15px); background: #fff; box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-radius: 15px; padding: 20px; min-width: 200px; transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275); z-index: 101; list-style: none; pointer-events: none; border: 1px solid rgba(0,0,0,0.04); border-left: 4px solid #E4007F; }
#header .subOption::before { content: ''; position: absolute; top: 15px; left: -25px; width: 25px; height: 100%; background: transparent; }
#header .subnav > li:hover .subOption { opacity: 1; visibility: visible; transform: translateX(0); pointer-events: auto; }
#header .subOption a { display: inline-flex; padding: 6px 0; font-size: 0.95rem; color: #666; font-weight: 700; flex-direction: row; align-items: center; transition: all 0.3s; }
#header .subOption a::before { content: '▸'; color: #ccc; margin-right: 8px; font-size: 0.8rem; transition: color 0.3s; }
#header .subOption a:hover { color: #E4007F; transform: translateX(5px); }
#header .subOption a:hover::before { color: #E4007F; }
#header .hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1002; position: relative; width: 30px; height: 24px; justify-content: center; }
#header .hamburger span { display: block; width: 100%; height: 3px; background-color: #231815; border-radius: 3px; transition: all 0.4s cubic-bezier(0.68,-0.55,0.265,1.55); transform-origin: center; }

#footer-section { background-color: #fff; color: #231815; border-top: 1px solid #e0e0e0; position: relative; z-index: 10; font-family: 'Noto Sans TC',sans-serif; overflow: hidden; }
#footer-section .footer-watermark { position: absolute; bottom: -5%; right: -2%; font-size: 15rem; font-weight: 900; color: #00AEEF; opacity: 0.03; pointer-events: none; user-select: none; z-index: 0; }
#footer-section .footer-main { display: flex; max-width: 1600px; margin: 0 auto; min-height: 450px; position: relative; z-index: 1; }
#footer-section .footer-left {width: 410px;padding: 70px 50px;border-right: 1px solid #e0e0e0;display: flex;flex-direction: column;justify-content: space-between;background: rgba(255,255,255,0.8);backdrop-filter: blur(10px);}
#footer-section .footer-logo-wrap { display: flex; flex-direction: column; gap: 15px; }
#footer-section #footer-cis img{
    width: min(250px , 100%);
}
#footer-section .footer-logo-title { font-size: 2rem; font-weight: 900; color: #231815; display: flex; align-items: center; gap: 12px; letter-spacing: 0.05em; }
#footer-section .footer-site-type { font-size: 1rem; font-weight: 700; letter-spacing: 0.1em; color: #666; margin-top: 10px; padding-bottom: 20px; border-bottom: 1px solid #e0e0e0; }
#footer-section .footer-contact-info { margin-top: 30px; font-size: 0.95rem; line-height: 2.2; color: #333; }
#footer-section .footer-contact-info a { color: #231815; font-weight: 900; transition: color 0.3s; font-size: 1.1rem; }
#footer-section .footer-contact-info a:hover { color: #E4007F; }
#footer-section .footer-right { flex: 1; display: flex; flex-direction: column; }
#footer-section .footer-links-grid { flex: 1; display: flex; padding: 70px 6%; border-bottom: 1px solid #e0e0e0; justify-content: space-between; gap: 30px; }
#footer-section .footer-link-col { display: flex; flex-direction: column; gap: 18px; flex: 1; }
#footer-section .footer-col-title { font-weight: 900; font-size: 1.2rem; margin-bottom: 15px; color: #231815; position: relative; display: inline-block; }
#footer-section .footer-col-title::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 30px; height: 3px; background: #00AEEF; border-radius: 2px; }
#footer-section .footer-link-col a { color: #666; font-size: 1rem; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
#footer-section .footer-link-col a::before { content: '▸'; color: #ccc; font-size: 0.8rem; transition: color 0.3s; }
#footer-section .footer-link-col a:hover { color: #E4007F; transform: translateX(8px); }
#footer-section .footer-link-col a:hover::before { color: #E4007F; }
#footer-section .footer-actions { display: flex; height: 160px; }
#footer-section .footer-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 900; color: #231815; cursor: pointer; transition: all 0.4s ease; gap: 20px; letter-spacing: 0.05em; background: transparent; }
#footer-section .footer-action-btn:first-child { border-right: 1px solid #e0e0e0; }
#footer-section .footer-action-btn:hover { background-color: #231815; color: #fff; }
#footer-section .footer-action-btn span { font-size: 1.1rem; font-weight: 500; color: #aaa; transition: color 0.4s; }
#footer-section .footer-action-btn:hover span { color: #FFF000; }
#footer-section .footer-bottom-bar { border-top: 1px solid #e0e0e0; padding: 25px 50px; max-width: 1600px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: #666; position: relative; z-index: 1; }
#footer-section .footer-bottom-links { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
#footer-section .footer-bottom-links a { color: #231815; font-weight: 700; transition: color 0.3s; display: flex; align-items: center; gap: 5px; }
#footer-section .footer-bottom-links a:hover { color: #00AEEF; }
#footer-section .footer-bottom-links span { color: #ddd; }


/* 懸浮按鈕群組 (Floating Action Buttons) */
.fab-container { position: fixed; right: 30px; bottom: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 9999; transform: translateY(65px); transition: transform 0.4s cubic-bezier(0.25,0.8,0.25,1); }
.fab-container.is-active { transform: translateY(0); }
.fab-container .fab-btn { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.15); transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1); text-decoration: none; border: 2px solid rgb(255 255 255/48%); outline: none; background: #38549d; }
.fab-container .fab-btn svg { fill: white; width: 20px; }
.fab-container .fab-btn.fab-top { background: var(--primary); }
.fab-container .fab-btn.fab-top svg { fill: var(--primary); stroke: white; }
.fab-container .fab-btn:hover { transform: scale(1.1) translateY(-3px); box-shadow: 0 15px 25px rgba(0,0,0,0.25); color: #fff; }
.fab-container .fab-phone {background-color: #3e3d41;border-color: #4f4f53;}
.fab-container .fab-line { background-color: #06C755; border-color: #06C755; }
.fab-top { background-color: #1a1a1a; border-color: rgba(255,255,255,0.2); opacity: 0; pointer-events: none; transition: opacity 0.4s ease,transform 0.3s ease; }
.fab-top:hover { background-color: #ff6600; border-color: #ff6600; }
.fab-container.is-active .fab-top { opacity: 1; pointer-events: auto; }




@keyframes floatPolygon {
  0% { transform: translate(var(--mx,0px),var(--my,0px)) rotate(0deg) scale(1); }
  50% { transform: translate(calc(var(--mx,0px) + 25px),calc(var(--my,0px) - 35px)) rotate(10deg) scale(1.05); }
  100% { transform: translate(calc(var(--mx,0px) - 25px),calc(var(--my,0px) + 25px)) rotate(-10deg) scale(0.95); }
}
@keyframes float {
  0% { transform: translateY(0) translateX(0) scale(1); }
  100% { transform: translateY(-40px) translateX(30px) scale(1.05); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollText {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes scrollPortfolio {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulseFSC {
  0% {transform: scale(1);box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);}
  100% {transform: scale(1.05);box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);}
}
@keyframes floatLeaf {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(120vh) rotate(360deg); opacity: 0; }
}
@media (max-width:1200px) {
  #about-section .about-content { margin-left: 40px; padding: 60px 50px; }
  #services-section .services-left { width: 25%; }
  #services-section .services-right { width: 75%; }
}
@media (max-width:992px) {
  #footer-section .footer-main { flex-direction: column; }
  #footer-section .footer-left { width: 100%; border-right: none; border-bottom: 1px solid #e0e0e0; padding: 50px 5%; text-align: center; align-items: center; }
  #footer-section .footer-links-grid { flex-wrap: wrap; padding: 60px 5%; gap: 50px; }
  #footer-section .footer-link-col { min-width: calc(50% - 25px); text-align: center; align-items: center; }
  #footer-section .footer-col-title::after { left: 50%; transform: translateX(-50%); }
  #footer-section .footer-actions { height: auto; flex-direction: column; }
  #footer-section .footer-action-btn { padding: 40px 5%; border-right: none; border-bottom: 1px solid #e0e0e0; }
  #footer-section .footer-bottom-bar { flex-direction: column; gap: 25px; padding: 35px 5%; text-align: center; }
  #footer-section .footer-bottom-links { justify-content: center; }
}
@media (max-width:768px) {
  #header { padding: 15px 5%; }
  #header .hamburger { display: flex; }
  #header .nav-links { display: block; position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: rgba(255,255,255,0.98); transition: right 0.4s cubic-bezier(0.77,0,0.175,1); z-index: 1001; padding: 100px 20px 40px; overflow-y: auto; }
  #header .nav-links.active { right: 0; }
  /* 修正手機版選單排版為直列，不再繼承橫向 */
  #header .nav-links > ul { display: flex; flex-direction: column; gap: 20px; align-items: center; width: 100%; }
  #header .nav-links > ul > li { width: 100%; padding: 0; }
  #header .nav-links > ul > li > a { align-items: center; }
  #header .nav-links > ul > li > a::after { display: none; }
  #header .nav-links .cn { font-size: 1.6rem; }
  #header .nav-links .en { font-size: 0.9rem; margin-bottom: 5px; }
  #header .subnav { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: 15px 0 20px 0; min-width: 100%; background: transparent; display: block; pointer-events: auto; text-align: center; border-bottom: 1px dashed #eee; margin-bottom: 10px; }
  #header .nav-links > ul > li:hover .subnav { transform: none; }
  #header .subnav > li { margin-bottom: 25px; }
  #header .subnav > li:hover p { border-bottom: none; }
  #header .subnav > li:has(.subOption) p::after { display: none; }
  #header .subnav p { font-size: 1.15rem; margin-bottom: 10px; border-bottom: none; color: #00AEEF; justify-content: center; display: flex; }
  #header .subOption { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0; min-width: 100%; pointer-events: auto; margin-top: 5px; }
  #header .subnav > li:hover .subOption { transform: none; }
  #header .subOption::before { display: none; }
  #header .subOption a { font-size: 1.05rem; justify-content: center; display: flex; margin-bottom: 5px; color: #555; }
  #header .subOption a:hover { transform: none; color: #E4007F; }
  #header .subOption a::before { display: none; }
  #header .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); background-color: #E4007F; }
  #header .hamburger.active span:nth-child(2) { opacity: 0; }
  #header .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background-color: #E4007F; }
  #footer-section .footer-link-col { min-width: 100%; }
  #footer-section .footer-watermark { display: none; }
  .fab-container { right: 20px; bottom: 20px; transform: translateY(55px); gap: 10px; }
  .fab-container.is-active { transform: translateY(0); }
  .fab-btn { width: 45px; height: 45px; }
}
