@charset "utf-8";
/* 
  Theme Name: QiMeng
  Theme URL: http://www.qimengkf.com/
  Description: 启梦语言康复中心专业从事特殊教育。
  Author: XZH
  Author URI: http://www.qimengkf.com/
  Version: 1.0
*/

@charset "utf-8";

/* ==========================================================================
   1. 全局变量与基础样式
   ========================================================================== */
:root {
    --primary-color: #FF9F43; /* 暖橙 */
    --secondary-color: #FF6B6B; /* 活泼红 */
    --bg-color: #FFFDF5; /* 米黄背景 */
    --text-color: #555;
}

body {
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
}

/* 链接去除下划线默认样式 */
a { text-decoration: none; }

/* ==========================================================================
   2. 导航栏 (Navbar)
   ========================================================================== */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary-color);
}

.nav-link {
    color: #555;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 18px !important;
    margin: 0 2px;
    transition: all 0.3s;
}

/* 导航选中与悬停状态 */
.navbar-nav .nav-link.active, 
.navbar-nav .nav-link:hover {
    background-color: var(--primary-color);
    color: #fff !important;
    border-radius: 20px;
}

/* ==========================================================================
   3. 轮播图 (Carousel) - 首页专用
   ========================================================================== */
.carousel-item img {
    height: 420px;
    object-fit: cover;
    border-radius: 0 0 20px 20px;
}

/* 轮播标题背景框 */
.carousel-caption {
    bottom: 40px;
    background: rgba(255, 159, 67, 0.85);
    border-radius: 30px;
    padding: 10px 30px;
    display: inline-block;
    max-width: 80%;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: bottom 0.3s ease;
}

.carousel-caption h5 {
    margin: 0;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: none;
    color: #fff;
}

/* 指示器（小白点） */
.carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--primary-color);
    height: 4px;
    border-radius: 2px;
    width: 25px;
    opacity: 0.6;
    border: none;
    margin: 0 4px;
}

.carousel-indicators .active {
    opacity: 1;
    width: 35px;
    background-color: #fff;
}

/* 手机端轮播图适配（防止标题挡住指示器） */
@media (max-width: 768px) {
    .carousel-item img {
        height: 250px; /* 稍微增高 */
    }
    .carousel-caption h5 {
        font-size: 0.95rem;
    }
    .carousel-caption {
        padding: 6px 15px;
        bottom: 45px; /* 上移标题，避开指示器 */
        width: 90%;
    }
}

/* ==========================================================================
   4. 通用组件样式
   ========================================================================== */
/* 栏目标题 */
.section-title {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.more-link {
    font-size: 0.85rem;
    color: #999;
    font-weight: normal;
}

/* 新闻列表 (带小圆点) */
.news-list li {
    border-bottom: 1px dashed #eee;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-list li a {
    display: flex;
    align-items: center;
    color: #444;
    transition: 0.3s;
    width: 75%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 实心小圆点 */
.news-list li a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.news-list li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.news-date {
    color: #999;
    font-size: 0.8rem;
    font-family: Arial, sans-serif;
}

/* 侧边栏卡片 */
.sidebar-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border-top: 3px solid var(--primary-color);
}

/* ==========================================================================
   5. 首页统计模块
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    text-align: center;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.stat-num {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
}

/* ==========================================================================
   6. 列表页样式 (List.html)
   ========================================================================== */
.article-card {
    transition: transform 0.2s;
    border: none;
    border-bottom: 1px solid #eee;
    background: #fff;
    margin-bottom: 15px;
    border-radius: 10px;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.date-box {
    background: #FFECD1;
    color: #d35400;
    padding: 8px 15px;
    border-radius: 8px;
    text-align: center;
    min-width: 80px;
}

.date-box .day {
    font-size: 1.4rem;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.date-box .year {
    font-size: 0.8rem;
}

/* ==========================================================================
   7. 文章内容页样式 (Article.html)
   ========================================================================== */
.article-container {
    background: #fff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    margin-top: 20px;
}

.article-meta {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    color: #888;
    font-size: 0.9rem;
    margin: 20px 0 30px 0;
    text-align: center;
}

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

.article-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* ==========================================================================
   8. 学校概况样式 (About.html)
   ========================================================================== */
.about-header {
    background: url('https://images.unsplash.com/photo-1503676260728-1c00da094a0b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80') no-repeat center center;
    background-size: cover;
    height: 350px;
    position: relative;
}

.overlay {
    background: rgba(255, 159, 67, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-box {
    background: #fff;
    padding: 50px;
    margin-top: -60px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   9. 留言板样式 (Guest.html)
   ========================================================================== */
.guest-form-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.comment-box {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border-left: 3px solid #eee;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.reply-box {
    background: #fdfdfd;
    border-left: 3px solid var(--primary-color);
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 5px 5px 0;
    font-size: 0.95rem;
}

/* 留言板上方提示框 */
.intro-alert {
    background-color: #FFF3E0;
    border-left: 5px solid var(--primary-color);
    color: #8d6e63;
}

/* ==========================================================================
   10. 底部 (Footer)
   ========================================================================== */
footer {
    background: #FFECD1;
    padding: 30px 0;
    margin-top: 40px;
    color: #666;
    border-top: 4px solid var(--secondary-color);
}

/* ==========================================================================
   6. 列表页样式 (List.html) - 修正与增强
   ========================================================================== */
.article-card {
    transition: transform 0.2s;
    border: none;
    border-bottom: 1px solid #eee;
    background: #fff;
    margin-bottom: 15px;
    border-radius: 10px;
    /* 确保布局对齐 */
    display: flex; 
    align-items: center; 
}

/* --- 核心修复：防止 flex 容器内文字溢出 --- */
/* 选择 .article-card 下的最后一个 div（即放标题和摘要的容器） */
.article-card > div:last-child {
    flex: 1;      /* 占据剩余空间 */
    min-width: 0; /* 【关键】允许容器缩小，从而触发 text-truncate 省略号 */
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.date-box {
    background: #FFECD1;
    color: #d35400;
    padding: 8px 15px;
    border-radius: 8px;
    text-align: center;
    min-width: 80px; /* 电脑端保持宽度 */
    flex-shrink: 0;  /* 防止日期框被挤压 */
}

.date-box .day {
    font-size: 1.4rem;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.date-box .year {
    font-size: 0.8rem;
}

/* --- 手机端单独优化 --- */
@media (max-width: 768px) {
    /* 1. 减小卡片整体内边距 (原本是 p-4) */
    .article-card {
        padding: 15px !important; 
    }
    
    /* 2. 缩小日期框，腾出更多空间给标题 */
    .date-box {
        min-width: 60px;      /* 宽度变小 */
        padding: 5px 8px;     /* 内边距变小 */
        margin-right: 12px !important; /* 减小与文字的间距 (原本是 me-4) */
    }
    .date-box .day { font-size: 1.1rem; }
    .date-box .year { font-size: 0.7rem; }
    
    /* 3. 调整标题和摘要的字号 */
    .article-card h5 { 
        font-size: 1rem; 
        margin-bottom: 4px !important;
    }
    .article-card p { 
        font-size: 0.85rem; 
    }
}

/* ==========================================================================
   11. 顶部搜索框样式 (Search Bar) - 新增
   ========================================================================== */
.search-form {
    position: relative;
    width: 100%;
    max-width: 240px; /* 电脑端限制宽度，显得精致 */
}

/* 输入框样式 */
.search-input {
    border-radius: 25px 0 0 25px !important; /* 左侧大圆角 */
    border: 1px solid #ffe0b2; /* 浅橙色边框 */
    background-color: #fffbf0; /* 极淡的暖色背景 */
    font-size: 0.9rem;
    padding-left: 18px;
    color: #666;
    transition: all 0.3s;
}

.search-input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.15); /* 聚焦时的柔和光晕 */
}

.search-input::placeholder {
    color: #bbb;
    font-size: 0.85rem;
}

/* 搜索按钮样式 */
.search-btn {
    border-radius: 0 25px 25px 0 !important; /* 右侧大圆角 */
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 6px 16px;
    transition: all 0.3s;
}

.search-btn:hover {
    background-color: var(--secondary-color); /* 悬停变为活泼红 */
    border-color: var(--secondary-color);
}

/* 手机端适配 */
@media (max-width: 991px) {
    .search-form {
        max-width: 100%; /* 手机端撑满 */
        margin-top: 15px;
        margin-bottom: 10px;
        padding: 0 5px; /* 两侧留点空隙 */
    }
}

/* ==========================================================================
   12. 侧边栏二维码样式 (Sidebar QR Codes) - 新增
   ========================================================================== */
.qr-row {
    margin-top: 15px;
    border-top: 1px dashed #ddd; /* 上方增加虚线分隔 */
    padding-top: 15px;
}

.qr-item img {
    width: 100%;       /* 宽度自适应列宽 */
    max-width: 100px;  /* 限制最大宽度，防止太大 */
    aspect-ratio: 1/1; /* 强制正方形 */
    background: #fff;  /* 白色背景 */
    padding: 5px;      /* 留白 */
    border: 1px solid #e0e0e0; /* 细边框 */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.qr-label {
    font-size: 0.75rem; /* 12px字体 */
    color: #666;
    margin-top: 5px;
    display: block;
}

/* ==========================================================================
   13. 首页-图片故事 (Picture Story) - 新增
   ========================================================================== */
.pic-story-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    margin-bottom: 20px;
    display: flex; /* 左右布局 */
    height: 180px; /* 固定高度 */
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

/* 左侧竖排标题 */
.pic-story-title-box {
    width: 60px;
    background-color: var(--primary-color); /* 暖橙色 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.pic-story-text {
    font-size: 1.2rem;
    font-weight: bold;
    writing-mode: vertical-lr; /* 竖排文字 */
    letter-spacing: 6px;       /* 字间距 */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 右侧滚动可视区域 */
.pic-story-viewport {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

/* 滚动的长条轨道 */
.pic-story-track {
    display: flex;
    /* 6张图片 * 200px宽 = 1200px，这里设置动画 */
    /* 这里的宽度需要足够容纳所有图片 */
    width: calc(220px * 12); 
    /* 动画时长20s，匀速，无限循环 */
    animation: scrollLeft 25s linear infinite; 
}

/* 每一组图片项 */
.pic-story-item {
    width: 200px; /* 每张图宽度 */
    height: 160px;
    margin: 10px; /* 上下左右间距 */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.pic-story-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.pic-story-item:hover img {
    transform: scale(1.1); /* 悬停放大效果 */
}

/* 标题蒙层 */
.pic-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5); /* 黑色半透明背景（灰色视觉） */
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 滚动动画关键帧 (向左移动，视觉效果就是图片由右向左出现，模拟轮询) 
   如果一定要“由左向右”移动，可以将 translateX 的值反过来，
   但通常轮播是让用户视线从左看到右，即内容向左走。
   这里按照通用的走马灯效果配置。
*/
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-220px * 6)); } /* 移动6个元素的距离 */
}

/* 鼠标悬停时暂停滚动，方便用户查看 */
.pic-story-track:hover {
    animation-play-state: paused;
}

  
/* 新增：仅在电脑端(lg屏幕)开启吸顶效果，防止手机端表单遮挡内容 */
@media (min-width: 992px) {
	.desktop-sticky {
		position: sticky;
		top: 100px;
		z-index: 1020;
	}
}

/* WordPress 正文 <blockquote> 样式 */
.article-content blockquote {
    position: relative;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem 1rem 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #fd720d;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.8;
}
.article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* 备案图标 */
.beian {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAACXlBMVEUAAADax4rGxqP556zmsVD/6KXu5JvwvFPglEFnY3nnpEjosU1+XFTmuVfu13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68efueLVvXLSqLXirCCBgDow1HT+GS/AP7srblLS+K5bIHCjmodpXUr929d+eaVb3SsuouQCHhufPjShsbJk/rrK2KW8hiBxRyVkvnkI9tnaDQJDNFOU1DDOjRMEfe9Mjpiewz5RIzZmmKMoPcKqGbkJqSkBSfnDqpXS+ACeRpJ76W/uSUpDlpLPFtfK5soLAKFbU05Odm4eblN7YWk4KEGWOIp62FgYCVsG84SAAAL7BaooX965sAAAAASUVORK5CYII=);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    vertical-align: -2px;   /* 让图标和文字对齐 */
    margin-right: 4px;
}

/* 文章内容区的所有 P 标签自动缩进2个汉字 */
.article-content p {
	text-indent: 2em;
}