/* ---------------------------------
   1. 变量与基础设置
--------------------------------- */
:root {
    --primary-color: #8B7355; /* 原木色 */
    --secondary-color: #A9BA9D; /* 浅绿色 */
    --accent-color: #E6A57E; /* 陶土色 */
    --background-light: #FAF7F2; /* 米白背景 */
    --white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    
    --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-script: 'Dancing Script', cursive;
    
    --transition-speed: 0.3s;
    --shadow-card: 0 5px 15px rgba(0,0,0,0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--background-light);
    line-height: 1.6;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
img { max-width: 100%; display: block; }

/* ---------------------------------
   2. 通用组件
--------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header .subtitle {
    color: var(--primary-color);
    font-size: 1.8rem;
    display: block;
    margin-bottom: 5px;
}

.section-header h3 {
    font-size: 2rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-header h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

.script-font {
    font-family: var(--font-script);
}

/* 按钮 */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    border: 2px solid var(--primary-color);
}

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

.btn-primary-nav {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 20px !important;
    border-radius: 20px;
}

.btn-primary-nav:hover {
    background-color: var(--accent-color);
}

/* ---------------------------------
   3. 动画类
--------------------------------- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------
   4. 导航栏
--------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s, padding 0.3s, box-shadow 0.3s;
    padding: 20px 0;
    background-color: transparent;
}

.navbar.scrolled {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* ---------------------------------
   5. 首屏 (Hero)
--------------------------------- */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('https://placehold.co/1920x1080/CCC/8B7355?text=Artistic+Studio+Background'); /* 替换为真实图片 */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* ---------------------------------
   6. 关于我们
--------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.values-list {
    margin-top: 30px;
}

.values-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.values-list .icon {
    font-size: 1.5rem;
    margin-right: 15px;
    background: var(--background-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--secondary-color);
}

.about-image img {
    border-radius: 10px;
    box-shadow: 20px 20px 0 var(--secondary-color);
}

/* ---------------------------------
   7. 服务项目
--------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.card-img {
    height: 200px;
    overflow: hidden;
    background-color: #eee;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    text-align: center;
}

.card-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-content .price {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---------------------------------
   8. 环境展示 (Grid)
--------------------------------- */
.env-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.env-item {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.env-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

/* ---------------------------------
   9. 作品展示 (Gallery)
--------------------------------- */
.gallery-filters {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: 1px solid var(--text-secondary);
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text-secondary);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(139, 115, 85, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay p {
    color: var(--white);
    font-weight: bold;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
}

/* ---------------------------------
   10. 预约与页脚
--------------------------------- */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-card);
}

.contact-info, .booking-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-info h3, .booking-form-container h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.info-item strong {
    min-width: 80px;
}

.map-placeholder img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
}

.booking-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-group.half {
    width: calc(50% - 8px);
}

.form-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input, .form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

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

.full-width {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

footer {
    background-color: #2c2c2c;
    color: #aaa;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links a {
    margin-left: 20px;
    color: #fff;
    font-size: 0.9rem;
}

/* ---------------------------------
   11. 灯箱效果 (Lightbox)
--------------------------------- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* ---------------------------------
   12. 移动端适配
--------------------------------- */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 60px;
        background-color: var(--white);
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.nav-active {
        transform: translateY(0);
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu-btn.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .mobile-menu-btn.toggle span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

    .hero h1 { font-size: 2.5rem; }
    .about-grid, .env-grid { grid-template-columns: 1fr; }
    .item-large { grid-column: span 1; grid-row: span 1; }
    
    .contact-wrapper { padding: 20px; }
    .form-group.half { width: 100%; }
    
    .footer-content { flex-direction: column; }
    .social-links a { margin: 0 10px; }
}