:root {
    /* 調色盤：更現代的科技藍與深邃灰 */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --accent: #0ea5e9;
    /* 亮藍色點綴 */
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);

    --bg: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.7);
    /* 玻璃擬態背景 */
    --bg-card: #ffffff;

    --text-main: #0f172a;
    /* 很深的藍黑，比純黑更有質感 */
    --text-sub: #475569;
    --text-muted: #94a3b8;

    --border: rgba(226, 232, 240, 0.8);
    --border-hover: #cbd5e1;

    /* 陰影系統 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 20px 40px -10px rgba(59, 130, 246, 0.15);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --font-sans: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg);
    /* 增加背景紋理，更有質感 */
    background-image:
        radial-gradient(at 0% 0%, hsla(215, 98%, 61%, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(256, 100%, 60%, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 6vw;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 設定logo-mark的寬度為5% */
.logo-mark {
    width: 60px;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: inline-block;
    /* border-radius: 50%; */
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    /* border-radius: 50%; */
}

.logo-name {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.logo-sub {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-sub);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: 0.02em;
    border: none;
}

.btn.primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.5);
}

.btn.outline {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn.outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 6vw 60px;
    overflow: hidden;
}

/* 增加一個裝飾性的光暈 */
.hero-bg-blob {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-kicker {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 20px;
}

.hero h1 {
    font-size: clamp(36px, 4.5vw, 52px);
    line-height: 1.2;
    margin: 0 0 24px;
    font-weight: 800;
    color: var(--text-main);
}

.hero-highlight {
    background: -webkit-linear-gradient(315deg, var(--primary-dark), var(--accent));
    background: linear-gradient(315deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Card General Styling */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Hero Panel Specific */
.hero-panel {
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.9);
}

.hero-panel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.hp-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 15px;
}

.hp-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--border);
    border-radius: 50%;
    margin-left: 4px;
}

.hero-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.icon-box.sm {
    width: 32px;
    height: 32px;
}

.icon-box.green {
    background: #dcfce7;
    color: #16a34a;
}

.icon-box.blue {
    background: #dbeafe;
    color: #2563eb;
}

.icon-box.yellow {
    background: #fef9c3;
    color: #ca8a04;
}

.list-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.list-desc {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.5;
}

/* Sections */
.section {
    padding: 80px 6vw;
}

.section-alt {
    background: linear-gradient(to bottom, #f1f5f9, #f8fafc);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 16px;
    color: var(--text-main);
}

.section-header p {
    font-size: 18px;
    color: var(--text-sub);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-main p {
    font-size: 16px;
    margin-bottom: 24px;
    color: var(--text-sub);
}

.about-main strong {
    color: var(--primary-dark);
    background: linear-gradient(120deg, transparent 60%, rgba(59, 130, 246, 0.2) 60%);
}

.about-list {
    padding-left: 20px;
    line-height: 1.8;
    color: var(--text-sub);
}

.about-list li {
    margin-bottom: 8px;
}

.about-side {
    padding: 32px;
    background: white;
    border: 1px solid var(--border);
}

.about-side h3 {
    margin-top: 0;
    font-size: 20px;
}

.about-tags {
    padding-left: 20px;
    color: var(--text-sub);
    line-height: 1.8;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service {
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid transparent;
}

.service:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 32px;
    margin-bottom: 20px;
}

.service h3 {
    font-size: 20px;
    margin: 0 0 12px;
    font-weight: 700;
}

.service-desc {
    font-size: 15px;
    color: var(--text-sub);
    flex-grow: 1;
}

.service ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Cases */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.case {
    padding: 32px;
    background: white;
    position: relative;
}

.case-feature {
    grid-column: span 1;
    border: 2px solid var(--primary-light);
    background: linear-gradient(to bottom right, white, #f8fafc);
}

@media (min-width: 1024px) {
    .case-feature {
        grid-column: span 2;
    }
}

.case-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 1;
}

.case h3 {
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--text-main);
}

.case-subtitle {
    color: var(--primary);
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 16px;
}

/* Process */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.step {
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.step-number {
    font-size: 48px;
    font-weight: 900;
    color: rgba(59, 130, 246, 0.1);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.step h3 {
    position: relative;
    font-size: 18px;
    margin-bottom: 12px;
    z-index: 1;
}

.step p {
    position: relative;
    z-index: 1;
    font-size: 15px;
}

/* ======================================= */
/* 聯絡我們 (Contact) 區塊優化樣式 - 修正為三欄 */
/* ======================================= */

.contact-grid {
    display: grid;
    /* 修正為平均的三欄佈局 */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* 縮小間距讓三欄能更好呈現 */
}

/* 確保所有卡片都有相同的內邊距 */
.contact-card,
.prep-card,
.tip-card {
    padding: 30px 25px; /* 略微縮小內邊距以適應三欄 */
    display: flex;
    flex-direction: column;
}

/* 聯絡清單 (Contact List) */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    margin-bottom: 8px; /* 略微縮小行距 */
    font-size: 15px;
}
.contact-label {
    width: 70px; /* 略微縮小標籤寬度 */
    font-weight: 500;
    color: var(--text-sub);
}
.contact-list a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* 準備清單 (Preparation List) - 在中間卡片內 */
.prep-note {
    margin-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.prep-card h3,
.tip-card h3 {
    font-size: 18px;
    color: var(--primary-strong);
    margin-bottom: 12px;
}

.prep-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 14px; /* 略微縮小字體 */
    color: var(--text-main);
    line-height: 1.7;
}

.prep-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    font-weight: 500;
}

.prep-list li::before {
    content: "💡";
    position: absolute;
    left: 0;
    font-size: 12px;
    top: 2px;
    opacity: 0.7;
}

.prep-summary {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 15px;
}

/* 問題範例區塊 (Example Tip Content) - 在右側卡片內 */
.tip-card p {
    font-size: 14px;
    color: var(--text-sub);
}

.contact-examples {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.contact-examples li {
    font-size: 14px;
    color: var(--text-main);
    padding: 8px 10px;
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid rgba(43, 124, 255, 0.2);
    font-weight: 500;
}

/* RWD 調整 */
@media (max-width: 1200px) {
    .contact-grid {
        /* 中尺寸螢幕 (如大平板或小筆電) 設為兩欄 */
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .contact-grid {
        /* 行動裝置設為一欄 */
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Footer */
.footer {
    padding: 40px 6vw;
    text-align: center;
    background: white;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

/* 回到頂部按鈕 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.5);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* 響應式：小螢幕調整按鈕位置 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Animations & Responsive */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .header {
        padding: 10px 20px;
    }

    .nav {
        position: fixed;
        top: 60px;
        right: 20px;
        width: 200px;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-radius: 12px;
        display: none;
    }

    .nav.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
    }

    .nav-toggle span {
        width: 24px;
        height: 2px;
        background: var(--text-main);
    }

    .hero {
        padding-top: 40px;
    }

    .hero-inner,
    .about-grid,
    .contact-grid,
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-panel {
        order: -1;
        margin-bottom: 20px;
    }

    .case {
        padding: 24px;
    }

    .case-badge {
        top: 15px;
        right: 15px;
        font-size: 11px;
        padding: 3px 8px;
    }
}