/*
Theme Name: 睿景装修设计
Description: 专注牙科诊所 / 口腔医院装修设计的轻量响应式 WordPress 主题。内置 SEO TDK 设置（后台可改标题描述关键词）、结构化数据、服务地区模板与移动端吸底电话条。
Author: 睿景装修设计
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: ruijing
*/

:root {
  --rj-primary: #0F766E;
  --rj-primary-dark: #0B5A54;
  --rj-primary-light: #E6F2F1;
  --rj-text: #1F2937;
  --rj-muted: #6B7280;
  --rj-line: #E5E7EB;
  --rj-bg: #FFFFFF;
  --rj-bg-alt: #F7FAF9;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--rj-text);
  background: var(--rj-bg);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rj-primary); text-decoration: none; }
a:hover { color: var(--rj-primary-dark); }

.rj-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.rj-header {
  background: #fff;
  border-bottom: 1px solid var(--rj-line);
  position: relative;
  z-index: 100;
}
.rj-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.rj-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--rj-text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.rj-logo:hover { color: var(--rj-text); }
.rj-logo img { max-height: 40px; width: auto; }
.rj-logo .rj-logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--rj-primary);
  color: #fff; font-size: 16px; line-height: 32px; text-align: center;
  flex: 0 0 auto;
}
.rj-logo small { font-size: 12px; color: var(--rj-muted); font-weight: 400; }

.site-nav ul { list-style: none; display: flex; gap: 28px; }
.site-nav a { color: var(--rj-text); font-size: 15px; padding: 6px 0; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--rj-primary); }

.rj-nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px;
}
.rj-nav-toggle span, .rj-nav-toggle span::before, .rj-nav-toggle span::after {
  display: block; width: 22px; height: 2px;
  background: var(--rj-text); position: relative; transition: all .2s;
  margin: 0 auto;
}
.rj-nav-toggle span::before { content: ""; position: absolute; top: -7px; left: 0; }
.rj-nav-toggle span::after { content: ""; position: absolute; top: 7px; left: 0; }
.rj-nav-toggle.open span { background: transparent; }
.rj-nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.rj-nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* ---------- 首页头图 ---------- */
.rj-hero {
  background: var(--rj-primary);
  color: #fff;
  padding: 90px 0;
  text-align: center;
}
.rj-hero h1 { font-size: 36px; line-height: 1.3; margin-bottom: 16px; }
.rj-hero p { font-size: 17px; opacity: .92; margin-bottom: 32px; }
.rj-btn {
  display: inline-block;
  background: #fff; color: var(--rj-primary);
  padding: 13px 34px; border-radius: 999px;
  font-size: 16px; font-weight: 500;
}
.rj-btn:hover { background: var(--rj-primary-light); color: var(--rj-primary-dark); }
.rj-btn-solid { background: var(--rj-primary); color: #fff; }
.rj-btn-solid:hover { background: var(--rj-primary-dark); color: #fff; }

/* ---------- 首页版块 ---------- */
.rj-section { padding: 64px 0; }
.rj-section.alt { background: var(--rj-bg-alt); }
.rj-section-title { text-align: center; margin-bottom: 40px; }
.rj-section-title h2 { font-size: 26px; margin-bottom: 8px; }
.rj-section-title p { color: var(--rj-muted); font-size: 15px; }

.rj-grid { display: grid; gap: 24px; }
.rj-grid-2 { grid-template-columns: repeat(2, 1fr); }
.rj-grid-3 { grid-template-columns: repeat(3, 1fr); }
.rj-grid-4 { grid-template-columns: repeat(4, 1fr); }

.rj-card {
  background: #fff; border: 1px solid var(--rj-line);
  border-radius: 12px; padding: 32px 26px; text-align: center;
  transition: box-shadow .2s;
}
.rj-card:hover { box-shadow: 0 6px 20px rgba(15,118,110,.10); }
.rj-card .rj-card-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  background: var(--rj-primary-light); color: var(--rj-primary);
  border-radius: 12px; font-size: 24px; line-height: 52px;
}
.rj-card h3 { font-size: 18px; margin-bottom: 8px; }
.rj-card p { color: var(--rj-muted); font-size: 14px; margin-bottom: 14px; }

/* 案例卡片 */
.rj-case-card {
  background: #fff; border: 1px solid var(--rj-line);
  border-radius: 12px; overflow: hidden;
}
.rj-case-card .rj-case-thumb {
  aspect-ratio: 4 / 3; background: var(--rj-primary-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--rj-primary); font-size: 13px;
}
.rj-case-card .rj-case-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rj-case-body { padding: 16px 18px; }
.rj-case-body h3 { font-size: 16px; margin-bottom: 6px; }
.rj-case-meta { font-size: 13px; color: var(--rj-muted); }
.rj-case-meta span { margin-right: 12px; }

/* 服务地区 */
.rj-area-box {
  background: #fff; border: 1px solid var(--rj-line); border-radius: 12px;
  padding: 28px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
}
.rj-area-box .rj-area-tag {
  background: var(--rj-primary-light); color: var(--rj-primary);
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
}

/* 流程 */
.rj-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; }
.rj-step { text-align: center; padding: 20px 8px; }
.rj-step .rj-step-num {
  width: 40px; height: 40px; margin: 0 auto 12px;
  background: var(--rj-primary); color: #fff; border-radius: 50%;
  font-size: 16px; line-height: 40px; font-weight: 500;
}
.rj-step h4 { font-size: 15px; margin-bottom: 4px; }
.rj-step p { font-size: 13px; color: var(--rj-muted); }

/* FAQ */
.rj-faq-item { background: #fff; border: 1px solid var(--rj-line); border-radius: 10px; padding: 18px 22px; margin-bottom: 14px; }
.rj-faq-item h3 { font-size: 16px; margin-bottom: 6px; }
.rj-faq-item p { color: var(--rj-muted); font-size: 14px; }

/* CTA */
.rj-cta {
  background: var(--rj-primary); color: #fff; text-align: center;
  padding: 56px 0;
}
.rj-cta h2 { font-size: 24px; margin-bottom: 10px; }
.rj-cta p { opacity: .9; margin-bottom: 24px; }
.rj-cta .rj-phone-big { font-size: 26px; font-weight: 700; color: #fff; display: inline-block; }

/* ---------- 内页 ---------- */
.rj-page-head {
  background: var(--rj-bg-alt); border-bottom: 1px solid var(--rj-line);
  padding: 40px 0;
}
.rj-page-head h1 { font-size: 26px; margin-bottom: 6px; }
.rj-breadcrumb { font-size: 13px; color: var(--rj-muted); }
.rj-breadcrumb a { color: var(--rj-muted); }
.rj-breadcrumb a:hover { color: var(--rj-primary); }

.rj-content { padding: 48px 0; }
.rj-entry { font-size: 16px; }
.rj-entry h2 { font-size: 22px; margin: 28px 0 12px; }
.rj-entry h3 { font-size: 18px; margin: 24px 0 10px; }
.rj-entry p, .rj-entry ul, .rj-entry ol { margin-bottom: 14px; }
.rj-entry ul, .rj-entry ol { padding-left: 22px; }
.rj-entry img { border-radius: 10px; margin: 16px 0; }
.rj-entry blockquote {
  border-left: 4px solid var(--rj-primary);
  background: var(--rj-primary-light);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 18px 0;
}

.rj-entry-meta { font-size: 13px; color: var(--rj-muted); margin-bottom: 24px; }

/* 案例详情 meta */
.rj-case-info {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.rj-case-info div {
  background: var(--rj-primary-light); color: var(--rj-primary-dark);
  padding: 8px 16px; border-radius: 8px; font-size: 14px;
}

/* 分页 */
.rj-pagination { margin-top: 32px; text-align: center; }
.rj-pagination .nav-links a, .rj-pagination .nav-links span {
  display: inline-block; padding: 8px 14px; margin: 0 4px;
  border: 1px solid var(--rj-line); border-radius: 8px; font-size: 14px;
}
.rj-pagination .nav-links .current { background: var(--rj-primary); color: #fff; border-color: var(--rj-primary); }

/* ---------- 页脚 ---------- */
.rj-footer {
  background: #14211F; color: #9FB5B2;
  padding: 48px 0 32px; margin-top: 0;
}
.rj-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.rj-footer a { color: #9FB5B2; }
.rj-footer a:hover { color: #fff; }
.rj-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.rj-footer ul { list-style: none; }
.rj-footer ul li { margin-bottom: 8px; font-size: 14px; }
.rj-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 20px; text-align: center; font-size: 13px;
}
.rj-footer-bottom a { color: #C7D6D4; }

/* ---------- 手机端吸底电话条 ---------- */
.rj-sticky-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  background: #fff; border-top: 1px solid var(--rj-line);
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.rj-sticky-bar a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 0; font-size: 16px; font-weight: 500;
}
.rj-sticky-bar .rj-sticky-tel { background: var(--rj-primary); color: #fff; }
.rj-sticky-bar .rj-sticky-wechat { color: var(--rj-primary); }
.rj-sticky-bar svg { width: 20px; height: 20px; }

.rj-wechat-popup {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5);
}
.rj-wechat-popup.open { display: flex; align-items: center; justify-content: center; }
.rj-wechat-popup .rj-popup-box {
  background: #fff; border-radius: 14px; padding: 28px;
  text-align: center; max-width: 320px; width: 86%;
}
.rj-popup-box h3 { font-size: 17px; margin-bottom: 12px; }
.rj-popup-box img { width: 180px; height: 180px; margin: 0 auto 12px; }
.rj-popup-box .rj-wechat-no { color: var(--rj-muted); font-size: 15px; margin-bottom: 16px; }
.rj-popup-close {
  display: inline-block; background: var(--rj-primary); color: #fff;
  padding: 10px 32px; border-radius: 999px; font-size: 15px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .rj-grid-3, .rj-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .rj-steps { grid-template-columns: repeat(2, 1fr); }
  .rj-footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .rj-nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--rj-line);
    padding: 10px 20px 16px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 12px 0; font-size: 16px; }

  .rj-hero { padding: 60px 0; }
  .rj-hero h1 { font-size: 26px; }
  .rj-hero p { font-size: 15px; }
  .rj-section { padding: 44px 0; }
  .rj-section-title h2 { font-size: 21px; }
  .rj-grid-2, .rj-grid-3, .rj-grid-4 { grid-template-columns: 1fr; }
  .rj-steps { grid-template-columns: 1fr 1fr; }
  .rj-cta h2 { font-size: 20px; }

  /* 吸底电话条：仅手机端显示，并给页脚留出空间 */
  .rj-sticky-bar { display: flex; }
  body { padding-bottom: 54px; }
  .rj-footer-cols { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .rj-steps { grid-template-columns: 1fr; }
  .rj-hero h1 { font-size: 23px; }
}
