/* ============================================
   Hightek Group — slides.css
   業務簡報網頁（16:9 投影）· Clean Professional White
   設計 tokens 沿用官網 style.css
   ============================================ */

:root {
    --red: #E60819;
    --red-dark: #C20015;
    --red-soft: #FCE9EB;
    --ink: #15181D;
    --ink-2: #2C313A;
    --grey: #59606B;
    --grey-2: #8A929E;
    --line: #E7E9ED;
    --white: #FFFFFF;
    --bg-soft: #F6F8FA;
    --bg-soft-2: #EEF1F5;
    --font-zh: 'Noto Sans TC', sans-serif;
    --font-en: 'Inter', 'Noto Sans TC', sans-serif;
    --shadow-sm: 0 1px 2px rgba(20,24,30,.04), 0 6px 20px rgba(20,24,30,.05);
    --shadow-md: 0 10px 30px rgba(20,24,30,.09);
    --radius: 14px;
    --radius-sm: 10px;
}

/* 語言字體（覆寫 --font-zh，全頁繼承） */
html[lang="zh-CN"] { --font-zh: 'Noto Sans SC', 'Noto Sans TC', sans-serif; }
html[lang="th"]    { --font-zh: 'Noto Sans Thai', 'Noto Sans TC', sans-serif; }
html[lang="vi"]    { --font-zh: 'Inter', 'Noto Sans TC', sans-serif; }
html[lang="en"]    { --font-zh: 'Inter', 'Noto Sans TC', sans-serif; }

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

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: #0E1013;            /* 16:9 以外的留邊（投影黑邊） */
    font-family: var(--font-zh);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--red); color: #fff; }

/* ============================================
   STAGE — 固定 1280×720 畫布，JS 等比縮放置中
   ============================================ */
#stage {
    position: absolute;
    top: 50%; left: 50%;
    width: 1280px; height: 720px;
    transform-origin: center center;
    background: var(--white);
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    overflow: hidden;
}

/* ---- Slide 基礎 ---- */
.slide {
    position: absolute; inset: 0;
    padding: 64px 80px;
    background: var(--white);
    opacity: 0;
    visibility: hidden;
    transform: translateX(40px);
    transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity .45s ease, transform .45s ease;
}
.slide.from-right { transform: translateX(40px); }
.slide.active.from-right,
.slide.active.from-left { transform: translateX(0); }
.slide.from-left { transform: translateX(-40px); }
.slide.grey { background: var(--bg-soft); }
.slide.vcenter { display: flex; flex-direction: column; justify-content: center; }

/* ---- 共用元素 ---- */
.s-label {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
}
.s-title {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 26px;
}
.s-title .en {
    display: block;
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 500;
    color: var(--grey-2);
    letter-spacing: .08em;
    margin-top: 6px;
}
.center { text-align: center; }

/* ============================================
   01 封面
   ============================================ */
.slide.cover {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    background:
        radial-gradient(ellipse 90% 70% at 70% -10%, var(--red-soft) 0%, rgba(252,233,235,0) 55%),
        linear-gradient(180deg, #FFFFFF 0%, #F6F8FA 100%);
}
.cover-logo { width: 110px; height: 110px; margin-bottom: 28px; }
.cover-en {
    font-family: var(--font-en);
    font-size: 16px; font-weight: 600;
    letter-spacing: .35em;
    color: var(--red);
    margin-bottom: 14px;
}
.cover-title { font-size: 60px; font-weight: 700; letter-spacing: .04em; }
.cover-sub { font-size: 20px; color: var(--grey); margin-top: 18px; letter-spacing: .06em; }
.cover-rule {
    width: 56px; height: 4px; border-radius: 2px;
    background: var(--red);
    margin: 30px auto 0;
}
.cover-hint {
    position: absolute; bottom: 36px; left: 0; right: 0;
    font-size: 13px; color: var(--grey-2);
    letter-spacing: .12em;
}

/* ============================================
   02 集團數字
   ============================================ */
.bigstats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    margin-top: 8px;
}
.bigstat {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 38px 40px 34px;
    position: relative;
    overflow: hidden;
}
.bigstat::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px; background: var(--red);
}
.bigstat .num {
    font-family: var(--font-en);
    font-size: 52px; font-weight: 700; line-height: 1.1;
    white-space: nowrap;
}
.bigstat .num span { font-size: 26px; font-weight: 600; margin-left: 4px; }
.bigstat .lbl { font-size: 17px; color: var(--grey); margin-top: 8px; }

/* ============================================
   03 關於 + 三支柱
   ============================================ */
.about-cols {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 44px;
    align-items: start;
}
.about-cols p {
    font-size: 16.5px; line-height: 1.9; color: var(--ink-2);
    margin-bottom: 14px;
}
.about-cols .about-img-box {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-md);
}
.about-cols .about-img-box img { width: 100%; height: 250px; object-fit: cover; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
.pillar {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
    padding: 20px 22px;
}
.pillar h4 { font-size: 17px; margin-bottom: 6px; }
.pillar h4::before { content: '— '; color: var(--red); }
.pillar p { font-size: 13.5px; line-height: 1.7; color: var(--grey); }

/* ============================================
   04 亞太佈局地圖
   ============================================ */
.globalwrap {
    display: grid;
    grid-template-columns: 7fr 6fr;
    gap: 36px;
    align-items: center;
}
/* 第 4 頁版型：左大地圖（向左出血放大）+ 右上標題 + 據點總覽表 */
.globalwrap.g2 {
    grid-template-columns: 1fr 436px;
    gap: 26px;
    height: 100%;
}
.globalwrap.g2 .mapwrap {
    width: calc(100% + 64px);
    margin-left: -64px;
}
.globalwrap.g2 .gright {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 14px;
}
.globalwrap.g2 .gright .s-title { font-size: 30px; margin-bottom: 22px; }
.mapwrap { position: relative; margin: 0 auto; width: 100%; }
.mapwrap img.map { width: 100%; }
.map-marker { position: absolute; transform: translate(-50%, -50%); }
.map-marker i {
    display: block; width: 12px; height: 12px; border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(230,8,25,.16);
    animation: pulse 2.2s infinite;
}
.map-marker.hq i { width: 15px; height: 15px; background: var(--red-dark); }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230,8,25,.30); }
    70%  { box-shadow: 0 0 0 11px rgba(230,8,25,0); }
    100% { box-shadow: 0 0 0 0 rgba(230,8,25,0); }
}
.map-name {
    position: absolute; left: 50%; top: -23px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11.5px; font-weight: 600;
    background: transparent;
    padding: 1px 8px;
    text-shadow: 0 0 4px #fff, 0 1px 2px rgba(255,255,255,.9);
}

/* ============================================
   05 廠區總覽表
   ============================================ */
table.ftable {
    width: 100%; border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 15.5px;
}
.ftable th, .ftable td { padding: 10px 18px; text-align: left; }
.ftable th {
    background: var(--ink); color: #fff;
    font-weight: 500; font-size: 14px; letter-spacing: .06em;
}
.ftable td { border-bottom: 1px solid var(--line); }
.ftable tr:last-child td { border-bottom: none; }
.ftable tr.hq td { background: var(--red-soft); font-weight: 500; }
.ftable td.num { font-family: var(--font-en); }
.ftable.compact { font-size: 13px; }
.ftable.compact th { font-size: 12px; padding: 8px 10px; }
.ftable.compact td { padding: 7px 10px; line-height: 1.45; }
.ftable.compact td.num { white-space: nowrap; }

/* ============================================
   06-13 廠區頁
   ============================================ */
.fslide { display: grid; grid-template-columns: 11fr 9fr; gap: 44px; align-items: center; height: 100%; }
.fslide .photo {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-md);
}
.fslide .photo img { width: 100%; height: 430px; object-fit: cover; }
.fslide .s-title { margin-bottom: 8px; }
.fslide .frole { font-size: 18px; font-weight: 500; color: var(--red); margin-bottom: 18px; }
.fslide .fdesc { font-size: 16.5px; line-height: 1.9; color: var(--ink-2); margin-bottom: 26px; }
.fmeta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fmeta .m {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.fmeta .m .v { font-family: var(--font-en); font-size: 22px; font-weight: 700; white-space: nowrap; }
.fmeta .m .v span { font-size: 13px; font-weight: 500; color: var(--grey); margin-left: 2px; }
.fmeta .m .k { font-size: 13px; color: var(--grey); margin-top: 2px; }

/* ============================================
   14 產品總覽
   ============================================ */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pcard {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-sm); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.pcard img { width: 100%; height: 130px; object-fit: cover; }
.pcard .t { font-size: 15.5px; font-weight: 700; padding: 10px 14px 2px; }
.pcard .d { font-size: 12.5px; color: var(--grey); line-height: 1.55; padding: 0 14px 12px; }

/* ============================================
   15-22 產品頁
   ============================================ */
.prodslide {
    display: grid;
    grid-template-columns: 470px 590px;
    justify-content: center;
    gap: 40px;
    height: 100%;
    align-items: center;
}
.prodslide .s-title { font-size: 32px; margin-bottom: 18px; }
.speclist h4 {
    font-size: 14px; font-weight: 700; letter-spacing: .1em;
    color: var(--red); margin: 14px 0 8px;
    text-transform: uppercase; font-family: var(--font-en);
}
.speclist li {
    font-size: 15px; line-height: 1.65; color: var(--ink-2);
    padding-left: 16px; position: relative; margin-bottom: 5px;
}
.speclist li::before {
    content: ''; position: absolute; left: 0; top: 10px;
    width: 6px; height: 6px; border-radius: 2px; background: var(--red);
}
.prodvisual { display: flex; flex-direction: column; gap: 14px; }
.prodvisual .main {
    border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
}
.prodvisual .main img { width: 100%; height: 310px; object-fit: cover; }
.appthumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.appthumbs .app {
    border-radius: 8px; overflow: hidden; position: relative;
    box-shadow: var(--shadow-sm);
}
.appthumbs .app img { width: 100%; height: 122px; object-fit: cover; }
.appthumbs .app .cap {
    position: absolute; left: 0; right: 0; bottom: 0;
    font-size: 11px; line-height: 1.4; color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    padding: 14px 8px 5px;
}

/* ============================================
   23 客戶
   ============================================ */
.custgroup { margin-bottom: 30px; }
.custgroup .gt {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    padding-left: 12px; border-left: 4px solid var(--red);
}
.logowall { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.logowall .lg {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    height: 74px;
    display: flex; align-items: center; justify-content: center;
    padding: 12px 18px;
}
.logowall .lg img { max-height: 38px; max-width: 130px; width: auto; object-fit: contain; }
.logowall .lg img.logo-icon { max-height: 48px; }

/* ============================================
   24 沿革
   ============================================ */
.tl2col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 44px; }
.tlitem {
    display: grid; grid-template-columns: 64px 1fr; gap: 14px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}
.tlitem .y { font-family: var(--font-en); font-size: 19px; font-weight: 700; color: var(--red); }
.tlitem .t { font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* ============================================
   25 認證
   ============================================ */
.certgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.certcard {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
    padding: 18px 22px;
}
.certcard .cn { font-family: var(--font-en); font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.certcard .cd { font-size: 13.5px; color: var(--grey); }

/* ============================================
   26 獎項
   ============================================ */
.awgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.awcard {
    position: relative;
    border-radius: var(--radius-sm); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.awcard img { width: 100%; aspect-ratio: 10/11; object-fit: cover; }
.awcard .ab {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 26px 12px 9px;
    background: linear-gradient(transparent, rgba(0,0,0,.78));
}
.awcard .ay { font-family: var(--font-en); font-size: 11.5px; font-weight: 700; color: #FF9AA3; }
.awcard .an { font-size: 13px; font-weight: 700; line-height: 1.35; color: #fff; }
.awcard .ao { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 1px; }

/* ============================================
   27 聯絡 / Thank You
   ============================================ */
.slide.thanks {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    background:
        radial-gradient(ellipse 90% 70% at 30% 110%, var(--red-soft) 0%, rgba(252,233,235,0) 55%),
        linear-gradient(180deg, #FFFFFF 0%, #F6F8FA 100%);
}
.thanks .big { font-family: var(--font-en); font-size: 54px; font-weight: 700; letter-spacing: .04em; }
.thanks .zh { font-size: 22px; color: var(--grey); margin-top: 10px; }
.contactrow {
    display: flex; gap: 40px; margin-top: 44px;
    font-size: 15.5px; color: var(--ink-2);
}
.contactrow .ci strong { display: block; font-size: 12.5px; color: var(--grey-2); font-weight: 500; margin-bottom: 2px; }
.contactrow .ci span { font-family: var(--font-en); }

/* ============================================
   控制列（簡報 UI，非投影內容）
   ============================================ */
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 50; transition: opacity .4s; }
body.idle #ui { opacity: 0; }

/* 進度條 */
#progress {
    position: absolute; left: 0; bottom: 0;
    height: 3px; background: var(--red);
    width: 0; transition: width .35s ease;
}
/* 頁碼 */
#pagenum {
    position: absolute; right: 18px; bottom: 12px;
    font-family: var(--font-en);
    font-size: 13px; color: #9AA2AD;
    background: rgba(14,16,19,.55);
    border-radius: 20px;
    padding: 3px 12px;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}
#pagenum:hover { color: #fff; }

/* 左右翻頁箭頭 */
.navarrow {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
    border: none; border-radius: 50%;
    background: rgba(14,16,19,.45);
    color: #fff; font-size: 20px;
    cursor: pointer; pointer-events: auto;
    display: flex; align-items: center; justify-content: center;
    transition: background .25s, opacity .25s;
    opacity: .35;
}
.navarrow:hover { background: var(--red); opacity: 1; }
.navarrow:disabled { opacity: .08; cursor: default; }
.navarrow:disabled:hover { background: rgba(14,16,19,.45); }
#prevBtn { left: 16px; }
#nextBtn { right: 16px; }

/* 頂部右側控制 */
#topbar {
    position: absolute; top: 14px; right: 16px;
    display: flex; gap: 8px;
    pointer-events: auto;
}
.ctl {
    height: 38px; min-width: 38px;
    padding: 0 12px;
    border: none; border-radius: 10px;
    background: rgba(14,16,19,.55);
    color: #D6DAE0; font-size: 14px;
    font-family: var(--font-zh);
    cursor: pointer;
    display: flex; align-items: center; gap: 7px;
    transition: background .25s, color .25s;
}
.ctl:hover { background: var(--red); color: #fff; }

/* 章節選單 overlay */
#menu {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(14,16,19,.82);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center; justify-content: center;
}
#menu.show { display: flex; }
.menubox {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    padding: 36px 44px;
    min-width: 540px;
}
.menubox h3 { font-size: 20px; margin-bottom: 18px; }
.menubox h3 span:last-child { font-size: 13px; color: var(--grey-2); font-weight: 400; margin-left: 10px; }
.chaplist li {
    display: grid; grid-template-columns: 36px 1fr auto;
    gap: 14px; align-items: center;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .2s;
}
.chaplist li:hover { background: var(--red-soft); }
.chaplist li.cur { background: var(--bg-soft); }
.chaplist .no {
    font-family: var(--font-en); font-size: 14px; font-weight: 700;
    color: var(--red);
}
.chaplist .nm { font-size: 16.5px; font-weight: 500; }
.chaplist .pg { font-family: var(--font-en); font-size: 13px; color: var(--grey-2); }

/* 語言選單（下拉） */
#langwrap { position: relative; }
#langmenu {
    position: absolute; top: 44px; right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: none;
    min-width: 140px;
}
#langmenu.show { display: block; }
#langmenu button {
    display: block; width: 100%;
    border: none; background: none;
    text-align: left;
    font-size: 14.5px; font-family: var(--font-zh);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}
#langmenu button:hover { background: var(--bg-soft); }
#langmenu button.cur { color: var(--red); font-weight: 700; }
#langmenu button:disabled { color: var(--grey-2); cursor: default; }
#langmenu button:disabled:hover { background: none; }
