/* ==========================================
   首頁專用樣式 - index.html
   配色方案：海洋薄荷綠 (方案 5)
   重點：增強字卡明顯度與對比度
   ========================================== */

/* ==========================================
   影片橫幅 (Video Banner)
   ========================================== */
.video-banner {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
}

.video-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.video-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.video-banner-content {
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 2rem;
}

.video-banner-content h1 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.video-banner-content p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1.2s ease-out;
}

.video-banner-content .flex {
    animation: fadeInUp 1.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .video-banner {
        min-height: 550px;
    }

    .video-banner-content h1 {
        font-size: 2rem !important;
    }

    .video-banner-content p {
        font-size: 1.125rem !important;
    }
}

/* ==========================================
   橫幅輪播 (Banner Swiper)
   ========================================== */
.banner-slide {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-video,
.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.banner-content {
    position: relative;
    z-index: 10;
    color: white;
    text-align: left;
    max-width: 1280px;
    width: 100%;
    padding: 0 2rem;
}

.banner-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: 1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 700px;
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Swiper 分頁樣式 */
.swiper-pagination {
    bottom: 40px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 5px;
    background: var(--accent-gold);
}

/* ==========================================
   快速連結區塊 - 增強明顯度
   ========================================== */
.quick-links {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 121, 107, 0.75) 0%, rgba(0, 105, 92, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 20px rgba(0, 121, 107, 0.15);
}

.quick-link-item {
    padding: 1.5rem 2rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9375rem;
    font-weight: 500;
}

.quick-link-item:last-child {
    border-right: none;
}

.quick-link-item:hover {
    background: rgba(77, 182, 172, 0.3);
    transform: translateY(-2px);
}

/* ==========================================
   段落標題樣式 - 根據背景色自動調整文字顏色
   ========================================== */
.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-light);
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--accent-red);
    margin-bottom: 4rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

/* About Us 區塊文字樣式 - 確保在淺色背景下清晰可讀 */
.section .text-lg,
.section p {
    color: var(--text-light) !important;
}

.section .text-white\/80,
.section .text-white\/70 {
    color: var(--text-light) !important;
    opacity: 0.85;
}

/* 深色背景區塊（如果有需要）保持白色文字 */
.section-dark .text-lg,
.section-dark p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.section-dark .section-title {
    color: white !important;
}

.section-dark .section-subtitle {
    color: var(--accent-gold) !important;
}

/* ==========================================
   About Us 玻璃擬態卡片升級 - 薄荷綠主題
   ========================================== */
.about-glass-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,    /* 接近純白 */
        rgba(240, 247, 244, 0.98) 100%   /* 淡薄荷白 */
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(77, 182, 172, 0.4);
    border-radius: 24px;
    padding: 3rem;
    box-shadow:
        0 25px 70px rgba(0, 121, 107, 0.35),
        0 10px 30px rgba(38, 166, 154, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.8),
        inset 0 -2px 0 rgba(77, 182, 172, 0.15);
}

/* 添加左側薄荷綠裝飾條 */
.about-glass-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 5px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--accent-red) 50%,
        transparent 100%
    );
    border-radius: 0 3px 3px 0;
}

/* 玻璃卡片內的標題樣式 */
.about-glass-card .section-subtitle {
    color: var(--accent-red) !important;
    font-size: 0.95rem;
    letter-spacing: 4px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(77, 182, 172, 0.3);
    margin-bottom: 1rem;
}

.about-glass-card .section-title {
    color: var(--primary-blue) !important;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2rem;
    text-shadow: 0 2px 15px rgba(0, 121, 107, 0.2);
}

/* 玻璃卡片內的文字樣式 */
.about-glass-card .text-lg,
.about-glass-card .text-gray-200 {
    color: var(--text-light) !important;
    font-size: 1.125rem;
    line-height: 1.9;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-glass-card .text-base,
.about-glass-card .text-gray-400 {
    color: var(--text-gray) !important;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* 玻璃卡片內的按鈕升級 */
.about-glass-card .btn-primary {
    background: var(--primary-blue);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 121, 107, 0.3);
    border: 2px solid transparent;
}

.about-glass-card .btn-primary:hover {
    background: #00695c;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 121, 107, 0.4);
    border-color: var(--accent-gold);
}

/* 次要按鈕（聯絡我們）樣式 */
.about-glass-card .btn-outline,
.about-glass-card a[href*="contact"] {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    border: 2px solid var(--accent-red);
    color: var(--primary-blue) !important;
    background: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.about-glass-card .btn-outline:hover,
.about-glass-card a[href*="contact"]:hover {
    background: var(--accent-red);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(38, 166, 154, 0.4);
}

/* 響應式調整 */
@media (max-width: 1280px) {
    .about-glass-card {
        margin-right: 0 !important;
    }
}

@media (max-width: 1024px) {
    .about-glass-card {
        padding: 2.5rem;
        border-radius: 20px;
    }
}

@media (max-width: 768px) {
    .about-glass-card {
        padding: 2rem;
        border-radius: 16px;
        margin-right: 0 !important;
    }

    .about-glass-card .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .about-glass-card .text-lg {
        font-size: 1rem;
    }

    .about-glass-card::after {
        width: 3px;
    }
}

/* Three.js 3D 地球容器 - 科技感漸層背景 */
#canvas-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg,
        #0a192f 0%,      /* 深藍黑 */
        #112240 25%,     /* 深藍 */
        #1a365d 50%,     /* 中藍 */
        #112240 75%,     /* 深藍 */
        #0a192f 100%     /* 深藍黑 */
    );
    box-shadow:
        0 20px 60px rgba(0, 121, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(77, 182, 172, 0.2);
}

/* 添加內陰影增強深度感 */
#canvas-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Canvas 元素樣式 */
#canvas-container canvas {
    position: relative;
    z-index: 2;
    mix-blend-mode: normal;
}

/* 響應式調整 */
@media (max-width: 768px) {
    #canvas-container {
        height: 350px;
        border-radius: 12px;
    }
}

/* ==========================================
   核心業務卡片 - 增強字卡明顯度與對比
   ========================================== */
.business-card {
    position: relative;
    height: 560px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 121, 107, 0.2);
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 100%);
    transition: all 0.4s ease;
    z-index: 1;
}

.business-card:hover::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.business-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.business-card:hover .business-card-bg {
    transform: scale(1.08);
}

.business-card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.business-card .business-card-title {
    color: white !important;
}

.business-card .business-card-description p,
.business-card .business-card-link {
    color: white !important;
}

.business-card-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: white !important;
    writing-mode: vertical-lr;
    letter-spacing: 6px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.business-card-description {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    color: white;
    font-size: 0.95rem;
    line-height: 1.55;
    background: rgba(0, 0, 0, 0.75);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.business-card:hover .business-card-description {
    opacity: 1;
    transform: translateY(0);
}

.business-card-links {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.business-card:hover .business-card-links {
    opacity: 1;
    transform: translateY(0);
}

.business-card-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding-left: 1.5rem;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.business-card-link::before {
    content: '•';
    position: absolute;
    left: 0;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.business-card-link:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
}

.business-card-link:hover::before {
    color: var(--accent-gold);
}

/* ==========================================
   新聞卡片樣式 - 增強對比與可讀性
   ========================================== */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 121, 107, 0.15);
    border: 1px solid var(--border-light);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 121, 107, 0.25);
    border-color: var(--accent-red);
}

.news-card-image {
    position: relative;
    padding-top: 57%;
    overflow: hidden;
    background: var(--primary-dark);
}

.news-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 121, 107, 0);
    transition: all 0.4s ease;
}

.news-card:hover .news-card-image::after {
    background: rgba(0, 121, 107, 0.2);
}

.news-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.news-date {
    color: var(--text-gray);
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    font-weight: 400;
}

.news-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-blue);
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.news-link:hover {
    color: var(--accent-red);
    gap: 0.5rem;
}

.news-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: margin-left 0.3s ease;
}

/* ==========================================
   響應式設計
   ========================================== */
@media (max-width: 1024px) {
    .business-card {
        height: 450px;
    }

    .business-card-description {
        font-size: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .banner-slide {
        min-height: 550px;
    }

    .business-card {
        height: 400px;
    }

    .business-card-title {
        writing-mode: horizontal-tb;
        font-size: 1.75rem;
        letter-spacing: 2px;
    }

    .business-card-description {
        font-size: 0.95rem;
        padding: 1.25rem;
    }

    .news-title {
        font-size: 1.2rem;
    }
}
