/* 全局样式 */
:root {
    --primary-color: #8b5a2b;
    --secondary-color: #d4b78f;
    --dark-color: #333;
    --light-color: #f9f5f0;
    --white-color: #fff;
    --gray-color: #eee;
    --text-color: #555;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    font-size: 18px;
    color: var(--text-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #6d4722;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white-color);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
}

/* 关于我们 */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-text ul {
    margin-top: 20px;
    list-style: none;
}

.about-text ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-text ul li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 18px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 动画激活时的状态 */
.about-text.animate {
    opacity: 1;
    transform: translateX(0);
}

/* 服务 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-color);
}

/* 作品集 */
.portfolio-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    border-radius: 30px;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 90, 43, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--white-color);
    text-align: center;
    padding: 20px;
}

.portfolio-overlay h3 {
    font-size: 22px;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: var(--transition);
}

.portfolio-overlay p {
    margin-bottom: 15px;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.1s;
}

.portfolio-overlay .portfolio-view {
    width: 50px;
    height: 50px;
    background-color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    font-size: 20px;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.2s;
    text-decoration: none;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p,
.portfolio-item:hover .portfolio-overlay .portfolio-view {
    transform: translateY(0);
}

/* 客户评价 */
.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-slide {
    display: none;
    text-align: center;
    padding: 30px;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-content {
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-content p {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 30px;
    position: relative;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: 50px;
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
}

.testimonial-content p::before {
    top: -20px;
    left: -10px;
}

.testimonial-content p::after {
    bottom: -40px;
    right: -10px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-author img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.testimonial-author h4 {
    font-size: 20px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.testimonial-author span {
    color: var(--text-color);
    font-size: 14px;
}

.testimonial-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.testimonial-controls button {
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.testimonial-controls button:hover {
    background-color: #6d4722;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.testimonial-dots .dot {
    width: 12px;
    height: 12px;
    background-color: #ddd;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-dots .dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* 联系我们 */

.contact-info,
.contact-info h3,
.contact-info .info-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 动画激活时的状态 */
.contact-info.animate,
.contact-info.animate h3,
.contact-info.animate .info-item {
    opacity: 1;
    transform: translateX(0);
}

/* 为不同元素设置不同的延迟 */
.contact-info.animate h3 {
    transition-delay: 0.2s;
}

.contact-info.animate .info-item:nth-child(2) {
    transition-delay: 0.4s;
}

.contact-info.animate .info-item:nth-child(3) {
    transition-delay: 0.6s;
}

.contact-info.animate .info-item:nth-child(4) {
    transition-delay: 0.8s;
}

.contact-info.animate .info-item:nth-child(5) {
    transition-delay: 1s;
}
.contact-content {
    display: flex;
    gap: 50px;
    margin-top: 30px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-item i {
    color: var(--primary-color);
    font-size: 20px;
    margin-right: 15px;
    margin-top: 5px;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: var(--primary-color);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-5px);
}



/* 页脚 */
footer {
    background-color: #2a2118;
    color: var(--white-color);
    padding: 80px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-about .logo {
    color: var(--white-color);
    display: block;
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 20px;
    color: #bbb;
}

.footer-links h3,
.footer-services h3,
.footer-newsletter h3 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-services h3::after,
.footer-newsletter h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    bottom: 0;
    left: 0;
}

.footer-links ul,
.footer-services ul {
    list-style: none;
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-services ul li a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover,
.footer-services ul li a:hover {
    color: var(--white-color);
    padding-left: 5px;
}




.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #bbb;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-legal {
    margin-top: 15px;
}

.footer-legal a {
    color: #bbb;
    margin: 0 10px;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--white-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #6d4722;
    transform: translateY(-5px);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white-color);
    font-size: 40px;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white-color);
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info {
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: var(--transition);
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
    
    .testimonial-content {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 30px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 25px;
    }
    
    .section-title h2 {
        font-size: 26px;
    }
    
    .portfolio-filter {
        justify-content: flex-start;
    }
    
    .filter-btn {
        margin: 5px;
        padding: 8px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-about, 
    .footer-links, 
    .footer-services {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .footer-links ul, 
    .footer-services ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }

    
}

/* 小屏幕优化 (小于576px) */
@media (max-width: 576px) {
    .footer-about p {
        padding: 0 10px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }
}