/* --- 基礎設定 (Reset & Variables) --- */
:root {
    --primary-color: #2563eb; /* 科技藍 - 核心品牌色 */
    --primary-hover: #1d4ed8; /* 深一點的藍色用於 Hover */
    --secondary-color: #0f172a; /* 極深藍灰 - 用於標題與背景 */
    --text-color: #334155; /* 內文深灰 */
    --bg-light: #f8fafc; /* 極淺藍灰背景 */
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 更滑順的過渡效果 */
    --font-main: 'Exo', 'Roboto', sans-serif; /* 科技感字體 */
}

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

html {
    scroll-behavior: smooth; /* 點擊導航連結時平滑滾動 */
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased; /* 讓字體在 Mac 上更清晰 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- 導航欄 (Flexbox) --- */
header {
    background-color: rgba(255, 255, 255, 0.95); /* 輕微透明 */
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 55px;
    width: auto;
}

.logo span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 700;
    color: var(--secondary-color);
    transition: var(--transition);
    font-size: 1.1rem;
}

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

/* --- Hero 區塊 (加大版) --- */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), url('images/AI-biomaterials.jpeg');
    background-size: cover;
    background-position: center;
    padding: 12rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.hero-logo {
    width: 180px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.4));
}

/* --- 關於我們區塊 (Flexbox) --- */
.about-section {
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.8)), url('images/Programmable-molecule-video.jpg');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem 6rem;
    color: #e2e8f0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-video-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 3rem;
    height: 50vh;
    min-height: 320px;
    overflow: hidden;
    background: #0f172a;
}

.about-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.about-container {
    width: 100%;
    padding: 0 5%;
    margin: 0 auto;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.about-content {
    flex: 1;
}

.about-content p {
    font-size: 1.1rem;
    color: #cbd5e1; /* 調整內文顏色以適應深色背景 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.about-section .section-title {
    color: var(--white); /* 標題改為白色 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: left;
    font-size: 2.5rem; /* 縮小標題 */
    line-height: 1.2;
}

.about-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.2); /* 改為藍色科技感光暈 */
    border: 1px solid #1e293b; /* 深色邊框 */
}

/* --- About 平台視覺 (MolForge) --- */
.platform-tagline {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

.about-platform-tagline {
    margin-top: 1rem;
}

.about-section .about-container {
    margin-bottom: 0;
}

/* --- 服務區塊 (CSS Grid) --- */
.services {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.25rem;
    color: var(--secondary-color);
    font-weight: 700;
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

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

.service-card p {
    color: #64748b;
    line-height: 1.7;
}

/* --- Solutions 頁面專屬樣式 --- */
.solutions-section {
    padding-bottom: 6rem;
    background-color: #020617; /* 深黑藍背景 */
    color: #e2e8f0;
}

.solutions-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/Programmable-molecule-video.jpg');
    background-size: cover;
    background-position: center;
    padding: 6rem 2rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 4rem;
}

.solutions-hero h2 {
    font-size: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.process-steps {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.step-card {
    background: #0f172a; /* 深藍灰卡片背景 */
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #1e293b;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

/* Solutions 區塊內的文字顏色覆蓋 */
.solutions-section .section-title {
    color: var(--white);
}

.solutions-section .about-content p {
    color: #cbd5e1;
}

.solutions-section .step-card h3 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.step-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.step-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.solutions-section .step-card p {
    color: #94a3b8;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-top: -3rem;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* --- Contact 聯絡我們區塊 --- */
.contact-section {
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.8)), url('images/Programmable-molecule-video.jpg');
    background-size: cover;
    background-position: center;
    padding: 6rem 2rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-wrap {
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    padding: 2.5rem 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.contact-section .section-title {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.contact-intro {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 2rem;
}

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

.contact-form label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-form .required {
    color: #dc2626;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--secondary-color);
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #94a3b8;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.contact-form .btn-submit {
    width: 100%;
    margin-top: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1.05rem;
}

/* --- Team 主要負責人畫布 --- */
.team-section .team-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.team-intro {
    text-align: center;
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.team-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.team-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
}

.team-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    width: 220px;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.2);
}

.team-card-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-card-photo:has(img) .team-photo-placeholder {
    display: none;
}

.team-photo-placeholder {
    color: #475569;
    width: 48%;
    height: 48%;
}

.team-photo-placeholder svg {
    width: 100%;
    height: 100%;
}

.team-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.35rem;
}

.team-card-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-card-bio {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

/* --- Mission / CTA Section --- */
.mission-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 6rem 2rem;
    text-align: center;
}

.mission-inner {
    max-width: 720px;
    margin: 0 auto;
}

.mission-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.mission-section h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.mission-section p {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.75;
    margin-bottom: 2.5rem;
}

/* --- Footer --- */
footer {
    background-color: var(--secondary-color);
    color: #94a3b8;
    text-align: center;
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    font-size: 0.9rem;
}

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

.social-links a {
    color: #94a3b8;
    transition: var(--transition);
}

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

/* --- RWD 手機版優化 (Mobile Responsive) --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 1.5rem;
        font-size: 0.9rem;
        flex-wrap: wrap; /* 防止小螢幕換行問題 */
    }

    .hero {
        padding: 5rem 1.5rem;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about-container {
        flex-direction: column;
        gap: 2.5rem;
    }

    .about-image {
        max-width: 100%;
    }

    .about-content {
        text-align: center;
    }

    .about-content .section-title {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .services {
        padding: 4rem 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-wrap {
        padding: 1.75rem 1.5rem;
    }

    .contact-section .section-title {
        font-size: 1.75rem;
    }

    .contact-intro {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .about-video-wrap {
        margin-bottom: 2rem;
    }

    .team-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .team-card {
        width: 100%;
        max-width: 280px;
    }

    .team-intro {
        margin-bottom: 2rem;
    }
}
