/* ============================================
   兴业县城隍镇姓氏图文网络工作室 - 全站公共样式
   内容区 1400px / #4a6cf7 蓝色系 / 扁平化大气风格
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ---------- 顶部栏 ---------- */
.top-bar { background: #1a1a2e; color: #fff; font-size: 13px; padding: 8px 0; }
.top-bar .container { max-width: 1400px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.top-bar .date { opacity: 0.8; }
.top-bar .links a { color: #ccc; margin-left: 20px; transition: color 0.3s; }
.top-bar .links a:hover { color: #fff; }

/* ---------- 头部 ---------- */
.header { background: #fff; padding: 20px 0; border-bottom: 1px solid #e0e0e0; }
.header .container { max-width: 1400px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 15px; }
.logo-icon { width: 50px; height: 50px; background: #4a6cf7; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: bold; }
.logo-text h1 { font-size: 22px; color: #1a1a2e; margin-bottom: 3px; }
.logo-text p { font-size: 13px; color: #666; }

/* ---------- 导航 ---------- */
.nav { background: #4a6cf7; position: sticky; top: 0; z-index: 100; }
.nav .container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.nav ul { display: flex; }
.nav li { position: relative; }
.nav a { display: block; padding: 15px 25px; color: #fff; font-size: 15px; transition: background 0.3s; }
.nav a:hover, .nav li.active a { background: rgba(255,255,255,0.15); }

/* ---------- 主内容区（首页双栏） ---------- */
.main { max-width: 1400px; margin: 20px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 20px; }

/* ---------- 横幅 ---------- */
.banner { background: #4a6cf7; border-radius: 12px; padding: 40px; color: #fff; margin-bottom: 20px; text-align: center; }
.banner h2 { font-size: 28px; margin-bottom: 10px; }
.banner p { font-size: 16px; opacity: 0.9; }

/* ---------- 通用区块卡片 ---------- */
.panel { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #4a6cf7; }
.section-header h3 { font-size: 18px; color: #1a1a2e; display: flex; align-items: center; gap: 8px; }
.section-header .more { font-size: 13px; color: #4a6cf7; }
.section-header .more:hover { text-decoration: underline; }

/* ---------- 新闻列表 ---------- */
.news-list li { padding: 12px 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.news-list li:last-child { border-bottom: none; }
.news-list a { color: #333; font-size: 14px; transition: color 0.3s; display: flex; align-items: center; gap: 8px; }
.news-list a:hover { color: #4a6cf7; }
.news-list .tag { background: #e3f2fd; color: #1976d2; padding: 2px 8px; border-radius: 3px; font-size: 12px; flex-shrink: 0; }
.news-list .date { color: #999; font-size: 13px; }

/* ---------- 服务卡片（扁平化） ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.service-card { background: #fff; border-radius: 16px; padding: 35px 30px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s; border: 1px solid #f0f0f0; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.service-icon { width: 64px; height: 64px; background: #f5f7ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; color: #4a6cf7; font-size: 28px; }
.service-card h4 { font-size: 18px; margin-bottom: 10px; color: #1a1a2e; font-weight: 600; }
.service-card p { font-size: 14px; color: #888; line-height: 1.5; }

/* ---------- 工具网格（扁平化） ---------- */
.tools-section { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-item { background: #fff; border-radius: 12px; padding: 28px 20px; text-align: center; transition: all 0.3s; border: 1px solid #f0f0f0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.tool-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); border-color: #e0e0e0; }
.tool-item .icon { width: 48px; height: 48px; background: #f5f7ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: #4a6cf7; font-size: 22px; }
.tool-item span { font-size: 14px; color: #333; font-weight: 500; }

/* ---------- 侧边栏 ---------- */
.sidebar > div { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sidebar h4 { font-size: 16px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #4a6cf7; color: #1a1a2e; }
.notice-list li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.notice-list li:last-child { border-bottom: none; }
.notice-list a { font-size: 13px; color: #555; display: block; }
.notice-list a:hover { color: #4a6cf7; }
.notice-list .time { color: #999; font-size: 12px; margin-top: 3px; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tags a { background: #f0f0f0; padding: 5px 12px; border-radius: 20px; font-size: 12px; color: #555; transition: all 0.3s; }
.hot-tags a:hover { background: #4a6cf7; color: #fff; }
.contact-info p { font-size: 13px; color: #555; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* ---------- 内容页（单栏居中） ---------- */
.page-main { max-width: 1400px; margin: 20px auto; padding: 0 20px; }
.page-hero { background: #4a6cf7; border-radius: 12px; padding: 34px 40px; color: #fff; margin-bottom: 20px; }
.page-hero h2 { font-size: 26px; margin-bottom: 8px; }
.page-hero p { font-size: 15px; opacity: 0.92; }
.crumb { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 10px; }
.crumb a:hover { text-decoration: underline; }

.page-content { background: #fff; border-radius: 12px; padding: 34px 40px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.page-content h3 { font-size: 20px; color: #1a1a2e; margin: 26px 0 12px; padding-left: 12px; border-left: 4px solid #4a6cf7; }
.page-content h3:first-child { margin-top: 0; }
.page-content h4 { font-size: 16px; color: #1a1a2e; margin: 18px 0 8px; }
.page-content p { font-size: 15px; color: #444; margin-bottom: 12px; text-indent: 0; }
.page-content ul, .page-content ol { margin: 0 0 14px 22px; }
.page-content li { font-size: 15px; color: #444; margin-bottom: 8px; }
.page-content .note { background: #f5f7ff; border: 1px solid #e3e9ff; border-radius: 8px; padding: 12px 16px; font-size: 14px; color: #555; margin: 14px 0; }

/* 内容页图文块 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0; }

/* 案例卡片（内容页复用） */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 16px; }
.case-card { border: 1px solid #eee; border-radius: 14px; padding: 22px 24px; background: #fff; transition: all 0.3s; }
.case-card:hover { box-shadow: 0 8px 26px rgba(0,0,0,0.09); transform: translateY(-3px); border-color: #dde5ff; }
.case-card h4 { font-size: 16px; color: #1a1a2e; margin-bottom: 8px; }
.case-card p { font-size: 14px; color: #666; margin-bottom: 6px; }
.case-card .meta { font-size: 12px; color: #999; }

/* 资讯列表页条目 */
.article-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.article-item:last-child { border-bottom: none; }
.article-item h4 { font-size: 15px; color: #333; font-weight: 500; margin-bottom: 4px; }
.article-item h4 a:hover { color: #4a6cf7; }
.article-item p { font-size: 13px; color: #888; }
.article-item .date-box { text-align: center; background: #f5f7ff; border-radius: 10px; padding: 8px 14px; flex-shrink: 0; }
.article-item .date-box .d { font-size: 20px; color: #4a6cf7; font-weight: bold; line-height: 1.2; }
.article-item .date-box .m { font-size: 12px; color: #999; }

/* 文章正文（资讯详情复用） */
.article-body h3 { font-size: 22px; color: #1a1a2e; text-align: center; margin-bottom: 10px; border: none; padding: 0; }
.article-body .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #f0f0f0; }
.article-body p { text-indent: 2em; font-size: 15px; line-height: 1.9; color: #444; margin-bottom: 14px; }

/* ---------- 工具页 ---------- */
.tool-hero { background: #4a6cf7; border-radius: 12px; padding: 30px 40px; color: #fff; margin-bottom: 20px; }
.tool-hero h2 { font-size: 24px; margin-bottom: 6px; }
.tool-hero p { font-size: 14px; opacity: 0.92; }
.tool-box { background: #fff; border-radius: 12px; padding: 30px 34px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tool-box label { display: block; font-size: 14px; color: #555; margin-bottom: 8px; font-weight: 500; }
.tool-box textarea, .tool-box input[type="text"], .tool-box input[type="number"], .tool-box select {
    width: 100%; border: 1px solid #d9d9d9; border-radius: 8px; padding: 12px 14px; font-size: 14px;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #333; outline: none; transition: border-color 0.3s;
    background: #fafbfc;
}
.tool-box textarea:focus, .tool-box input:focus, .tool-box select:focus { border-color: #4a6cf7; background: #fff; }
.tool-box textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.tool-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; background: #4a6cf7; color: #fff; border: none; border-radius: 8px; padding: 11px 26px; font-size: 15px; cursor: pointer; transition: background 0.3s, transform 0.15s; }
.btn:hover { background: #3a5ce5; }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: #eef1ff; color: #4a6cf7; }
.btn.secondary:hover { background: #dfe6ff; }
.tool-actions { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.result-box { background: #f8f9fc; border: 1px solid #e8eaf0; border-radius: 8px; padding: 14px 16px; min-height: 48px; font-size: 14px; color: #333; margin-top: 8px; word-break: break-all; white-space: pre-wrap; line-height: 1.7; }
.result-box.primary { background: #f5f7ff; border-color: #dde5ff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 10px; }
.stat-card { background: #f8f9fc; border-radius: 10px; padding: 16px; text-align: center; }
.stat-card .num { font-size: 26px; color: #4a6cf7; font-weight: bold; }
.stat-card .lbl { font-size: 13px; color: #888; margin-top: 4px; }
.tool-tips { background: #fff; border-radius: 12px; padding: 22px 28px; margin-top: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tool-tips h4 { font-size: 15px; color: #1a1a2e; margin-bottom: 10px; padding-left: 10px; border-left: 4px solid #4a6cf7; }
.tool-tips li { font-size: 13px; color: #666; margin-bottom: 6px; list-style: disc; margin-left: 18px; }

/* 颜色拾取专用 */
.color-picker-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.color-preview { width: 130px; height: 130px; border-radius: 14px; border: 1px solid #e0e0e0; transition: background 0.3s; }

/* 图片压缩专用 */
.drop-zone { border: 2px dashed #c9d4ff; border-radius: 12px; padding: 40px 20px; text-align: center; color: #889; font-size: 14px; cursor: pointer; transition: all 0.3s; background: #fafbff; }
.drop-zone:hover, .drop-zone.drag { border-color: #4a6cf7; background: #f0f4ff; color: #4a6cf7; }

/* ---------- 页脚 ---------- */
.footer { background: #1a1a2e; color: #ccc; padding: 40px 0 20px; margin-top: 40px; }
.footer .container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 30px; }
.footer-col h5 { color: #fff; font-size: 15px; margin-bottom: 15px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #aaa; font-size: 13px; transition: color 0.3s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; font-size: 13px; }
.footer-bottom p { color: #ccc; line-height: 2; }
.footer-bottom a { color: #ccc; margin: 0 6px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .main { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .nav ul { flex-wrap: wrap; }
    .nav a { padding: 10px 15px; font-size: 14px; }
    .page-content { padding: 22px 18px; }
    .case-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .color-picker-row { flex-direction: column; }
}