/* ================================================================
   public.css — 前台基础页面布局治理
   作用域: .public-body
   治理范围: shell、header、footer、页面 hero、页面 intro、基础排版
   版本: 1.0.0 / CSS Governance Upgrade
   ================================================================ */

/* ================================================================
   1. Shell 容器
   统一前台页面主容器宽度，不采用 site.css 的 1320px 限制
   ================================================================ */
.public-body .shell {
  width: min(var(--front-shell-max), calc(100% - var(--front-shell-pad)));
  max-width: var(--front-shell-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 900px) {
  .public-body .shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ================================================================
   2. Section 间距
   板块之间的垂直间距治理，不要依赖 !important 的零散值
   ================================================================ */
.public-body .section {
  padding-top: var(--admin-section-space, 44px);
  padding-bottom: var(--admin-section-space, 44px);
}
.public-body .section.section-tint {
  background: #f8fafc;
}
.public-body .section.section-dark {
  background: #0a1929;
  color: #fff;
}

/* ================================================================
   3. 页面 Hero (非首页)
   用于内页 (services, industries, quality, about, contact 等)
   ================================================================ */
.public-body .page-hero {
  padding-top: 52px;
  padding-bottom: 40px;
  background: linear-gradient(180deg, #f0f5fc 0%, #fff 100%);
}

/* ================================================================
   2.5 内页 Banner 治理 — 缩小边距偏移
   ================================================================ */
.public-body .inner-page-banner-grid {
  padding: clamp(40px, 5vw, 60px) !important;
}
.public-body .inner-page-banner-side {
  justify-content: center !important;
  padding-right: 0;
}
.public-body .page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .public-body .page-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.public-body .page-hero-copy:not(.inner-page-banner-copy) h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #0f172a;
}
.public-body .page-hero-copy:not(.inner-page-banner-copy) p {
  font-size: 17px;
  color: #475569;
  line-height: 1.65;
  max-width: 560px;
}
.public-body .page-hero-copy .page-hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.public-body .page-hero-media img {
  width: 100%;
  border-radius: 24px;
  display: block;
}

/* ================================================================
   4. 页面 Intro
   用于 hero 下面的概述区域
   ================================================================ */
.public-body .page-intro {
  padding-top: 36px;
  padding-bottom: 24px;
}
.public-body .page-intro-inner {
  max-width: 820px;
}
.public-body .page-intro h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 14px;
  color: #0f172a;
}
.public-body .page-intro .rich-text {
  color: #475569;
  line-height: 1.75;
  font-size: 16px;
}

/* ================================================================
   5. Header 微调
   不覆盖 site.css 中已稳定的 header 结构，只做必要的治理
   ================================================================ */
/* 确保 header shell 与页面 shell 统一 */
.public-body .header-blueprint-shell {
}

/* ================================================================
   6. Footer 微调
   ================================================================ */
.public-body .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 48px;
}
@media (max-width: 860px) {
  .public-body .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}
@media (max-width: 520px) {
  .public-body .footer-grid {
    grid-template-columns: 1fr;
  }
}
.public-body .footer-grid h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  color: #94a3b8;
}
.public-body .footer-grid a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  padding: 3px 0;
  font-size: 14px;
  transition: color 0.15s ease;
}
.public-body .footer-grid a:hover {
  color: #fff;
}
.public-body .footer-sub-link {
  padding-left: 14px;
  font-size: 13px;
}
.public-body .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #64748b;
}

/* ================================================================
   7. 前台表单
   用于 inquiry 表单的前台样式
   ================================================================ */
.public-body .public-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.public-body .public-form label > span {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.public-body .public-form .req {
  color: #dc2626;
  font-style: normal;
}
.public-body .public-form input[type='text'],
.public-body .public-form input[type='email'],
.public-body .public-form input[type='search'],
.public-body .public-form input[type='file'],
.public-body .public-form select,
.public-body .public-form textarea {
  padding: 10px 14px;
  border: 1px solid rgba(20, 54, 102, 0.15);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.2s ease;
  font-family: inherit;
}
.public-body .public-form input:focus,
.public-body .public-form select:focus,
.public-body .public-form textarea:focus {
  border-color: var(--accent, #0b7cff);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 124, 255, 0.1);
}

/* ================================================================
   8. 通用微调
   ================================================================ */
/* 按钮基础样式 */
.public-body .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.public-body .btn-primary {
  background: var(--accent, #0b7cff);
  color: #fff;
  border-color: var(--accent, #0b7cff);
}
.public-body .btn-primary:hover {
  filter: brightness(1.1);
}
.public-body .btn-outline {
  background: transparent;
  border-color: rgba(20, 54, 102, 0.2);
  color: #153154;
}
.public-body .btn-outline:hover {
  background: rgba(11, 124, 255, 0.05);
  border-color: var(--accent, #0b7cff);
}
.public-body .btn-small {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* Section tag/badge */
.public-body .section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #0b7cff);
  background: rgba(11, 124, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

/* Muted copy */
.public-body .muted-copy {
  color: #64748b;
  line-height: 1.65;
}

/* Alert */
.public-body .alert {
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 14px;
}
.public-body .alert.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.public-body .alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ================================================================
   9. 错误页
   ================================================================ */
.public-body .public-error-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}
.public-body .public-error-shell {
  width: min(var(--front-shell-max), calc(100% - var(--front-shell-pad)));
  max-width: var(--front-shell-max);
  margin: 0 auto;
}
.public-body .public-error-card {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  border: 1px solid #dfe7f2;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 48px rgba(14,34,66,.08);
}
.public-body .public-error-card h1 {
  margin: 10px 0 12px;
  color: #11284a;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.public-body .public-error-card .muted-copy {
  max-width: 620px;
  font-size: 16px;
  margin: 0;
}
.public-body .public-error-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
@media (max-width: 640px) {
  .public-body .public-error-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
