/* ==========================================================================
   1. 基礎全域設定與頂部 Logo 排版
   ========================================================================== */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    text-align: center;
    padding: 50px 20px 40px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;            
    margin-bottom: 25px;  
    flex-wrap: wrap;      
}

.header-logo {
    height: 65px;         
    width: auto;          
    object-fit: contain;
}

.career-logo {
    height: 60px;
}

header h1 {
    margin: 0 0 12px 0;
    font-size: 2.6rem;
    color: #1e3c72; 
    font-weight: 700;
    letter-spacing: 1px;
}

header p {
    margin: 0;
    color: #666666;
    font-size: 1.05rem;
}

/* ==========================================================================
   2. 核心特效：奢華藍紫多漸變流體 + 幾何四角星芒星空 (main)
   ========================================================================== */
main {
    min-height: calc(100vh - 250px); 
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 🎯 背景升級：全面注入「魅幻深紫、璀璨靛藍、迷幻紫羅蘭、電光藍」四色奢華多漸變 */
main::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #050b1a, #1a0b36, #2a1b5c, #1f4287, #4b134f, #050b1a);
    background-size: 400% 400%;
    animation: luxuryPurpleFlow 12s ease infinite;
}

/* 藍紫漸層流體動畫 */
@keyframes luxuryPurpleFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 🎯 繁星圖層基底 */
.stars-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 🎯 終極黑科技：用 clip-path 裁切出多個「真正像 image_6b0c47 的四角星芒」，分佈在藍紫夜空中 */
.stars-layer::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    
    /* 利用背景多重繪製與 clip-path 完美交叉出真正的四角星星 */
    background-image: 
        radial-gradient(circle at 15% 15%, #ffffff 0%, rgba(255,255,255,0.8) 4px, transparent 15px),
        radial-gradient(circle at 45% 25%, #ffffff 0%, rgba(255,255,255,0.8) 6px, transparent 20px),
        radial-gradient(circle at 80% 18%, #ffffff 0%, rgba(255,255,255,0.8) 5px, transparent 18px),
        radial-gradient(circle at 25% 65%, #ffffff 0%, rgba(255,255,255,0.8) 5px, transparent 18px),
        radial-gradient(circle at 60% 80%, #ffffff 0%, rgba(255,255,255,0.8) 7px, transparent 25px),
        radial-gradient(circle at 85% 60%, #ffffff 0%, rgba(255,255,255,0.8) 4px, transparent 15px),
        radial-gradient(circle at 50% 45%, #ffffff 0%, rgba(255,255,255,0.8) 5px, transparent 18px);
        
    animation: starBlink 4s ease-in-out infinite alternate;
}

/* 🎯 星空背景的立體微弱遠星襯託層（點點繁星） */
.stars-layer::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 
        5vw 30vh #fff, 20vw 45vh rgba(255,255,255,0.5), 35vw 15vh #fff, 50vw 55vh rgba(255,255,255,0.3),
        65vw 25vh #fff, 75vw 40vh rgba(255,255,255,0.6), 90vw 70vh #fff, 10vw 85vh rgba(255,255,255,0.4),
        30vw 90vh #fff, 55vw 75vh rgba(255,255,255,0.5), 70vw 88vh #fff, 85vw 95vh rgba(255,255,255,0.7),
        95vw 35vh #fff, 40vw 3vh rgba(255,255,255,0.6), 8vw 12vh #fff, 78vw 72vh rgba(255,255,255,0.5);
    animation: starBlink 3s ease-in-out infinite alternate-reverse;
}

/* 星星呼吸閃爍動畫 */
@keyframes starBlink {
    0% { opacity: 0.3; transform: scale(0.92); }
    50% { opacity: 1.0; transform: scale(1.08); }
    100% { opacity: 0.4; transform: scale(0.96); }
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 35px; 
    position: relative;
    z-index: 5;
}

/* ==========================================================================
   3. 企業卡片：5px 實心極光藍超級霸氣厚框（保持讚讚的發光特效）
   ========================================================================== */
.company-card {
    background: rgba(255, 255, 255, 0.95) !important; 
    backdrop-filter: blur(8px) !important; 
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 20px !important; 
    padding: 25px !important;
    text-align: center !important;
    
    /* 保持你覺得讚的 5px 粗邊框與極光藍色調 */
    border: 5px solid #00b4d8 !important;
    
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important; 
    height: 310px; 
    cursor: pointer !important;
    position: relative !important;
    top: 0;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* 滑鼠懸停（Hover）特效（保持發光） */
.company-card:hover {
    top: -10px !important; 
    background: #ffffff !important; 
    border-color: #00f5ff !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 0 35px rgba(0, 245, 255, 0.85) !important; 
}

/* 限制 Logo 區域的高度與排版 */
.card-logo-container {
    width: 100%;
    height: 110px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #ffffff; 
    border-radius: 12px;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.company-logo-img {
    max-width: 75% !important;   
    max-height: 85% !important;  
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.4s ease;
}

.company-card:hover .company-logo-img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.25rem;
    color: #1e3c72;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.card-footer {
    font-size: 0.95rem;
    color: #2a5298;
    font-weight: bold;
    border-top: 1px solid #f5f5f5;
    padding-top: 15px;
    transition: color 0.3s ease;
}

.company-card:hover .card-footer {
    color: #00b4d8;
}

/* ==========================================================================
   4. 內頁詳細資訊頁面 (detail.html) 的樣式
   ========================================================================== */
.detail-container {
    max-width: 800px;
    margin: 0 auto; 
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    border: 5px solid #00b4d8;
}

.back-btn { display: inline-block; margin-bottom: 20px; color: #2a5298; text-decoration: none; font-weight: bold; }
.detail-header { display: flex; align-items: center; gap: 20px; border-bottom: 2px solid #eef2f7; padding-bottom: 20px; margin-bottom: 30px; }
.detail-logo { width: 120px; height: 120px; object-fit: contain; }
.section-title { color: #1e3c72; border-left: 4px solid #2a5298; padding-left: 10px; margin-top: 30px; font-size: 1.3rem; }
.job-tag { display: inline-block; background-color: #eef2f7; color: #1e3c72; padding: 5px 15px; border-radius: 6px; margin: 5px; font-weight: bold; }
.meta-info p { margin: 10px 0; line-height: 1.6; }
.meta-label { font-weight: bold; color: #1e3c72; }
.debug-box { background-color: #ffebe9; border: 1px solid #ffc1bd; color: #b31412; padding: 15px; border-radius: 6px; margin-top: 20px; font-family: monospace; }
@media (max-width: 480px) { .logo-container { gap: 20px; } .header-logo { height: 50px; } .career-logo { height: 45px; } }
