/* ==========================================================
   main.css — 泛荣官网全局自定义样式
   技术栈：Flask + Jinja2 + TailwindCSS CDN
   ========================================================== */

/* --- 表单蜜罐字段：屏幕外隐藏，正常用户看不到也不会填 --- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Section rhythm --- */
.section-pad {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
@media (max-width: 768px) {
  .section-pad {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* --- Full-width band (突破 base.html 的 max-w 容器限制) --- */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* --- Soft radial gradient atmosphere overlay (via ::before，不覆盖 bg-* 背景色) --- */
.band-soft {
  position: relative;
  overflow: hidden;
}
.band-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 10% 10%, rgba(52, 211, 153, .18), transparent 60%),
    radial-gradient(50% 35% at 90% 15%, rgba(56, 189, 248, .18), transparent 60%),
    radial-gradient(45% 35% at 20% 85%, rgba(217, 70, 239, .12), transparent 60%);
  pointer-events: none;
}

/* --- Icon badge (circular gradient bg behind FA icons) --- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(52, 211, 153, .18), rgba(56, 189, 248, .14));
}

/* --- Hover lift effect --- */
.lift {
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

/* --- Chip / tag badge --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 9999px;
  padding: .25rem .75rem;
  font-size: .75rem;
  line-height: 1.1rem;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .06);
}

/* --- Hide scrollbar (horizontal scroll areas) --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- Nav tagline (logo right side) --- */
.nav-tagline {
  font-size: 0.72rem;
  color: #064e3b;
  font-weight: 500;
  margin-left: 0.875rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-left: 0.875rem;
  border-left: 1px solid rgba(6, 78, 59, 0.2);
}
@media (max-width: 1279px) {
  /* 桌面菜单从 1024px 开始显示，但德文标语（44字符）在 1024-1279px 这段
     容易和菜单挤到一起甚至重叠，所以标语延后到 1280px 才出现，留够空间。 */
  .nav-tagline { display: none; }
}

/* --- Hero section (首页) --- */
.hero-slider {
  display: inline-block;
  vertical-align: middle;
  height: 1.15em;
  overflow-y: hidden;
  position: relative;
  /* 宽度不写死：让容器随当前语言里最长的那个词自适应，
     避免中文调好的固定宽度在英文/德文下把词裁断（比如德文
     Zuverlässig/Langfristig 明显比中文词长）。 */
}
.hero-slider-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.55s ease;
  will-change: transform;
}
.hero-word {
  display: block;
  height: 1.15em;
  line-height: 1.15em;
  font-weight: 650;
  letter-spacing: -0.01em;
}
#heroSection {
  display: block;
  margin: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  overflow: hidden;
  background: #f0f2f5;
  min-height: 54vh;
}
#heroImg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}
#heroContent {
  position: relative;
  z-index: 10;
  margin-left: auto;
  margin-right: auto;
  max-width: 72rem;
  padding: 4.5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#heroTextBlock {
  max-width: 485px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 1.25rem;
  padding: 2rem 1.8rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
@media (max-width: 639px) {
  #heroSection { min-height: unset; }
  #heroImg {
    position: static;
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center center;
    margin: 0;
  }
  #heroContent {
    padding: 2.5rem 1rem 1rem;
    flex-direction: column-reverse;
  }
  #heroTextBlock {
  width: fit-content;
  align-self: flex-start;
    max-width: 100%;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
}

/* --- 表单输入框在手机上的字号（联系表单等） ---
   Tailwind 的 text-sm 是 14px；iOS Safari 对小于 16px 的输入框会在
   聚焦时自动放大页面（体验很跳），这里只在手机宽度下把表单控件字号
   提到 16px，不影响桌面端设计稿的字号。 */
@media (max-width: 639px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="file"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* --- Tech page: process steps (工艺步骤卡片) --- */
.process-card {
  position: relative;
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.process-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .08);
  border-color: rgba(15, 23, 42, .1);
}
.process-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.process-index {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: #94a3b8;
}
.process-arrow {
  font-size: .8rem;
  color: #cbd5e1;
}
.process-card:last-child .process-arrow,
.process-arrow.is-final {
  color: #10b981;
}
.process-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  margin-top: .9rem;
  background: linear-gradient(135deg, rgba(52, 211, 153, .16), rgba(56, 189, 248, .12));
  color: #0f766e;
  font-size: 1.05rem;
}

/* --- Tech page: quality metric cards --- */
.metric-card {
  position: relative;
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(15, 23, 42, .06);
}
.metric-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .68rem;
  font-weight: 700;
}
.metric-value {
  margin-top: .85rem;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

/* --- Tech page: quality principle cards (与 metric-card 同语言，弱化边框降低阅读压力) --- */
.principle-card {
  background: #f8fafc;
  border-radius: 1.25rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(15, 23, 42, .04);
}
.principle-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, .12);
  color: #0f766e;
  font-size: .7rem;
  font-weight: 700;
}

/* --- FAQ accordion：展开时标题变色、图标旋转、内容淡入 --- */
.faq-item {
  transition: background-color .2s ease;
}
.faq-item[open] {
  background-color: #f0fdfa;
}
.faq-item summary {
  transition: color .18s ease;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item[open] summary .faq-q {
  color: #0f766e;
}
.faq-icon {
  transition: transform .25s ease, color .18s ease;
  color: #94a3b8;
}
.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: #0f766e;
}
.faq-item .faq-a {
  animation: faqFadeIn .25s ease;
}
@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Inquiry panel (联系页面 · 提交项目需求，可折叠) --- */
.inquiry-panel {
  transition: background-color .2s ease, box-shadow .2s ease;
}
.inquiry-summary {
  cursor: pointer;
  list-style: none;
}
.inquiry-summary::-webkit-details-marker {
  display: none;
}
.inquiry-title {
  transition: color .18s ease;
}
.inquiry-panel[open] {
  background-color: #fff;
  box-shadow: 0 20px 44px rgba(15, 23, 42, .06);
}
.inquiry-panel[open] .inquiry-title {
  color: #0f766e;
}
.inquiry-chevron {
  transition: transform .25s ease, color .18s ease;
  color: #94a3b8;
}
.inquiry-panel[open] .inquiry-chevron {
  transform: rotate(180deg);
  color: #0f766e;
}
.inquiry-body {
  animation: faqFadeIn .25s ease;
}
.inquiry-group + .inquiry-group {
  margin-top: 1.75rem;
}
.inquiry-group-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: .875rem;
}
.inquiry-banner {
  border: 1px solid transparent;
}
.inquiry-banner-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.inquiry-banner-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* --- Back button (返回按钮) — breadcrumb style --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
  margin-bottom: 1.25rem;
}
.back-btn i {
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.back-btn:hover {
  color: #334155;
}
.back-btn:hover i {
  transform: translateX(-2px);
}

/* --- 技术知识中心详情页：Markdown 正文渲染出来的排版 --- */
.knowledge-body {
  line-height: 1.85;
  color: #334155;
}
.knowledge-body h1,
.knowledge-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2rem 0 0.75rem;
  line-height: 1.4;
}
.knowledge-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1.75rem 0 0.6rem;
  line-height: 1.4;
}
.knowledge-body h1:first-child,
.knowledge-body h2:first-child,
.knowledge-body h3:first-child {
  margin-top: 0;
}
.knowledge-body p {
  margin: 0.9rem 0;
}
.knowledge-body ul,
.knowledge-body ol {
  margin: 0.9rem 0;
  padding-left: 1.4rem;
}
.knowledge-body ul {
  list-style: disc;
}
.knowledge-body ol {
  list-style: decimal;
}
.knowledge-body li {
  margin: 0.35rem 0;
}
.knowledge-body strong {
  color: #0f172a;
  font-weight: 700;
}
.knowledge-body a {
  color: #0369a1;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.knowledge-body blockquote {
  border-left: 3px solid #cbd5e1;
  padding-left: 1rem;
  color: #64748b;
  margin: 1rem 0;
}
.knowledge-body-summary {
  color: #0c4a6e;
}
.knowledge-body-summary p {
  margin: 0.4rem 0;
}
.knowledge-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}
.knowledge-body th,
.knowledge-body td {
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.knowledge-body th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}
