:root {
    --primary-color: #303030;
    --secondary-color: #D4AF37;
    --accent-color: #9370DB;
    --text-color: #ffffff;
    --gradient-bg: linear-gradient(135deg, #303030, #1a1a1a);
    --card-bg: rgba(255, 255, 255, 0.05);
    --max-width: 1200px;
    --section-padding: 80px 20px;
}

/* 全局樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

/* 導航欄樣式 */
.nav-bar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #303030;
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px #D4AF37;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.eng-address {
    font-size: 23px; /* 設置英文地址的字體大小為 10px */
}

.nav-apply-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-apply-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* 主視覺區域 */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 20px; /* 調整內邊距 */
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    margin-right: 10px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-image img {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    top: -80px; /* 將圖片上移 20 像素 */
}

.hero-image img.active {
    opacity: 1;
}

/* 計算器相關樣式 */
.calculator-section {
    background-image: url('bg2.png'); /* 設置背景圖片 */
    background-size: cover; /* 使背景圖片覆蓋整個區域 */
    background-position: center; /* 使背景圖片居中 */
    background-repeat: no-repeat; /* 不重複背景圖片 */
    padding: 80px 20px; /* 調整內邊距 */
    display: flex;
    justify-content: center; /* 置中內容 */
}

.calculator-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 30px;
    width: 100%;
    max-width: 700px; /* 設置最大寬度 */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h3 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* 金額輸入區域 */
.amount-slider {
    margin-bottom: 2.5rem;
}

.amount-input-group {
    margin-bottom: 1.5rem;
}

.amount-input {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.amount-input input {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5rem;
    width: 100%;
    padding: 0.5rem;
    outline: none;
}

.currency {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* 滑塊樣式 */
.slider-container {
    position: relative;
    padding: 0.5rem 0;
}

.styled-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.styled-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--secondary-color);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* 期限選擇按鈕 */
.term-selector {
    margin-bottom: 2.5rem;
}

.term-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.term-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.term-button:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--secondary-color);
}

.term-button.active {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

/* 結果顯示區域 */
.result-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.result-item {
    text-align: center;
}

.result-label {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.result-value {
    color: var(--secondary-color);
    font-size: 2rem;
    font-weight: bold;
}

/* 說明文字樣式 */
.disclaimer {
    color: rgba(255, 255, 255, 0.7); /* 淺灰色 */
    font-size: 0.9rem; /* 字體大小 */
    text-align: center; /* 置中對齊 */
    margin-top: 1rem; /* 添加上邊距 */
}

/* 響應式設計補充 */
@media (max-width: 768px) {
    .calculator-container {
        padding: 2rem;
    }

    .term-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .result-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 功能特點樣式 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    color: var(--text-color);
}

.feature-icon img {
    max-width: 80%;
    height: auto;
    margin-bottom: 1rem;
}

/* 半透明背景樣式 */
.text-background {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 0.25rem;
    display: inline-block;
    margin-top: 0.25rem;
}

/* 文字樣式 */
.feature-title, .feature-description {
    position: relative;
    z-index: 1;
}

.feature-title {
    font-size: 2rem;
    font-weight: bold;
    color: #D4AF37;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.feature-description {
    font-size: 1.2rem;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .nav-right {
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .nav-apply-button {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}

/* 動畫效果 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 按鈕樣式 */
.primary-button, .secondary-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.primary-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.secondary-button {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

/* 底部樣式 */
.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: 50px 0 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 70px; /* 添加下邊距以增加距離 */
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.social-icon:hover img {
    transform: scale(1.2);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-width: 65px;
    height: auto;
    margin-right: 10px;
}

/* 公司名稱樣式 */
.company-name {
    background: linear-gradient(to right, #C0C0C0, #D4AF37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
    font-weight: bold;
}

/* 版權聲明樣式 */
.copyright {
    text-align: center; /* 置中對齊 */
    margin: 0; /* 去除默認邊距 */
    padding: 10px 0; /* 添加上下內邊距 */
    color: rgba(255, 255, 255, 0.8); /* 設置顏色 */
}

/* 忠告樣式 */
.advice {
    font-size: 1.8rem; /* 字體大小為兩倍 */
    font-weight: bold; /* 加粗 */
    text-align: center; /* 置中對齊 */
    margin: 0; /* 去除默認邊距 */
    padding: 10px 0; /* 添加上下內邊距 */
    color: rgba(255, 255, 255, 0.9); /* 設置顏色 */
}

/* 段落样式 */
p {
    margin-bottom: 1rem; /* 添加下边距以增加间距 */
}

.shadow-effect {
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.3);
}

/* 更新 main.css */
.logo-container {
    position: fixed; /* 固定定位 */
    bottom: 20px; /* 距離底部 20 像素 */
    right: 20px; /* 距離右側 20 像素 */
    z-index: 1000; /* 確保在最上層 */
}

.wts-logo {
    width: 80px; /* 設置圖片寬度，根據需要調整 */
    height: auto; /* 自動調整高度以保持比例 */
    transition: box-shadow 0.3s ease; /* 添加過渡效果 */
}

.wts-logo:hover {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.6); /* 發光效果 */
}

/* 更新 main.css */
.section-nav a {
    color: #D4AF37; /* 鏈接顏色 */
    text-decoration: none; /* 去掉下劃線 */
    font-size: 0.8rem; /* 字體大小 */
    margin: 0;
}

.section-nav a:hover {
    text-decoration: underline; /* 懸停時添加下劃線 */
}

/* 聯繫資訊樣式 */
.contact-section {
    display: flex; /* 使用 flexbox 來排列內容 */
    justify-content: space-between; /* 使內容兩側對齊 */
    padding: 40px; /* 添加內邊距 */
    background-image: url('bg2.png'); /* 設置背景圖片 */
    background-size: cover; /* 使背景圖片覆蓋整個區域 */
    background-position: center; /* 使背景圖片居中 */
    background-repeat: no-repeat; /* 不重複背景圖片 */
    border-radius: 10px; /* 圓角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* 添加陰影 */
}

.contact-container {
    display: flex; /* 使用 flexbox 來排列內容 */
    width: 100%; /* 使容器寬度自適應 */
}

.contact-info {
    flex: 1px; /* 使聯繫資訊區域佔用可用空間 */
    margin-right: 20px; /* 右邊距 */
    background-color: rgba(255, 255, 255, 0.575); /* 半透明白色背景 */
    border-radius: 10px; /* 圓角 */
    padding: 15px; /* 內邊距 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 添加陰影 */
    margin-top: 100px; /* 向下移動 10 像素 */
    color: #303030;
    font-size: 1.8rem;
}

.contact-map {
    flex: 1; /* 使地圖區域佔用可用空間 */
    margin-top: 100px; /* 向下移動 100 像素 */
}

.contact-item {
    display: flex; /* 使用 flexbox 來排列圖標和文字 */
    align-items: center; /* 垂直置中 */
    margin-bottom: 15px; /* 下邊距 */
}

.contact-item i {
    font-size: 1.5rem; /* 圖標大小 */
    color: #D4AF37; /* 圖標顏色 */
    margin-right: 10px; /* 右邊距 */
}

.map-image {
    width: 100%; /* 使地圖圖片寬度自適應 */
    height: auto; /* 自動調整高度以保持比例 */
    border-radius: 10px; /* 圓角 */
}

.apply-button {
    display: inline-block; /* 使按鈕為行內塊元素 */
    padding: 10px 20px; /* 添加內邊距 */
    background-color: #D4AF37; /* 按鈕背景顏色 */
    color: #303030; /* 按鈕文字顏色 */
    text-decoration: none; /* 去掉下劃線 */
    border-radius: 20px; /* 圓角 */
    margin-top: 20px auto 0; /* 上邊距 */
    transition: background-color 0.3s; /* 添加過渡效果 */
}

.apply-button:hover {
    background-color: #b5942a; /* 懸停時改變背景顏色 */
}

/* 下拉菜单样式 */
.dropdown {
    position: relative; /* 使下拉菜单相对定位 */
    display: inline-block; /* 使其与其他链接在同一行 */
    margin-top: -12px; /* 上边距 */
}

.dropbtn {
    background-color: transparent; /* 按钮背景透明 */
    color: #fff; /* 按钮文字颜色 */
    padding: 14px 16px; /* 按钮内边距 */
    font-size: 16px; /* 字体大小 */
    border: none; /* 去掉边框 */
    cursor: pointer; /* 鼠标指针 */
}

.dropdown-content {
    display: none; /* 默认隐藏下拉内容 */
    position: absolute; /* 绝对定位 */
    background-color: #f9f9f9; /* 下拉菜单背景颜色 */
    min-width: 160px; /* 最小宽度 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    z-index: 1; /* 确保下拉菜单在其他元素上方 */
}

.dropdown-content a {
    color: black; /* 链接颜色 */
    padding: 12px 16px; /* 链接内边距 */
    text-decoration: none; /* 去掉下划线 */
    display: block; /* 使链接块状显示 */
}

.dropdown-content a:hover {
    background-color: #f1f1f1; /* 悬停时的背景颜色 */
}

.dropdown:hover .dropdown-content {
    display: block; /* 鼠标悬停时显示下拉内容 */
}

.menu-toggle {
    display: none; /* 預設隱藏 */
}





/* 手機版樣式 */
@media (max-width: 800px) {
    :root {
        --primary-color: #303030;
        --secondary-color: #D4AF37;
        --accent-color: #9370DB;
        --text-color: #ffffff;
        --gradient-bg: linear-gradient(135deg, #303030, #1a1a1a);
        --card-bg: rgba(255, 255, 255, 0.05);
        --max-width: 100%; /* 最大寬度設為100% */
        --section-padding: 40px 10px; /* 調整內邊距 */
    }

    body {
        font-size: 14px; /* 調整字體大小 */
    }

    .section-container {
        padding: var(--section-padding);
    }

    .section-title {
        font-size: 2rem; /* 調整標題字體大小 */
        margin-bottom: 2rem; /* 減少下邊距 */
        text-align: center; /* 置中對齊 */
    }

    .nav-container {
        position: relative; /* 相對定位 */
    }

    .menu-toggle {
        display: block; /* 在手機版顯示 */
        background-color: var(--secondary-color); /* 按鈕背景顏色 */
        color: var(--primary-color); /* 按鈕文字顏色 */
        border: none; /* 去掉邊框 */
        z-index: 1001; /* 確保在最上層 */
        padding: 8px; /* 減少按鈕內邊距 */
        font-size: 1.2rem; /* 調整字體大小 */
    }

    .nav-links {
        display: none; /* 預設隱藏 */
        position: absolute; /* 絕對定位 */
        top: 100;
        left: 0;
        width: 150px; /* 設置寬度 */
        height: 20%; /* 設置高度 */
        padding: 20px;
        z-index: 1000; /* 確保在最上層 */
    }

    .nav-links a {
        display: block; /* 每個鏈接佔一行 */
        margin: 10px 0; /* 增加上下邊距 */
    }

    .nav-links.active {
        display: block; /* 當展開時顯示 */
    }

    .nav-apply-button {
        width: auto; /* 設置寬度為自動 */
        padding: 6px 15px; /* 調整內邊距 */
        font-size: 0.8rem; /* 調整字體大小 */
        margin: 10px 0; /* 增加上下邊距 */
    }

    .hero-section {
        flex-direction: column; /* 垂直排列 */
        padding: 40px 10px; /* 調整內邊距 */
        text-align: center; /* 置中對齊 */
        margin-top: 30px; /* 整個區域下移 5px */
    }

    .hero-content h1 {
        font-size: 2rem; /* 調整主標題字體大小 */
    }

    .hero-subtitle {
        font-size: 1.2rem; /* 調整副標題字體大小 */
    }

    .calculator-container {
        padding: 2rem 1rem; /* 減少計算器內邊距 */
    }

    .result-card {
        grid-template-columns: 1fr; /* 僅顯示一列 */
        gap: 1rem; /* 減少格子間距 */
    }

    .features-grid {
        grid-template-columns: 1fr; /* 僅顯示一列 */
    }

    .footer-content {
        grid-template-columns: 1fr; /* 僅顯示一列 */
    }

    .primary-button, .secondary-button {
        width: 100%; /* 按鈕寬度設為100% */
        margin: 5px 0; /* 增加上下邊距 */
    }

    .disclaimer {
        font-size: 0.8rem; /* 調整說明文字大小 */
    }

    .loan-intro h2, .loan-intro h3, .loan-intro p {
        font-size: 1rem; /* 調整字體大小 */
    }

    .dropdown {
        width: 100%;
    }

    .dropbtn {
        width: 100%;
        text-align: left;
    }

    .nav-bar {
        padding: 10px; /* 減少內邊距 */
        height: auto; /* 自動高度 */
    }

    .nav-container {
        padding: 0; /* 去除內邊距 */
    }

    .nav-links a {
        font-size: 0.9rem; /* 調整鏈接字體大小 */
        padding: 8px 0; /* 增加上下內邊距 */
    }

    .nav-apply-button {
        padding: 6px 15px; /* 減少按鈕內邊距 */
        font-size: 0.8rem; /* 調整按鈕字體大小 */
    }

    .company-name {
        font-size: 0.9rem; /* 調整手機版字體大小 */
        line-height: 1.2; /* 調整行高 */
    }

    .hero-image img {
        transform: translate(-132.5px, 7px); /* 向左平移 6px，向下移動 7px */
    }

    .success-stories-section .primary-title {
        font-size: 0.8rem; /* 調整標題字體大小 */
    }

    .success-stories-section p {
        font-size: 0.8rem; /* 調整段落字體大小 */
    }

    .success-stories-section .success-image {
        width: 40px; /* 調整圖片寬度 */
        height: auto; /* 自動調整高度以保持比例 */
    }

    .success-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 每行兩個格子 */
        gap: 1rem; /* 格子之間的間距 */
    }

    .highlight-image {
        width: 80px; /* 調整圖片寬度 */
        height: auto; /* 自動調整高度以保持比例 */
    }
    
    .contact-container {
        display: flex;
        flex-direction: column; /* 垂直排列 */
    }

    .contact-info {
        order: 1; /* 確保聯繫信息在前 */
        font-size: 1rem; /* 將字體大小縮小 50% */
    }

    .contact-info h4 {
        font-size: 1rem; /* 確保標題字體也縮小 */
    }

    .contact-info p {
        font-size: 1rem; /* 確保段落字體也縮小 */
    }

    .contact-map {
        order: 2; /* 確保地圖在後 */
        margin-top: 10px; /* 可選：增加上邊距 */
    }
}