/*!
 * Cleaning 主题补充样式
 *
 * 原设计样式位于 style.css，保持不变。本文件只处理 WordPress 原生元素
 * （正文、分页、评论、小工具、搜索表单等）以及表单提交状态。
 */

/* ---------- 可访问性 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: 0 0 10px 0;
  font-size: 14px;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--blue);
  display: block;
  font-size: 14px;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 14px 20px;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

/* ---------- 后台工具条 ---------- */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ---------- 表单：蜜罐与提交状态 ---------- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.form-msg.is-error {
  background: rgba(196, 66, 45, .07);
  border-color: rgba(196, 66, 45, .3);
  color: #a33a26;
}

/* ---------- 正文内容 ---------- */
.entry-content {
  max-width: 820px;
  font-size: 16px;
  line-height: 1.9;
  color: #374d56;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--ink);
  line-height: 1.35;
  margin: 34px 0 12px;
}
.entry-content h1 { font-size: 30px; }
.entry-content h2 {
  font-size: 23px;
  padding-left: 14px;
  border-left: 3px solid var(--amber);
}
.entry-content h3 { font-size: 19px; }
.entry-content h4 { font-size: 17px; }
.entry-content h5 { font-size: 15px; }
.entry-content h6 { font-size: 14px; color: var(--muted); }
.entry-content p { margin-bottom: 16px; }
.entry-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content a:hover { color: var(--teal); }
.entry-content ul,
.entry-content ol {
  margin: 0 0 18px;
  padding-left: 24px;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 8px; }
.entry-content li > ul,
.entry-content li > ol { margin: 8px 0 0; }
.entry-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--bg-soft);
  border-left: 3px solid var(--teal);
  border-radius: 0 12px 12px 0;
  font-size: 15.5px;
  color: #37505a;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14.5px;
}
.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
}
.entry-content th {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 600;
}
.entry-content img,
.entry-content video,
.entry-content iframe {
  max-width: 100%;
  height: auto;
}
.entry-content figure { margin: 24px 0; }
.entry-content figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.entry-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}
.entry-content code,
.entry-content pre {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13.5px;
}
.entry-content code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 6px;
}
.entry-content pre {
  background: var(--navy);
  color: #e8f2f4;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }

.entry-content .alignleft { float: left; margin: 6px 24px 16px 0; }
.entry-content .alignright { float: right; margin: 6px 0 16px 24px; }
.entry-content .aligncenter { display: block; margin: 24px auto; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text { font-size: 13px; color: var(--muted); }

.page-links {
  margin: 26px 0;
  font-size: 14px;
  color: var(--muted);
}
.page-links a,
.page-links > span:not(.page-links-title) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  margin-right: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.page-links a:hover { border-color: var(--teal); color: var(--blue); }
.page-links > span:not(.page-links-title) {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ---------- 锚点定位（避开固定页头） ---------- */
.service-detail[id],
[id^="case-"],
#booking,
#process {
  scroll-margin-top: 92px;
}

/* ---------- 浅色背景上的面包屑 ---------- */
.breadcrumb.breadcrumb--muted {
  color: var(--muted);
  margin-bottom: 26px;
}
.breadcrumb.breadcrumb--muted a { color: var(--blue); }
.breadcrumb.breadcrumb--muted a:hover { color: var(--teal); }

/* ---------- 正文 + 侧边栏 ---------- */
.content-layout { display: block; }
.content-layout.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}
.content-layout.has-sidebar .entry-content { max-width: none; }

/* ---------- 小工具 ---------- */
.sidebar .widget {
  margin-bottom: 22px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.sidebar .widget-title,
.sidebar .widget h5 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 14px;
}
.sidebar .widget ul {
  display: grid;
  gap: 10px;
  font-size: 14.5px;
}
.sidebar .widget a { color: #3a5058; }
.sidebar .widget a:hover { color: var(--blue); }
.sidebar .widget p { font-size: 14.5px; color: var(--body); }
.sidebar .widget select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.site-footer .widget { margin-bottom: 20px; }
.site-footer .widget-title,
.site-footer .widget h5 {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.site-footer .widget ul { display: grid; gap: 10px; font-size: 14px; }
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget a { color: rgba(255, 255, 255, .72); }
.site-footer .widget a:hover { color: #fff; }

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 44px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}
.pagination .page-numbers:hover { border-color: var(--teal); color: var(--blue); }
.pagination .page-numbers.current {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- 搜索 ---------- */
.search-panel { margin-bottom: 34px; max-width: 560px; }
.search-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.search-form .search-field {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-form .search-field:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28, 146, 164, .12);
}
.search-form .btn { flex: none; }

.none-found h2 { margin-top: 0; }

/* ---------- 评论 ---------- */
.comments-area {
  margin-top: 54px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: #374d56;
}
.comments-title,
.comment-reply-title {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 22px;
}
.comment-list {
  display: grid;
  gap: 20px;
  margin-bottom: 34px;
}
.comment-list .children {
  list-style: none;
  margin: 18px 0 0 0;
  padding-left: 26px;
  display: grid;
  gap: 18px;
}
.comment-body {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.comment-author { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.comment-author .avatar { border-radius: 50%; margin: 0; }
.comment-author .fn { font-style: normal; font-weight: 600; }
.comment-metadata { font-size: 12.5px; }
.comment-metadata a { color: var(--muted); }
.comment-content { font-size: 14.8px; line-height: 1.85; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 8px; font-size: 13px; }
.reply a { color: var(--blue); }
.comment-respond { margin-top: 10px; }
.comment-form { display: grid; gap: 14px; }
.comment-form label { font-size: 13px; font-weight: 600; color: #4a6069; }
.comment-form p { margin: 0; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28, 146, 164, .12);
}
.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.comment-form .comment-form-cookies-consent input { margin-top: 4px; }
.comment-form .submit {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.comment-form .submit:hover { background: var(--navy-2); border-color: var(--navy-2); }
.comment-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  font-size: 14px;
}
.comment-notes,
.logged-in-as { font-size: 13px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media screen and (max-width: 960px) {
  .content-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }
}

@media screen and (max-width: 620px) {
  .entry-content { font-size: 15.5px; }
  .entry-content h2 { font-size: 20px; }
  .search-form { flex-wrap: wrap; }
  .search-form .btn { width: 100%; }
  .comment-list .children { padding-left: 12px; }
}
