/* 全局變數定義 (專業深藍配色) */
:root {
    --primary-bg: #0b132b;
    --secondary-bg: #1c2541;
    --text-main: #ffffff;
    --text-muted: #a3b1c6;
    --accent-blue: #4cc9f0;
    --accent-orange: #fca311;
    --whatsapp-green: #25D366;
    --whatsapp-hover: #1EBE55;
    --chat-bg: #e5ddd5;
    --chat-sent: #dcf8c6;
    --chat-received: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 基礎設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導航列 */
header {
    background-color: rgba(11, 19, 43, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

/* 固定顯示的聯絡資訊 */
.header-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: rgba(37, 211, 102, 0.15);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--accent-blue);
    color: var(--primary-bg);
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.primary-btn:hover {
    background-color: #3bb5da;
    transform: translateY(-2px);
}

.outline-btn {
    border: 2px solid var(--accent-blue);
    color: var(--accent-blue);
}

.outline-btn:hover {
    background-color: var(--accent-blue);
    color: var(--primary-bg);
}

/* Hero Section */
.hero {
    padding-top: 130px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    background-color: rgba(255, 247, 216, 0.1) ;
    color: #daa914;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

/* WhatsApp 對話盒 UI 設計 */
.chat-mockup {
    width: 320px;
    height: 480px;
    background-color: var(--chat-bg);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 8px #2b3a55;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.chat-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.chat-header {
    background-color: #075E54;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-bg);
}

.chat-header-info strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
}

.chat-header-info span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.chat-body {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    background-image: radial-gradient(#d4c8b8 1px, transparent 1px);
    background-size: 20px 20px;
    text-align:left;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #303030;
    position: relative;
    /* 優化：移除強制透明，改由動畫從透明過度到實體，防止動畫失效時全隱藏 */
    animation: slideUpFadeIn 0.6s both ease-out;
}

.chat-msg .time {
    display: block;
    font-size: 0.65rem;
    color: #888;
    text-align: right;
    margin-top: 4px;
}

.chat-msg.sent {
    background-color: var(--chat-sent);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg.received {
    background-color: var(--chat-received);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* 訊息浮現的動畫延遲設定 */
.msg-1 { animation-delay: 0.2s; }
.msg-2 { animation-delay: 1.2s; }
.msg-3 { animation-delay: 1.8s; }
.msg-4 { animation-delay: 3.0s; }

@keyframes slideUpFadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.chat-footer {
    background-color: #f0f0f0;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background-color: white;
    padding: 10px 15px;
    border-radius: 20px;
    color: #888;
    font-size: 0.9rem;
}

.chat-send {
    width: 40px;
    height: 40px;
    background-color: var(--whatsapp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 通用區塊設定 */
.section {
    padding: 80px 0;
}

.bg-dark {
    background-color: var(--secondary-bg);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--text-main);
}

/* 網格系統 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* 卡片設計 */
.card {
    background-color: rgba(11, 19, 43, 0.6);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.outline-card {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card svg {
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 收費方案卡片 */
.pricing-card {
    background-color: var(--primary-bg);
    padding: 50px 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.pricing-card.highlight {
    border: 2px solid var(--accent-orange);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-orange);
    color: var(--primary-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.pricing-card h3 span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 30px;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-card ul {
    text-align: left;
    margin-bottom: 40px;
}

.pricing-card li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: #050a17;
    padding: 60px 0 20px;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h4 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-info p, .footer-info ul li {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-info a:hover {
    color: var(--accent-blue);
}

.footer-info.disclaimer p {
    font-size: 0.8rem;
    line-height: 1.8;
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* WhatsApp 懸浮按鈕 */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--whatsapp-green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 100;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: var(--whatsapp-hover);
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

/* RWD 響應式設計 (Mobile Responsive) */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text p {
        margin: 0 auto 30px;
    }

    .hero-image {
        margin-top: 20px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        height: auto;
        padding: 10px 0;
    }

    .header-contact {
        font-size: 0.9rem;
        padding: 4px 12px;
    }

    .hero {
        padding-top: 110px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .chat-mockup {
        width: 100%;
        max-width: 300px;
        height: 420px;
        transform: none;
    }

    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .pricing-card.highlight {
        transform: scale(1);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}