/* ==========================================
   現代文創風全域初始化定義 
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: #1A1A1A;
    line-height: 1.7;
    background-color: #FFFFFF;
}

.container {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 各分頁專屬背景色配置 */
.bg-white { background-color: #FFFFFF; }
.bg-warm-gray { background-color: #F5F3F0; } /* 溫潤淺暖灰 */
.bg-light-gray { background-color: #F8F9FA; } /* 輕工業風淺灰 */
.bg-dark-tech { background-color: #1A1D20; } /* 深鈦灰科技背景 */

.text-white { color: #FFFFFF !important; }

/* ==========================================
   固定導覽列樣式 (向下捲動仍清晰可見)
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(8px); /* 現代感磨砂效果 */
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 9999;
    padding: 16px 0; /* 調整上下內距，與放大後的 Logo 取得完美視覺比例 */
    transition: all 0.3s ease;
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center; /* 確保導覽列主容器上下完美居中 */
}

.nav-brand {
    display: flex;
    align-items: center; /* 修正：讓 Logo 圖片與品牌文字保持完美垂直置中 */
    text-decoration: none;
}

/* ✦ 調整：將 Logo 圖片高度由 38px 放大至 80px ✦ */
.logo-img {
    height: 75px;
    width: auto; /* 確保維持原圖比例不變形 */
    margin-right: 14px;
    display: block;
}

.brand-text {
    font-size: 21px; /* 按比例微調放大字體大小 */
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 1.5px;
    line-height: 1.2; /* 控制文字行高，方便上下對齊 */
}

.brand-text span {
    display: block;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 1px;
    color: #777;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center; /* 修正：確保選單連結與左側放大後的 Logo 完美垂直置中 */
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

/* 懸停與當前頁面高亮：使用 Logo 硃砂紅 */
.nav-links a:hover, 
.nav-links a.active {
    color: #E60012;
}

/* 導覽列滾動時的動態微調類別 */
.navbar.is-scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    background-color: rgba(255, 255, 255, 0.98);
}

/* ==========================================
   首頁 Banner 區與行銷文案排版
   ========================================== */
.hero-banner {
    height: 70vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding-top: 115px; /* 配合 Logo 75px + 上下 padding 16px*2 = 107px，多留 8px 緩衝 */
}

.hero-container {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-container h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.3;
}

.hero-container h1 span {
    color: #E60012; /* 硃砂紅點睛 */
    display: block;
}

.hero-subtext {
    font-size: 16px;
    color: #666;
    margin: 15px 0 30px 0;
    letter-spacing: 1px;
}

.btn-cta {
    display: inline-block;
    background-color: #1A1A1A;
    color: #FFF;
    text-decoration: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background-color: #E60012;
    transform: translateY(-2px);
}

/* 品牌故事網格設計 */
.section-padding { padding: 90px 0; }

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: flex-start;
}

.text-tag {
    font-size: 12px;
    color: #E60012;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.story-marketing h2 {
    font-size: 32px;
    line-height: 1.4;
    font-weight: 700;
}

.decorator-line {
    width: 40px;
    height: 3px;
    background-color: #E60012;
    margin-top: 20px;
}

.story-content p {
    color: #444;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: justify;
}

.story-content p strong {
    color: #E60012;
    font-weight: 600;
}

/* ==========================================
   首頁產品項目動畫展現區
   ========================================== */
.home-products-section {
    background-color: #F8F9FA;
    padding: 80px 0;
}

.section-title-center {
    text-align: center;
    font-size: 26px;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.home-product-cards {
    display: flex;
    gap: 30px;
}

.scroll-animate-card {
    flex: 1;
    background-color: #FFF;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    border-top: 4px solid #1A1A1A;
    /* 預備給 JS 做進入動畫的樣式定義 */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-card:hover {
    border-top-color: #E60012;
    box-shadow: 0 10px 30px rgba(230,0,18,0.08);
}

.card-icon { font-size: 30px; margin-bottom: 15px; }

.scroll-animate-card h3 { font-size: 20px; margin-bottom: 12px; }

.scroll-animate-card p { color: #666; font-size: 14.5px; margin-bottom: 20px; }

.text-link {
    text-decoration: none; color: #E60012; font-weight: 600; font-size: 14px;
}

/* ==========================================
   第二層 (products.html)：大網格排版 
   ========================================== */
.page-header-padding { padding-top: 150px; padding-bottom: 80px; } /* 調整頂部內距，配合放大的導覽列 */

.page-intro { margin-bottom: 50px; }

/* ✦ SEO 補強：因應 products.html、contact.html 的主標題已由 h2 改為 h1（SEO 需求，全頁僅一個 H1），
   此處選擇器同時涵蓋 h1 與 h2，確保新的 H1 標題與舊有 h2 頁面樣式都能維持一致 ✦ */
.page-intro h1,
.page-intro h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }

.page-intro h1 span,
.page-intro h2 span { font-size: 14px; color: #888; font-weight: 300; margin-left: 10px; }

.page-intro p { color: #666; font-size: 15px; }

.solutions-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.solution-big-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0,0,0,0.03);
    transition: transform 0.4s;
    border: 1px solid #EAEAEA;
}

.solution-big-card:hover {
    transform: translateY(-5px);
}

.solution-caption { padding: 45px; }

.tag-red {
    font-size: 11px; background-color: #FFEBEB; color: #E60012;
    padding: 4px 10px; border-radius: 3px; font-weight: 600;
}

.solution-caption h3 { font-size: 22px; margin: 15px 0 12px 0; }

.marketing-pitch { color: #666; font-size: 14.5px; margin-bottom: 25px; }

.btn-secondary {
    display: inline-block; border: 1px solid #1A1A1A; color: #1A1A1A;
    text-decoration: none; padding: 10px 22px; font-size: 13px; font-weight: 600;
    transition: 0.3s;
}

.solution-big-card:hover .btn-secondary {
    background-color: #E60012; border-color: #E60012; color: #FFF;
}

/* ==========================================
   第三層產品細頁網格設計 (對應 6 張圖與 10 張圖)
   ========================================== */
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 15px; }

.breadcrumb a { text-decoration: none; color: #555; }

.detail-header { margin-bottom: 40px; }

/* ✦ SEO 補強：因應 uvprinter.html、fishinglight.html 的主標題已由 h2 改為 h1（SEO 需求，全頁僅一個 H1），
   此處選擇器同時涵蓋 h1 與 h2，確保新的 H1 標題與舊有 h2 頁面樣式都能維持一致 ✦ */
.detail-header h1,
.detail-header h2 { font-size: 28px; font-weight: 700; }

.detail-header p { color: #666; font-size: 15px; margin-top: 5px; }

.gallery-responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-card {
    background-color: #FFFFFF;
    border: 1px solid #EEEEEE;
    padding: 12px;
    transition: all 0.3s;
}

.gallery-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: #E60012;
}

.gallery-img-box {
    width: 100%;
    height: 240px;
    background-color: #F8F9FA;
    overflow: hidden;
}

.gallery-img-box img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s;
}

.gallery-card:hover img { transform: scale(1.03); }

.gallery-meta { padding: 12px 4px 4px 4px; }

.gallery-meta h4 { font-size: 14.5px; font-weight: 600; color: #1A1A1A; }

.gallery-meta p { font-size: 12px; color: #888; margin-top: 2px; }

/* 針對深色集魚燈頁面的特製樣式微調 */
.tech-card { background-color: #24282C !important; border-color: #333 !important; }
.tech-card h4 { color: #FFF !important; }

/* ==========================================
   聯絡資訊頁面排版 (左資訊、右 LINE 條碼)
   ========================================== */
.contact-split-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    padding: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.01);
}

.contact-left-info h3 { font-size: 22px; margin-bottom: 25px; border-bottom: 2px solid #1A1A1A; padding-bottom: 10px; }

.info-item-row { display: flex; padding: 10px 0; border-bottom: 1px dashed #EEE; font-size: 15.5px; }

.info-label { width: 100px; color: #777; font-weight: 600; }

.info-val { color: #1A1A1A; flex: 1; }

.qr-文創卡片 { background-color: #F8F9FA; padding: 35px; text-align: center; border-radius: 4px; }

.qr-文創卡片 h4 { font-size: 16px; margin-bottom: 8px; }

.qr-sub { font-size: 13px; color: #777; margin-bottom: 20px; }

.qr-wrapper {
    background-color: #FFF; padding: 15px; display: inline-block; border: 1px solid #DDD;
}

.qr-wrapper img { width: 170px; height: 170px; display: block; }

/* ==========================================
   全站基本頁尾與動畫定義
   ========================================== */
.footer {
    background-color: #111; color: #888; text-align: center; padding: 35px 0; font-size: 13px; margin-top: 80px;
}

/* 首頁 Banner 微淡入進場動畫 */
.animate-fade-in {
    opacity: 0; transform: translateY(15px); animation: fadeIn 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-fade-in-delay {
    opacity: 0; transform: translateY(15px); animation: fadeIn 1s 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   漢堡選單按鈕樣式 (手機版導覽列觸控開關)
   預設隱藏，僅在小螢幕時才顯示出來
   ========================================== */
.nav-hamburger {
    display: none;             /* 桌機版隱藏 */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;            /* 確保浮在選單之上 */
}

/* 漢堡按鈕的三條橫線 */
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #1A1A1A;
    border-radius: 2px;
    transition: all 0.3s ease; /* 開關切換時的平滑動畫 */
}

/* 漢堡按鈕點擊後變成「X」關閉圖示 */
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;                /* 中間那條消失 */
    transform: scaleX(0);
}
.nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================
   手機版下拉式選單覆蓋層樣式
   預設收起，由 JS 加上 is-open 類別後展開
   ========================================== */
.nav-mobile-overlay {
    display: none;             /* 桌機版完全不存在 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 9998;             /* 在導覽列之下，但蓋住所有頁面內容 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;      /* 收起時不可點擊 */
}

/* 選單展開後的可見狀態 */
.nav-mobile-overlay.is-open {
    display: flex;             /* 覆蓋 display:none，讓選單實際出現 */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;      /* 展開後可點擊 */
}

/* 手機覆蓋層內的選單連結樣式 */
.nav-mobile-overlay a {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none;
    padding: 18px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #F0F0F0;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

/* 最後一個連結不需要底線 */
.nav-mobile-overlay a:last-child {
    border-bottom: none;
}

/* 手機選單連結的 hover 與當前頁面高亮 */
.nav-mobile-overlay a:hover,
.nav-mobile-overlay a.active {
    color: #E60012;            /* 硃砂紅高亮 */
}

/* ==========================================
   RWD 響應式中斷點設計 (手機與平板適應)
   ========================================== */

/* 平板中斷點 (992px 以下) */
@media (max-width: 992px) {
    .solutions-overview-grid, 
    .contact-split-layout { grid-template-columns: 1fr; gap: 35px; }
    .contact-split-layout { padding: 30px; }
    .page-header-padding { padding-top: 140px; }
}

/* 手機中斷點 (768px 以下) */
@media (max-width: 768px) {
    /* 隱藏桌機版橫排導覽連結，改用漢堡選單取代 */
    .nav-links { display: none; }

    /* 顯示漢堡按鈕 */
    .nav-hamburger { display: flex; }

    /* 覆蓋層由 .is-open class 統一控制，此處不強制顯示，避免透明層擋住點擊 */

    /* 其他手機版排版調整 */
    .story-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-container h1 { font-size: 28px; }
    .home-product-cards { flex-direction: column; }
}


/* LINE 直加好友按鈕樣式 */
.line-btn-wrapper {
    margin-top: 15px;
    text-align: center;
}

.line-direct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #06C755; /* LINE 官方綠色 */
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%; /* 寬度撐滿容器，手機上更好點擊 */
    max-width: 250px; /* 限制最大寬度，避免電腦上看太大 */
    box-sizing: border-box;
}

.line-direct-btn:hover {
    background-color: #05b04b; /* 滑鼠懸停時顏色加深 */
    transform: translateY(-2px);
}

.btn-line-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 響應式優化（可選）：如果你希望在電腦版隱藏按鈕、只在手機版顯示 */
@media (min-width: 769px) {
    /* 如果你想讓電腦版完全隱藏按鈕，請把下方註解解開 */
    /* .line-btn-wrapper { display: none; } */
}