/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
    overflow-x: hidden;
    width: 100%;
    /* 防止溢出 */
}

h1,
h2,
h3,
.serif {
    font-family: var(--font-serif);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Navigation & Header --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 导航栏滚动后的样式，由 JS 切换 */
nav.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a {
    display: inline-block;
}

.nav-links a:hover {
    transform: translateY(-3px);
    color: inherit;
}

/* --- Hamburger Menu & Mobile Nav --- */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Mobile Nav Styles */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
        /* 防止横向滚动 */
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: var(--nav-height);
        background-color: rgba(255, 255, 255, 0.98);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -2px 5px 15px rgba(0, 0, 0, 0.1);
        padding-top: 50px;
        z-index: 999;
    }

    .nav-links li {
        opacity: 0;
        margin: 30px 0;
    }

    .hamburger {
        display: block !important;
    }
}

.nav-active {
    transform: translateX(0%) !important;
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.nav-active li {
    animation: navLinkFade 0.5s ease forwards 0.3s;
}

/* Hamburger Animation */
.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle span:nth-child(2) {
    opacity: 0;
}

.toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* --- Page Header (Subpages) --- */
.page-header {
    height: 40vh;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    margin-top: var(--nav-height);
    /* 增加顶部外边距，避开 fixed 导航栏 */
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(transparent, var(--bg-color));
}

/* --- 现代入场动画 --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sections --- */
section {
    padding: 120px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 2.2rem;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.section-title p {
    color: var(--accent-color);
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
}

/* --- Cards (Works & Services) --- */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #f1f5f9;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.btn {
    display: inline-block;
    padding: 16px 48px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.1em;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* --- Table & Form --- */
.company-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.company-table th,
.company-table td {
    padding: 20px 25px;
    /* 增加内边距，防止内容拥挤 */
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    /* 确保内容顶部对齐 */
}

.company-table th {
    width: 30%;
    /* 固定标题列宽度 */
    background: #f8fafc;
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
    /* 防止标题换行 */
}

.company-table tr:last-child td,
.company-table tr:last-child th {
    border-bottom: none;
}

/* 移动端适配 */
@media (max-width: 600px) {

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background: #f1f5f9;
        padding-bottom: 5px;
    }

    .company-table td {
        padding-top: 5px;
        padding-bottom: 25px;
        border-bottom: 1px solid #e2e8f0;
    }
}



/* Form Layout - Vertical Stack */
.form-group {
    display: block;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    margin-right: 0;
    padding-top: 0;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* --- Footer --- */
footer {

    padding: 80px 10% 40px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
}

footer p {
    font-size: 0.85rem;
    opacity: 0.6;
}