/*
Theme Name: dowelmp
Theme URI: https://www.dowelmp.com/
Author: 道唯传播
Description: 道唯传播官网主题（WP重构 阶段3）——还原自 Astro 静态站蓝本，零框架零构建零插件依赖。主题色由 CSS 变量定义，阶段4 可后台切换。
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
*/

/* ========== 主题变量（阶段4 可切换） ========== */
:root {
  --brand-dark: #003366;   /* 深蓝：导航/页脚/标题 */
  --brand-main: #0066CC;   /* 亮蓝：强调/链接/按钮 */
  --brand-light: #E8F1F8;  /* 浅蓝：区块背景 */
  --bg-gray: #F5F5F5;      /* 辅助灰：页面背景 */
  --g50: #f9fafb; --g100: #f3f4f6; --g200: #e5e7eb; --g400: #9ca3af;
  --g500: #6b7280; --g600: #4b5563; --g800: #1f2937; --g900: #111827;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --font: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

/* ========== 基础 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-gray);
  color: var(--g800);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
main { flex: 1; width: 100%; }
.dw-container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ========== 顶部导航 ========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand-dark); box-shadow: var(--shadow-md);
}
.header-inner { display: flex; height: 80px; align-items: center; justify-content: space-between; }
.header-logo img { height: 56px; width: auto; }

.nav-desktop { display: none; }
.nav-desktop > ul { display: flex; align-items: center; }
.nav-desktop li { position: relative; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 14px; text-align: center; transition: background .2s;
}
.nav-item .cn { font-size: 15px; line-height: 1.25; color: #fff; }
.nav-item .en { font-size: 11px; line-height: 1.25; color: rgba(255,255,255,.6); }
.nav-desktop a:hover, .nav-desktop .nav-item.active { background: var(--brand-main); }

.dropdown {
  visibility: hidden; opacity: 0; position: absolute; left: 0; top: 100%; z-index: 50;
  min-width: 144px; background: var(--brand-dark); box-shadow: var(--shadow-md);
  transition: all .2s;
}
li:hover > .dropdown { visibility: visible; opacity: 1; }
.dropdown a {
  display: block; white-space: nowrap; padding: 10px 16px; font-size: 14px; color: #fff;
}
.dropdown a:hover { background: var(--brand-main); }

.menu-btn {
  display: block; background: none; border: 0; border-radius: 4px;
  padding: 8px; color: #fff; cursor: pointer;
}
.menu-btn:hover { background: var(--brand-main); }
.menu-btn svg { width: 24px; height: 24px; }

.mobile-menu { display: none; border-top: 1px solid rgba(255,255,255,.1); background: var(--brand-dark); }
.mobile-menu.open { display: block; }
.mobile-menu a { color: #fff; }
.mobile-menu .mm-item {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.1); padding: 12px 0;
}
.mobile-menu .mm-item .cn { font-weight: 500; }
.mobile-menu .mm-item .en { font-size: 12px; color: rgba(255,255,255,.5); }
.mobile-menu .mm-sub { background: rgba(0,0,0,.2); padding: 0 12px; }
.mobile-menu .mm-sub a { display: block; padding: 8px 0; font-size: 14px; color: #e5e7eb; }
.mobile-menu .mm-search { display: block; padding: 12px 0; }

/* ========== 首页轮播 ========== */
.hero { position: relative; height: 320px; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s;
}
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-mask { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--brand-dark) 80%, transparent), color-mix(in srgb, var(--brand-dark) 30%, transparent) 50%, transparent); }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 40px; margin: 0 auto;
  max-width: 896px; padding: 0 16px; text-align: center; color: #fff;
}
.hero-text h2 { font-size: 24px; font-weight: 700; line-height: 1.4; }
.hero-text p { margin: 16px auto 0; max-width: 672px; font-size: 14px; line-height: 1.5; color: #f3f4f6; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.3); color: #fff; cursor: pointer; font-size: 18px;
}
.hero-arrow:hover { background: rgba(0,0,0,.5); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 10;
  display: flex; gap: 8px;
}
.hero-dot {
  width: 10px; height: 10px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s;
}
.hero-dot:hover { background: #fff; }
.hero-dot.active { background: var(--brand-main); }

/* ========== 通用版块 ========== */
.section { padding: 56px 0; }
.section-white { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; }
.section-title {
  border-left: 4px solid var(--brand-main); padding-left: 12px;
  font-size: 24px; font-weight: 700; color: var(--brand-dark); line-height: 1.2;
}
.section-more { font-size: 14px; color: var(--brand-main); }
.section-more:hover { text-decoration: underline; }

/* 卡片网格 */
.card-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: #fff; border: 1px solid var(--g200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--g100); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb .thumb-fallback {
  display: flex; align-items: center; justify-content: center; height: 100%;
  background: var(--brand-light); font-size: 36px; font-weight: 700; color: var(--brand-main);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.card-title {
  font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--g900);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card-title { color: var(--brand-main); }
.card-summary {
  margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--g500);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--g100);
  display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--g400);
}
.card-meta .col { color: var(--brand-main); }

/* 会场卡片副信息 */
.venue-meta { margin-top: 4px; font-size: 12px; color: var(--g500); }
.venue-table { width: 100%; border-collapse: collapse; margin: 16px 0; background: #fff; }
.venue-table th, .venue-table td { border: 1px solid var(--g200); padding: 8px 12px; font-size: 14px; text-align: left; }
.venue-table th { background: var(--brand-light); color: var(--brand-dark); white-space: nowrap; width: 110px; }

/* 首页：关于道唯 + 四大服务 */
.about-grid { display: grid; gap: 40px; }
.about-text h2 { margin-bottom: 16px; }
.about-text p { line-height: 1.75; color: var(--g600); }
.btn-main {
  display: inline-block; margin-top: 20px; padding: 10px 20px;
  background: var(--brand-main); color: #fff; font-size: 14px; border-radius: 4px;
  border: 0; cursor: pointer; transition: opacity .2s;
}
.btn-main:hover { opacity: .9; }
.service-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.service-tile {
  background: #fff; border-radius: var(--radius); padding: 24px; text-align: center;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s;
}
.service-tile:hover { box-shadow: var(--shadow-md); }
.service-tile .icon {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand-main);
  font-size: 20px; font-weight: 700; line-height: 48px;
}
.service-tile h3 { font-weight: 600; color: var(--g900); }
.service-tile:hover h3 { color: var(--brand-main); }

/* 首页：联系条 */
.contact-bar { background: var(--brand-dark); padding: 48px 0; color: #fff; }
.contact-bar .inner {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 24px;
}
.contact-bar h2 { font-size: 24px; font-weight: 700; }
.contact-bar p { margin-top: 8px; color: #d1d5db; }
.contact-bar .btn-main { margin-top: 0; padding: 12px 32px; font-weight: 600; }

/* ========== 页脚 ========== */
.site-footer { background: var(--brand-dark); color: #d1d5db; }
.footer-top { padding-top: 40px; }
.footer-brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 24px;
}
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { max-width: 672px; font-size: 14px; line-height: 1.5; color: var(--g400); }
.footer-grid { display: grid; gap: 40px; padding: 32px 0; }
.footer-grid h3 { margin-bottom: 12px; font-size: 16px; font-weight: 600; color: #fff; }
.footer-grid li { font-size: 14px; line-height: 1.9; }
.footer-grid a:hover { color: #fff; }
.footer-contact .qr { margin-top: 16px; height: 96px; width: 96px; border: 1px solid rgba(255,255,255,.2); }
.footer-contact .qr-tip { margin-top: 4px; font-size: 12px; color: var(--g400); }
.footer-links ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.footer-bottom .inner {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px;
}
.footer-copy { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; color: var(--g400); }
.footer-copy a:hover { color: #fff; }
.footer-qual { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.footer-qual img { height: 36px; width: auto; }
@media (max-width: 767px) {
  .footer-qual img { max-width: calc(20% - 4px); height: auto; }
}

/* ========== 悬浮客服栏 ========== */
.float-sidebar {
  position: fixed; right: 12px; bottom: 96px; z-index: 40;
  display: none; flex-direction: column; gap: 8px;
}
.float-sidebar a, .float-sidebar button, .float-sidebar .fs-wx {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 4px; cursor: pointer;
}
.float-sidebar img { width: 24px; height: 24px; }
.fs-qq { background: #6da9de; } .fs-qq:hover { background: #488bc7; }
.fs-wx { background: #78c340; } .fs-wx:hover { background: #58a81c; }
.fs-phone { background: #fbb01f; } .fs-phone:hover { background: #ff811b; }
.fs-top { background: var(--brand-main); } .fs-top:hover { opacity: .9; }
.fs-tip {
  position: absolute; right: 100%; margin-right: 8px; white-space: nowrap;
  background: var(--g800); border-radius: 4px; padding: 4px 8px;
  font-size: 12px; color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.float-sidebar a:hover .fs-tip { opacity: 1; }
.fs-qr {
  position: absolute; right: 100%; margin-right: 8px; display: none;
  background: #fff; border-radius: 4px; padding: 8px; box-shadow: var(--shadow-md);
  pointer-events: none; width: 128px;
}
.fs-wx:hover .fs-qr { display: block; }
.fs-qr img { width: 112px; height: 112px; max-width: none; display: block; }

/* ========== 列表/详情页（M3 完善样式） ========== */
.page-banner { background: var(--brand-light); padding: 32px 0; }
.page-banner h1 { font-size: 26px; font-weight: 700; color: var(--brand-dark); }
.page-banner .crumb { margin-top: 6px; font-size: 13px; color: var(--g500); }
.page-banner .crumb a:hover { color: var(--brand-main); }
.archive-list { padding: 32px 0; }
.pagination { margin: 32px 0 8px; text-align: center; font-size: 14px; }
.pagination .page-numbers {
  display: inline-block; margin: 0 3px; padding: 6px 14px;
  border: 1px solid var(--g200); background: #fff; color: var(--g600); border-radius: 4px;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
  background: var(--brand-main); border-color: var(--brand-main); color: #fff;
}

.single-wrap { padding: 40px 0; }
.single-title { font-size: 28px; font-weight: 700; color: var(--g900); line-height: 1.4; }
.single-meta { margin: 12px 0 24px; font-size: 13px; color: var(--g400); display: flex; gap: 16px; flex-wrap: wrap; }
.single-thumb img { border-radius: var(--radius); margin: 0 0 24px; }
.entry-content { background: #fff; border-radius: var(--radius); padding: 24px; line-height: 1.8; color: var(--g800); overflow-wrap: break-word; }
.entry-content p, .entry-content td, .entry-content th { overflow-wrap: anywhere; } /* 旧站正文含长串&nbsp;，允许任意断行防撑破 */
.entry-content img { margin: 12px auto; }
.entry-content p { margin: 12px 0; }
.entry-content h2, .entry-content h3 { margin: 20px 0 10px; color: var(--g900); }
.entry-content a { color: var(--brand-main); }
.entry-content table { border-collapse: collapse; max-width: 100%; }
.entry-content table td, .entry-content table th { border: 1px solid var(--g200); padding: 6px 10px; }
.entry-content ul, .entry-content ol { padding-left: 24px; list-style: revert; }
.entry-content blockquote { border-left: 4px solid var(--brand-main); background: var(--brand-light); padding: 12px 16px; margin: 12px 0; color: var(--g600); }
.views-count { color: var(--g400); }

/* 搜索表单 */
.search-form { display: flex; max-width: 420px; }
.search-form input[type="search"] {
  flex: 1; padding: 8px 12px; border: 1px solid var(--g200); border-right: 0; outline: none; font-family: var(--font);
}
.search-form button { padding: 8px 20px; background: var(--brand-main); color: #fff; border: 0; cursor: pointer; }

/* ========== 响应式 ========== */
@media (min-width: 640px) {
  .hero { height: 420px; }
  .hero-text h2 { font-size: 30px; }
  .hero-text p { font-size: 16px; }
  .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-links ul { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { flex-direction: row; align-items: center; }
  .footer-bottom .inner { flex-direction: row; }
  .footer-copy { flex-direction: row; gap: 12px; }
  .contact-bar .inner { flex-direction: row; }
}
@media (min-width: 1024px) {
  .hero { height: 520px; }
  .hero-text h2 { font-size: 36px; }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .nav-desktop { display: block; }
  .menu-btn { display: none; }
  .mobile-menu { display: none !important; }
  .float-sidebar { display: flex; }
}

/* ========== 内页：面包屑 / 两栏布局 / 侧栏（M3） ========== */
.breadcrumb-bar { background: #fff; border-bottom: 1px solid var(--g200); }
.breadcrumb-bar .dw-container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px; font-size: 14px; color: var(--g500);
}
.breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand-main); }
.breadcrumb .cur { color: var(--g600); }
.breadcrumb .sep { color: var(--g400); }

.layout-two { display: grid; gap: 32px; padding: 40px 0; grid-template-columns: minmax(0,1fr); }
.main-col { min-width: 0; }
.page-title-lg {
  border-left: 4px solid var(--brand-main); padding-left: 12px; margin-bottom: 24px;
  font-size: 24px; font-weight: 700; color: var(--brand-dark); line-height: 1.2;
}
.empty-tip { color: var(--g500); }

/* 侧栏 */
.aside-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.aside-title {
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--brand-main);
  font-size: 16px; font-weight: 700; color: var(--brand-dark);
}
.aside-nav a {
  display: block; border-radius: 4px; padding: 6px 8px; font-size: 14px; color: var(--g600);
}
.aside-nav a:hover { background: var(--brand-light); }
.aside-nav a.active { background: var(--brand-main); color: #fff; }
.aside-contact { background: var(--brand-dark); border-radius: var(--radius); padding: 20px; color: #fff; box-shadow: var(--shadow-sm); }
.aside-contact h3 { margin-bottom: 8px; font-size: 16px; font-weight: 700; }
.aside-contact ul { font-size: 14px; line-height: 1.9; color: #e5e7eb; }
.aside-contact .btn-main { margin-top: 12px; padding: 8px 16px; }

/* 详情页 */
.detail-title { font-size: 24px; font-weight: 700; line-height: 1.4; color: var(--brand-dark); margin-bottom: 12px; }
.detail-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--g200);
  font-size: 14px; color: var(--g400);
}
.detail-thumb img { display: block; margin: 0 auto 24px; max-height: 384px; width: auto; border-radius: var(--radius); }
.summary-box { margin-top: 32px; background: var(--g50); border-radius: 4px; padding: 16px; font-size: 14px; color: var(--g500); }
.summary-box .lab { font-weight: 500; color: var(--g600); }
.back-link { display: inline-block; margin-top: 32px; font-size: 14px; color: var(--brand-main); }
.back-link:hover { text-decoration: underline; }
.map-box { margin-top: 32px; border: 1px solid var(--g200); border-radius: var(--radius); padding: 20px; }
.map-box h2 { margin-bottom: 16px; font-size: 18px; font-weight: 700; color: var(--brand-dark); }
.map-box .placeholder { background: var(--g50); border-radius: 4px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.map-box .placeholder p { font-size: 14px; color: var(--g600); }

@media (min-width: 1024px) {
  .layout-two { grid-template-columns: minmax(0,1fr) 280px; }
  .detail-title { font-size: 30px; }
  .page-title-lg { font-size: 30px; }
}
