:root {
    /* Elegant European Pastel Theme */
    --primary-color: #5a6e8c; /* Slate Blue */
    --secondary-color: #d4b499; /* Warm Beige */
    --accent-color: #7c9070; /* Sage Green */
    --text-color: #2c3e50; /* Dark Blue-Grey */
    --light-text: #607d8b; /* Muted Blue-Grey */
    --bg-light: #f9f8f6; /* Warm White */
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #5a6e8c 0%, #7c9070 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Noto Sans TC', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(90, 110, 140, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 110, 140, 0.4);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 140px; /* Increased height for larger logo */
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.logo-img {
    height: 120px; /* Enlarged from 100px */
    width: auto;
    display: block;
}

.company-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap; /* Keep on one line */
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-weight: 500;
    color: var(--text-color);
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(90, 110, 140, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons-header {
    display: flex;
    gap: 15px;
}

.social-icons-header a {
    color: var(--light-text);
    font-size: 16px;
}

.social-icons-header a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid #eee;
    padding-left: 20px;
}

.lang-switch button {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--light-text);
    font-size: 14px;
    transition: var(--transition);
}

.lang-switch button.active {
    color: var(--primary-color);
    font-weight: 700;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: 0px;
    padding-top: 140px; /* Adjusted for new header height */
    overflow: hidden;
    background-color: var(--primary-color); /* Fallback color */
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.6); /* Overlay to ensure text readability */
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 2;
}

/* Carousel Styles */
.hero-carousel {
    position: relative;
    height: 150px; /* Adjust based on content height */
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Allow clicking through if needed */
}

.carousel-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative; /* Make it take up space */
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-size: 42px;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 300;
}

.divider {
    width: 80px;
    height: 3px;
    background: var(--gradient);
    margin: 0 auto;
    border-radius: 2px;
}

/* About */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
    text-align: center;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    color: var(--light-text);
    line-height: 1.8;
}

.about-features {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(90, 110, 140, 0.1) 0%, rgba(124, 144, 112, 0.1) 100%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.feature-item:hover i {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(90, 110, 140, 0.3);
}

.feature-item h3 {
    font-size: 20px;
    color: var(--text-color);
    font-weight: 500;
}

/* Services */
.bg-light {
    background-color: var(--bg-light);
}

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

.service-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 2px;
    box-shadow: var(--shadow);
    text-align: left; /* Changed to left align for elegance */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, rgba(90, 110, 140, 0.03), transparent);
    transition: var(--transition);
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-15px);
    border-bottom-color: var(--secondary-color);
}

.service-card:hover::before {
    height: 100%;
}

.service-card .icon {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 25px 0;
    transition: var(--transition);
}

.service-card .icon i {
    font-size: 42px;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover .icon i {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--light-text);
    font-size: 16px;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* Contact */
.contact-wrapper {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: stretch;
}

.contact-left-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-right-col {
    flex: 1;
}

.contact-info {
    min-width: 300px;
}

.info-item {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(90, 110, 140, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.info-item:hover i {
    background: var(--gradient);
    color: var(--white);
}

.info-item h4 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
}

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

.contact-form-wrapper {
    height: 100%;
    background: var(--white);
    padding: 50px;
    border-radius: 2px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 15px;
    background-color: #fcfcfc;
    transition: var(--transition);
}

.contact-form textarea {
    flex: 1;
    min-height: 200px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Map Container */
.map-container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

/* Footer */
.footer {
    background: #20232a;
    color: var(--white);
    padding: 15px 0 10px; /* Minimized padding */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 10px; /* Reduced margin */
    gap: 40px;
}

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--white);
    font-weight: 300;
    letter-spacing: 2px;
    background: none;
    -webkit-text-fill-color: initial;
}

.footer-logo p {
    color: #888;
    font-style: italic;
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 5px; /* Reduced margin */
}

.footer-social a {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
    font-size: 14px;
}

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

.footer-links {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.footer-links a {
    color: #aaa;
    font-weight: 300;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--white);
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Login Page Styles */
.login-body {
    background-color: var(--bg-light);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--white);
    padding: 50px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.login-logo {
    margin-bottom: 30px;
}

.login-title {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 30px;
    font-weight: 300;
}

.login-form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 15px;
}

.login-btn {
    width: 100%;
    margin-top: 10px;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: var(--light-text);
    font-size: 14px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .header .nav {
        display: none;
        position: absolute;
        top: 140px; /* Adjusted for new header height */
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    
    .header .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .social-icons-header {
        justify-content: center;
        margin-top: 20px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}
