/* CSS 變數定義 */
:root {
    --primary-color: #005bbb;
    --primary-light: #3388cc;
    --primary-dark: #004499;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b35;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* 基礎樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* 導航選單 */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    height: 70px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 10px 0;
    position: relative;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

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

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

/* Hero 區樣式 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 120px 0 60px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    margin-top: 70px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text {
    animation: fadeInLeft 1s ease-out;
}

.company-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

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

.btn-line {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.hero-image {
    animation: fadeInRight 1s ease-out;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
}

/* 區塊標題 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* 產品項目區 */
.products {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

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

.product-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 20px;
    color: var(--primary-color);
    text-align: center;
}

/* 使用場景區 */
.use-cases {
    padding: 100px 0;
    background-color: var(--white);
}

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

.use-case-item {
    background-color: var(--light-gray);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
}

.use-case-item:hover {
    background-color: var(--white);
    box-shadow: var(--shadow);
    transform: translateX(10px);
}

.use-case-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.use-case-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 聯絡資訊區 */
.contact {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.contact-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 91, 187, 0.1);
}

.contact-info {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.info-item:hover {
    background-color: var(--white);
    box-shadow: var(--shadow);
}

.info-icon {
    font-size: 2rem;
    margin-right: 20px;
    min-width: 50px;
}

.info-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.info-content p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Line QR Code 區 */
.line-qr {
    text-align: center;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.line-qr h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.line-qr img {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.line-qr p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* 模態框樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 15% auto;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.modal-content p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

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

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 動畫效果 */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* RWD 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 15px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        padding: 120px 0 40px 0;
        min-height: 80vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .company-name {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products {
        padding: 60px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .use-cases {
        padding: 60px 0;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact {
        padding: 60px 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form,
    .contact-info {
        padding: 30px 20px;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .line-qr {
        padding: 30px 20px;
    }
    
    .line-qr img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 40px 0;
    }
    
    .company-name {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .product-item,
    .use-case-item {
        padding: 30px 20px;
    }
    
    .contact-form,
    .contact-info {
        padding: 25px 15px;
    }
    
    .line-qr img {
        width: 120px;
        height: 120px;
    }
}
