/* ============================================================
 * 《白石岭没有下线》 — css/website.css
 * 白石岭村在线 — 村委会官方网站（PHASE 01）
 * 2006年中国乡镇政府官网风格：固定宽度 / 红渐变横幅 / 浅蓝导航 /
 * 左右两栏 / 深蓝底部 / 星形访问计数器
 * 严格参考 IMG_020.jpg 设计
 * ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #e8ecf2;
    font-family: "SimSun", "宋体", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
}

/* 页面加载极简淡入（0.2秒，符合动画纪律） */
body {
    animation: siteFadeIn 0.2s ease-out;
}

@keyframes siteFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- 固定宽度主容器 ---------- */
.site-wrap {
    width: 824px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #c0c8d4;
    border-top: none;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================================
 * 顶部横幅：红色到暗红渐变 + 白色五角星装饰
 * ============================================================ */
.site-banner {
    position: relative;
    height: 92px;
    background: linear-gradient(180deg, #e83030 0%, #c01e1e 45%, #9a1010 80%, #7a0a0a 100%);
    overflow: hidden;
}

/* 白色五角星装饰 */
.site-banner .star {
    position: absolute;
    color: rgba(255, 255, 255, 0.85);
    font-size: 22px;
    line-height: 1;
}
.site-banner .star.s1 { top: 10px; left: 24px; }
.site-banner .star.s2 { top: 34px; left: 58px; font-size: 16px; }
.site-banner .star.s3 { top: 12px; right: 26px; }
.site-banner .star.s4 { top: 36px; right: 60px; font-size: 16px; }
.site-banner .star.s5 { bottom: 8px; left: 42%; font-size: 14px; }

.banner-title {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffffff;
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 6px;
    text-shadow: 2px 2px 0 rgba(90, 0, 0, 0.75);
}

.banner-subtitle {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffe9a8;
    font-size: 14px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 rgba(90, 0, 0, 0.8);
}

/* ============================================================
 * 导航栏：浅蓝色背景、白色文字链接
 * ============================================================ */
.site-nav {
    min-height: 30px;
    background: linear-gradient(180deg, #5a9de0 0%, #3f85cd 50%, #2f74bd 100%);
    border-top: 1px solid #7ab3e8;
    border-bottom: 1px solid #1c5c9c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;          /* 放不下时整行换行，每项保持单行 */
    padding: 2px 0;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 14px;
    text-shadow: 1px 1px 1px rgba(0, 40, 90, 0.6);
    white-space: nowrap;      /* 核心：禁止文字折行 */
    flex-shrink: 0;           /* 核心：禁止被 flex 压缩 */
    border-right: 1px solid rgba(255, 255, 255, 0.2);  /* 导航项分隔线 */
}

.site-nav a:last-child {
    border-right: none;
}

/* 链接悬停：下划线出现 */
.site-nav a:hover {
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.15);
}

.site-nav a.current {
    font-weight: bold;
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.22);
}

/* ============================================================
 * 主体：左右两栏
 * ============================================================ */
.site-main {
    display: flex;
    min-height: 420px;
}

/* ---------- 左栏（宽）：白色背景 ---------- */
.site-left {
    flex: 1;
    background: #ffffff;
    padding: 14px 16px;
    border-right: 1px solid #d8dde5;
}

.left-title {
    font-size: 17px;
    font-weight: bold;
    color: #a41414;
    border-left: 4px solid #c01e1e;
    padding-left: 8px;
    margin-bottom: 10px;
}

.left-content {
    font-size: 14px;
    line-height: 1.8;
    text-indent: 2em;
}

.left-content img {
    max-width: 100%;
    border: 1px solid #ccc;
    margin: 10px 0;
    display: block;
}

.photo-caption {
    font-size: 12px;
    color: #777;
    text-align: center;
    text-indent: 0;
    margin: -6px 0 10px;
}

/* ---------- 村庄简介图片（老式"照片贴纸"风格） ----------
 * 左栏为 flex 自适应布局，展示宽度 ≥620px，给图片留足空间。 */
.left-content img.village-intro-img,
.site-left img.village-intro-img {
    width: 340px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto 14px auto;   /* 上下留白 10/14px，水平居中 */
    border: 2px solid #d4d0c8;    /* 老式灰边 */
    padding: 4px;                 /* 白色内边距 */
    background: #fefefe;
    box-sizing: border-box;       /* 340px 含边框与内边距 */
}

/* 图片下方说明文字（居中 / 宋体 12px / 灰色） */
.img-caption {
    text-align: center;
    font-size: 12px;
    color: #888888;
    font-family: SimSun, "宋体", serif;
    text-indent: 0;
    margin: -6px 0 16px 0;
    letter-spacing: 1px;
}

/* 新闻列表 */
.news-list {
    list-style: none;
}

.news-list li {
    padding: 7px 0;
    border-bottom: 1px dashed #d0d6df;
    font-size: 14px;
}

.news-list li .date {
    color: #888;
    font-size: 12px;
    margin-right: 8px;
}

.news-list li a {
    color: #1a4f9e;
    text-decoration: none;
}

.news-list li a:hover {
    text-decoration: underline;
}

/* 公告区 */
.notice-box {
    background: #fffbe8;
    border: 1px solid #e8d488;
    padding: 8px 12px;
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.7;
}

/* ---------- 右栏（窄）：浅灰/淡紫背景 ---------- */
.site-right {
    width: 200px;
    background: linear-gradient(180deg, #efeaf6 0%, #e6e0f0 60%, #e0d9ec 100%);
    padding: 12px 12px;
    font-size: 13px;
    line-height: 1.7;
}

.side-box {
    margin-bottom: 14px;
}

.side-title {
    font-size: 14px;
    font-weight: bold;
    color: #4a2a8a;
    border-bottom: 1px solid #c4b8d8;
    padding-bottom: 3px;
    margin-bottom: 6px;
}

.contact-table td {
    padding: 1px 0;
    vertical-align: top;
}

.contact-table td.k {
    color: #66558a;
    width: 56px;
}

/* 站内搜索框（仅UI） */
.search-box {
    display: flex;
    gap: 4px;
}

.search-box input {
    flex: 1;
    height: 22px;
    border: 1px solid #9aa4b0;
    padding: 0 6px;
    font-family: inherit;
    font-size: 12px;
}

.search-box button {
    height: 22px;
    padding: 0 8px;
    border: 1px solid #5a6a8a;
    background: linear-gradient(180deg, #e8ecf4, #c8d0dc);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* 天气预报 */
.weather-today {
    font-size: 13px;
}
.weather-today .w-date {
    color: #66558a;
}

/* 网站统计 */
.stat-row {
    display: flex;
    justify-content: space-between;
}

.stat-row .n {
    color: #a41414;
    font-weight: bold;
}

/* ============================================================
 * 底部：深蓝色背景、白色文字、星形计数器
 * ============================================================ */
.site-footer {
    background: linear-gradient(180deg, #24428a 0%, #1a3068 60%, #12244e 100%);
    color: #ffffff;
    text-align: center;
    padding: 12px 10px 10px;
    font-size: 12px;
    line-height: 1.9;
    border-top: 1px solid #3a5aa8;
}

.footer-copy {
    font-size: 13px;
    letter-spacing: 1px;
}

/* 星形访问计数器：★00123456★ */
.star-counter {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 12px;
    background: #0a1630;
    border: 1px solid #4a6ab0;
    color: #ffd75e;
    font-size: 14px;
    letter-spacing: 2px;
    font-family: "SimSun", monospace;
}

/* 返回桌面链接 */
.back-desktop {
    display: inline-block;
    margin-top: 8px;
    color: #9ab4e8;
    text-decoration: none;
}
.back-desktop:hover {
    text-decoration: underline;
    color: #fff;
}

/* 子页面正文 */
.page-body {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.9;
}

.page-body p {
    text-indent: 2em;
    margin-bottom: 8px;
}

.page-body img {
    max-width: 100%;
    border: 1px solid #ccc;
    margin: 8px auto;
    display: block;
}

.contact-info-box {
    border: 1px solid #c8d0dc;
    background: #f4f6fa;
    padding: 12px 16px;
    margin: 10px 0;
    line-height: 2;
}

/* ---------- 村民风采（PHASE 02） ---------- */
.profile-card {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid #d8dde5;
    background: #fafbfd;
}

.profile-card-group {
    margin-top: 22px;
    border-color: #e0c8c0;
    background: #fdfaf7;
}

.profile-photo {
    flex: 0 0 132px;
}

.profile-photo img {
    width: 132px;
    height: 99px;
    object-fit: cover;
    border: 1px solid #b8c0cc;
    display: block;
}

.profile-photo-wide img {
    width: 220px;
    height: 165px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 17px;
    font-weight: bold;
    color: #a41414;
    margin-bottom: 6px;
}

.profile-desc {
    font-size: 14px;
    line-height: 1.9;
    color: #444;
    text-indent: 0;
}

/* 降级友好：减少动效 */
@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
    }
}

/* 优化包：小屏适配（≤1024px 不溢出，保持 2006 固定布局审美） */
@media (max-width: 1024px) {
    .site-wrap { width: auto; max-width: 824px; margin-left: 8px; margin-right: 8px; }
}
