/* ================================================================= */
/* 全局樣式及標題 (適用於所有區塊) */
/* ================================================================= */

/* 主要區塊標題（如：恆勇優勢, 服務項目） */
.section-heading, .section-title, .gallery-heading {
    /* *** 修正處：字體放大至 3.0em (約 48px) *** */
    font-size: 3.0em; 
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 10px;
    border-bottom: 3px solid #007bff; /* 藍色底線，風格統一 */
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: auto;
}


/* ================================================================= */
/* 1. 服務項目區塊 (.service-section-wrap) 樣式 */
/* ================================================================= */

.service-section-wrap {
    /* 修正：新增最大寬度及居中，增加左右間距，移除灰色背景 */
    max-width: 1200px; 
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px; 
    background-color: #ffffff; 
    
    font-family: Arial, sans-serif;
}

/* Grid 佈局容器 (固定 3 列佈局) */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; 
}

/* 單個服務卡片樣式 */
.service-card {
    background-color: #ffffff; 
    border-radius: 4px;
    overflow: hidden; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex; 
    flex-direction: column;
}

/* 卡片標題樣式 (藍色背景部分) */
.card-title {
    background-color: #007bff; 
    color: #ffffff;
    /* *** 修正處：字體放大至 1.8em (約 28.8px) *** */
    font-size: 1.8em; 
    font-weight: 700;
    padding: 20px 20px; 
    text-align: center;
}

/* 卡片內容樣式 (白色背景部分) */
.card-content {
    flex-grow: 1; 
    /* *** 修正處：內文字體放大至 1.25em (約 20px) *** */
    font-size: 1.25em; 
    line-height: 1.8;
    padding: 20px;
    color: #555;
    word-wrap: break-word; 
}


/* ================================================================= */
/* 2. 生產設備與技術區塊 (畫廊) 樣式 */
/* ================================================================= */

.gallery-section-wrap {
    /* 修正：新增最大寬度及居中，增加左右間距 */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px; 
    
    background-color: #ffffff; 
}

.production-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
}

.gallery-card {
    background-color: #ffffff;
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden; 
    position: relative; 
    transition: all 0.3s ease;
}

.gallery-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.image-wrap {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 66.66%; 
}

.image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* 圖片下方的標題覆蓋層 */
.caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%; 
    
    background-color: rgba(90, 90, 90, 0.8); 
    
    color: #ffffff;
    /* *** 修正處：字體放大至 1.5em (約 24px) *** */
    font-size: 1.5em; 
    font-weight: 600;
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

/* ================================================================= */
/* 3. 恆勇優勢區塊 (.advantage-list) 樣式 */
/* ================================================================= */

.features-section {
    padding: 20px 0;
}

.advantage-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.advantage-item {
    background-color: #f8f9fa; 
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #007bff; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advantage-item:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px); 
}

.advantage-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.advantage-title .fa {
    font-size: 1.8em;
    margin-right: 15px;
}

.icon-color {
    color: #007bff; 
}

/* 特色標題字體放大：約 25.6px */
.advantage-title h3 {
    margin: 0;
    /* *** 修正處：字體放大至 1.6em (約 25.6px) *** */
    font-size: 1.6em; 
    font-weight: 700;
    color: #333; 
}

/* 描述文字字體放大：約 20px */
.advantage-description {
    /* *** 修正處：內文字體放大至 1.25em (約 20px) *** */
    font-size: 1.25em; 
    line-height: 1.7;
    color: #555;
    margin-bottom: 0;
    padding-left: 0; 
}

.advantage-item.full-width {
    grid-column: 1 / -1; 
}

/* ================================================================= */
/* 4. 合作品牌客戶區塊 (.brand-logo-list) 樣式 */
/* ================================================================= */

.brand-cooperation-section {
    padding: 20px 0;
}

.brand-logo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 30px 20px; 
    justify-content: start; 
}

.brand-item {
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    text-align: left;
    padding: 15px;
    border: 1px solid #eee; 
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.brand-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-image-wrap {
    width: 100%;
    height: 0;
    padding-bottom: 90%; 
    position: relative;
    margin-bottom: 10px;
    overflow: hidden; 
}

.brand-image-wrap img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%; 
    max-height: 90%; 
    width: auto;
    height: auto;
    object-fit: contain; 
}

/* 品牌名稱 */
.brand-name {
    /* *** 修正處：字體放大至 1.5em (約 24px) *** */
    font-size: 1.5em; 
    font-weight: 600;
    color: #555;
    margin-top: 5px; 
}

/* ================================================================= */
/* 5. 響應式媒體查詢 (RWD) 調整 */
/* ================================================================= */

@media (max-width: 992px) {
    /* 服務項目區塊：平板尺寸固定為 2 列 */
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 在手機/平板上，減少外層左右邊距，讓內容有更多空間 */
    .service-section-wrap,
    .gallery-section-wrap {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    /* 手機尺寸：所有 Grid 佈局改為單列 */
    .service-grid,
    .production-gallery,
    .advantage-list {
        grid-template-columns: 1fr; 
    }
    
    .section-heading, .section-title, .gallery-heading {
        font-size: 2em; /* 標題在手機上適度縮小 */
    }

    /* 手機上卡片標題字體適度縮小 */
    .service-card .card-title {
        font-size: 1.5em; 
    }
}