/* ==========================================
   全域變數與基礎設定
   ========================================== */
:root {
    --primary-green: #1b4332;
    --primary-green-hover: #2d6a4f;
    --accent-gold: #d4a017;
    --accent-gold-light: #fef9e7;
    --bg-light-gray: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #212529;
    --text-body: #495057;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --transition: all 0.3s ease;
}

/* ==========================================
   頂部主視覺與數據總覽 (Hero & Stats)
   ========================================== */
.page-hero {
    padding: 60px 0 50px;
    text-align: center;
    background: var(--bg-light-gray);
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    color: var(--primary-green);
    font-size: 2.25rem;
    margin-bottom: 12px;
    font-weight: 700;
}

/* 數據指標看板網格 */
.stats-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1040px;
    margin: 30px auto 0;
    padding: 0 24px;
}

.stat-box-card {
    background: var(--bg-white);
    padding: 28px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.stat-box-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.text-emerald { color: #10b981; }
.text-amber { color: #d4a017; }
.text-blue { color: #3b82f6; }

.stat-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 6px;
}

.stat-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================
   三大核心主區塊排版 (Main Category Sections)
   ========================================== */
.main-category-section {
    padding: 40px 0 60px;
    border-bottom: 2px dashed var(--border-color);
}

.main-category-section:last-of-type {
    border-bottom: none;
}

.category-main-header {
    max-width: 1140px;
    margin: 0 auto 40px;
    padding: 0 24px;
    text-align: center;
}

.main-category-title {
    font-size: 2.1rem;
    color: var(--primary-green);
    margin-bottom: 10px;
    font-weight: 700;
}

.main-category-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* 內容區塊共用容器 */
.section-content {
    max-width: 1140px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.section-content:last-child {
    margin-bottom: 0;
}

.section-heading {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-gold);
    padding-left: 15px;
    font-weight: 700;
}

.section-desc {
    color: var(--text-body);
    margin-bottom: 24px;
    font-size: 1.05rem;
    line-height: 1.75;
}

/* ==========================================
   區塊一：永續服務專屬樣式 (Sustainability)
   ========================================== */
.achievement-card {
    background: var(--accent-gold-light);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.achievement-card h3 {
    color: var(--primary-green);
    font-size: 1.35rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.achievement-card p {
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
}

/* 碳盤查圖文排版區塊 */
.carbon-footprint-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: center;
    background: var(--bg-white);
    padding: 30px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.carbon-info .section-desc {
    margin-bottom: 20px;
}

.carbon-img-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light-gray);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
}

.carbon-img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain; /* 圖片完整顯示不裁切 */
    border-radius: 6px;
    display: block;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.service-tags span {
    background: var(--primary-green);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.report-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.report-item {
    padding: 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.report-item:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.report-item h4 {
    color: var(--primary-green);
    font-size: 1.15rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.report-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================
   區塊二：人員培訓專屬樣式 (Training)
   ========================================== */
.training-category-header {
    margin-bottom: 8px;
}

.category-tag {
    display: inline-block;
    background: var(--accent-gold-light);
    color: var(--primary-green);
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.training-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.training-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.training-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.training-icon {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.training-card h3 {
    color: var(--primary-green);
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.training-type {
    color: var(--text-body);
    font-size: 0.9375rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.training-year {
    align-self: flex-start;
    background: var(--primary-green);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================
   區塊三：光電建置專屬樣式 (Solar Energy)
   ========================================== */
.solar-intro-box-full {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-green);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.solar-intro-box-full h3 {
    color: var(--primary-green);
    font-size: 1.35rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.solar-intro-box-full p {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 20px;
}

.partner-badge-inline {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.badge-title {
    font-weight: 600;
    color: var(--primary-green);
    display: block;
    margin-bottom: 10px;
}

.badge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.partner-tag {
    background: var(--bg-light-gray);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

/* 案場實績左右交錯卡片（圖片無裁切） */
.featured-case-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.featured-case-card:last-child {
    margin-bottom: 0;
}

.case-img-wrap {
    position: relative;
    width: 100%;
    min-height: 280px;
    background-color: var(--bg-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: contain; /* 案場照片不裁切 */
    display: block;
}

.case-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent-gold);
    color: var(--text-dark);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 2;
}

.case-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-content h3 {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.case-highlight {
    font-weight: 600;
    color: var(--primary-green-hover);
    margin-bottom: 10px;
}

.case-content p {
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
}

/* ==========================================
   響應式調整 (RWD Breakpoints)
   ========================================== */
@media (max-width: 991px) {
    .carbon-footprint-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .carbon-img {
        max-height: 260px;
    }

    .featured-case-card {
        grid-template-columns: 1fr;
    }

    .case-content {
        padding: 28px 24px;
    }
}

@media (max-width: 768px) {
    .training-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.85rem;
    }
    
    .main-category-title {
        font-size: 1.75rem;
    }

    .section-content {
        padding: 0 16px;
    }

    .carbon-footprint-grid {
        padding: 20px 16px;
    }

    .carbon-img {
        max-height: 220px;
    }
}