:root {
    --text-secondary: #6c757d;
    --text-primary: #121212;
    --web-color: #0984e3;
    --graphic-color: #d63031;
    --code-color: #00b894;
    --card-bg: #ffffff;
    --accent: #2d3436;
}

body {
    color: var(--bg);
    background-color:  var(--bg-w);
}
.hamburger-line {
    background: var(--bg-b);
}
.main-brand {
    color: var(--bg);
}
.sub-brand {
    color: var(--bg);
}

.unit_header {
    padding: 60px 20px;
}


/* 容器：居中並限制最大寬度 */
.section {
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.lab-filter-nav { 
    margin-bottom: 50px; 
    position: sticky; 
    top: 80px; 
    z-index: 100; 
    background: transparent; 
    padding: 10px 0;
    width: 100%; /* 確保容器滿版 */
}
/* 捲動包裝層 */
.filter-wrapper { 
    width: 100%;
    display: flex; 
    justify-content: center; /* 桌面端預設居中 */
    gap: 12px; 
    overflow-x: auto; /* 開啟橫向捲動 */
    padding: 10px 5%; /* 增加左右 padding，防止手機捲動時邊緣被切掉 */
    scrollbar-width: none; /* Firefox 隱藏捲動條 */
    -webkit-overflow-scrolling: touch; /* iOS 捲動流暢感 */
}

.filter-group {
    display: flex; justify-content: center; gap: 15px; flex-wrap: wrap;
}

.filter-btn {
    background: var(--card-bg); border: 1px solid #eee; padding: 10px 24px;
    border-radius: 50px; cursor: pointer; font-size: 0.9rem; font-weight: 500;
    transition: var(--transition); box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    color: var(--accent);
    text-decoration: none; 
}

.filter-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }



/* 核心容器：最大寬度 1100px 且居中 */
.container {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    padding-bottom: 90px;
}

/* 響應式網格系統 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 卡片精緻樣式 */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    /* padding: 30px; */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    
    /* transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    border: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* 互動效果：懸停位移與陰影加深 */
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

/* 卡片內容設計 */
.card-icon {
    font-size: 2.5rem;
    display: inline-block;
}
.card-icon img{
    width: 100%;
}

.category-tag {
    position: absolute; 
    top: 15px; left: 15px; 
    padding: 4px 12px;
    border-radius: 20px; 
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; 
    color: white; 
    backdrop-filter: blur(5px);
}
.tag-web { background: var(--web-color); }
.tag-graphic { background: var(--graphic-color); }
.tag-code { background: var(--code-color); }

.card-body {
    width: 100%;
    padding: 25px;
}

.date { 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
    margin-bottom: 10px; 
    text-decoration: none; 
}

.card-body h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none; 
}

.card p {
    margin: 0;
    color: #636e72;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 裝飾性的小細節：懸停時的漸變底線 */
.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.card:hover::after {
    width: 100%;
}

/* 自適應微調 */
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}