/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    /* Colors - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-dark: #1a1f36;
    
    --accent-primary: #0066cc;
    --accent-secondary: #00a86b;
    --accent-light: #e6f2ff;
    --accent-green-light: #e6f7f1;
    
    --text-primary: #1a1f36;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    /* LINE Green */
    --line-green: #00B900;
    
    /* Spacing */
    --section-padding: clamp(3rem, 8vw, 5rem);
    --container-max: 1200px;
    --container-padding: clamp(1rem, 4vw, 2rem);
    
    /* Typography */
    --font-primary: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ===================================
   Utility Classes
   =================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-outline {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

.btn-full {
    width: 100%;
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ===================================
   Top Bar
   =================================== */
.top-bar {
    background: var(--bg-dark);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-text .highlight {
    color: #ffd700;
}

.top-bar-contact a {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--line-green);
    font-weight: 500;
    transition: opacity var(--transition-fast);
}

.top-bar-contact a:hover {
    opacity: 0.8;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-sub {
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.nav-link.nav-cta {
    background: var(--accent-primary);
    color: white;
    margin-left: 0.5rem;
}

.nav-link.nav-cta:hover {
    background: #0052a3;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

/* ===================================
   Hero Slider
   =================================== */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.slider-container {
    position: relative;
}

.slides {
    position: relative;
}

.slide {
    display: none;
    position: relative;
    min-height: 500px;
}

.slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-bg {
    position: absolute;
    inset: 0;
}

.slide-bg-1 {
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f7ff 50%, #e6fff5 100%);
}

.slide-bg-2 {
    background: linear-gradient(135deg, #e6fff5 0%, #f0fff8 50%, #e6f2ff 100%);
}

.slide-bg-3 {
    background: linear-gradient(135deg, #fff5e6 0%, #fff9f0 50%, #e6f2ff 100%);
}

.slide-content {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}

.slide-content .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.slide-tag {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.slide-text h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.text-accent {
    color: var(--accent-primary);
}

.slide-text p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.slide-btns {
    display: flex;
    gap: 1rem;
}

.slide-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-graphic {
    width: 300px;
    height: 300px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.graphic-circle {
    position: absolute;
    inset: 20px;
    border: 3px dashed var(--border-color);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.graphic-code {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.graphic-dots {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 8px;
}

.graphic-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-secondary);
    animation: pulse 1.5s ease infinite;
}

.graphic-dots span:nth-child(2) { animation-delay: 0.2s; }
.graphic-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.graphic-alt .graphic-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 120px;
}

.graphic-chart .bar {
    width: 30px;
    background: linear-gradient(to top, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px 4px 0 0;
    animation: grow 1s ease;
}

@keyframes grow {
    from { height: 0 !important; }
}

.graphic-crawler .crawler-icon {
    width: 100px;
    height: 100px;
}

.graphic-crawler .crawler-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-primary);
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Slider Controls */
.slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all var(--transition-base);
}

.dot.active {
    background: var(--accent-primary);
    width: 30px;
    border-radius: 5px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-base);
}

.slider-arrow:hover {
    background: var(--accent-primary);
}

.slider-arrow:hover svg {
    stroke: white;
}

.slider-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
}

.slider-arrow.prev {
    left: 1rem;
}

.slider-arrow.next {
    right: 1rem;
}

/* ===================================
   Stats Bar
   =================================== */
.stats-bar {
    background: var(--bg-dark);
    padding: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent-secondary);
}

.stat-info {
    color: white;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-suffix {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* ===================================
   Services Section
   =================================== */
.services {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-light);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--accent-primary);
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.service-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.service-list {
    margin-bottom: 1.5rem;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.375rem 0;
}

.service-list li::before {
    content: '✓';
    color: var(--accent-secondary);
    font-weight: 700;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: gap var(--transition-base);
}

.service-link:hover {
    gap: 0.625rem;
}

.service-link svg {
    width: 16px;
    height: 16px;
}

/* ===================================
   Projects Section
   =================================== */
.projects {
    padding: var(--section-padding) 0;
}

.project-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 100px;
    transition: all var(--transition-base);
}

.tab-btn:hover {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.tab-btn.active {
    color: white;
    background: var(--accent-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
}

.project-card.hidden {
    display: none;
}

.project-badge {
    display: flex;
    gap: 0.5rem;
    padding: 1.5rem 1.5rem 0;
}

.badge-industry,
.badge-type {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
}

.badge-industry {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.badge-type {
    background: var(--accent-green-light);
    color: var(--accent-secondary);
}

.project-title {
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
}

.project-body {
    padding: 0 1.5rem;
}

.project-section {
    margin-bottom: 1rem;
}

.project-section h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.project-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    padding: 0.75rem 1.5rem;
}

.project-tech span {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.project-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.result {
    text-align: center;
    padding: 1.25rem 0.5rem;
    border-right: 1px solid var(--border-light);
}

.result:last-child {
    border-right: none;
}

.result-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.result-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.projects-more {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.projects-more p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* ===================================
   Process Section
   =================================== */
.process {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.process-step {
    position: relative;
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-light);
    line-height: 1;
    margin-bottom: 1rem;
}

.step-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: calc(100% - 60px);
}

.step-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.step-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-primary);
}

.step-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.step-time {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--accent-green-light);
    color: var(--accent-secondary);
    border-radius: 100px;
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: var(--section-padding) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-content .section-tag,
.about-content .section-title {
    text-align: left;
}

.about-intro {
    font-size: 1.125rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-intro strong {
    color: var(--accent-primary);
}

.about-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-quote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-primary);
    padding: 1.5rem;
    background: var(--accent-light);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    line-height: 1.8;
}

.about-skills {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.about-skills h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-group h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.skill-tags span {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* ===================================
   FAQ Section
   =================================== */
.faq {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: all var(--transition-base);
}

.faq-question:hover {
    color: var(--accent-primary);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    padding: var(--section-padding) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    position: relative;
    transition: all var(--transition-base);
}

.contact-card:hover {
    background: var(--bg-tertiary);
}

.contact-line:hover {
    background: rgba(0, 185, 0, 0.05);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-line .contact-icon svg {
    fill: var(--line-green);
}

.contact-email .contact-icon svg {
    stroke: var(--accent-primary);
}

.contact-text h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.contact-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.recommend-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: var(--line-green);
    color: white;
    border-radius: var(--radius-sm);
}

.contact-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.contact-note svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-primary);
    flex-shrink: 0;
}

.contact-note p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-note strong {
    color: var(--accent-primary);
}

.contact-form-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.contact-form h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group .required {
    color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding-top: 3rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.footer-logo .logo-icon {
    width: 36px;
    height: 36px;
}

.footer-logo .logo-icon svg {
    width: 20px;
    height: 20px;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   Floating Elements
   =================================== */
.line-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--line-green);
    color: white;
    border-radius: 100px;
    box-shadow: 0 4px 20px rgba(0, 185, 0, 0.4);
    z-index: 999;
    transition: all var(--transition-base);
}

.line-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 185, 0, 0.5);
}

.line-float svg {
    width: 24px;
    height: 24px;
}

.line-float span {
    font-weight: 600;
    font-size: 0.9375rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 10rem;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-primary);
}

.back-to-top:hover svg {
    stroke: white;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9375rem;
    color: var(--text-primary);
    z-index: 9999;
    opacity: 0;
    transition: all var(--transition-base);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--accent-secondary);
}

.toast.error {
    border-left: 4px solid #e53e3e;
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

/* ===================================
   Mobile Responsive
   =================================== */
@media (max-width: 1024px) {
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar-text {
        font-size: 0.75rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
    }
    
    .nav-link.nav-cta {
        margin-left: 0;
        margin-top: 1rem;
        text-align: center;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .slide-content .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .slide-image {
        display: none;
    }
    
    .slide-btns {
        justify-content: center;
    }
    
    .slider-arrow {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-list {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .line-float {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .line-float span {
        display: none;
    }
    
    .back-to-top {
        right: 4.5rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .slide-text h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .project-results {
        grid-template-columns: 1fr;
    }
    
    .result {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 1rem;
    }
    
    .result:last-child {
        border-bottom: none;
    }
}

/* ===================================
   Contact Cards Row - 左右對稱卡片
   =================================== */
.contact-cards-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.contact-card-large:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.contact-card-large .card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.contact-card-large .card-icon svg {
    width: 40px;
    height: 40px;
}

.contact-line-large .card-icon {
    background: linear-gradient(135deg, #00B900 0%, #00D900 100%);
}

.contact-line-large .card-icon svg {
    fill: white;
}

.contact-line-large:hover {
    border-color: var(--line-green);
}

.contact-form-large .card-icon {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #0088ff 100%);
}

.contact-form-large .card-icon svg {
    stroke: white;
    fill: none;
}

.contact-form-large:hover {
    border-color: var(--accent-primary);
}

.contact-card-large h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.contact-card-large p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-card-large .card-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.contact-line-large .card-value {
    color: var(--line-green);
}

.contact-card-large .card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--line-green);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.contact-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-footer-note svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-primary);
    flex-shrink: 0;
}

.contact-footer-note p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* RWD for Contact Cards */
@media (max-width: 768px) {
    .contact-cards-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-card-large {
        padding: 2rem 1.5rem;
    }
    
    .contact-card-large .card-icon {
        width: 64px;
        height: 64px;
    }
    
    .contact-card-large .card-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .contact-card-large h3 {
        font-size: 1.25rem;
    }
}
