@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

/* G01 Technology - Original Professional Style */
:root {
    --primary-color: #004a99;
    --primary-light: #e6f0ff;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: 'Source Sans 3', 'Noto Sans TC', "Microsoft JhengHei", sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: radial-gradient(#d1d5db 0.6px, transparent 0.6px);
    background-size: 24px 24px;
    margin: 0;
}

header {
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    margin-right: 12px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover:after, .nav-links a.active:after {
    width: 100%;
}

.hero {
    position: relative;
    height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-index {
    background-image: linear-gradient(135deg, rgba(0, 45, 91, 0.9) 0%, rgba(0, 20, 40, 0.5) 100%), url('images/2db361edc32a4b70044582b040d5e3ff.jpg');
}

.hero-about {
    height: 400px;
    background-image: linear-gradient(135deg, rgba(0, 45, 91, 0.85) 0%, rgba(0, 20, 40, 0.6) 100%), url('images/factory-gate.jpg');
}

.hero-products {
    height: 400px;
    background-image: linear-gradient(135deg, rgba(0, 45, 91, 0.85) 0%, rgba(0, 20, 40, 0.6) 100%), url('images/45084ccc015bf42b84051dc34b6914c1.jpg');
}

.hero h1 {
    font-weight: 700;
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: heroTextUp 1.2s ease-out;
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    opacity: 0.95;
    font-weight: 300;
    animation: heroTextUp 1.2s ease-out 0.2s backwards;
}

@keyframes heroTextUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 3rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    padding: 2.5rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: left;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.image-text-block {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.image-text-block:nth-child(even) {
    flex-direction: row-reverse;
}

.block-image {
    flex: 1;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background-color: #eee;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 1;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.block-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.block-text {
    flex: 1;
}

.stats-container {
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin-top: 4rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

footer {
    background-color: var(--secondary-color);
    color: rgba(255,255,255,0.8);
    padding: 5rem 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: left;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Photo Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    height: 200px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Timeline Design */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
    padding: 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #ddd;
    top: 0;
    bottom: 0;
    left: 140px;
}

.timeline-item {
    padding: 2.5rem 0;
    position: relative;
    display: flex;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease-out;
}

.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}

.timeline-date {
    width: 120px;
    padding-right: 30px;
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 5px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    left: 135px;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    top: 3.1rem;
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding-left: 50px;
    flex-grow: 1;
}

.timeline-content h4 {
    margin: 0 0 0.8rem 0;
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-weight: 700;
}

.timeline-content p {
    margin: 0;
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    /* 修復導航欄：強制不換行 */
    nav {
        padding: 0.6rem 1rem;
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.05rem; /* 稍微再縮小一點點確保空間 */
        white-space: nowrap;
        flex-shrink: 0;
    }

    .logo img {
        height: 28px;
        margin-right: 5px;
    }

    .nav-links { 
        gap: 0.5rem; 
        flex-shrink: 1;
    }

    .nav-links a { 
        font-size: 0.8rem; 
        white-space: nowrap; 
    }

    /* 修復大標背景 */
    .hero { 
        height: 350px !important;
        background-attachment: scroll !important;
        background-position: center center !important;
    }

    .hero-about, .hero-products { height: 280px !important; }
    .hero h1 { font-size: 1.8rem; padding: 0 1rem; }
    .hero p { font-size: 0.95rem; padding: 0 1rem; }

    /* 修復區塊佈局與圖片顯示 */
    .image-text-block, .image-text-block:nth-child(even) {
        flex-direction: column;
        gap: 1.5rem;
    }

    .block-image, .block-text {
        width: 100% !important;
        flex: none;
    }

    .slideshow-container {
        height: 250px !important;
        width: 100% !important;
        display: block !important;
        margin-bottom: 1rem;
    }

    .timeline::after { left: 15px; }
    .timeline-item { flex-direction: column; padding: 1.5rem 0 1.5rem 40px; }
    .timeline-date { text-align: left; width: auto; padding-bottom: 8px; margin-top: 0; }
    .timeline-item::after { left: 10px; top: 1.9rem; }
    .timeline-content { padding-left: 0; }
}
