/*
Theme Name: Spintech Machinery Theme
Description: 專業精密主軸製造商WordPress自定義主題 - 為旭泰機械量身打造的現代化工業風格主題
Author: MiniMax Agent
Version: 1.0.0
Text Domain: spintech
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: industrial, machinery, manufacturing, responsive, custom-post-types, multilingual
*/

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: #ffffff;
    line-height: 1.6;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */

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

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo img {
    height: 60px;
    width: auto;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

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

.nav-menu a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.current {
    color: #f97316;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f97316;
    transition: width 0.3s ease;
}

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

/* Language Switcher */
.language-switcher {
    margin-left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.language-switcher a {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.language-switcher a:hover,
.language-switcher a.active {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #374151;
    margin: 5px 0;
    transition: 0.3s;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

.btn-primary:hover {
    background: #ea580c;
    border-color: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

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

.btn-secondary:hover {
    background: white;
    color: #1e40af;
    transform: translateY(-2px);
}

/* ==========================================================================
   Content Sections
   ========================================================================== */

.content-section {
    padding: 80px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.product-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-link {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.product-link:hover {
    gap: 0.75rem;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f97316;
}

.footer-section p,
.footer-section li {
    color: #d1d5db;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

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

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #f97316;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem 0;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0 1rem;
    }
    
    .nav-menu li {
        border-bottom: 1px solid #f3f4f6;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 60px 0;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.hidden { display: none; }
.visible { display: block; }

/* ==========================================================================
   History Page Styles
   ========================================================================== */

.history-page {
    max-width: 1000px;
    margin: 0 auto;
}

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

.page-title {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.timeline-container {
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #f97316, #ea580c);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-year {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}

.year-circle {
    width: 60px;
    height: 60px;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    margin: 0 auto;
}

.year-circle.color-1 { background: #f97316; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); }
.year-circle.color-2 { background: #3b82f6; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.year-circle.color-3 { background: #10b981; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.year-circle.color-4 { background: #8b5cf6; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.year-circle.color-5 { background: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.year-circle.color-6 { background: #f59e0b; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.year-circle.color-7 { background: #06b6d4; box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3); }
.year-circle.color-8 { background: #84cc16; box-shadow: 0 4px 12px rgba(132, 204, 22, 0.3); }
.year-circle.color-9 { background: #ec4899; box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3); }

.timeline-content {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-left: 2rem;
}

.timeline-content.border-1 { border-left: 4px solid #f97316; }
.timeline-content.border-2 { border-left: 4px solid #3b82f6; }
.timeline-content.border-3 { border-left: 4px solid #10b981; }
.timeline-content.border-4 { border-left: 4px solid #8b5cf6; }
.timeline-content.border-5 { border-left: 4px solid #ef4444; }
.timeline-content.border-6 { border-left: 4px solid #f59e0b; }
.timeline-content.border-7 { border-left: 4px solid #06b6d4; }
.timeline-content.border-8 { border-left: 4px solid #84cc16; }
.timeline-content.border-9 { border-left: 4px solid #ec4899; }

.timeline-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
    color: #374151;
    line-height: 1.7;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-content li .number {
    position: absolute;
    left: 0;
    font-weight: bold;
}

.timeline-content li .number.color-1 { color: #f97316; }
.timeline-content li .number.color-2 { color: #3b82f6; }
.timeline-content li .number.color-3 { color: #10b981; }
.timeline-content li .number.color-4 { color: #8b5cf6; }
.timeline-content li .number.color-5 { color: #ef4444; }
.timeline-content li .number.color-6 { color: #f59e0b; }
.timeline-content li .number.color-7 { color: #06b6d4; }
.timeline-content li .number.color-8 { color: #84cc16; }
.timeline-content li .number.color-9 { color: #ec4899; }

.timeline-content p {
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 30px !important;
    }
    
    .timeline-item {
        flex-direction: column !important;
    }
    
    .timeline-year {
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    .timeline-content {
        margin-left: 0 !important;
    }
    
    .year-circle {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.875rem !important;
    }
}

/* ==========================================================================
   News Section Styles
   ========================================================================== */

.news-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.excerpt-short {
    display: block;
}

.excerpt-full {
    display: none;
}

.news-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-date {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.news-title {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.news-link {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: #ea580c;
}

.read-more-toggle {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.read-more-toggle:hover {
    color: #ea580c;
}

/* ==========================================================================
   Product Share Styles
   ========================================================================== */

.product-share {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.product-share h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.875rem;
}

.facebook-share {
    background: #1877f2;
}

.facebook-share:hover {
    background: #166fe5;
}

.line-share {
    background: #00C300;
}

.line-share:hover {
    background: #00B200;
}

.copy-link {
    background: #6b7280;
}

.copy-link:hover {
    background: #4b5563;
}

.share-btn:active {
    transform: scale(0.95);
}

#share-success {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #166534;
    font-size: 0.875rem;
}

#share-success.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

@media (max-width: 480px) {
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
        text-align: center;
    }
}

/* Full Content Display for Read More */
.full-content {
    display: none;
}

/* History Page Styles */
.history-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.history-section h2 {
    text-align: center;
    color: #f97316;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
}

.history-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
}

.history-item {
    display: flex;
    margin-bottom: 2.5rem;
    align-items: flex-start;
    gap: 2rem;
}

.history-year {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
    position: relative;
    flex-shrink: 0;
}

.history-year::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid #ea580c;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.history-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-list li {
    background: #f8fafc;
    margin-bottom: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #f97316;
    color: #374151;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.history-list li:hover {
    background: #f1f5f9;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.history-list li::before {
    content: counter(achievement-counter);
    counter-increment: achievement-counter;
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    background: #f97316;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.history-item {
    counter-reset: achievement-counter;
}

@media (max-width: 768px) {
    .history-section {
        padding: 2rem 1rem;
    }
    
    .history-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .history-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .history-year {
        align-self: flex-start;
        min-width: auto;
    }
    
    .history-year::after {
        display: none;
    }
}