/* style1.css - 名梅系列页面样式 */
/* 保持与主页一致的风格 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #4a6b8a;
    --accent-color: #e0c9a6;
    --light-bg: #f9f5f0;
    --text-color: #333;
    --text-light: #7f8c8d;
    --font-main: 'Noto Serif SC', serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #2c3e50, #4a6b8a);
    color: white;
    text-align: center;
    padding: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem; /* 增加底部间距 */
}


.logo h1 {
    font-size: 2.8rem;              /* 更大，突出古典气势 */
    margin: 0;
    letter-spacing: 4px;            /* 增加字距，更疏朗飘逸 */
    font-weight: 600;               /* 略重，营造书法厚重感 */
    font-family: 'Noto Serif SC', serif;
    /* color: #2c3e50; */
}

.logo p {
    font-size: 1.1rem;                /* 稍小，更显内敛 */
    margin: 10px 0 0;
    font-style: italic;             /* 斜体，营造诗意书卷感 */
    /* color: #666;                    更柔和的灰色，不喧宾夺主 */
    opacity: 0.85;
    font-family: 'Noto Serif SC', serif;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 20px 0 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 15px;
}

.main-nav a {
    color: white;
    padding: 5px 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.2rem;
}

.main-nav a:hover {
    color: #e0c9a6;
}

.main-nav a.active {
    font-weight: bold;
    color: #e0c9a6;
    border-bottom: 2px solid #e0c9a6;
}



/* 作品展示区域 */
main {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

.art-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.art-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--accent-color);
    text-align: center;
}

/* 自适应布局，不固定列数 */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.gallery-item {
    flex: 1 1 200px;
    max-width: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 1rem;
    opacity: 0;
    transition: var(--transition);
    transform: translateY(100%);
    text-align: center;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem;
}

.modal-image-wrapper {
    display: flex;
    max-width: 90%;
    max-height: 80vh;
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-description {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    color: var(--text-color);
    box-shadow: var(--shadow);
}

.modal-description h3 {
    color: var(--primary-color);
    margin-top: 0;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--accent-color);
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 1rem;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 4px;
    transition: var(--transition);
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--accent-color);
}

.prev {
    left: 2rem;
}

.next {
    right: 2rem;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}







@media (max-width: 1024px) {
    .flex-layout {
        flex-direction: column;
        gap: 25px;
    }
    
    .sidebar-left, .series-overview, .sidebar-right {
        width: 100%;
    }
    
    .author-intro {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: clamp(1.4rem, 5.5vw, 2rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo p {
        font-size: clamp(0.9rem, 3vw, 1rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-nav ul {
        flex-wrap: wrap;                 
        justify-content: center;
        gap: 8px 12px;
        padding: 10px 15px;
        overflow: visible;              
    }

    .main-nav a {
        font-size: clamp(0.75rem, 2.5vw, 1rem);
        padding: 4px 8px;
        white-space: nowrap;
    }

    .image-container {
        height: 150px;
    }
}