/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-dark: #1a202c;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 辅助功能类 - SEO 和无障碍优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 首页横幅 */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/mxene/DSC_0550.JPG') center/cover no-repeat;
    opacity: 0.2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

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

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

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

.btn-detail {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    margin-top: 1rem;
    width: 100%;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 关于我们 */
.about-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
    text-align: justify;
}

.timeline {
    list-style: none;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.timeline li {
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -2.3rem;
    top: 5px;
    width: 15px;
    height: 15px;
    background: var(--white);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.timeline-content {
    color: var(--text-light);
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

/* 产品中心 */
.products-section {
    padding: 5rem 0;
    background: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 250px);
}

.product-info h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.product-info > p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-features {
    list-style: none;
    margin-bottom: 1rem;
    flex: 1;
}

.product-features li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 产品详情弹窗 */
.product-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.modal-body h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-body .product-detail-image {
    width: 100%;
    height: 400px;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
}

.modal-body .product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.modal-body ul {
    list-style: none;
    margin-bottom: 1rem;
}

.modal-body ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dark);
}

.modal-body ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 联系我们 */
.contact-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.contact-content {
    margin-top: 2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.8;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* 页脚 */
.footer {
    background: var(--bg-dark);
    color: var(--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 h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section ul {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

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

.footer-section ul li {
    padding: 0.3rem 0;
}

.footer-section a,
.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover,
.footer-bottom a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        transition: all 0.3s ease;
    }

    .navbar.scrolled .container {
        padding: 0.5rem 15px;
    }

    .navbar.scrolled .logo img {
        height: 30px;
    }

    .navbar.scrolled .logo-text {
        font-size: 1rem;
    }

    .logo img {
        height: 40px;
        transition: height 0.3s ease;
    }

    .logo-text {
        font-size: 1.3rem;
        transition: font-size 0.3s ease;
    }

    .nav-links {
        position: fixed;
        top: 100%;
        left: auto;
        right: 0;
        width: 50%;
        background: var(--white);
        flex-direction: column;
        max-height: 0;
        padding: 0;
        box-shadow: var(--shadow);
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-links.active {
        max-height: 250px;
        padding: 0.5rem 0;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        padding: 0.4rem 1rem;
        font-size: 0.95rem;
        display: block;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
        padding: 10px;
        margin: -10px;
    }

    .hero {
        padding: 80px 0 60px;
        min-height: auto;
        height: auto;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .about-content,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .about-card {
        padding: 1.5rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-info h3 {
        font-size: 1.1rem;
    }

    .product-info > p {
        font-size: 0.9rem;
    }

    .product-features li {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-title::after {
        width: 60px;
        bottom: -10px;
    }

    .contact-section {
        padding: 3rem 0;
    }

    .contact-item {
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section {
        padding: 1rem 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-description {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        padding: 0 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .product-image {
        height: 180px;
    }

    .about-section,
    .products-section,
    .contact-section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 15px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 滚动时导航栏效果 */
.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled .container {
    padding: 0.5rem 20px;
}
