/* 文件级注释：粤木子路灯官网样式表 */
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 导航栏样式 */
.header {
    background-color: #1a1a2e;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #00bfff;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #fff;
}

/* 英雄区域样式 */
.hero {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 70px;
}

/* 首页hero背景 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('docs/太阳能路灯产品-实物图3.png');
}

/* 产品页hero背景 */
.product-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('docs/太阳能路灯产品-实物图3.png');
    height: 30vh;
}

/* 案例页hero背景 */
.case-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('docs/工程案例1.png');
    height: 30vh;
}

/* 联系我们页hero背景 */
.contact-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('docs/太阳能路灯产品-实物图.png');
    height: 30vh;
}

/* 非首页hero-content样式调整 */
.product-hero .hero-content h2,
.case-hero .hero-content h2,
.contact-hero .hero-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-hero .hero-content p,
.case-hero .hero-content p,
.contact-hero .hero-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn-primary {
    background-color: #00bfff;
    color: #fff;
    border: 2px solid #00bfff;
}

.btn-primary:hover {
    background-color: transparent;
    color: #00bfff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #00bfff;
    border: 2px solid #00bfff;
}

.btn-secondary:hover {
    background-color: #00bfff;
    color: #fff;
    transform: translateY(-2px);
}

/* 标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    position: relative;
}

.line {
    width: 100px;
    height: 3px;
    background-color: #00bfff;
    margin: 0 auto;
    border-radius: 2px;
}

/* 公司概况样式 */
.about {
    padding: 6rem 0;
    background-color: #fff;
}

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

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #666;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 核心优势样式 */
.features {
    padding: 6rem 0;
    background-color: #f8f9fa;
}

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

.feature-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: #00bfff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.feature-item p {
    color: #666;
}

/* 产品预览样式 */
.products-preview {
    padding: 6rem 0;
    background-color: #fff;
}

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

.product-item {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

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

.product-item:hover img {
    transform: scale(1.05);
}

.product-item h3 {
    padding: 1.5rem;
    text-align: center;
    color: #1a1a2e;
    font-size: 1.2rem;
}

.view-more {
    text-align: center;
}

/* 页脚样式 */
.footer {
    background-color: #1a1a2e;
    color: #fff;
    padding: 4rem 0 2rem;
}

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

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00bfff;
}

.footer-info p {
    color: #ccc;
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #00bfff;
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00bfff;
}

.footer-contact p {
    color: #ccc;
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #ccc;
}

/* 产品页面样式 */
.products {
    padding: 6rem 0;
    background-color: #fff;
    margin-top: 70px;
}

.products-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-full {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

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

.product-full:hover img {
    transform: scale(1.05);
}

.product-full h3 {
    padding: 1rem;
    text-align: center;
    color: #1a1a2e;
    font-size: 1.1rem;
    background-color: #fff;
}

/* 案例页面样式 */
.cases {
    padding: 6rem 0;
    background-color: #fff;
    margin-top: 70px;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.case-item {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.case-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.case-content {
    padding: 1.5rem;
}

.case-content h3 {
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.case-content p {
    color: #666;
    margin-bottom: 1rem;
}

/* 联系我们样式 */
.contact {
    padding: 6rem 0;
    background-color: #fff;
    margin-top: 70px;
}

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

.contact-info h3 {
    color: #1a1a2e;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: #00bfff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-details p {
    color: #666;
    margin: 0;
}

.contact-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    color: #1a1a2e;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00bfff;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #00bfff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #0099cc;
    transform: translateY(-2px);
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #1a1a2e;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

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

    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

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

    .about-text p {
        font-size: 1rem;
    }

    .products-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }
}