/* ===================================
   Global Styles & Reset
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Modern & Elegant */
    --primary-color: #2c3e50;
    --secondary-color: #c9a67a;
    --accent-color: #3498db;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    
    /* Typography */
    --font-serif: 'Noto Serif TC', serif;
    --font-sans: 'Noto Sans TC', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-brand i {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width var(--transition-fast);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition-fast);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1600210492486-724fe5c67fb0?w=1920');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-text h1 {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hero-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(201, 166, 122, 0.3);
}

.btn-primary:hover {
    background: #b8956a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 166, 122, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: var(--font-serif);
}

.stat-label {
    font-size: 1rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0.6;
}

.scroll-indicator span {
    width: 2px;
    height: 10px;
    background: white;
    animation: scrollDown 1.5s infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scrollDown {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

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

/* ===================================
   Section Styles
   =================================== */
section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 1.5rem;
}

/* ===================================
   Services Section
   =================================== */
.services {
    background: var(--bg-light);
}

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

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    border-top: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--secondary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary-color), #d4b78f);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-features {
    margin-top: 1.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.service-features i {
    color: var(--success-color);
    font-size: 0.9rem;
}

/* ===================================
   Portfolio Section
   =================================== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
}

.portfolio-item.hide {
    display: none;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    padding-bottom: 75%;
}

.portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(44, 62, 80, 0.95), rgba(44, 62, 80, 0.3));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.portfolio-link {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    transition: var(--transition-fast);
}

.portfolio-link:hover {
    background: white;
    color: var(--primary-color);
}

/* ===================================
   Advantages Section
   =================================== */
.advantages {
    background: var(--bg-light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.advantage-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all var(--transition-smooth);
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advantage-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(201, 166, 122, 0.15);
    font-family: var(--font-serif);
}

.advantage-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #5dade2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.advantage-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.advantage-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===================================
   Process Section
   =================================== */
.process-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

.process-step:nth-child(even) .process-content {
    text-align: right;
}

.process-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), #d4b78f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 0 10px white, 0 0 0 12px var(--border-color);
    position: relative;
    z-index: 1;
}

.process-content {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.process-content h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.process-content p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
}

.testimonials .section-title {
    color: white;
}

.testimonials .section-title::after {
    background: var(--secondary-color);
}

.testimonials .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-stars {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.testimonial-stars i {
    margin-right: 0.25rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    font-family: var(--font-serif);
    margin-bottom: 0.25rem;
}

.author-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--bg-light);
}

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

.contact-info h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary-color), #d4b78f);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
}

.contact-form-wrapper {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

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

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    opacity: 0.8;
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ===================================
   Floating Line Button
   =================================== */
.line-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #06c755;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.4);
    z-index: 999;
    transition: all var(--transition-fast);
    animation: pulse 2s infinite;
}

.line-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.6);
}

.line-btn span {
    font-size: 0.7rem;
    margin-top: 2px;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(6, 199, 85, 0.4), 0 0 0 0 rgba(6, 199, 85, 0.7);
    }
    50% {
        box-shadow: 0 4px 15px rgba(6, 199, 85, 0.4), 0 0 0 10px rgba(6, 199, 85, 0);
    }
}

/* ===================================
   Scroll to Top Button
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 6rem;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
}

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

.scroll-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .process-timeline::before {
        left: 40px;
    }
    
    .process-step,
    .process-step:nth-child(even) {
        flex-direction: row;
    }
    
    .process-step:nth-child(even) .process-content {
        text-align: left;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transition: left var(--transition-fast);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid,
    .portfolio-grid,
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .line-btn {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .scroll-top {
        right: 2rem;
        bottom: 6rem;
    }
    
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    .process-timeline::before {
        left: 20px;
    }
    
    .process-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}