* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f0f4f8;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

.csrl {
    background: url(../picture/ldxxbg.png) no-repeat center center;
    background-size: cover;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 45px 20px 30px;
    font-size: 14px;
    color: #666;
}

.breadcrumb .location-icon {
    color: #1e5aa8;
    margin-right: 5px;
}

.breadcrumb .location-icon img {
    width: 18px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #1e3a8a;
}

.breadcrumb .current {
    color: #1e3a8a;
    font-weight: 500;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

/* ==================== 头部区域 ==================== */
.header-section {
    max-width: 1400px;
    margin: 0 auto 30px;
    display: flex;
    gap: 0;
    padding: 25px;
    background: url(../image/csrltopbg.png) no-repeat center center;
    background-size: 100% 100%;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 左侧标题区域 */
.header-left {
    flex: 1;
    position: relative;
    min-height: 280px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding-top: 50px;
}

.header-title {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* 右侧日历区域 */
.header-right {
    width: 60%;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px 30px;
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    max-width: 820px;
    min-width: 600px;
    padding: 20px 24px;
    border-radius: 8px;
}

.calendar-header {
    width: 90%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-month {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #666;
    font-size: 12px;
    touch-action: manipulation;
}

.calendar-nav button:hover {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

.calendar-nav button:active {
    transform: scale(0.95);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.calendar-weekdays div {
    padding: 8px 0;
    font-family: MicrosoftYaHei;
    font-size: 20px;
    color: #999999;
    line-height: 26px;
    text-align: center;
    font-style: normal;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    justify-items: center;
}

/* 日期格子 - 带农历 */
.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    position: relative;
    touch-action: manipulation;
    height: 64px;
    width: 48px;
    background: #fafbfc;
    border: 1px solid transparent;
    font-family: MicrosoftYaHei;
    font-size: 20px;
    color: #000000;
    text-align: center;
    font-style: normal;
}

.calendar-day:hover {
    background: #e0e7ff;
}

.calendar-day:active {
    transform: scale(0.95);
}

.calendar-day.other-month {
    color: #ccc;
    background: transparent;
}

.calendar-day.other-month:hover {
    background: #f3f4f6;
}

/* 公历日期 */
.day-number {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
}

/* 农历/节假日文字 */
.day-lunar {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    line-height: 1.2;
    white-space: nowrap;
    //overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 节假日红色 */
.day-lunar.holiday {
    color: #dc2626;
    font-weight: 500;
}

/* 节气绿色 */
.day-lunar.solar-term {
    color: #059669;
    font-weight: 500;
}

/* 红点标记 */
.calendar-day.has-dot::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 5px;
    height: 5px;
    background: #dc2626;
    border-radius: 50%;
}

.calendar-day.today {
    background: #1e3a8a;
    color: #fff;
}

.calendar-day.today .day-lunar {
    color: rgba(255, 255, 255, 0.8);
}

.calendar-day.today .day-lunar.holiday,
.calendar-day.today .day-lunar.solar-term {
    color: #fca5a5;
}

.calendar-day.selected {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #1e3a8a;
}

.calendar-day.selected .day-lunar {
    color: #1e3a8a;
}

.calendar-day.no-data {
    color: #ccc;
    pointer-events: none;
}

.calendar-day.no-data::after {
    display: none;
}

/* 未来日期禁用 */
.calendar-day.future {
    color: #d1d5db;
    cursor: default;
    background: transparent;
}

.calendar-day.future .day-lunar {
    color: #d1d5db;
}

.calendar-day.future:hover {
    background: transparent;
    border-color: transparent;
}

/* ==================== 稿件列表 ==================== */
.content-section {
    max-width: 1400px;
    margin: 0 auto;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-card {
    height: 180px;
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    transition: all 0.3s;
    cursor: pointer;
    touch-action: manipulation;
    background: #F7F9FF;
    border: 1px solid rgba(153, 153, 153, 0.4);
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-card:active {
    transform: scale(0.98);
}

.article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag a {
    width: 120px;
    height: 32px;
    display: inline-block;
    font-family: MicrosoftYaHei;
    font-size: 16px;
    color: #3A4890;
    line-height: 32px;
    text-align: center;
    font-style: normal;
    white-space: nowrap;
    background: url(../image/csrlbg1.png) no-repeat center;
    background-size: contain;
}

.article-date {
    font-family: MicrosoftYaHei;
    font-size: 16px;
    color: #666666;
    line-height: 21px;
    text-align: center;
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.article-date::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233A4890' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.article-title {
    font-family: MicrosoftYaHei;
    font-size: 20px;
    color: #333333;
    line-height: 36px;
    text-align: left;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

/* ==================== 空状态 ==================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    font-size: 14px;
    flex-wrap: wrap;
}

.pagination-info {
    color: #666;
    margin-right: 10px;
}

.pagination-info span {
    color: #dc2626;
    font-weight: 600;
}

.pagination button,
.pagination select {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    transition: all 0.3s;
    touch-action: manipulation;
    min-height: 40px;
}

.pagination button:hover:not(:disabled) {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

.pagination button:active:not(:disabled) {
    transform: scale(0.95);
}

.pagination button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination button.active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

.pagination select {
    padding: 8px 12px;
    outline: none;
    min-width: 60px;
}

.pagination select:focus {
    border-color: #1e3a8a;
}

/* ==================== 隐藏数据源 ==================== */
#wcm-data-source {
    display: none;
}

/* ==================== 日期范围提示 ==================== */
.date-range-info {
    max-width: 1400px;
    margin: 0 auto 15px;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
}

.date-range-info span {
    color: #1e3a8a;
    font-weight: 600;
}

/* ==================== 手机端适配 ==================== */
@media screen and (max-width: 768px) {
    .breadcrumb {
        padding: 10px 15px;
        font-size: 12px;
    }

    .breadcrumb .separator {
        margin: 0 5px;
    }

    .header-section {
        flex-direction: column;
        margin: 0 10px 20px;
        padding: 0;
        border-radius: 12px;
    }

    .header-left {
        min-height: 160px;
    }

    .header-left .header-title img {
        width: 40vw;
    }

    .header-right {
        width: 100%;
        padding: 15px;
        min-width: 0;
        max-width: 100%;
    }

    .calendar-header {
        margin-bottom: 12px;
    }

    .calendar-month {
        font-size: 16px;
    }

    .calendar-nav button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .calendar-weekdays div {
        font-size: 13px;
        padding: 6px 0;
    }

    .calendar-day {
        font-size: 14px;
        height: 54px;
        padding-top: 3px;
    }

    .day-number {
        font-size: 14px;
    }

    .day-lunar {
        font-size: 10px;
    }

    .calendar-day.has-dot::after {
        width: 4px;
        height: 4px;
        bottom: 3px;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .article-card {
        padding: 15px;
        border-radius: 10px;
    }

    .article-header {
        margin-bottom: 10px;
    }

    .article-tag a {
        padding: 3px 12px;
        font-size: 16px;
        line-height: 25px;
    }

    .article-date {
        font-size: 16px;
    }

    .article-title {
        font-size: 18px;
        line-height: 1.6;
    }

    .pagination {
        gap: 6px;
        margin: 25px 0;
        padding: 0 10px;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 13px;
    }

    .pagination button,
    .pagination select {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 36px;
    }

    .pagination select {
        min-width: 50px;
    }

    .date-range-info {
        padding: 0 15px;
        font-size: 13px;
    }
}

/* ==================== 超小屏幕适配 ==================== */
@media screen and (max-width: 375px) {
    .header-left {
        min-height: 130px;
    }

    .header-left .header-title img {
        width: 50vw;
    }

    .header-right {
        padding: 12px;
    }

    .calendar-day {
        height: 48px;
    }

    .day-number {
        font-size: 13px;
    }

    .day-lunar {
        font-size: 9px;
    }

    .article-tag a {
        padding: 2px 10px;
        font-size: 14px;
    }

    .article-title {
        font-size: 16px;
    }
}

/* ==================== 620px以下超小屏幕适配 ==================== */
@media screen and (max-width: 620px) {
    #calendarContainer {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 10px !important;
    }

    .header-right {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 10px !important;
    }

    .calendar-header {
        margin-bottom: 8px;
    }

    .calendar-month {
        font-size: 14px;
    }

    .calendar-nav button {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .calendar-weekdays {
        margin-bottom: 6px;
    }

    .calendar-weekdays div {
        font-size: 14px;
        padding: 4px 0;
        line-height: 20px;
    }

    .calendar-days {
        gap: 2px;
    }

    .calendar-day {
        min-height: 36px;
        height: 36px;
        font-size: 14px;
        border-radius: 4px;
    }

    .day-number {
        font-size: 14px;
    }

    .day-lunar {
        /* display: none; */
    }

    .calendar-day.has-dot::after {
        width: 3px;
        height: 3px;
        bottom: 2px;
    }
}

/* ==================== 平板适配 ==================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .header-section {
        margin: 0 15px 25px;
    }

    .header-right {
        width: 400px;
        padding: 20px;
    }

    .article-grid {
        gap: 15px;
    }

    .article-card {
        padding: 18px 20px;
    }
}

/* ==================== 横屏手机优化 ==================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .header-left {
        min-height: 120px;
    }
}

/* ==================== 安全区域适配 ==================== */
@supports (padding-top: env(safe-area-inset-top)) {
    @media screen and (max-width: 768px) {
        .breadcrumb {
            padding-top: calc(25px + env(safe-area-inset-top));
        }
    }
}

/* ==================== 深色模式适配 ==================== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }

    .header-section,
    .article-card {
        background: #1e293b;
    }

    .article-title {
        color: #e2e8f0;
    }

    .header-right {
        background: rgba(30, 41, 59, 0.95);
    }

    .calendar-month {
        color: #e2e8f0;
    }

    .calendar-day {
        color: #e2e8f0;
        background: #1e293b;
    }

    .calendar-day.other-month {
        color: #64748b;
        background: transparent;
    }

    .calendar-day.future {
        color: #475569;
    }

    .calendar-day.future .day-lunar {
        color: #475569;
    }

    .day-lunar {
        color: #94a3b8;
    }

    .calendar-nav button {
        background: #1e293b;
        border-color: #475569;
        color: #94a3b8;
    }

    .pagination button,
    .pagination select {
        background: #1e293b;
        border-color: #475569;
        color: #e2e8f0;
    }

    .date-range-info {
        color: #94a3b8;
    }
}