/* =========================================
   聯合通科技官方網站 - 首頁特定樣式
   主要功能：視差滾動、案例輪播、方案區塊等
   ========================================= */

/* 頁面間距調整 */
body {
    padding-top: 76px; /* 導航列高度 */
}

/* 英雄區域視差滾動效果 */
.hero-parallax {
    position: relative;
    height: 100vh;
    min-height: 600px;
    /* 使用漸變背景色作為臨時替代，直到圖片資源可用 */
    background: linear-gradient(135deg, #0056b3 0%, #0077cc 50%, #0088ee 100%);
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: #fff;
    margin-top: -76px; /* 抵消導航列高度 */
    z-index: 0;
}

/* 背景圖片可用時加回此行
.hero-parallax {
    background: url('/assets/images/common/hero-bg.jpg') no-repeat center center;
}
*/

.hero-parallax .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 減少透明度，因為已經使用藍色漸變背景 */
    z-index: -1;
}

.hero-parallax h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-parallax .lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
}

/* 筆電響應式優化 */
@media (min-width: 1200px) {
    .hero-parallax h1 {
        font-size: 3.25rem;
        max-width: 90%;
    }
    
    .hero-parallax .lead {
        font-size: 1.375rem;
        max-width: 85%;
    }
}

@media (min-width: 1400px) {
    .hero-parallax h1 {
        font-size: 3.5rem;
        max-width: 85%;
    }
    
    .hero-parallax .lead {
        font-size: 1.5rem;
        max-width: 80%;
    }
}

/* 核心價值區塊樣式 */
.feature-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.card:hover .feature-icon {
    transform: scale(1.1);
    background-color: rgba(0, 86, 179, 0.2);
}

/* 案例輪播樣式 */
#caseCarousel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow-lg);
}

.carousel-inner {
    border-radius: 8px;
}

.carousel-item {
    background-color: #fff;
    padding: 2rem 0;
}

/* 缺少圖片資源時使用的替代背景 */
.carousel-item .case-image-placeholder {
    background: linear-gradient(45deg, #f8f9fa 25%, #e9ecef 25%, #e9ecef 50%, #f8f9fa 50%, #f8f9fa 75%, #e9ecef 75%, #e9ecef 100%);
    background-size: 20px 20px;
    height: 300px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item .case-image-placeholder:after {
    content: "案例圖片";
    color: #6c757d;
    font-size: 1.5rem;
    font-weight: 500;
}

.carousel-indicators {
    bottom: -40px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: var(--primary-color);
    opacity: 0.3;
}

.carousel-indicators button.active {
    opacity: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-color);
    padding: 20px;
    border-radius: 50%;
    background-size: 50%;
}

#caseCarousel:hover .carousel-control-prev,
#caseCarousel:hover .carousel-control-next {
    opacity: 0.8;
}

.case-features {
    list-style: none;
    padding-left: 0;
}

.case-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.case-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 解決方案區塊樣式 */
.solution-card {
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    border-radius: 8px;
}

.solution-card:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.solution-card:hover .card-title,
.solution-card:hover .card-text,
.solution-card:hover .solution-icon i {
    color: #fff;
}

.solution-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(0, 86, 179, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.solution-icon i {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.solution-card:hover .solution-icon {
    background-color: rgba(255, 255, 255, 0.2);
}

.solution-card .card-title {
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.solution-card .card-text {
    color: var(--text-color);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

/* 新聞區塊樣式 */
.news-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* 聯絡我們區塊樣式 */
.bg-primary {
    position: relative;
    overflow: hidden;
}

.bg-primary:before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.bg-primary:after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.bg-primary .container {
    position: relative;
    z-index: 1;
}

/* 響應式調整 */
@media (max-width: 992px) {
    .hero-parallax {
        background-attachment: scroll;
        height: 80vh;
    }
    
    .hero-parallax h1 {
        font-size: 2.75rem;
    }
    
    .hero-parallax .lead {
        font-size: 1.25rem;
    }
    
    .carousel-item {
        padding: 1rem 0;
    }
}

@media (max-width: 768px) {
    .hero-parallax {
        height: 70vh;
    }
    
    .hero-parallax h1 {
        font-size: 2.25rem;
    }
    
    .hero-parallax .lead {
        font-size: 1.1rem;
    }
    
    .carousel-item .row {
        flex-direction: column;
    }
    
    .carousel-item .col-md-6:first-child {
        margin-bottom: 1.5rem;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}
