/* ====================================================
 * unitesys.css - 雲太系統顧問有限公司 全站共用樣式
 * 此檔案集中管理品牌色彩、基礎排版、共用元件與動畫
 * 供所有 HTML 頁面統一引用，修改此檔即可全站生效
 * ==================================================== */

/* ─────────────────────────────────────────
   1. 基礎 Body 樣式
   ───────────────────────────────────────── */
body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
    /* 全站背景紋理：微妙的放射漸層，增添視覺層次 */
    background-image:
        radial-gradient(at 0% 0%,   hsla(210, 100%, 20%, 0.05) 0, transparent 50%),
        radial-gradient(at 50% 0%,  hsla(220, 100%, 30%, 0.03) 0, transparent 50%),
        radial-gradient(at 100% 100%, hsla(200, 100%, 40%, 0.05) 0, transparent 50%);
    background-attachment: fixed;
}

/* ─────────────────────────────────────────
   2. 品牌色彩 (Brand Colors)
   主色：深藍 #003366 (雲太企業識別色)
   ───────────────────────────────────────── */

/* 背景色：深藍品牌色 (用於導覽按鈕、區塊背景) */
.unitesys-blue {
    background-color: #003366;
}

/* 文字色：深藍品牌色 (用於標題、連結強調) */
.unitesys-text {
    color: #003366;
}

/* ─────────────────────────────────────────
   3. 共用元件：玻璃磨砂卡片 (Glass Card)
   ───────────────────────────────────────── */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 51, 102, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: #003366;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.1);
}

/* ─────────────────────────────────────────
   4. 共用元件：文字光暈效果 (Text Glow)
   ───────────────────────────────────────── */
.text-glow {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* ─────────────────────────────────────────
   5. 共用元件：英雄區漸層背景 (Hero Gradient)
   ───────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #002244 0%, #004488 100%);
}

/* 舊版 tech-gradient (文字漸層裁切，保留向後相容) */
.tech-gradient {
    background: linear-gradient(135deg, #002244 0%, #004488 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─────────────────────────────────────────
   6. 動畫：上下漂浮 (Float)
   ───────────────────────────────────────── */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   7. 動畫：淡入滑下 (Fade In)
   用於行動版選單展開效果
   ───────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ─────────────────────────────────────────
   8. 區塊間距：各 section 統一 padding
   ───────────────────────────────────────── */
section {
    padding: 80px 0;
}

/* ─────────────────────────────────────────
   9. 產品卡片 hover 效果 (Product Card)
   ───────────────────────────────────────── */
.product-card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* ─────────────────────────────────────────
   10. 公司沿革時間軸 (Timeline - about.html 專用)
   ───────────────────────────────────────── */
.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 2rem;
    border-left: 2px solid #e2e8f0;
}

.timeline-item:last-child {
    border-left: 2px solid transparent;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #003366;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #003366;
}

/* ─────────────────────────────────────────
   11. 時期切換按鈕 (Phase Button - about.html 專用)
   ───────────────────────────────────────── */
.phase-btn-active {
    background-color: #003366 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.phase-btn-inactive {
    background-color: #ffffff !important;
    color: #003366 !important;
    border: 1px solid rgba(0, 51, 102, 0.2);
}

.phase-btn-inactive:hover {
    background-color: #f1f5f9 !important;
    border-color: #003366;
}

/* ─────────────────────────────────────────
   12. 最新公告區塊 (Announcement Grid Section)
   ───────────────────────────────────────── */

/* 網格獨立公告卡片 (Card Layout) */
.news-grid-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.news-grid-card:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(34, 211, 238, 0.7); /* cyan-400 */
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 20px rgba(34, 211, 238, 0.15);
}

.news-grid-card.is-link {
    cursor: pointer;
    text-decoration: none;
}

/* 超顯眼黃色日期徽章 (Eye-catching Yellow Date Badge) */
.news-date-badge-v2 {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 0.4rem;
    background: rgba(250, 204, 21, 0.12); /* 半透明亮黃底色 */
    border: 1px solid rgba(250, 204, 21, 0.5);  /* 亮黃色邊框 */
    color: #facc15; /* 顯眼金黃色文字 */
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.2);
    margin-bottom: 0.85rem;
    letter-spacing: 0.04em;
    width: fit-content;
}

.news-date-badge-v2 i,
.news-date-badge-v2 svg {
    color: #facc15 !important; /* 日曆圖示顯眼金黃色 */
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle;
}

.news-date-badge-v2 span {
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle;
}

/* 舊版單行相容樣式 */
.news-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.news-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(34, 211, 238, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.news-date-badge {
    flex-shrink: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    white-space: nowrap;
    margin-top: 0.125rem;
}

/* 額外公告網格展開過渡 */
#news-list-extra {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#news-list-extra.is-open {
    max-height: 99999px;
}
