/* ==========================================================================
   台灣工控系統洞察報告模組 (Insight Split-Screen Slider) - CWV Optimized
   ========================================================================== */
.connect-insight-module {
    background-color: #000000;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    width: 100%; /* 確保外層不超過螢幕 */
}

.connect-insight-module .insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    width: 100%;
}

/* 🚀 關鍵修復 1：解決 CSS Grid 撐破效應 (Grid Blowout Bug) */
.connect-insight-module .insight-grid > div {
    min-width: 0; /* 剝奪內容無限撐寬的權利 */
    max-width: 100%;
}

/* --- 左側：文案資訊架構 --- */
.connect-insight-module .insight-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.connect-insight-module .insight-badge {
    display: inline-block;
    background: rgba(255, 220, 25, 0.1);
    color: #ffdc19;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 220, 25, 0.2);
    letter-spacing: 1px;
}

.connect-insight-module h2.insight-title {
    color: #ffffff !important; 
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-left: none !important;
    padding-left: 0 !important;
}

.connect-insight-module .insight-desc {
    color: #9ca3af; 
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    word-wrap: break-word; /* 🚀 關鍵修復 2：確保長文字絕對會自動換行 */
}

/* 環境光暈 (Ambient Glow) */
.connect-insight-module .insight-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 220, 25, 0.15) 0%, transparent 70%);
    filter: blur(50px);
    z-index: 1;
    pointer-events: none;
    animation: pulse-glow 6s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* --- 右側：單張深色輪播卡片 (Dark Glassmorphism Slider) --- */
.dark-slider-wrapper {
    position: relative;
    width: 100%;
    z-index: 10;
}

.dark-slider-track {
    display: flex;
    flex-wrap: nowrap; 
    width: 100%; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.dark-slider-item {
    flex: 0 0 100%;
    width: 100%; 
    flex-shrink: 0; 
    box-sizing: border-box;
    padding: 0 8px; 
}

/* 深色玻璃質感卡片 */
.dark-glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 360px; 
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.dark-glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 220, 25, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 220, 25, 0.15);
}

.dark-glass-card .card-title {
    color: #ffffff !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 1rem;
    border-left: none !important;
    padding-left: 0 !important;
}

.dark-glass-card .card-desc {
    color: #9ca3af;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* CTA 按鈕整合樣式 */
.dark-glass-card .insight-cta.btn-sm {
    align-self: flex-start;
    padding: 12px 24px;
    font-size: 1rem;
    background-color: #ffdc19;
    color: #111827 !important; 
    font-weight: 800;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 220, 25, 0.15);
}

.dark-glass-card .insight-cta.btn-sm:hover {
    background-color: #e6c616;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 220, 25, 0.35);
    color: #000000 !important;
    text-decoration: none;
}

/* 現代化控制列 */
.dark-slider-controls {
    display: flex;
    justify-content: flex-end; 
    gap: 16px;
    margin-top: 24px; 
    padding-right: 8px;
}

.dark-slider-btn {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-slider-btn:hover:not(:disabled) {
    background-color: #ffdc19;
    color: #111827;
    border-color: #ffdc19;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 220, 25, 0.3);
}

.dark-slider-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* ==========================================================================
   行動裝置防呆 (Mobile-First 堆疊與滿版設定)
   ========================================================================== */
@media (max-width: 991px) {
    .connect-insight-module {
        padding: 60px 0;
    }
    
    .connect-insight-module .insight-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .connect-insight-module h2.insight-title {
        font-size: 1.8rem !important;
    }
    .connect-insight-module .insight-desc {
        font-size: 1.05rem;
        margin-bottom: 1rem; 
    }

    .dark-glass-card { 
        padding: 32px 24px; 
        min-height: auto; 
    }
    
    .dark-glass-card .insight-cta.btn-sm {
        width: 100%; 
        justify-content: center;
    }
    
    .dark-slider-controls {
        justify-content: center; 
        margin-top: 20px;
        padding-right: 0;
    }
}