/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f3f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
nav {
    background-color: #f0d9c9;
    color: #333;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-links a i {
    margin-right: 8px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.nav-links a:hover i {
    transform: scale(1.1);
}

.nav-links a:hover {
    color: #666;
}

.nav-links a.active {
    background-color: #f0d9c9;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a.active:hover {
    background-color: #e8c5b0;
    color: #333;
}

/* 页面标题样式 */
h1 {
    font-size: 2rem;
    margin: 20px 0;
    color: #333;
}

/* 相片集样式 */
.gallery {
    margin: 30px 0;
}

.gallery-section {
    margin-bottom: 40px;
}

.gallery-section h2 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #555;
}

.gallery-section h3 {
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #666;
}

.gallery-section h4 {
    font-size: 1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #777;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1) contrast(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
    opacity: 0.95;
}

.gallery-item h3 {
    padding: 15px;
    font-size: 1rem;
    color: #333;
}

/* 嵌套相片集样式 */
.nested-gallery {
    margin-top: 20px;
    padding-left: 20px;
    border-left: 2px solid #ddd;
}

/* 轮播组件样式 */
.carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }

    .nav-links {
        margin-top: 15px;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}