/* ==========================================================================
   首頁專用樣式 - 焦點專區 (Spotlight)
   ========================================================================== */

/* 容器命名：焦點專區 (Spotlight) */
#spotlight-grid-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: "Microsoft JhengHei", "Heiti TC", sans-serif;
    box-sizing: border-box;
}

/* 網格系統：Desktop 預設 4 欄 (4 columns, 1 row) */
.spotlight-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* 卡片本體 - 改為 a 標籤後確保無底線 */
.spotlight-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: transparent;
    align-items: center;
    cursor: pointer;
}

/* 圖片容器 */
.spotlight-img-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #eee;
    margin-bottom: 20px;
}

.spotlight-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* 滑鼠懸停特效 */
.spotlight-card:hover .spotlight-img-box img {
    transform: scale(1.08);
}

/* 標題樣式 */
.spotlight-title {
    font-size: 22px;
    font-weight: 500;
    color: #222;
    letter-spacing: 1.5px;
    margin: 0;
    text-align: center;
}

/* ==========================================================================
   RWD 響應式設定
   ========================================================================== */

/* 平板直幅與小筆電 (< 1024px) 改為 2 欄 */
@media (max-width: 1024px) {
    .spotlight-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .spotlight-title {
        font-size: 24px;
    }
}

/* 手機版 (< 768px) 改為單欄 */
@media (max-width: 768px) {
    .spotlight-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


/* ==========================================================================
   首頁專用樣式 - 服務網格專區 (Services Grid)
   ========================================================================== */

#services-grid-container {
    background-color: #ffffff;
    color: #333;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.grid-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* --- 卡片主體樣式 --- */
.card {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    min-height: 120px; /* 維持視覺平衡 */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #e6f0ff;
}

/* --- 圖片容器 --- */
.card-image-wrapper {
    width: 110px;
    height: 110px;
    margin-bottom: 15px;
    background-color: #f7f9fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover .card-image-wrapper {
    transform: scale(1.05);
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 標題樣式 --- */
.card-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    margin: 0;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: #003399;
}

/* --- 隱藏區域與按鈕 --- */
.more-items {
    display: none; /* 預設隱藏 */
}

.action-area {
    margin-top: 50px;
    text-align: center;
    padding-bottom: 40px;
}

.btn-more {
    display: inline-block;
    background-color: transparent;
    color: #003399;
    padding: 12px 64px;
    font-size: 18px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #003399;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-more:hover {
    background-color: #003399;
    color: #fff;
}

/* --- Services Grid RWD 設定 --- */
@media (min-width: 768px) {
    .grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .grid-wrapper {
        grid-template-columns: repeat(6, 1fr);
    }
}