/* ==================== Reset / Base ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft JhengHei', Arial, sans-serif; background-color: #111827; color: #ffffff; line-height: 1.6; overflow-x: hidden; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }

/* ==================== Navigation ==================== */
nav { position: fixed; width: 100%; z-index: 1000; transition: all 0.3s ease; background-color: #1e3a8a; }
nav.scrolled { background-color: rgba(17, 24, 39, 0.95); backdrop-filter: blur(10px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.nav-container { max-width: 1140px; margin: 0 auto; padding: 0.75rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: bold; background: linear-gradient(to right, #22d3ee, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo img { height: 50px; width: auto; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { color: #ffffff; text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover { color: #22d3ee; }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ==================== Hero Section ==================== */
.hero { height: 100vh; min-height: 600px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #111827 0%, #1e3a8a 50%, #111827 100%); }
.hero-pattern { position: absolute; inset: 0; opacity: 0.2; background-image: radial-gradient(circle at 2px 2px, cyan 1px, transparent 0); background-size: 40px 40px; }
.hero-content { position: relative; z-index: 10; text-align: center; padding: 2rem; max-width: 900px; }
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; }
.hero .gradient-text { background: linear-gradient(to right, #22d3ee, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.35rem; color: #d1d5db; margin-bottom: 2rem; }
.hero-powered { font-size: 1.1rem !important; margin-bottom: 2rem !important; font-weight: bold; }
.nv-text { color: #76b900; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; color: #22d3ee; font-size: 2rem; }

/* ==================== Buttons ==================== */
.btn { padding: 0.75rem 2rem; border-radius: 9999px; font-weight: 600; cursor: pointer; transition: all 0.3s; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-primary { background: linear-gradient(to right, #06b6d4, #3b82f6); color: white; border: none; }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3); }
.btn-outline { display: inline-block; padding: 0.75rem 1.5rem; border: 1px solid #22d3ee; color: #22d3ee; text-decoration: none; border-radius: 0.5rem; margin-top: 2rem; transition: all 0.3s; }
.btn-outline:hover { background-color: rgba(34, 211, 238, 0.1); }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ==================== Section Common ==================== */
section { padding: 7rem 0; }
.section-title { text-align: center; margin-bottom: 5rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.section-title h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1.25rem; }
.section-title p { font-size: 1.15rem; color: #9ca3af; }

/* ==================== Partners Section ==================== */
.partners { background-color: #111827; border-bottom: 1px solid rgba(255,255,255,0.05); }
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; }
.partner-card { background-color: #1f2937; padding: 3rem 2rem; border-radius: 1rem; border: 1px solid rgba(255,255,255,0.05); text-align: center; transition: all 0.3s; }
.partner-card:hover { transform: translateY(-5px); border-color: #22d3ee; }
.partner-role { font-size: 0.8rem; color: #22d3ee; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.25rem; font-weight: bold; }
.partner-logo-placeholder { height: 70px; background-color: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; border-radius: 0.5rem; margin-bottom: 1.5rem; color: #9ca3af; font-weight: bold; }

/* ==================== Technology Section ==================== */
.technology { background-color: #0f172a; background-image: url('assets/images/background/technology_background.png'); background-attachment: fixed; background-size: cover; background-position: center; position: relative; min-height: 100vh; }
.technology .container { position: relative; z-index: 1; max-width: 1280px; }
.technology::before { content: ''; position: absolute; inset: 0; background: rgba(10, 20, 40, 0.45); z-index: 0; }
@supports not (background-attachment: fixed) {
    .technology { background-attachment: scroll; }
}
.tech-flow { display: flex; flex-direction: column; gap: 2rem; align-items: stretch; max-width: 100%; margin: 0 auto; }
@media (min-width: 768px) {
    .tech-flow { flex-direction: row; align-items: stretch; }
    .tech-connector { align-self: flex-start; }
}
.tech-step { flex: 1; text-align: center; background: rgba(17, 24, 39, 0.85); padding: 2.5rem; border-radius: 1rem; border: 1px solid rgba(255,255,255,0.05); width: 100%; }
.tech-icon-circle { width: 50px; height: 50px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.8), rgba(59, 130, 246, 0.8)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: bold; margin: 0 auto 1.5rem; color: white; }
.tech-connector { display: none; }
@media (min-width: 768px) {
    .tech-connector { display: block; height: 1px; background: rgba(255,255,255,0.1); flex: 0 0 40px; margin-top: 50px; }
}
.tech-slogan {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ==================== Features Section ==================== */
/* [FIX] 背景色統一為 #0f172a，移除 ::before 分隔線，消除區塊間淺色斷層 */
.features { background-color: #0f172a; position: relative; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; justify-content: center; }

.features-image { width: 100%; text-align: center; padding: 2rem 0; }
.features-image img { max-width: 900px; width: 100%; height: auto; }

@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(6, 1fr); }
    .feature-card:nth-child(1), .feature-card:nth-child(2), .feature-card:nth-child(3) { grid-column: span 2; }
    .feature-card:nth-child(4) { grid-column: 2 / span 2; }
    .feature-card:nth-child(5) { grid-column: 4 / span 2; }
}

.feature-card { background: rgba(31, 41, 55, 0.5); backdrop-filter: blur(10px); padding: 3rem 2rem; border-radius: 1.25rem; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.4s; text-align: center; display: flex; flex-direction: column; align-items: center; }
.feature-card:hover { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; transform: translateY(-10px); }
.feature-icon { width: 70px; height: 70px; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; background: rgba(59, 130, 246, 0.1); border-radius: 1rem; }
.feature-icon img { max-width: 40px; max-height: 40px; filter: brightness(0) invert(1); opacity: 0.8; }

/* ==================== Products Section ==================== */
.products .container { max-width: 1500px; }
.products { background-color: #0f172a; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 350px)); gap: 2.5rem; justify-content: center; }
.product-card { background-color: #1f2937; border-radius: 1rem; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); }
.product-image { height: auto; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.product-content { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column; height: 420px; }
.product-tags { margin-bottom: 1.25rem; }
.tag-group { display: flex; flex-direction: row; gap: 8px; flex-wrap: wrap; }
.card-description { font-size: 14px; color: #cbd5e1; margin-top: 10px; line-height: 1.5; text-align: left; }
.tag { background: rgba(34, 211, 238, 0.1); color: #22d3ee; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; border: 1px solid rgba(34, 211, 238, 0.2); }
.product-slogan { font-size: 0.75rem; color: #fbbf24; margin-bottom: 1.25rem; font-style: italic; font-weight: 500; }
.product-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; background: rgba(0,0,0,0.2); padding: 0.75rem; border-radius: 0.5rem; }
.product-link { color: #ffffff; text-decoration: none; display: block; text-align: left; }

/* ==================== Applications Section ==================== */
.applications { padding: 7rem 0; background-color: #111827; }
.app-tabs { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 3rem; flex-wrap: wrap; }
.app-tab { padding: 0.6rem 1.5rem; border-radius: 9999px; background-color: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,0.5); cursor: pointer; font-size: 0.9rem; transition: all 0.2s; white-space: nowrap; }
.app-tab:hover { border-color: #22d3ee; color: #22d3ee; }
.app-tab.active { background: linear-gradient(to right, #06b6d4, #3b82f6); color: white; border-color: transparent; }
.app-content-wrapper { position: relative; border-radius: 1rem; overflow: hidden; }
.app-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 0.4s ease; }
.app-bg.fading { opacity: 0; transition: opacity 0.2s linear; }
.app-overlay { position: absolute; border-radius: 1rem; inset: 2.5rem 4.5rem 2.5rem 4.5rem; background: rgba(10, 20, 40, 0.6); box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.2); /* 內陰影：頂部微亮邊，模擬光源 */}
.app-text-content { position: relative; z-index: 1; padding: 4rem 7rem 7rem 7rem; height: 490px; }
.app-subtitle { font-size: 0.85rem; color: rgba(255,255,255,0.7); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.app-panel h3 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; background: linear-gradient(to right, #22d3ee, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.app-slogan { color: #fbbf24; font-size: 1.1rem; margin-bottom: 1rem; font-weight: 700; }
.app-panel .desc { color: #d1d5db; margin-bottom: 1.75rem; max-width: 700px; font-weight: 700; }
.app-features { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.app-feature { background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.3); color: #ffffff; padding: 0.4rem 1rem; border-radius: 9999px; font-size: 0.9rem; }

/* ==================== About Section ==================== */
.about { background-color: #0f172a; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 4rem; align-items: center; }
.about-video { height: 350px; background: #111827; border-radius: 1.5rem; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; display: flex; justify-content: center; align-items: center; }

/* ==================== Contact Section ==================== */
.contact { background-color: #111827; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4rem; }

/* ==================== Footer ==================== */
footer { padding: 3rem; text-align: center; color: #4b5563; font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.05); }

.hidden { display: none; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .section-title h2 { font-size: 2rem; }
    .nav-links { display: none; }
    .app-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 0.5rem; }
    .app-tabs::-webkit-scrollbar { display: none; }
    .app-text-content { padding: 2rem 1.5rem; min-height: 500px; }
    .app-panel h3 { font-size: 1.5rem; }
}
