/* 传统习俗页面样式 */
.traditions-page {
    background: linear-gradient(135deg, #fff5f5 0%, #fff8f0 100%);
    min-height: 100vh;
}

/* 日历头部样式 */
.calendar-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.calendar-intro {
    color: #666;
    font-size: 1.1rem;
    margin-top: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* 新标题样式 */
.page-title {
    font-size: 2.5rem;
    color: var(--primary-red);
    text-align: center;
    margin: 2rem 0 1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.page-intro {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    margin: 0 auto 3rem;
    max-width: 800px;
    line-height: 1.6;
}

/* 月份容器样式 */
.month-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.month-section {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin: 2rem auto;
    max-width: 1200px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.month-section h2 {
    color: var(--primary-red);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.month-section h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--gold), var(--primary-red));
    margin: 0.8rem auto;
    border-radius: 3px;
}

.festival-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

.date-card {
    background: #fff;
    border: 1px solid rgba(232, 232, 232, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.date-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 122, 69, 0.3);
}

.date {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 122, 69, 0.1);
}

.lunar-date {
    display: block;
    font-size: 1.3rem;
    color: var(--primary-red);
    font-weight: bold;
    margin-bottom: 0.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.solar-date {
    display: block;
    font-size: 0.85rem;
    color: #888;
}

.festival-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0 0 1rem 0;
    text-align: center;
    padding: 0;
    position: relative;
}

.festival-desc {
    color: #666;
    line-height: 1.6;
    text-align: left;
    font-size: 0.95rem;
    margin: 0;
    padding: 0 0.2rem;
}

.highlight-text {
    background: linear-gradient(120deg, rgba(255, 223, 186, 0.4) 0%, rgba(255, 223, 186, 0.1) 100%);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-weight: 500;
}

/* 文章内容链接样式 */
.content-block a {
    color: #e63946;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.content-block a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #e63946;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.content-block a:hover {
    color: #c1121f;
}

.content-block a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 视觉隐藏类 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .festival-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .festival-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .festival-grid {
        grid-template-columns: 1fr;
    }
    
    .month-section {
        padding: 1rem;
        margin: 1rem;
    }
    
    .date-card {
        min-height: 120px;
    }
}

/* 卡片进入动画 */
.date-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--card-index) * 0.1s);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 无障碍支持 */
.date-card:focus-within {
    outline: 2px solid #ff7a45;
    outline-offset: 2px;
}

/* 打印样式优化 */
@media print {
    .month-container {
        display: block;
    }

    .month-section {
        break-inside: avoid;
        margin-bottom: 2rem;
        box-shadow: none;
    }

    .date-card {
        break-inside: avoid;
        border: 1px solid #000;
    }
}

/* 传统习俗详情页样式 */
.tradition-detail-page {
    background-color: #fff;
}

.content-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    /* display: grid; */
    grid-template-columns: 1fr 250px;
    gap: 2rem;
}

.tradition-article {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 1.8rem;
    color: #c41230;
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #333;
    margin: 1.5rem 0 1rem;
}

.custom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.custom-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.quick-nav {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-nav h3 {
    color: #c41230;
    margin-bottom: 1rem;
}

.quick-nav ul {
    list-style: none;
    padding: 0;
}

.quick-nav li {
    margin-bottom: 0.8rem;
}

.quick-nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.quick-nav a:hover {
    color: #c41230;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-article {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        display: none;
    }
    
    .tradition-article {
        padding: 1rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
}

.date-card a { 
    text-decoration: none; 
    color: inherit; 
    cursor: pointer;
}