/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #FFF5EE;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    background-color: #8B0000;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 导航栏样式 */
.nav {
    background-color: #A52A2A;
    padding: 10px 0;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px 15px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: #DAA520;
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 主页特定样式 */
.index-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.index-main {
    position: relative;
    margin-bottom: 40px;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.index-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.index-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.index-main-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.index-main-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.index-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.index-item:hover {
    transform: translateY(-10px);
}

.index-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.index-item-content {
    padding: 20px;
    background: linear-gradient(to top, #fff, rgba(255,255,255,0.9));
}

.index-item h3 {
    color: #8B0000;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
}

.index-item p {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.index-item a {
    display: block;
    text-align: center;
    color: #8B0000;
    text-decoration: none;
    padding: 10px;
    border: 2px solid #8B0000;
    border-radius: 5px;
    transition: all 0.3s;
}

.index-item a:hover {
    background: #8B0000;
    color: #fff;
}

.index-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    opacity: 0.1;
    pointer-events: none;
}

.index-decoration.top-left {
    top: 20px;
    left: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q50,10 90,50" stroke="%238B0000" fill="none" stroke-width="2"/></svg>');
}

.index-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q50,90 90,50" stroke="%238B0000" fill="none" stroke-width="2"/></svg>');
}

/* 书法页面特定样式 */
.calligraphy-gallery {
    position: relative;
}

.calligraphy-section {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 40px;
    position: relative;
    background: linear-gradient(to right, rgba(255,245,238,0.9), rgba(255,245,238,0.95));
}

.calligraphy-section:nth-child(even) {
    flex-direction: row-reverse;
    background: linear-gradient(to left, rgba(255,245,238,0.9), rgba(255,245,238,0.95));
}

.calligraphy-image {
    flex: 0 0 50%;
    padding: 20px;
}

.calligraphy-image img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.calligraphy-image img:hover {
    transform: scale(1.02);
}

.calligraphy-content {
    flex: 0 0 50%;
    padding: 40px;
    position: relative;
}

.calligraphy-content::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #DAA520;
}

.calligraphy-section:nth-child(odd) .calligraphy-content::before {
    left: 0;
}

.calligraphy-section:nth-child(even) .calligraphy-content::before {
    right: 0;
}

.calligraphy-content h3 {
    font-size: 2.5em;
    color: #8B0000;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.calligraphy-content p {
    font-size: 1.2em;
    line-height: 2;
    margin-bottom: 30px;
    text-align: justify;
    padding: 0 20px;
}

.calligraphy-content a {
    display: inline-block;
    color: #8B0000;
    text-decoration: none;
    padding: 12px 30px;
    border: 2px solid #8B0000;
    border-radius: 5px;
    font-size: 1.1em;
    transition: all 0.3s;
    margin-left: 20px;
}

.calligraphy-content a:hover {
    background: #8B0000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139,0,0,0.2);
}

.calligraphy-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    opacity: 0.1;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
}

.calligraphy-decoration.top-left {
    top: 20px;
    left: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q50,10 90,50" stroke="%238B0000" fill="none" stroke-width="2"/></svg>');
}

.calligraphy-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q50,90 90,50" stroke="%238B0000" fill="none" stroke-width="2"/></svg>');
}

/* 国画页面特定样式 */
.painting-container {
    column-count: 2;
    column-gap: 20px;
    padding: 20px;
}

.painting-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
}

/* 戏曲页面特定样式 */
.opera-container {
    display: flex;
    gap: 30px;
    padding: 20px;
}

.opera-left {
    flex: 1;
}

.opera-right {
    flex: 1;
}

.opera-item {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
}

/* 茶艺页面特定样式 */
.tea-container {
    padding: 20px;
}

.tea-item {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.tea-item:nth-child(even) {
    flex-direction: row-reverse;
}

.tea-image {
    flex: 0 0 50%;
}

.tea-content {
    flex: 1;
    padding: 20px;
}

/* 建筑页面特定样式 */
.architecture-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 150px);
    gap: 20px;
    padding: 20px;
}

.architecture-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.architecture-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* 宫殿建筑 - 大尺寸 */
.architecture-item:nth-child(1) {
    grid-column: span 4;
    grid-row: span 3;
}

/* 园林建筑 - 中等尺寸 */
.architecture-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 3;
}

/* 民居建筑 - 中等尺寸 */
.architecture-item:nth-child(3) {
    grid-column: span 3;
    grid-row: span 3;
}

/* 寺庙建筑 - 中等尺寸 */
.architecture-item:nth-child(4) {
    grid-column: span 3;
    grid-row: span 3;
}

.architecture-item img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.architecture-item:hover img {
    transform: scale(1.05);
}

.architecture-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.architecture-item:hover .architecture-content {
    transform: translateY(0);
}

.architecture-content h3 {
    color: #8B0000;
    font-size: 1.8em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.architecture-content p {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.architecture-content a {
    display: inline-block;
    color: #8B0000;
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid #8B0000;
    border-radius: 5px;
    transition: all 0.3s;
}

.architecture-content a:hover {
    background: #8B0000;
    color: #fff;
}

.architecture-decoration {
    position: absolute;
    width: 50px;
    height: 50px;
    opacity: 0.1;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.architecture-decoration.top-left {
    top: 10px;
    left: 10px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,80 L50,20 L80,80 Z" stroke="%238B0000" fill="none" stroke-width="2"/></svg>');
}

.architecture-decoration.bottom-right {
    bottom: 10px;
    right: 10px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,20 L80,20 L50,80 Z" stroke="%238B0000" fill="none" stroke-width="2"/></svg>');
}

/* 通用图片样式 */
.grid-item img,
.calligraphy-item img,
.painting-item img,
.opera-item img,
.tea-image img,
.architecture-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* 页脚样式 */
.footer {
    background-color: #8B0000;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* 内容页样式 */
.content-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.content-container img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 5px;
} 