/*
 * ========================================
 * content-styles.css - 生泰合成工業內容頁共用樣式
 * ========================================
 *
 * 適用範圍: 資料夾 1-6 的所有內容頁面
 * 搭配使用: nav-styles.css, footer-styles.css
 *
 * 樣式模組:
 * 1. 基礎樣式 (Body & Main Wrapper)
 * 2. Main Content & Card
 * 3. Section Header - 升級版
 * 4. Content Elements
 * 5. Highlight Box
 * 6. Grid Systems
 * 7. 響應式設計
 *
 * 註: 面包屑導航樣式，最後更新: 2026-01-06
 * 
 * ========================================
 */

/* ========================================
   1. 基礎樣式
   ======================================== */

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #FFF;
}

.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #FFFFFF;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    min-height: 100vh;
}

/* ========================================
   2. Breadcrumb
   ======================================== */

.breadcrumb-section {
    background: var(--light-bg);
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb {
    margin: 0;
    background: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

.breadcrumb-item.active {
    color: var(--blue-text);
}

/* ========================================
   3. Main Content & Card
   ======================================== */

.main-content {
    padding: 1.75rem 0 3rem 0;
}

.content-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    padding: 48px 56px;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* ========================================
   4. Section Header - 升級版
   ======================================== */

.section-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.section-title i {
    font-size: 1.8rem;
    margin-right: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 36px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 3px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, transparent 100%);
    border-radius: 2px;
}

/* ========================================
   5. Content Elements
   ======================================== */

.content-paragraph {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: left;
}

.feature-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

/* ========================================
   6. Highlight Box
   ======================================== */

.highlight-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 10px 10px 0;
    margin: 1.5rem 0;
}

.highlight-box .icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* ========================================
   7. Grid Systems
   ======================================== */

/* Companies Grid */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.company-badge {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: bold;
    color: var(--primary-color);
}

.company-badge:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* ========================================
   8. 動畫效果
   ======================================== */

.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   8b. Page with Sidebar Layout
   ======================================== */

.page-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.75rem;
    align-items: start;
}

/* Prevent grid-item blowout when table content is wider than the track */
.page-content {
    min-width: 0;
}

/* Sidebar */
.page-sidebar {
    position: sticky;
    top: calc(68px + 1.5rem); /* nav height + gap */
}

.sidebar-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(46, 74, 58, 0.08);
    border: 1px solid rgba(46, 74, 58, 0.08);
}

.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: #fff;
    background: linear-gradient(135deg, #2E4A3A, #4E604C);
    padding: 0.9rem 1.2rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 1.2rem;
    color: #2d3748;
    text-decoration: none;
    font-size: 0.90rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-link:not(:last-child) {
    border-bottom: 1px solid rgba(46, 74, 58, 0.06);
}

.sidebar-link i {
    width: 16px;
    font-size: 0.82rem;
    color: #6E5834;
    opacity: 0.75;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(46, 74, 58, 0.06);
    color: #2E4A3A;
    border-left-color: #52b788;
}

.sidebar-link.is-active {
    background: rgba(46, 74, 58, 0.08);
    color: #2E4A3A;
    font-weight: 700;
    border-left-color: #2E4A3A;
}

.sidebar-link.is-active i {
    opacity: 1;
}

/* ========================================
   9. 響應式設計 - 平板
   ======================================== */

@media (max-width: 960px) {
    .page-layout {
        grid-template-columns: 185px 1fr;
        gap: 1.25rem;
    }
    .sidebar-link {
        font-size: 0.84rem;
        padding: 0.65rem 1rem;
    }
}

@media (max-width: 768px) {
    /* Sidebar becomes horizontal scrollable pill tabs on mobile */
    .page-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-sidebar {
        position: static;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-card {
        border-radius: 12px;
    }

    .sidebar-heading {
        display: none; /* Hide "About SYN-TECH" title on mobile to save space */
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0;
        padding: 0.5rem 0.6rem;
        overflow-x: auto;
    }

    .sidebar-link {
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
        white-space: nowrap;
        border-left: none !important;
        border-bottom: 2px solid transparent;
        border-radius: 8px;
        text-align: center;
    }

    .sidebar-link:not(:last-child) {
        border-bottom: 2px solid transparent;
    }

    .sidebar-link i {
        font-size: 1rem;
        width: auto;
        color: #6E5834;
    }

    .sidebar-link:hover,
    .sidebar-link.is-active {
        border-left: none !important;
        background: rgba(46, 74, 58, 0.08);
    }

    .sidebar-link.is-active {
        border-bottom-color: #2E4A3A !important;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.6rem !important;
        padding-left: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .section-title i {
        font-size: 1.5rem;
        margin-right: 0.5rem;
    }

    .section-title::before {
        width: 4px;
        height: 28px;
    }

    .section-title::after {
        width: 60px;
        height: 3px;
        left: 0.8rem;
    }

    .content-paragraph {
        font-size: 1.1rem !important;
        text-indent: 1rem;
    }

    .content-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .companies-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* ========================================
   10. 響應式設計 - 手機
   ======================================== */

@media (max-width: 576px) {
    .main-content {
        padding: 2rem 0;
    }

    .content-card {
        padding: 24px 20px;
        margin: 1rem;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.4rem !important;
        padding-left: 0.6rem;
        margin-bottom: 1.2rem;
    }

    .section-title i {
        font-size: 1.3rem;
        margin-right: 0.4rem;
    }

    .section-title::before {
        width: 3px;
        height: 24px;
    }

    .section-title::after {
        width: 50px;
        height: 3px;
        left: 0.6rem;
    }

    .content-paragraph {
        font-size: 1.05rem !important;
    }
}
